/* ==========================================================================
   Mid Group AI, homepage (design 4a)
   Loaded after css/styles.css, which owns the tokens, .container, the nav
   shell, and the form field primitives. This file styles the homepage only.

   Conversion architecture:
   - One primary CTA sitewide, "Book your workflow audit", the orange pill.
     It appears exactly three times: nav, hero, closing band.
   - Orange appears nowhere else on this page. Every other action is an
     arrow text link.
   ========================================================================== */

/* The utility bar, the flat nav, .btn-audit, .btn-quiet, .arrow-link, and the
   band footer moved to css/styles.css when the rest of the site adopted them.
   They are sitewide chrome now, not homepage components. Only the hero-sized
   variant of the CTA stays here, because only the hero uses it. */
.btn-audit--hero {
  min-height: 52px;
  padding: 15px 30px;
  font-size: 16px;
  flex: none;
}

/* ----- 3. Hero -----
   Full bleed, 700px on desktop. The headline is real text over the media,
   never baked into it. Media sits under a fixed scrim so white text clears
   4.5:1 against the darkest stop. */
.home-hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #10121a;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media picture,
.hero-video,
.hero-img,
.hero-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The hero box is far wider than 16:9 at desktop (1920x700), so `cover` takes
   a middle band and a centred crop clips the top of the subject's head. Bias
   the band upward. Below ~700px wide the box turns portrait, the full image
   height is used, and this value stops mattering. */
.hero-img { object-position: center 28%; }

/* Kept for a media-less hero (a campaign variant, or the poster failing to
   load). Never a third-party stock image. */
.hero-placeholder {
  background:
    repeating-linear-gradient(
      115deg,
      var(--ph-a) 0 44px,
      var(--ph-b) 44px 88px
    );
  opacity: 0.55;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--scrim);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 0 56px;
}
.hero-h {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
  color: #ffffff;
  margin: 0 0 28px;
}
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  max-width: 44ch;
  color: #ffffff;
  margin: 0;
}

/* When asset H1 lands, add .hero-media--film alongside .hero-media so the
   poster paints behind the video and stays visible on the reduced path. */
.hero-media--film {
  background: url('../assets/hero/hero-poster.jpg') center / cover no-repeat;
}

/* Reduced motion: the film is removed outright and the poster underneath
   carries the same information, so the reduced path loses nothing. The
   markup keeps `autoplay`, so this rule is what actually honours the
   preference; do not delete it when the video is switched on. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ----- 4. Statement ----- */
.statement { padding-block: 88px; }
.statement-lead {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 30ch;
  margin: 0 0 26px;
  color: var(--ink);
}
.statement-em {
  font-style: italic;
  color: var(--blue);
}
.statement-body {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}

/* ----- 5. Stats band ----- */
.stats {
  background: var(--panel);
  padding-block: 72px;
}
.stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.stats-head h2 {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
  margin: 0;
}
.stat { margin: 0; }
.stat-fig {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 10px;
}
.stat-cap {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ----- 6. How value is created ----- */
.value { padding-block: 96px; }
.value-h {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 52px;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 40px;
}
.value-col h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--ink);
}
.value-col p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
}

/* ----- 7. Insights strip -----
   Class is .fieldnotes, not .field: styles.css already owns .field for form
   controls and the two would collide. */
.fieldnotes {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 80px;
}
.fn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.fn-head h2 {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.fn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
/* Ships 2-up until the third piece is published. */
.fn-grid--2 { grid-template-columns: repeat(2, 1fr); }
.fn-card {
  display: block;
  color: var(--ink);
}
.fn-card:hover .fn-title { color: var(--blue); }
.fn-card:focus-visible {
  outline: 2px solid var(--blue2);
  outline-offset: 6px;
  border-radius: var(--r-xs);
}
/* The card image sits in a fixed 536x210 box at the 2-up desktop width, so
   `cover` shows the middle band of a 16:9 file. Compose to that. The gradient
   underneath shows while the image loads and if a card ships without one. */
.fn-media {
  display: block;
  height: 210px;
  border-radius: var(--r-lg);
  margin-bottom: 18px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      115deg,
      var(--ph-a) 0 40px,
      var(--ph-b) 40px 80px
    );
}
.fn-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fn-kicker {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.fn-title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

/* ----- 8. Closing band ----- */
.close {
  background: var(--band-bg);
  color: var(--band-ink);
  padding-block: 96px 56px;
}
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: start;
}
.close-h {
  font-family: var(--font-display);
  font-stretch: var(--wide);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  color: var(--band-ink);
}
.close-em {
  font-style: italic;
  color: var(--blue2);
}
.close-body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--band-muted);
  max-width: 54ch;
  margin: 0;
}
.close-say { min-width: 0; }
/* Grid so the pill sizes to its content instead of stretching the column. */
.close-act {
  display: grid;
  justify-items: start;
  min-width: 0;
}
.close-act-h {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--band-ink);
}
.close-alt { margin: 16px 0 0; font-size: 15px; }
.close-alt a {
  color: var(--band-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.close-alt a:hover { color: var(--band-ink); }
.close-contact {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
}
.close-contact a { color: var(--band-muted); }
.close-contact a:hover { color: var(--band-ink); }
.close a:focus-visible {
  outline: 2px solid var(--blue2);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* The contact form is demoted: no orange, no competing weight. It stays on
   the page because it is the only definition of the Netlify `contact` form. */
.close-form-wrap {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--band-line);
}
.close-form { max-width: 760px; }
.close-form-h {
  font-size: 15px;
  font-weight: 700;
  color: var(--band-ink);
  margin: 0 0 20px;
}
.close-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.close-form .field { margin-bottom: 18px; }
.close-form label { color: var(--band-muted); }
.close-form input,
.close-form textarea {
  background: #12161e;
  border-color: var(--band-line);
  color: var(--band-ink);
}
.close-form .form-note { color: var(--band-sub); }
.close-form .form-fallback p { color: var(--band-muted); }
.close-form .form-fallback a { color: var(--blue2); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .home-hero { min-height: 560px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 26px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; gap: 40px; }
  .fn-grid,
  .fn-grid--2 { grid-template-columns: 1fr; gap: 36px; }
  .close-grid { grid-template-columns: 1fr; gap: 44px; }
  .close-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .home-hero { min-height: 500px; }
  .hero-inner { padding-block: 0 40px; }
  .statement { padding-block: 64px; }
  .stats { padding-block: 56px; }
  .stat-fig { font-size: 34px; }
  .value { padding-block: 64px; }
  .fieldnotes { padding-block: 60px; }
  .close { padding-block: 64px 40px; }
}
