/* Pak Afghan: contact section (#contact), "Write to us".
   Markup is rendered by assets/js/contact.js. Shared tokens come from styles.css, each with a fallback. */

/* ---------- Section tokens and shell ---------- */

#contact {
  --ct-ink-950: var(--ink-950, #0b0a08);
  --ct-ink-900: var(--ink-900, #12100d);
  --ct-ivory: var(--ivory, #f3ecdf);
  --ct-muted: var(--ivory-muted, #bdb3a2);
  --ct-gold-200: var(--gold-200, #f1e2b8);
  --ct-gold-400: var(--gold-400, #d8b56d);
  --ct-emerald-400: var(--emerald-400, #3aa874);
  --ct-ember: var(--ember-500, #e8742a);
  --ct-error: #f2a27c;
  --ct-display: var(--font-display, 'Cormorant Garamond', 'Iowan Old Style', 'Times New Roman', serif);
  --ct-body: var(--font-body, 'Jost', 'Avenir Next', system-ui, sans-serif);
  --ct-ease: var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  --ct-ease-io: var(--ease-in-out, cubic-bezier(.65, 0, .35, 1));
  --ct-gutter: var(--gutter, clamp(16px, 4vw, 56px));
  --ct-container: var(--container, 1320px);
  --ct-pad: var(--section-pad, clamp(64px, 10vw, 168px));
  --ct-shadow: var(--shadow-deep, 0 40px 120px rgb(0 0 0 / .55));
  --ct-hair: rgb(216 181 109 / .28);
  --ct-hair-soft: rgb(216 181 109 / .15);
  --ct-field: rgb(243 236 223 / .035);
  --ct-foil: linear-gradient(100deg, #c9a052 0%, #f1e2b8 28%, #d8b56d 52%, #f6e7bf 74%, #c9a052 100%);
  --ct-sheen: linear-gradient(105deg, transparent 40%, rgb(255 250 236 / .95) 50%, transparent 60%);
  --ct-jali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d8b56d' stroke-width='.8'%3E%3Cpath d='M40 22l5.27 5.27h7.46v7.46L58 40l-5.27 5.27v7.46h-7.46L40 58l-5.27-5.27h-7.46v-7.46L22 40l5.27-5.27v-7.46h7.46z'/%3E%3Cpath d='M40 0v22M40 58v22M0 40h22M58 40h22M52.73 27.27 80 0M27.27 27.27 0 0M52.73 52.73 80 80M27.27 52.73 0 80'/%3E%3C/g%3E%3C/svg%3E");
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  padding-block: calc(var(--ct-pad) * .7) var(--ct-pad);
  color: var(--ct-ivory);
  font-family: var(--ct-body);
  background:
    radial-gradient(50% 40% at 72% 38%, rgb(232 116 42 / .07), transparent 72%),
    var(--ct-ink-950);
}

#contact * { box-sizing: border-box; }

/* faint lattice behind the card */
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ct-jali) 0 0 / 88px 88px;
  opacity: .045;
  -webkit-mask-image: radial-gradient(46% 52% at 70% 50%, #000, transparent 80%);
  mask-image: radial-gradient(46% 52% at 70% 50%, #000, transparent 80%);
  pointer-events: none;
}

.ct-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ct-wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.2vw, 36px);
  align-items: start;
  width: min(100% - 2 * var(--ct-gutter), var(--ct-container));
  margin-inline: auto;
}

.ct-icon {
  flex: none;
  width: 18px;
  height: 18px;
}

/* ---------- Side column: heading and "prefer to talk?" ---------- */

.ct-side { grid-column: 1 / span 5; }

.ct-eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.5rem;
  font: 500 .75rem/1.3 var(--ct-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ct-gold-400);
}

.ct-eyebrow::after {
  content: '';
  flex: 0 0 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--ct-gold-400), transparent);
  transform-origin: 0 50%;
}

.ct-eyebrow__star {
  width: 11px;
  height: 11px;
}

.ct-title {
  margin: 0;
  font-family: var(--ct-display);
  font-size: clamp(2.8rem, 1.5rem + 5vw, 6.5rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.015em;
  color: var(--ct-ivory);
  text-wrap: balance;
}

.ct-line {
  display: block;
  overflow: hidden;
  margin-bottom: -.12em;
  padding: 0 .12em .12em 0;
}

.ct-line__in { display: block; }

/* the gold italic word, crossed once by a sheen as it appears */
.ct-foil {
  font-style: italic;
  color: var(--ct-gold-200);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ct-foil {
    padding-right: .1em;
    margin-right: -.1em;
    background: var(--ct-sheen) 0 0 / 300% 100% no-repeat, var(--ct-foil);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.ct-lede {
  max-width: 31rem;
  margin: 1.6rem 0 0;
  font: 400 clamp(1.03rem, .98rem + .25vw, 1.16rem)/1.7 var(--ct-body);
  color: var(--ct-muted);
  text-wrap: pretty;
}

.ct-talk {
  display: grid;
  justify-items: start;
  gap: .5rem;
  max-width: 31rem;
  margin-top: clamp(32px, 3.6vw, 52px);
  padding-top: clamp(22px, 2.4vw, 30px);
  border-top: 1px solid var(--ct-hair-soft);
}

.ct-talk__label {
  margin: 0;
  font: 500 .75rem/1.3 var(--ct-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ct-gold-400);
}

.ct-talk__phone {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font: 400 clamp(2.2rem, 1.6rem + 2vw, 3.4rem)/1.1 var(--ct-display);
  font-variant-numeric: lining-nums;
  letter-spacing: .01em;
  color: var(--ct-ivory);
  text-decoration: none;
  background: linear-gradient(90deg, var(--ct-gold-400), var(--ct-gold-400)) 0 92% / 0 1px no-repeat;
  transition: color .35s var(--ct-ease), background-size .6s var(--ct-ease);
}

.ct-status {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin: .1rem 0 .3rem;
  font: 500 .8rem/1.3 var(--ct-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ct-gold-200);
}

.ct-status__dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ct-gold-400);
}

.ct-status.is-open { color: #7fd3a6; }

.ct-status.is-open .ct-status__dot {
  background: var(--ct-emerald-400);
  box-shadow: 0 0 10px rgb(58 168 116 / .7);
}

.ct-talk__addr {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: .5rem 0 0;
  font: 400 1rem/1.5 var(--ct-body);
  color: var(--ct-muted);
}

.ct-talk__addr .ct-icon {
  margin-top: .15rem;
  color: var(--ct-gold-400);
}

.ct-talk__dir {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  font: 500 .8rem/1.3 var(--ct-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ct-gold-200);
}

.ct-icon--next {
  width: 24px;
  height: 11px;
  transition: transform .5s var(--ct-ease);
}

/* ---------- The form card ---------- */

.ct-card {
  --ct-card-pad: clamp(24px, 3.6vw, 56px);
  position: relative;
  isolation: isolate;
  grid-column: 6 / -1;
  padding: var(--ct-card-pad);
  border: 1px solid rgb(216 181 109 / .5);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(232 116 42 / .1), transparent 58%),
    var(--ct-ink-900);
  box-shadow: var(--ct-shadow);
}

/* double hairline frame: the inner line sits 9px in */
.ct-card::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgb(216 181 109 / .24);
  pointer-events: none;
}

/* faint jali under the fields */
.ct-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ct-jali) 0 0 / 72px 72px;
  opacity: .035;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  pointer-events: none;
}

/* a soft ember light along the top edge */
.ct-card__glow {
  position: absolute;
  top: -1px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ct-gold-200), transparent);
  box-shadow: 0 0 18px 2px rgb(232 150 70 / .35);
  pointer-events: none;
}

