/* ==========================================================================
   contact.css — the calm form page (v2 §17).

   SIGNATURE IDEA: an enormous question carried by scale and stillness, and
   an exceptionally calm form. The left column anchors the question and the
   reassurance; the form does the work with minimal borders. No spectacle.
   ========================================================================== */

.ct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 104px);
  align-items: start;
}

.ct-aside {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

/* The aside is now taller than a short laptop screen leaves under the header;
   there it scrolls with the page so the contact rows are never cut off. */
@media (max-height: 839px) {
  .ct-aside {
    position: static;
  }
}

.ct-aside__question {
  font-size: clamp(1.75rem, min(3.2vw, 5svh), 3rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

/* Talent intent only: js/contact-intent.js swaps the steps for this line. */
.ct-aside__copy {
  margin-top: var(--space-4);
  color: var(--gray-600);
  max-width: 44ch;
}

/* WHAT HAPPENS NEXT — three numbered steps. The numerals echo the About terms
   cards (a CSS counter, Kuneo Blue fading out) at a size that sits beside the
   text rather than over it. Decorative: the <ol> already numbers the list
   for assistive tech. */
.ct-steps {
  display: grid;
  gap: var(--space-6);
  margin: clamp(24px, 4svh, 36px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ct-step;
}

.ct-step {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr);
  column-gap: var(--space-4);
  counter-increment: ct-step;
}

.ct-step::before {
  content: counter(ct-step, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-size: 3rem;
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: transparent;
  background: linear-gradient(180deg, var(--kuneo-blue) 5%, rgba(36, 87, 255, 0.08) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.ct-step__title {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.ct-step__text {
  margin-top: var(--space-1);
  max-width: 40ch;
  color: var(--gray-600);              /* 7.4:1 on white */
}

/* CONTACT DETAILS — a calm card of labelled rows: small uppercase label,
   readable value, every link a full-row 44px+ target. Paper surface, no
   rules between rows; the spacing does the separating. */
.ct-details {
  margin-top: clamp(32px, 5.5svh, 56px);
  padding: clamp(20px, 2vw, 28px);
  border-radius: var(--radius-large);
  background-color: var(--off-white);
}

.ct-details__title {
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-500);              /* 5.6:1 on paper */
}

.ct-details__intro {
  margin-top: var(--space-2);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.ct-details__list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.ct-details__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-4);
  padding-inline: var(--space-4);
  border-radius: var(--radius-card);
  background-color: var(--white);
}

/* [hidden] must win over the row's display: grid. */
.ct-details__row[hidden] {
  display: none;
}

.ct-details__label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);              /* 5.8:1 on white */
}

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

.ct-details__value a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 52px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blue-700);              /* 8.6:1 on white */
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  white-space: nowrap;
  transition: text-decoration-color var(--duration-fast) var(--ease-standard);
}

.ct-details__value a:hover,
.ct-details__value a:focus-visible {
  text-decoration-color: currentColor;
}

.ct-details__value svg {
  flex: none;
}

/* A phone: the label sits over its value so the value keeps one line, and the
   numerals step down so the text column keeps its measure. */
@media (max-width: 479px) {
  .ct-step {
    grid-template-columns: 3rem minmax(0, 1fr);
    column-gap: var(--space-3);
  }

  .ct-step::before {
    font-size: 2.375rem;
  }

  .ct-details {
    padding: var(--space-4);
  }

  .ct-details__row {
    grid-template-columns: minmax(0, 1fr);
    padding-top: var(--space-3);
  }

  .ct-details__value a {
    min-height: 44px;
  }
}

/* A light entrance as the aside scrolls in. CSS only, and only where
   scroll-driven animation exists and motion is welcome; everywhere else the
   finished state is simply the default. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .ct-step,
    .ct-details {
      animation: ct-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
  }
}

@keyframes ct-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
}

/* The form: minimal borders, generous rhythm, no outer card shell. */
.ct-form {
  display: grid;
  gap: var(--space-6);
}

.ct-form__grid {
  display: grid;
  gap: var(--space-6);
}

/* "* Required": explains the marker on the labels; the form's own gap
   already spaces it from the first field. */
.ct-form__key {
  margin-top: 0;
}

@media (min-width: 600px) {
  .ct-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-form__field--full {
    grid-column: 1 / -1;
  }
}

/* The optional-context disclosure: keeps the perceived form small while
   preserving every qualification field the backend expects. */
.ct-optional {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.ct-optional__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding-block: var(--space-3);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--brand-ink);
}

.ct-optional__summary::-webkit-details-marker { display: none; }
.ct-optional__summary::marker { content: ""; }

.ct-optional__summary:hover {
  color: var(--kuneo-blue);
}

.ct-optional__summary svg {
  flex: none;
  color: var(--kuneo-blue);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.ct-optional[open] .ct-optional__summary svg {
  transform: rotate(180deg);
}

.ct-optional__body {
  display: grid;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
}

@media (min-width: 600px) {
  .ct-optional__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-optional__body .ct-form__field--full {
    grid-column: 1 / -1;
  }
}

/* Success state: a designed conclusion at scale, not a green alert box
   (§17.5). The panel is produced by js/contact-form.js inside the existing
   aria-live region — the accessible behavior is unchanged. */
.form-status--success {
  border: 0;
  border-top: 1px solid var(--gray-200);
  background: none;
  padding: var(--space-8) 0 0;
}

.form-success__title {
  font-size: clamp(1.5rem, min(3vw, 4.5svh), 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--brand-ink);
  margin-bottom: var(--space-4);
}

@media (max-width: 1023px) {
  .ct-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ct-aside {
    position: static;
  }
}

/* ==========================================================================
   CONTACT — PHONE (§33)

   The form is already a single column below 600px (the two-column grid only
   starts at min-width: 600px), so the layout needs nothing. What the phone
   does need is the input mechanics that iOS changes: the virtual keyboard and
   the automatic zoom.
   ========================================================================== */
@media (max-width: 1023px) {
  /* THE 16px RULE (§33/§39). Safari on iOS zooms the whole page in when a
     text control receives focus and its computed font-size is below 16px. The
     zoom is not a nuisance: it leaves the layout scrolled sideways, and the
     visitor has to pinch back out before they can keep reading. The shared
     control already sits at 16px (--fs-body), but the FILE input is set to
     14px and would trip it on the talent branch — the one field a candidate
     reaches from a phone. Raised to the floor on the phone only, where it
     matters; the desktop value is untouched.

     `--fs-body` rather than a literal 16px, so the control keeps following
     the type scale if that token ever moves. */
  .field__input--file,
  .field__input--file::file-selector-button {
    font-size: var(--fs-body);
  }

  /* A taller message box on a phone (§33 asks for 140–160px). The desktop
     132px is a column-width decision; on a phone the textarea is the whole
     column, so it can afford the extra lines and the reader sees their own
     message without the box scrolling internally. */
  .field__textarea {
    min-height: 150px;
  }

  /* The submit action spans the column (§33). It already does inside the
     form's own actions block; this is the guarantee, stated where the rest of
     the phone rules live. */
  .form-actions .btn {
    width: 100%;
    min-height: 52px;
  }

  /* One indent for the aside and the form: both are inside .shell-wide, which
     now resolves to --page-gutter below 1024px (see layout.css). The block
     below only tightens the rhythm that the wider measure no longer needs. */
  .ct-form,
  .ct-form__grid,
  .ct-optional__body {
    gap: var(--space-6);
  }

  /* The disclosure's summary is the control that opens the optional block, so
     it must clear the touch floor on its own rather than relying on its text. */
  .ct-optional__summary {
    min-height: 56px;
  }
}
