/* ==========================================================================
   SeriesChief — home page (round 8: one section per visitor job, real proof only)
   Uses site.css tokens and shared components (.shot, .tour, .film-play, .grid-slots).
   Page classes are prefixed home-.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero — copy left, real-UI film loop in a monitor frame; the film plays there
   -------------------------------------------------------------------------- */
.home-hero {
  position: relative; isolation: isolate; overflow: clip;
  display: grid; align-items: center;
  min-height: min(calc(100svh - var(--header-h)), 900px);
  padding-block: clamp(2.5rem, 1rem + 4vw, 4.5rem);
}
.home-hero::before { /* faint timing grid behind the screen */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgb(242 239 230 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(242 239 230 / 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 45%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 45%, #000 15%, transparent 72%);
}
.home-hero__grid {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center;
}
.home-hero__copy { display: grid; gap: 1.2rem; justify-items: start; position: relative; z-index: 1; }
.home-hero__title { font-size: clamp(3.6rem, 1rem + 5.8vw, 7rem); line-height: 0.86; margin-block: 0.1rem 0.2rem; }
.home-hero__title .accent { display: block; } /* one sentence per line: "Run the league." / "Skip the admin." */
.home-hero__lede { max-width: 40ch; }
.home-hero__actions { --gap: 0.85rem; margin-top: 0.3rem; }
.home-hero__meta {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0.4rem 0 0;
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.home-hero__media { position: relative; display: grid; gap: 0.7rem; }
.home-hero__screen {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 50px 110px -40px rgb(0 0 0 / 0.95), 0 0 0 1px rgb(255 90 31 / 0.12);
}
.home-hero__video, .home-hero__still { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-hero__still { display: none; }

/* loop pause control (WCAG 2.2.2); shown by home.js when the loop can play */
.home-hero__toggle {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0 0.9rem;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-2); background: rgb(11 12 11 / 0.72); border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.home-hero__toggle[hidden] { display: none; }
.home-hero__toggle:hover { color: var(--fg); border-color: var(--fg); }
.home-hero__toggle:active { transform: translateY(1px); }
.home-hero__toggle-icon { width: 9px; height: 10px; border-inline: 3px solid currentColor; }
.home-hero__toggle.is-paused .home-hero__toggle-icon {
  border: 0; width: 0; height: 0;
  border-left: 9px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}

/* transform-only entrance: content is never hidden (LCP-safe) */
@media (prefers-reduced-motion: no-preference) {
  .home-hero__copy > * { animation: home-rise 0.7s var(--ease) both; }
  .home-hero__title { animation-delay: 60ms; }
  .home-hero__lede { animation-delay: 120ms; }
  .home-hero__actions { animation-delay: 180ms; }
  .home-hero__meta { animation-delay: 240ms; }
  .home-hero__media { animation: home-slide 0.8s var(--ease) 120ms both; }
}
@keyframes home-rise { from { transform: translateY(18px); } }
@keyframes home-slide { from { transform: translateX(32px); } }

@media (max-width: 960px) {
  .home-hero { min-height: 0; }
  .home-hero__grid { grid-template-columns: 1fr; }
}
/* phones: no video download — the real-UI still shows instead */
@media (max-width: 760px) {
  .home-hero { padding-top: 1.75rem; }
  .home-hero__video, .home-hero__toggle { display: none; }
  .home-hero__still { display: block; }
}

/* --------------------------------------------------------------------------
   1b. The film plays in the hero frame: "Watch the film" (or a click on the
       screen) swaps the loop for the film; home.js adds .is-film. Without JS
       the native player shows straight away.
   -------------------------------------------------------------------------- */
.home-hero__film { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; background: #000; }
html.js .home-hero__screen:not(.is-film) .home-hero__film { display: none; }
.home-hero__screen.is-film > :not(.home-hero__film) { display: none; }
html:not(.js) [data-hero-film-play] { display: none; }
html.js .home-hero__screen:not(.is-film) { cursor: pointer; }
html.js .home-hero__screen:not(.is-film)::after { /* play mark; the "Watch the film" button is the keyboard control */
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; pointer-events: none;
  background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 1l11 6-11 6z' fill='%231a0a03'/%3E%3C/svg%3E") no-repeat 58% 50% / 26px 26px;
  box-shadow: 0 0 0 10px rgb(255 90 31 / 0.2), 0 24px 50px -12px rgb(0 0 0 / 0.85);
  transition: transform var(--dur-1) var(--ease);
}
html.js .home-hero__screen:not(.is-film):hover::after { transform: scale(1.07); }
@media (max-width: 760px) {
  html.js .home-hero__screen:not(.is-film)::after { width: 58px; height: 58px; margin: -29px 0 0 -29px; background-size: 20px 20px; box-shadow: 0 0 0 7px rgb(255 90 31 / 0.2); }
}

/* --------------------------------------------------------------------------
   1c. One connected system (the point of difference): one ruling, start to
       finish, across Core, Stewarding and Broadcast. Markers take the tier colour.
   -------------------------------------------------------------------------- */
.home-flow { border-top: 1px solid var(--line); }
.home-flow__title {
  margin: 0 0 2rem; font-family: var(--font-mono); font-size: var(--step--2); font-weight: 650;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.home-flow__steps {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none; counter-reset: flow;
}
.home-flow__steps li {
  --where: var(--tier-core);
  position: relative; display: grid; align-content: start; gap: 0.55rem;
  grid-template-areas: "where" "what" "tag";
  padding: 1.7rem 1.25rem 0 0; border-top: 2px solid var(--line-2); counter-increment: flow;
}
.home-flow__steps li.is-stew { --where: var(--tier-stewarding); }
.home-flow__steps li.is-bc { --where: var(--tier-broadcast); }
.home-flow__steps li::before { /* numbered marker on the rail, in the step's tier colour */
  content: counter(flow); position: absolute; left: 0; top: -0.85rem;
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 750; color: var(--bg); background: var(--where);
}
.home-flow__where { grid-area: where; font-family: var(--font-mono); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--where); }
.home-flow__what { grid-area: what; color: var(--fg-2); line-height: 1.4; }
.home-flow__nb { white-space: nowrap; }
.home-flow__steps .tag { grid-area: tag; justify-self: start; }
.home-flow__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin: 2.4rem 0 0; color: var(--muted); font-size: var(--step--1); }
.home-flow__legend > span:last-child { margin-left: 0.4rem; }
@media (max-width: 1100px) { .home-flow__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.6rem; } }
@media (max-width: 600px) {
  .home-flow__steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .home-flow__steps li {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "where tag" "what what"; align-items: center;
    margin-left: 0.8rem; padding: 0 0 1.5rem 1.7rem; border-top: 0; border-left: 2px solid var(--line-2);
  }
  .home-flow__steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
  .home-flow__steps li::before { left: -0.85rem; top: -0.1rem; }
  .home-flow__legend > span:last-child { flex-basis: 100%; margin-left: 0; }
}

/* --------------------------------------------------------------------------
   2. One section per visitor job (19 Oct): race week, stewarding, broadcast,
      plans, proof, join. Each carries one proof sized to read on a phone,
      with more room between sections than the shared default.
   -------------------------------------------------------------------------- */
.home .section { padding-block: clamp(4.5rem, 2.5rem + 5vw, 7.5rem); }

/* copy beside one proof; --flip puts the proof first on wide screens */
.home-split {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 5rem); align-items: center;
}
.home-split--flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.home-split--flip > .home-split__copy { order: 2; }
.home-split__copy { display: grid; gap: 1.3rem; justify-items: start; }
.home-split__copy .checklist { margin: 0.2rem 0 0; }
.home-split__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin-top: 0.2rem; }

/* stewarding: a tight crop of the real incident sheet (2x capture, shown at about its own size) */
.home-stew__shot { width: 100%; max-width: 640px; justify-self: center; }

/* broadcast: the two real overlay recordings */
.home-bc { isolation: isolate; }
.home-bc::before { /* stage light behind the clips */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 55% at 74% 50%, rgb(255 90 31 / 0.13), transparent 72%);
}
.home-bc__media { display: grid; gap: 1rem; }
.home-bc__clips { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.home-clip { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.6rem 0.75rem; min-width: 0; }
.home-clip__frame { grid-column: 1 / -1; }
/* the pause button sits beside the caption, so it never covers the overlay */
.home-clip > .loop-toggle { position: static; grid-row: 2; grid-column: 2; width: 36px; height: 36px; }
.home-clip > figcaption { grid-row: 2; grid-column: 1; }
.home-clip__frame {
  position: relative; overflow: hidden; background: #0b0c0b;
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.9);
}
.home-clip video { display: block; width: 100%; height: auto; object-fit: cover; }
.home-clip--map video { aspect-ratio: 1; }
.home-clip--tow video { aspect-ratio: 640 / 1072; object-position: center top; }
.home-clip figcaption { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 900px) {
  .home-split, .home-split--flip { grid-template-columns: minmax(0, 1fr); }
  .home-split--flip > .home-split__copy { order: 0; }
  .home-stew__shot { justify-self: start; }
}
@media (max-width: 600px) {
  .home-bc__clips { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .home-clip--tow video { aspect-ratio: 1; } /* the top of the tower, at full size */
}

/* --------------------------------------------------------------------------
   3. Hands-off — 6 Auto rows + 2 Your call rows beside the drivers’ phones
   -------------------------------------------------------------------------- */
.home-auto__grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center;
}
.home-auto__copy { display: grid; gap: 1.4rem; justify-items: start; }
.home-auto__list { display: grid; width: 100%; margin: 0.4rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.home-auto__list li {
  display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); align-items: center; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); color: var(--fg-2); line-height: 1.35;
}
.home-auto__list .tag { justify-self: start; }
.home-auto__call { color: var(--fg); font-weight: 600; }
.home-auto__list li:not(.home-auto__call) + .home-auto__call { border-top: 1px solid var(--line-2); margin-top: 0.6rem; }
@media (max-width: 900px) { .home-auto__grid { grid-template-columns: 1fr; } }
/* drivers' phones beside the automation list: real screens, staggered */
.home-auto__visual { display: grid; gap: 1rem; justify-items: center; }
.home-auto__phones { display: grid; width: min(100%, 540px); grid-template-columns: repeat(2, minmax(0, 250px)); gap: clamp(1rem, 0.5rem + 2vw, 2rem); justify-content: center; }
.home-auto__phone { width: 100%; }
.home-auto__phones { align-items: start; }
.home-auto__phone--b { margin-top: clamp(2rem, 1rem + 3vw, 4rem); }
.home-auto__note { text-align: center; }
/* phones: one drivers' screen, big enough to read, instead of two side by side */
@media (max-width: 600px) {
  .home-auto__phones { width: min(100%, 280px); grid-template-columns: minmax(0, 1fr); }
  .home-auto__phone--b { display: none; }
}
@media (max-width: 480px) { .home-auto__list li { grid-template-columns: 1fr; gap: 0.35rem; } }