/* khatam stars on the inner frame's corners */
.ct-corner {
  position: absolute;
  width: 19px;
  height: 19px;
  color: var(--ct-gold-400);
  pointer-events: none;
}

.ct-corner svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--ct-ink-900);
  stroke: currentColor;
  stroke-width: 1.6;
}

/* each star is centred on a corner of the inner frame (9px in) */
.ct-corner--tl,
.ct-corner--tr { top: 0; }

.ct-corner--bl,
.ct-corner--br { bottom: 0; }

.ct-corner--tl,
.ct-corner--bl { left: 0; }

.ct-corner--tr,
.ct-corner--br { right: 0; }

.ct-form {
  container: ct-form / inline-size;
  display: grid;
  gap: clamp(20px, 2.2vw, 28px);
}

/* labels and fields */
.ct-label {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: 0 0 .6rem;
  padding: 0;
  font: 500 .75rem/1.3 var(--ct-body);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ct-gold-400);
}

.ct-optional {
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: none;
  color: var(--ct-muted);
}

.ct-field { min-width: 0; }

.ct-control { position: relative; }

/* light drawn along the lower edge of the focused field */
.ct-control::after {
  content: '';
  position: absolute;
  right: 10%;
  bottom: 0;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ct-gold-200), transparent);
  transform: scaleX(0);
  transition: transform .9s var(--ct-ease);
  pointer-events: none;
}

