/* ==========================================================================
   Contact — final handoff (final_contact.dc.html, 2026-10-30)
   Hero beside the learner-support tile; a photo beside the form; the three
   offices. One column at 1024px and below, as the design.
   ========================================================================== */

/* ---------------------------------------------------------------- Grid --- */

.ct-grid {
  display: grid;
  gap: var(--ffb-bento-gap);
  grid-template-columns: minmax(0, 1fr);
}

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

  .ct-formrow,
  .ct-offices {
    grid-column: 1 / -1;
  }
}

.ct-eyebrow {
  margin-bottom: 14px;
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ffb-green-hover);
}

.ct-nowrap {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Hero --- */

.ct-hero {
  --ffb-focus: var(--ffb-focus-on-dark);
  container: ct-hero / inline-size;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px clamp(32px, 4vw, 64px);
  padding: clamp(28px, 3.6vw, 52px);
  border-radius: var(--ffb-r-bento);
  background: var(--ffb-explore-hero-ground);
}

.ct-hero__intro {
  flex: 1 1 360px;
  min-width: 0;
}

.ct-hero__included {
  flex: 1 1 320px;
  min-width: 0;
}

/* Side by side, more room under "Included:" so the list ends nearer the
   email line in the left column (Keith, 2026-11-23). Stacked, it keeps the
   normal eyebrow gap. The columns sit side by side from 680px (their flex
   bases) plus the column gap (max 64px) of content width, hence 744px. */
@container ct-hero (min-width: 744px) {
  .ct-hero__included .ct-eyebrow {
    margin-bottom: 36px;
  }
}

.ct-hero__title {
  font-size: clamp(34px, min(3.6vw, 6.4vh), 52px);
  line-height: 1.06;
  color: #ffffff;
  white-space: nowrap;
}

.ct-hero__lead {
  max-width: 520px;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ffb-on-dark-soft);
}

/* The general address, under the lead (boss, 2026-11-23). */
.ct-hero__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.ct-hero__mail:hover {
  color: var(--ffb-green);
}

.ct-hero__mail svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ffb-green);
}

.ct-hero__list {
  display: grid;
  gap: 14px;
  list-style: none;
}

.ct-hero__list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
}

.ct-hero__list svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--ffb-green);
}

/* ------------------------------------------------------ Learner support --- */

.ct-support {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: var(--ffb-r-bento);
  background: var(--ffb-icon-well);
  border: 1px solid var(--ffb-icon-well-border);
}

/* Fades in from the top, so the copy above it stays clean. */
.ffb-pattern--support {
  --pat-line: var(--ffb-blue);
  --pat-line-a: 0.14;
  right: -14%;
  bottom: -18%;
  width: 72%;
  height: auto;
  aspect-ratio: 1;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}

.ct-support__title {
  margin-bottom: 10px;
  font-size: 24px;
  color: var(--ffb-navy-deep);
}

.ct-support__lead {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ffb-text-body-alt);
}

.ct-support__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 14px;
  color: var(--ffb-blue);
  overflow-wrap: anywhere;
}

.ct-support__mail:hover {
  color: var(--ffb-green);
}

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

/* -------------------------------------------------------- Photo + form --- */

.ct-formrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ffb-bento-gap);
  scroll-margin-top: 20px;
}

@media (min-width: 1025px) {
  .ct-formrow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ct-panel {
    grid-column: span 2;
  }
}

.ct-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 280px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--ffb-r-bento);
  background: var(--ffb-navy-deep);
}

@media (min-width: 1025px) {
  .ct-photo {
    min-height: 0;
  }
}

.ct-photo img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 100%;
}

.ct-photo__title {
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.1;
  color: #ffffff;
  text-shadow: var(--ffb-photo-title-shadow);
}

.ct-photo__lead {
  max-width: 360px;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
  text-shadow: var(--ffb-photo-text-shadow);
}

/* Stacked, the tile is wide and short: frame her face rather than the
   laptop, and shade the left so the copy reads (Keith, 2026-11-02). After
   the base rules, which it overrides. */
@media (max-width: 1024px) {
  .ct-photo {
    min-height: 340px;
  }

  .ct-photo img {
    object-position: 100%; /* Keith's, from devtools */
  }

  .ct-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ffb-photo-shade);
  }
}

.ct-panel {
  min-width: 0;
  padding: clamp(24px, 3vw, 48px);
  border-radius: var(--ffb-r-bento);
  background: #ffffff;
  border: 1px solid var(--ffb-hairline);
}

/* minmax(0, 1fr) so the column cannot grow to Turnstile's 300px minimum and
   drag every field past the panel with it on a narrow phone. */
.ct-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.ct-form__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* -------- Notices and field errors -------- */

.ct-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e6c0c0;
  border-radius: var(--ffb-r-input);
  background: #fdf3f3;
  font-size: 15px;
  line-height: 1.5;
  color: #8a2f2f;
}

/* The cooldown is not a failure, so it reads as information rather than an
   error — same shape, the panel's own greys. */
.ct-alert--wait {
  border-color: var(--ffb-input-border);
  background: #ffffff;
  color: var(--ffb-text-body-alt);
}

.ct-alert i,
.ct-alert svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.ct-field__error {
  font-size: 13px;
  line-height: 1.4;
  color: #8a2f2f;
}

.ct-input--error {
  border-color: #cf7f7f;
}

/* minmax(0, 1fr), not the implicit auto column: an auto column never shrinks
   below its content's minimum, and the phone row's (chip + gap + the input's
   intrinsic width) is wider than a ~395px screen — it pushed the whole panel
   past the edge. */
