/* ============================================================
   GIRL+GRID

   COLOUR DISCIPLINE — the rule this file is built on.

   Pink (--accent) is the brand: headlines, the CTA, hover, hot
   words. Teal (--accent-2) has exactly ONE job — it means live or
   active state, and nothing else.

   It used to be a gradient partner to the pink in nine places: the
   hero headline, the CTA, the manifesto, the card washes, the step
   numbers. A second colour used everywhere means nothing anywhere,
   and the pink→teal gradient is what made the hero read dated.

   So: no gradient in this file mixes --accent with --accent-2. If
   you find yourself reaching for the teal, ask whether the thing you
   are colouring is genuinely live. If it is not, it is pink.
   ============================================================ */

/* ============================================================
   01 · HERO
   The 2026 title sequence, one headline over it.
   ============================================================ */
.ghero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  overflow: hidden;
  padding-block: clamp(7rem, 14vh, 10rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--ground);
}

.ghero__film {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Held well back. It is the room's atmosphere, not its subject —
     the headline has to win. */
  opacity: 0.38;
  filter: saturate(0.9) contrast(1.05);
  transition: opacity 1200ms var(--ease-out);
}
.ghero[data-film="playing"] .ghero__film { opacity: 0.46; }

/* A vertical scrim so type at the top and the foot both stay legible
   whatever frame the film happens to be on. */
.ghero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg,
      var(--ground) 0%,
      color-mix(in srgb, var(--ground) 45%, transparent) 26%,
      color-mix(in srgb, var(--ground) 30%, transparent) 52%,
      color-mix(in srgb, var(--ground) 88%, transparent) 92%,
      var(--ground) 100%),
    radial-gradient(100% 70% at 12% 78%,
      color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%);
}

.ghero__inner {
  position: relative; z-index: 2;
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.5rem);
  justify-items: start;
  align-content: end;
}

.ghero__h1 {
  font-family: "Space Grotesk", var(--display-face);
  font-weight: 700;
  text-transform: uppercase;
  /* Big, because it is now the ONLY big thing in the hero. */
  font-size: clamp(3rem, 1rem + 9vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  max-width: 11ch;
  color: var(--ink);
}
.ghero__lede { color: var(--muted); max-width: 46ch; }

.ghero__foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: clamp(2rem, 5vw, 4rem);
}

@media (prefers-reduced-motion: reduce) {
  .ghero__film { transition: none; opacity: 0.3; }
}

/* ============================================================
   03 · MANIFESTO
   ============================================================ */
.manifesto { padding-block: var(--space-section); }
.manifesto__type {
  font-family: "Space Grotesk", var(--display-face);
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.8rem, 0.8rem + 4.6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-top: 1.2rem;
}
/* Both highlights are pink. The teal one here was the loudest use of
   a colour that now only means "live". */
.manifesto__type .p { color: var(--accent); }
.manifesto__body {
  color: var(--muted);
  max-width: 52ch;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}

/* ============================================================
   04 · THE GRID, BY TEAM
   ============================================================ */