.ct-control:focus-within::after { transform: scaleX(1); }

.ct-input {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: .8rem 1rem;
  border: 1px solid rgb(216 181 109 / .3);
  border-radius: 2px;
  background: var(--ct-field);
  color: var(--ct-ivory);
  font: 400 1rem/1.45 var(--ct-body);
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  transition: border-color .35s var(--ct-ease), background-color .35s var(--ct-ease), box-shadow .45s var(--ct-ease);
}

.ct-input:focus {
  outline: none;
  border-color: var(--ct-gold-400);
  background-color: rgb(243 236 223 / .055);
  box-shadow: 0 0 26px rgb(216 181 109 / .22), inset 0 0 18px rgb(216 181 109 / .06);
}

.ct-input:focus-visible {
  outline: 2px solid var(--ct-gold-400);
  outline-offset: 3px;
}

/* selects: a gold chevron, dark native lists */
.ct-select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8b56d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right .9rem center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  cursor: pointer;
}

.ct-select option {
  background-color: var(--ct-ink-900);
  color: var(--ct-ivory);
}

.ct-input--date { cursor: text; }

.ct-input--date::-webkit-calendar-picker-indicator {
  opacity: .8;
  cursor: pointer;
  filter: sepia(.6) saturate(2.2) hue-rotate(-8deg) brightness(1.05);
}

.ct-textarea {
  min-height: 168px;
  line-height: 1.6;
  resize: vertical;
}

.ct-error {
  margin: 0;
  font: 400 .8125rem/1.45 var(--ct-body);
  color: var(--ct-error);
}

.ct-error:not(:empty) { margin-top: .5rem; }

.ct-field.is-invalid .ct-input {
  border-color: rgb(242 162 124 / .75);
  background-color: rgb(232 116 42 / .05);
}

.ct-counter {
  margin: .45rem 0 0;
  text-align: right;
  font: 400 .75rem/1.3 var(--ct-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  color: var(--ct-muted);
}

.ct-counter.is-near { color: var(--ct-gold-200); }

/* the enquiry type: real radio inputs styled as gold-outline chips */
.ct-type {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.ct-chip {
  position: relative;
  display: inline-flex;
}

/* the input covers its chip, so the whole chip is the tap target */
.ct-chip input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ct-chip__text {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem .85rem;
  border: 1px solid rgb(216 181 109 / .42);
  border-radius: 3px;
  font: 500 .85rem/1.2 var(--ct-body);
  letter-spacing: .02em;
  color: var(--ct-ivory);
  transition: color .45s var(--ct-ease), border-color .35s var(--ct-ease);
}

/* selecting a chip sweeps gold across it */
.ct-chip__text::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, #b38b3f 0%, #f1e2b8 45%, #d4b063 75%, #ead59f 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .55s var(--ct-ease);
}

.ct-chip input:checked + .ct-chip__text {
  color: var(--ct-ink-950);
  border-color: var(--ct-gold-400);
}

.ct-chip input:checked + .ct-chip__text::before { transform: none; }

.ct-chip input:focus-visible + .ct-chip__text {
  outline: 2px solid var(--ct-gold-400);
  outline-offset: 3px;
}

.ct-chip input:active + .ct-chip__text { transform: scale(.97); }

/* contact and booking fields: one column, or two once the form is wide enough */
.ct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 24px) clamp(14px, 1.6vw, 20px);
}