.ct-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.ct-field__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ffb-text-body-alt);
}

.ct-field__label em {
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  color: var(--ffb-green-text);
}

.ct-input {
  height: 46px;
  padding: 0 14px;
  border: 2px solid var(--ffb-field-border);
  border-radius: var(--ffb-r-input-lg);
  background: #ffffff;
  font-family: var(--ffb-body);
  font-size: 16px;
  color: var(--ffb-text);
  transition: border-color var(--ffb-t-fast) ease, box-shadow var(--ffb-t-fast) ease;
}

.ct-input::placeholder {
  color: var(--ffb-text-muted-soft);
}

.ct-input:focus {
  border-color: var(--ffb-green);
  box-shadow: var(--ffb-focus-ring);
  outline: none;
}

.ct-textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

/* -------- Phone field -------- */

/* The phone label spans only the first column of its pair grid, so the code +
   number pair ends up exactly as wide as the Company field above it. */
.ct-field--phone {
  grid-column: 1;
}

.ct-phone {
  display: flex;
  gap: 10px;
  width: 100%;
}

.ct-phone__code {
  position: relative;
  flex: none;
  width: 96px;
  height: 46px;
}

/* The native <select> is stretched transparent over the chip: the closed field
   shows only the dial code, the open list is the platform's own. */
.ct-phone__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ct-phone__chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 10px;
  border: 2px solid var(--ffb-field-border);
  border-radius: var(--ffb-r-input-lg);
  background: #ffffff;
  font-size: 15px;
  color: var(--ffb-text);
  pointer-events: none;
}

/* The chip is inert, so the focus ring has to come from the select behind it. */
.ct-phone__select:focus-visible + .ct-phone__chip {
  border-color: var(--ffb-green);
  box-shadow: var(--ffb-focus-ring);
}

.ct-phone__caret {
  color: var(--ffb-text-muted-soft);
}

.ct-phone__number {
  flex: 1 1 auto;
  min-width: 0;
}

/* -------- Footnote and submit -------- */

.ct-form__note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ffb-text-muted-soft);
}

/* Turnstile renders an iframe (flexible size: full width, min 300px, 65px
   tall) that cannot be styled from here, so the wrapper dresses it instead: a
   field-style border and radius, with the widget pulled 2px under that border
   and clipped, so its own thin grey frame never shows. The fixed height also
   keeps the form from jumping when the widget finishes loading. It sits in a
   pair grid's first column, like the phone field, so it is exactly as wide as
   the fields above; the pair drops to one column on a phone. Where the
   column is under the widget's 300px minimum the overflow clips its right
   edge (the Cloudflare logo) — accepted, the checkbox on the left stays. */
.ct-turnstile {
  grid-column: 1;
  height: 65px;
  overflow: hidden;
  border: 2px solid var(--ffb-field-border);
  border-radius: var(--ffb-r-input-lg);
}

.ct-turnstile .cf-turnstile {
  margin: -2px;
}

.ct-form__submit {
  justify-self: start;
  padding: 15px 34px;
  color: var(--ffb-green-ink-alt);
}

/* Disabled during the post-send cooldown. The server rejects the send either
   way — this only stops the pointless round trip. */
.ct-form__submit:disabled {
  background: var(--ffb-input-border);
  box-shadow: none;
  color: var(--ffb-text-muted);
  cursor: not-allowed;
}

/* -------- Thank you -------- */

/* Same min-height as the design so the panel does not collapse next to the
   three office cards once the form is replaced. */
.ct-thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 320px;
}

.ct-thanks i,
.ct-thanks svg {
  width: 48px;
  height: 48px;
  color: var(--ffb-green);
}

.ct-thanks h2 {
  font-size: 28px;
}

.ct-thanks p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ffb-text-body-alt);
}

/* ---------------------------------------------------------------- Offices --- */

.ct-offices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ffb-bento-gap);
  list-style: none;
}

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

.ct-office {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(18px, 2vw, 26px) clamp(22px, 2.4vw, 32px);
  border-radius: var(--ffb-r-bento);
}

.ct-office--toronto {
  background: var(--ffb-office-toronto);
  border: 1px solid var(--ffb-office-toronto-border);
}

.ct-office--singapore {
  background: var(--ffb-glance-tile);
  border: 1px solid var(--ffb-icon-well-border);
}

.ct-office--frankfurt {
  background: var(--ffb-office-frankfurt);
  border: 1px solid var(--ffb-office-frankfurt-border);
}

.ffb-pattern--office {
  --pat-line: var(--ffb-blue);
  --pat-line-a: 0.18;
  --pat-a: var(--ffb-green);
  --pat-a-a: 0.45;
  --pat-b-a: 0.8;
  --pat-c-a: 0.2;
  right: -12px;
  bottom: -12px;
  width: 160px;
  height: 160px;
  opacity: 0.8;
}

.ffb-pattern--office .ffb-pattern__lines {
  stroke-width: 2;
}

.ffb-pattern--office .ffb-pattern__b {
  stroke: none;
}

.ct-office__city {
  font-size: 22px;
  color: var(--ffb-navy-deep);
}

.ct-office__row {
  display: flex;
  gap: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ffb-text-body-alt);
}

.ct-office__row svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--ffb-blue);
}

.ct-office__row a {
  color: inherit;
}

.ct-office__row a:hover {
  color: var(--ffb-blue);
}
