/* =========================================================
   BSD Strategic Advisors — Contact
   Builds on styles.css (form, Ways To Work card, footer).

    1. Hero: light grid, photo, copy and form, sized to fit one laptop screen
   ========================================================= */

/* =========================================================
   1. HERO
   ========================================================= */
.ct-hero {
  /* same cell size as the grid drawn by site.js (as on the About page) */
  --cell: clamp(92px, 15.42vw, 266px);
  position: relative;
  color: var(--ink);
  background: linear-gradient(to bottom, var(--sand), var(--bg) 70%);
  padding-top: 140px;
  padding-bottom: clamp(56px, 7vw, 120px);
}
@media (max-width: 699px) { .ct-hero { --cell: 140px; } }
.ct-hero__grid { opacity: 0; transition: opacity 2s ease .4s; }
body.is-ready .ct-hero__grid { opacity: 1; }
.ct-hero__inner { position: relative; display: grid; gap: 40px; }

.ct-hero__media {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #2b3945;
}
.ct-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

.ct-hero__copy { display: grid; justify-items: start; }
.ct-hero .hero__title { color: var(--ink); }
.ct-hero__tag { margin-top: clamp(20px, 2vw, 31px); }
.ct-hero__intro { margin-top: clamp(32px, 3vw, 48px); max-width: 560px; }
.ct-hero__copy .form { justify-self: stretch; margin-top: clamp(40px, 4vw, 64px); max-width: 684px; }

/* Title lines rise in once the page is ready (the homepage hero does the same) */
.ct-hero .line > span { transition-duration: 1.4s; transition-delay: .35s; }
.ct-hero .line:nth-child(2) > span { transition-delay: .47s; }
body.is-ready .ct-hero .line > span { transform: none; }

@media (min-width: 900px) {
  /* starts on the grid's second horizontal line, as in the design */
  .ct-hero { padding-top: calc(var(--cell) * .87); }
  .ct-hero__inner {
    grid-template-columns: minmax(0, 648fr) minmax(0, 744fr);
    column-gap: clamp(48px, 5.6vw, 96px);
    align-items: start;
  }
  /* One screen (Bruce, 2026-10-21): the photo runs from the title's top to the
     button's bottom, the message box is shorter and the fields sit closer */
  .ct-hero { padding-bottom: 64px; }
  .ct-hero__inner { align-items: stretch; }
  .ct-hero__media { position: relative; aspect-ratio: auto; height: auto; }
  .ct-hero__media img { position: absolute; inset: 0; }
  .ct-hero__copy { padding-top: 0; }
  .ct-hero__copy .form { gap: 16px; }
  .ct-hero__copy .field textarea { height: 120px; }
  /* the status line only takes space once there is a message, so the photo ends level with the button */
  .ct-hero .form__status:empty { display: none; }

  /* Fit the visible window, not the screen: browser bars leave ~950px on a 16" Mac.
     Top space, gaps and the message box shrink with the window height; on tall
     windows everything stays as designed. */
  .ct-hero {
    min-height: 100svh;
    padding-top: clamp(116px, 16svh, calc(var(--cell) * .87));
    padding-bottom: clamp(32px, 5svh, 64px);
  }
  .ct-hero__tag { margin-top: clamp(14px, 2svh, 31px); }
  .ct-hero__intro { margin-top: clamp(20px, 3svh, 48px); }
  .ct-hero__copy .form { margin-top: clamp(24px, 3.5svh, 64px); gap: clamp(10px, 1.4svh, 16px); }
  .ct-hero__copy .field textarea { height: clamp(64px, 9svh, 120px); }
}

/* Centred (2026-10-27): the photo fills the screen down to the bottom margin and the title,
   intro and form are centred against it, as in the homepage text-and-image sections */
@media (min-width: 900px) {
  .ct-hero { display: flex; flex-direction: column; }
  .ct-hero__inner { flex: 1 1 auto; width: 100%; align-items: center; }
  /* fills the row, but never taller than 880px: on very tall windows photo and form sit centred together */
  .ct-hero__media { align-self: center; height: 100%; max-height: 880px; }
}

/* Phones and tablets (2026-10-27): the form comes first, the photo closes the page */
@media (max-width: 899px) {
  .ct-hero__media { order: 2; }
}