/* --------------------------------------------------------------------------
   4. Plans — Core plus optional add-ons: one sentence, pricing chip, link
   -------------------------------------------------------------------------- */
.home-tiers__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.6rem + 1vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.home-tier {
  --tier: var(--tier-core);
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; align-content: start;
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--dur-1) var(--ease), transform var(--dur) var(--ease);
}
.home-tier:hover { border-color: color-mix(in srgb, var(--tier) 50%, var(--line)); }
.home-tier::before {
  content: ""; position: absolute; left: -12px; top: 0; height: 5px; width: 46%;
  background: var(--tier); transform: skewX(var(--lean)); transform-origin: left;
}
.home-tier--stew { --tier: var(--tier-stewarding); }
.home-tier--bc { --tier: var(--tier-broadcast); }
.home-tier__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.home-tier__price {
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.home-tier h3 { font-size: var(--step-2); }
.home-tier p { color: var(--muted); font-size: var(--step--1); }
.home-tier .link-arrow { justify-self: start; }
.home-tier--stew .link-arrow { color: var(--amber); }
.home-tier--bc .link-arrow { color: var(--signal-hi); }
.home-tier .link-arrow:hover { color: var(--fg); }
.home-tiers .section-head .accent-cyan { display: block; } /* "Pay per member." / "Never for more than 150." */
/* the bundle line: all three plans share one set of data */
.home-tiers__all { margin: 1.4rem 0 0; padding: 1rem 1.2rem; max-width: 72ch; color: var(--fg-2); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: var(--radius); }
.home-tiers__all strong { color: var(--fg); }
.home-tiers__price { margin-top: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem; color: var(--muted); font-size: var(--step--1); }
@media (max-width: 960px) { .home-tiers__cards { grid-template-columns: 1fr; max-width: 560px; } }

/* --------------------------------------------------------------------------
   5. Founding grid — GSRC in P1
   -------------------------------------------------------------------------- */
.home-grid__layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.home-grid__copy { display: grid; gap: 1.2rem; justify-items: start; }
.home-grid__copy .lede { max-width: 34ch; }
.home-grid__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 0.4rem 0 0; border-top: 1px solid var(--line); }
.home-grid__stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.35rem; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.home-grid__stats > div + div { padding-left: 1rem; border-left: 1px solid var(--line); }
.home-grid__stats dt { color: var(--muted); font-size: var(--step--1); line-height: 1.3; }
.home-grid__stats dd { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 860; font-stretch: 70%; font-size: var(--step-3); line-height: 0.9; color: var(--fg); text-transform: uppercase; }
.home-grid__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-grid__p1 { grid-column: 1 / -1; min-height: 150px; }
.home-grid__p1 .grid-slot__logo { width: min(100%, 260px); }
.home-grid__open { grid-column: 1 / -1; min-height: 0; display: flex; align-items: baseline; gap: 1rem; padding-block: 1rem 0.9rem; }
@media (max-width: 960px) { .home-grid__layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .home-grid__stats dd { font-size: var(--step-2); }
  .home-grid__stats > div + div { padding-left: 0.7rem; }
}

/* --------------------------------------------------------------------------
   6. CTA band additions
   -------------------------------------------------------------------------- */
.home-cta__eyebrow {
  margin: 0; font-family: var(--font-mono); font-size: var(--step--2); font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--signal-ink);
}
.cta-band .display--lg { max-width: 14ch; }