.ct-grid > * { grid-column: 1 / -1; }

.ct-grid > [data-ct-field="time"],
.ct-grid > [data-ct-field="guests"] { grid-column: auto; }

@container ct-form (min-width: 440px) {
  .ct-grid > * { grid-column: auto; }
  .ct-grid > .ct-note { grid-column: 1 / -1; }
}

.ct-form:not(.has-booking) [data-ct-booking],
.ct-form:not(.is-dumpukht) .ct-note { display: none; }

.ct-note {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 0;
  padding: .85rem 1rem;
  border-left: 2px solid var(--ct-gold-400);
  background: linear-gradient(90deg, rgb(216 181 109 / .08), transparent);
  font: italic 400 1.15rem/1.4 var(--ct-display);
  color: var(--ct-gold-200);
}

.ct-note .ct-icon {
  margin-top: .2rem;
  color: var(--ct-gold-400);
}

/* honeypot: present for bots, never shown to people */
.ct-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* privacy line and the send button */
.ct-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.6rem;
  padding-top: .4rem;
}

.ct-privacy {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  flex: 1 1 15rem;
  margin: 0;
  font: 400 .875rem/1.5 var(--ct-body);
  color: var(--ct-muted);
}

.ct-privacy .ct-icon {
  width: 16px;
  height: 16px;
  margin-top: .15rem;
  color: var(--ct-gold-400);
}

.ct-send,
.ct-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 56px;
  padding: .8rem 1.9rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font: 600 .8rem/1.3 var(--ct-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    color .35s var(--ct-ease),
    background-color .35s var(--ct-ease),
    border-color .35s var(--ct-ease),
    translate .6s var(--ct-ease),
    scale .2s var(--ct-ease);
}

.ct-send,
.ct-btn--gold {
  color: var(--ct-ink-950);
  background-color: var(--ct-gold-400);
}

/* a soft sheen crosses the gold on hover */
.ct-send::after,
.ct-btn--gold::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 248 228 / .75) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform .9s var(--ct-ease);
}

.ct-btn--line {
  color: var(--ct-ivory);
  border-color: var(--ct-hair);
  background-color: rgb(243 236 223 / .02);
  font-weight: 500;
}

.ct-send:active,
.ct-btn:active {
  scale: .97;
  filter: brightness(.94);
}

.ct-send .ct-icon { transition: transform .5s var(--ct-ease), opacity .3s; }

/* sending: the label gives way to three gold-dark dots */
.ct-send__dots {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  opacity: 0;
  transition: opacity .3s;
}

.ct-send__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ct-ink-950);
}

.ct-send__label { transition: opacity .3s; }

.ct-send.is-sending {
  cursor: progress;
  background-color: var(--ct-gold-200);
}

.ct-send.is-sending .ct-send__label,
.ct-send.is-sending .ct-icon { opacity: 0; }

.ct-send.is-sending .ct-send__dots { opacity: 1; }

.ct-send.is-sending .ct-send__dots i { animation: ct-dot 1s ease-in-out infinite; }
.ct-send.is-sending .ct-send__dots i:nth-child(2) { animation-delay: .15s; }
.ct-send.is-sending .ct-send__dots i:nth-child(3) { animation-delay: .3s; }