.grid26 { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.grid26__head { display: grid; gap: 1rem; margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.grid26__title { font-size: var(--text-section); }
.grid26__lede { color: var(--muted); max-width: 56ch; }

.grid26__filter {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: clamp(1.8rem, 3.5vw, 3rem);
}
.tchip {
  display: inline-flex; align-items: center;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: color var(--d2) var(--ease-out),
              border-color var(--d2) var(--ease-out);
}
.tchip:hover, .tchip:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ---- one block per team ----
   TWO blocks per row on a wide screen, not one.

   A full-width block gives its three drivers a third of 1264px each,
   which made 404px-wide cards 539px tall and pushed this section to
   5,088px — taller than the flat eighteen-card grid it replaced.
   Paired blocks put the cards back to a sensible size and cut the
   section to roughly a third of that. */
.grid26__teams { display: grid; gap: clamp(2.2rem, 4vw, 3.4rem); }
@media (min-width: 1000px) {
  .grid26__teams { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 4vw, 4rem); }
}

.tblock { scroll-margin-top: 6rem; }
.tblock__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: 0.9rem;
  margin-bottom: clamp(1rem, 2.2vw, 1.6rem);
  border-bottom: 1px solid var(--line);
}
.tblock__id { display: grid; gap: 0.25rem; }
.tblock__count { color: var(--muted); }
.tblock__name {
  font-family: "Space Grotesk", var(--display-face);
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.3rem, 0.9rem + 1.8vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
/* The 2026 car-lineup graphic. Four of the six teams have no supplied
   team mark at all, so this is the asset that exists for everyone. */
.tblock__cars {
  height: clamp(2.2rem, 5vw, 4rem);
  width: auto; max-width: 46%;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--d3) var(--ease-out);
}
.tblock:hover .tblock__cars { opacity: 1; }

/* Lit briefly when the filter jumps to it, so the destination is
   obvious without having to move anything. */
.tblock.is-lit .tblock__head { border-bottom-color: var(--accent); }
.tblock.is-lit .tblock__name { color: var(--accent); }

/* Three drivers, equal.

   An explicit repeat(3, …) rather than auto-fit: with three items
   auto-fit was producing a phantom fourth zero-width track, and the
   column count here is not a guess — an F1 Academy team runs three
   cars. Below 560px they drop to two, then the third wraps.

   `minmax(0, 1fr)` rather than `1fr` so a long name can never push
   a column wider than its share. That, plus overflow-wrap on the
   name, is what stops "ALISHA PALMO" being cut off. */
.tblock__drivers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
}
@media (min-width: 560px) {
  .tblock__drivers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.acard {
  position: relative;
  display: grid;
  gap: 0.65rem;
  transition: transform var(--d3) var(--ease-out);
}
.acard:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 1.3rem; }
.acard:hover { transform: translateY(-6px); }

/* The box. Identical for all eighteen: a blush ground, her number
   behind her, the cut-out standing on the floor of the frame.

   clip-path rather than overflow:hidden, so the sides and the floor
   clip but the top is left open by a quarter: on hover she grows and
   her head breaks out over the edge of her own box. */
.acard__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1.3rem;
  background:
    radial-gradient(80% 60% at 50% 18%, rgba(255, 255, 255, .7), transparent 70%),
    linear-gradient(165deg, #fff1f7 0%, #ffd3e7 48%, #ff9fcf 100%);
  clip-path: inset(-26% 0 0 0 round 1.3rem);
  isolation: isolate;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
  transition: box-shadow var(--d3) var(--ease-out);
}
/* The sheen: one pass of light across the box on hover. */
.acard__frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 46%, transparent 62%);
  translate: -120% 0;
  transition: translate 900ms var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
.acard:hover .acard__frame::after,
.acard:focus-visible .acard__frame::after { translate: 120% 0; }

.acard__cut {
  position: absolute;
  left: 50%; bottom: 0;
  height: 92%;
  width: auto;
  max-width: none;
  translate: -50% 0;
  z-index: 1;
  transform-origin: 50% 100%;
  transition: transform 700ms var(--ease-out), filter var(--d3) var(--ease-out);
  filter: drop-shadow(0 18px 24px rgba(122, 16, 72, .28));
  pointer-events: none;
}
.acard:hover .acard__cut,
.acard:focus-visible .acard__cut {
  transform: scale(1.14);
  filter: drop-shadow(0 26px 30px rgba(122, 16, 72, .4));
}

.acard__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(0.92rem, 0.8rem + 0.4vw, 1.15rem);
  line-height: 1.1;
  /* Names wrap rather than being cut off. This is the fix for
     "ALISHA PALMO" and "NATALIA GRANA". */
  overflow-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .acard, .acard__cut, .acard__frame::after, .tblock__cars { transition: none; }
  .acard:hover, .acard:hover .acard__cut { transform: none; }
}