@keyframes ct-dot {
  0%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

#contact a:focus-visible,
#contact button:focus-visible {
  outline: 2px solid var(--ct-gold-400);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .ct-talk__phone:hover {
    color: var(--ct-gold-200);
    background-size: 100% 1px;
  }

  .ct-talk__dir:hover .ct-icon--next { transform: translateX(4px); }

  .ct-input:hover:not(:focus) { border-color: rgb(216 181 109 / .5); }

  .ct-chip:hover input:not(:checked) + .ct-chip__text {
    border-color: var(--ct-gold-400);
    color: var(--ct-gold-200);
  }

  .ct-send:hover,
  .ct-btn--gold:hover { background-color: var(--ct-gold-200); }

  .ct-send:hover::after,
  .ct-btn--gold:hover::after { transform: translateX(110%); }

  .ct-send:hover .ct-icon { transform: translateX(4px); }

  .ct-btn--line:hover {
    color: var(--ct-gold-200);
    border-color: var(--ct-gold-400);
    background-color: rgb(216 181 109 / .08);
  }
}

/* the "please call us" and error notices */
.ct-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgb(216 181 109 / .32);
  border-left: 2px solid var(--ct-gold-400);
  border-radius: 2px;
  background: linear-gradient(135deg, rgb(216 181 109 / .09), rgb(216 181 109 / .02) 70%);
}

.ct-notice.is-error {
  border-left-color: var(--ct-ember);
  background: linear-gradient(135deg, rgb(232 116 42 / .1), rgb(232 116 42 / .02) 70%);
}

.ct-notice__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ct-hair);
  border-radius: 50%;
  color: var(--ct-gold-400);
}

.ct-notice__body {
  display: grid;
  justify-items: start;
  gap: 1rem;
  min-width: 0;
}

.ct-notice__text {
  margin: 0;
  font: italic 400 clamp(1.2rem, 1.05rem + .45vw, 1.4rem)/1.4 var(--ct-display);
  color: var(--ct-ivory);
}

.ct-notice .ct-btn { min-height: 48px; }

/* the thank-you panel: an arch with a gold check drawn inside it */
.ct-done {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: clamp(20px, 3vw, 44px) 0 clamp(8px, 1.4vw, 16px);
  text-align: center;
}

.ct-done[hidden] { display: none; }

.ct-done__mark {
  width: clamp(92px, 9vw, 120px);
  height: auto;
  margin-bottom: .6rem;
  overflow: visible;
  color: var(--ct-gold-400);
}

.ct-done__mark .ct-draw { stroke-dasharray: 1 1; }
.ct-done__mark .ct-draw--faint { opacity: .4; }
.ct-done__mark .ct-draw--check {
  stroke: var(--ct-gold-200);
  stroke-width: 2.4;
}

.ct-gem {
  fill: currentColor;
  stroke: none;
}

.ct-done__title {
  margin: 0;
  font: 400 clamp(2.2rem, 1.7rem + 1.8vw, 3.2rem)/1.05 var(--ct-display);
  color: var(--ct-ivory);
}

.ct-done__title:focus { outline: none; }

.ct-done__text {
  max-width: 30rem;
  margin: 0;
  font: 400 1.05rem/1.65 var(--ct-body);
  color: var(--ct-muted);
  text-wrap: pretty;
}

.ct-done .ct-btn { margin-top: .8rem; }

/* ---------- Reveals (classes added by contact.js; without it, or with reduced motion, nothing is hidden) ---------- */

.ct-anim [data-cr] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity .9s var(--ct-ease), transform .9s var(--ct-ease);
  transition-delay: calc(var(--cr-i, 0) * 70ms);
}

.ct-anim [data-cr].is-in {
  opacity: 1;
  transform: none;
}

.ct-anim [data-cr="lines"],
.ct-anim [data-cr="card"] {
  opacity: 1;
  transform: none;
}

.ct-anim [data-cr="lines"] .ct-line__in {
  transform: translate3d(0, 105%, 0);
  transition: transform 1s var(--ct-ease);
}

.ct-anim [data-cr="lines"].is-in .ct-line__in { transform: none; }

.ct-anim .is-in .ct-foil { animation: ct-sheen 1.3s var(--ct-ease-io) .6s 1 both; }

@keyframes ct-sheen {
  from { background-position: 100% 0, 0 0; }
  to { background-position: 0 0, 0 0; }
}

.ct-anim .ct-eyebrow::after {
  transform: scaleX(0);
  transition: transform .9s var(--ct-ease) .25s;
}

.ct-anim .ct-eyebrow.is-in::after { transform: none; }

/* the card: its glow line draws from the centre and the corner stars settle in */
.ct-anim [data-cr="card"] .ct-card__glow {
  transform: scaleX(0);
  transition: transform 1.1s var(--ct-ease) .1s;
}

.ct-anim [data-cr="card"] .ct-corner {
  opacity: 0;
  transform: scale(.4) rotate(-45deg);
  transition: opacity .6s var(--ct-ease) .35s, transform .8s var(--ct-ease) .35s;
}

.ct-anim [data-cr="card"].is-in .ct-card__glow,
.ct-anim [data-cr="card"].is-in .ct-corner {
  opacity: 1;
  transform: none;
}

/* the thank-you mark draws: arch from the crown, then the check */
.ct-done .ct-draw { stroke-dashoffset: 0; }

.ct-anim .ct-done:not(.is-drawn) .ct-draw { stroke-dashoffset: 1; }

.ct-anim .ct-done.is-drawn .ct-draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s var(--ct-ease-io);
}

.ct-anim .ct-done.is-drawn .ct-draw--faint { transition-delay: .15s; }
.ct-anim .ct-done.is-drawn .ct-draw--base { transition-delay: .25s; }

.ct-anim .ct-done.is-drawn .ct-draw--check {
  transition: stroke-dashoffset .55s var(--ct-ease) .65s;
}

/* ---------- Tablet and below (< 1024px): stacked ---------- */

@media (max-width: 1023px) {
  .ct-side,
  .ct-card { grid-column: 1 / -1; }

  .ct-card { margin-top: clamp(40px, 6vw, 64px); }

  /* phone, status and address sit beside each other above the card */
  .ct-talk {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(20px, 4vw, 48px);
    max-width: none;
    align-items: center;
  }

  .ct-talk__label { grid-column: 1 / -1; }
  .ct-talk__phone { grid-row: span 2; }
  .ct-status { margin: 0; }
  .ct-talk__addr { margin: 0; }
  .ct-talk__dir { grid-column: 2; }

  .ct-lede { max-width: 36rem; }
}

/* ---------- Phone (< 640px) ---------- */

@media (max-width: 639px) {
  .ct-eyebrow,
  .ct-talk__label,
  .ct-label { letter-spacing: .16em; }

  .ct-talk {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .45rem;
  }

  .ct-talk__phone { grid-row: auto; }
  .ct-talk__dir { grid-column: 1; }

  .ct-card { --ct-card-pad: 22px; }
  .ct-card::before { inset: 7px; }

  .ct-corner {
    width: 15px;
    height: 15px;
  }

  .ct-chips { gap: .5rem; }

  .ct-chip__text { padding-inline: .9rem; }

  .ct-send,
  .ct-notice .ct-btn,
  .ct-done .ct-btn { width: 100%; }

  .ct-notice { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Desktop: the side column stays in view beside a tall form ---------- */

@media (min-width: 1024px) and (min-height: 700px) {
  .ct-side {
    position: sticky;
    top: calc(var(--header-offset, var(--header-h, 76px)) + 32px);
    transition: top .45s var(--ct-ease);
  }
}

/* ---------- Large screens ---------- */

@media (min-width: 1680px) {
  .ct-card { grid-column: 6 / span 7; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ct-input,
  .ct-control::after,
  .ct-chip__text,
  .ct-chip__text::before,
  .ct-send,
  .ct-btn,
  .ct-talk__phone { transition: none; }

  .ct-send::after,
  .ct-btn--gold::after { display: none; }

  .ct-send.is-sending .ct-send__dots i { animation: none; }

  .ct-side { transition: none; }
}