/* ============================================================
   05 · SAME CAR — the real liveries
   ============================================================ */
.samecar { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.samecar__head { display: grid; gap: 1rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.samecar__title { font-size: var(--text-section); max-width: 16ch; }
.samecar__lede { color: var(--muted); max-width: 52ch; }

.samecar__body { display: grid; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 960px) { .samecar__body { grid-template-columns: 1.25fr 0.75fr; } }

/* Four liveries in ONE row on a wide screen. At minmax(17rem) they
   fell to a 2×2 block 470px tall per row, which is 900px of car
   pictures for a section whose point is a spec list. */
.samecar__liveries {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 700px) {
  .samecar__liveries { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The spec list. It is a plain two-column list that wraps, rather
   than the old fixed row that ran "Tatuus" and "1.4 turb" off the
   right edge of the screen. */
.samecar__spec { display: grid; gap: 1px; margin: 0; }
.samecar__spec > div {
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr;
  gap: 0.4rem 1.2rem;
  align-items: baseline;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.samecar__spec > div:last-child { border-bottom: 0; }
.samecar__spec dt { color: var(--muted); }
.samecar__spec dd {
  margin: 0;
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  line-height: 1.2;
  overflow-wrap: break-word;
}

/* ============================================================
   08 · HOW IT WORKS
   ============================================================ */
.how { padding-block: var(--space-section); }
.how__heading { font-size: var(--text-section); margin: 0.8rem 0 clamp(1.8rem, 3.5vw, 3rem); }
.how__grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 860px) { .how__grid { grid-template-columns: repeat(3, 1fr); } }
.how__card {
  background: var(--ground);
  padding: clamp(1.4rem, 2.8vw, 2.6rem);
  display: grid; gap: 0.9rem; align-content: start;
  min-height: clamp(230px, 28vh, 320px);
}
/* Was a pink→teal gradient clipped to the text. Solid pink. */
.how__no {
  font-family: "Space Grotesk", var(--display-face); font-weight: 700;
  font-size: clamp(2.2rem, 1rem + 3vw, 3.6rem); line-height: 1;
  color: var(--accent);
}
.how__title {
  font-family: "Space Grotesk", var(--display-face); font-weight: 700;
  text-transform: uppercase; font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); line-height: 1;
}
.how__body { color: var(--muted); }

/* ============================================================
   09 · VOICES
   ============================================================ */
.voices { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.voices__quote {
  font-family: "Space Grotesk", var(--display-face); font-weight: 700;
  font-size: clamp(1.5rem, 0.9rem + 3vw, 3.4rem);
  line-height: 1.06; letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0;
}
.voices__marks {
  font-family: "Space Grotesk", var(--display-face); font-weight: 700;
  font-size: clamp(5rem, 3rem + 10vw, 14rem);
  line-height: 0.6;
  color: var(--accent);        /* was teal */
  opacity: 0.28;
  display: block;
}
.voices__who { margin-top: 1.6rem; display: grid; gap: 0.2rem; }

/* ============================================================
   10 · JOIN
   ============================================================ */
.gjoin {
  padding-block: var(--space-section);
  display: grid; gap: clamp(1rem, 2.5vw, 1.8rem);
  justify-items: center; text-align: center;
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
}
.gjoin__ring {
  position: absolute;
  width: min(80vw, 640px); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  z-index: 0;
}
.gjoin > *:not(.gjoin__ring) { position: relative; z-index: 1; }
.gjoin__title { font-size: var(--text-section); }
.gjoin__lede { color: var(--muted); max-width: 44ch; }

/* The CTA was a pink→teal gradient. Solid pink, and it inverts on
   hover the way every other CTA on the site does. */
.cta--girl { background: var(--accent); color: var(--accent-ink); }
.cta--girl::after { background: var(--accent-ink); }
.cta--girl:hover { color: var(--accent); }
