/* /about-openflight/round/: one Streamer Combat round told as the page. Copyright (C) 2026 FDF Labs. All rights reserved.
   The dark register of DESIGN.md over site.css: slate and lake ink grounds, snowfield type, rules and secondary text
   in snow at alpha (--rule-dark, --rule-dark-2, --dim). No script: motion is <video> loops and scroll driven CSS
   behind @supports and prefers-reduced-motion, and the default is always the finished state. */

body.dark { background: var(--slate); color: var(--snow); color-scheme: dark; }
.dark ::selection { background: var(--lake-hi); color: var(--lake-ink); }
.dark :focus-visible { outline-color: var(--signal-hi); }
.dark .skip { background: var(--snow); color: var(--slate); }

/* Display type: Archivo at 900 and its widest, the game's own lettering. */
.hero h1, .display { max-width: 12ch; font-size: clamp(52px, 9.5vw, 128px); font-weight: 900; font-stretch: 125%; line-height: 0.88;
  letter-spacing: -0.01em; }
.dark .head h2 { font-size: clamp(40px, 6.4vw, 96px); font-weight: 900; font-stretch: 118%; line-height: 0.92; }
.dark .head p { color: var(--dim); }
.plate .lede { max-width: 40ch; }
.btn--big { min-height: 60px; padding: 0 28px; font-size: 19px; }
.plate .figline { border-top-color: var(--rule-dark-2); }
.osd .v { margin-right: 14px; color: var(--lake-hi); font-weight: 700; white-space: nowrap; }
.osd .v:last-child { margin-right: 0; }
@media (max-width: 760px) {
  .hero h1, .display { font-size: clamp(52px, 15vw, 72px); }
  /* The phone's first view belongs to the reel: the hero's readout repeats at the impact plate, so it goes here. */
  .hero .osd { display: none; }
}

/* The motion switch stops every loop: CSS cannot pause a video, so the loops are taken out of the page and the still
   under each one shows. */
body:has(#still:checked) video { display: none; }
@media (prefers-reduced-motion: reduce) { .dark video { display: none; } }

/* The round's opening line, as the game prints it. */
.game-say { display: inline-block; margin-top: 24px; padding: 10px 14px; border: 1.5px solid var(--lake-hi); border-radius: 2px;
  color: var(--lake-hi); font-size: 15px; font-weight: 700; font-stretch: 92%; }

/* Moments: the round's beats, each a loop with the crash cam's readout as its figure line. */
.moment { position: relative; background: var(--lake-ink); isolation: isolate; }
.moment .frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--lake-ink); }
.moment .frame > picture, .moment .frame img, .moment .frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.moment .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(12 20 22 / 0.7) 0%, rgb(12 20 22 / 0.25) 28%, rgb(12 20 22 / 0) 50%); }
.cue { position: absolute; left: var(--gutter); bottom: clamp(18px, 4vw, 44px); z-index: 1; max-width: 10ch; margin: 0;
  font-size: clamp(48px, 9vw, 136px); font-weight: 900; font-stretch: 125%; line-height: 0.88; letter-spacing: -0.02em; color: var(--snow); }
.moment .figline { margin-top: 0; border-top: 0; }
.moment-note { display: grid; gap: 14px 48px; padding: clamp(20px, 3vw, 36px) 0 clamp(44px, 6vw, 80px); }
.moment-note p { margin: 0; max-width: 58ch; color: var(--dim); font-size: clamp(17px, 1.4vw, 20px); }
.moment-note .say { max-width: 24ch; color: var(--snow); font-size: clamp(22px, 2.4vw, 34px); font-weight: 800; font-stretch: 112%;
  line-height: 1.05; letter-spacing: -0.015em; }
@media (min-width: 1000px) { .moment-note { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
@media (max-width: 760px) { .moment .frame { aspect-ratio: 9 / 16; } }

/* The game's own score pop, red because it is the state of the moment (DESIGN.md: red is a state, replay markers and
   score pops included). It sits over the frame but outside it, so the frame's wipe never slices it; it cuts in whole
   when the wipe is done (below). */
.schwing { position: absolute; right: var(--gutter); top: clamp(18px, 4vw, 44px); z-index: 1; margin: 0; color: var(--signal-hi);
  font-size: clamp(22px, 3vw, 44px); font-weight: 900; font-stretch: 112%; letter-spacing: -0.02em;
  text-shadow: 0 1px 12px rgb(12 20 22 / 0.55); }
@media (max-width: 760px) { .schwing { top: 32px; } }

/* The impact: full bleed, the crash cam's marker and its speed at display size. */
.impact { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--lake-ink); }
.impact-still, .impact-still img, .impact > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.impact::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(12 20 22 / 0.86) 0%, rgb(12 20 22 / 0.5) 22%, rgb(12 20 22 / 0) 44%); }
.impact-read { padding-bottom: clamp(20px, 4vh, 40px); }
.impact h2 { margin: 0; }
.impact-n { display: block; margin-top: 10px; font-size: clamp(96px, 19vw, 280px); font-weight: 900; font-stretch: 125%; line-height: 0.82;
  letter-spacing: -0.03em; color: var(--snow); }
.impact-n small { font-size: 0.3em; font-stretch: 100%; letter-spacing: 0; }

/* The scrub: the crash cam's frames stacked in one image, stepped by the scroll. The default is the last frame, the
   wing at rest in the grass, which is also what reduced motion and the motion switch show. Ten frames are ten
   values, steps(10, jump-none), each a whole frame (nine steps would stop between frames). The frames stay 16:9 on
   phones: the wing spans the frame, and a 9:16 crop would cut it off. */
.scrub { position: relative; background: var(--lake-ink); }
.scrub-stage { position: relative; height: 100svh; overflow: hidden; }
.scrub-frame { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(100%, calc(100svh * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; }
.scrub-frame img { width: 100%; height: auto; translate: 0 calc(-100% * 9 / 10); }
.scrub-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; max-width: none; padding-top: 96px; padding-bottom: clamp(20px, 4vh, 40px);
  background: linear-gradient(to top, rgb(12 20 22 / 0.88) 40%, rgb(12 20 22 / 0)); }
.scrub-copy .cue { position: static; margin: 0 0 16px; }
.scrub-marks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-size: 14px; font-weight: 600; font-stretch: 82%; color: var(--dim); }
/* The crash cam's markers, inline in the line that reads them out. */
.scrub-marks b, .osd .marker { margin-right: 6px; color: var(--signal-hi); font-weight: 800; }
.scrub-hint { display: none; }
.moment--after { background: var(--slate); }
/* On a phone the 16:9 frame is a band in a tall screen, and pinning it would leave the rest of the screen bare ink.
   So the stage is just the frame and its copy, it scrolls past like any section, and the frames step while it is
   whole on screen (the scroll distance is the screen's height less the stage's). */
@media (max-width: 760px) {
  .scrub-stage { height: auto; }
  .scrub-frame { position: relative; left: auto; top: auto; translate: none; width: 100%; }
  .scrub-copy { position: static; padding-top: 20px; background: none; }
}

/* The rigs: one instant, six cameras. */
.rigs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.rigs figure { position: relative; margin: 0; background: var(--lake-ink); }
.rigs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.rigs figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 2px; background: rgb(12 20 22 / 0.78);
  font-size: 14px; font-weight: 700; font-stretch: 88%; }
@media (min-width: 900px) { .rigs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.keys { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; font-size: 14px; font-weight: 600; font-stretch: 82%; color: var(--dim); }
.keys b { margin-right: 6px; color: var(--snow); font-weight: 800; }

/* The round's results sheet: a ruled table, a 2px snow rule to open it. */
.results { width: 100%; border-collapse: collapse; border-top: 2px solid var(--snow); font-size: clamp(16px, 1.4vw, 19px); }
.results th, .results td { padding: 16px 12px 16px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--rule-dark); }
.results thead th { font-size: 13px; font-weight: 600; font-stretch: 82%; color: var(--dim); }
.results .n { text-align: right; }
.results td.n { color: var(--lake-hi); font-weight: 600; }
.results .place { width: 2.2em; font-size: clamp(22px, 2.4vw, 34px); font-weight: 900; font-stretch: 118%; line-height: 1; }
.results .who { font-weight: 700; }
.results .win .who::after { content: "Winner"; margin-left: 12px; padding: 3px 8px; border-radius: 2px; background: var(--lake-hi); color: var(--lake-ink);
  font-size: 12px; font-weight: 700; font-stretch: 88%; vertical-align: middle; }
.results-grid { display: grid; gap: 28px; }
.last-cut { margin: 0; }
.last-cut img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--lake-ink); }
:is(.last-cut, .game-fig) figcaption { margin-top: 12px; font-size: 14px; font-weight: 600; font-stretch: 82%; color: var(--dim); }
:is(.last-cut, .game-fig) figcaption b { margin-right: 6px; color: var(--snow); font-weight: 800; }
@media (min-width: 1000px) { .results-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 40px; } }

/* The next game: real radios read through :has(). Without :has() all four panels show, one under the other. */
.games { display: grid; gap: 28px; }
.games .pick { margin: 0; }
.game { display: grid; gap: 22px 48px; }
@supports selector(:has(*)) {
  .game { display: none; }
  .games:has(#g-ace:checked) .g-ace, .games:has(#g-jam:checked) .g-jam,
  .games:has(#g-race:checked) .g-race, .games:has(#g-free:checked) .g-free { display: grid; }
}
.game .frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--lake-ink); }
.game .frame img, .game .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-fig { margin: 0; }
.game .blurb { max-width: 48ch; color: var(--dim); font-size: clamp(17px, 1.4vw, 20px); }
.game .blurb h3 { margin: 0 0 12px; color: var(--snow); font-size: clamp(24px, 2.6vw, 38px); font-weight: 800; font-stretch: 112%;
  line-height: 1.02; letter-spacing: -0.015em; }
.game .blurb p { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--lake-hi);
  font-size: 14px; font-weight: 600; font-stretch: 82%; }
@media (min-width: 1000px) { .game { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: end; } }

/* The hangar: eight renders in a snap strip, all eighteen, and the three on floats, in the data sheet behind a disclosure. */
.dark #hangar { background-image: linear-gradient(rgb(159 218 207 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(159 218 207 / 0.05) 1px, transparent 1px); }
.strip { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin;
  scrollbar-color: var(--rule-dark-2) transparent; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.strip figure { flex: 0 0 min(72vw, 340px); margin: 0; scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--lake-deep); }
.strip figcaption { padding-top: 12px; color: var(--dim); font-size: 14px; font-weight: 600; font-stretch: 82%; }
.strip figcaption b { display: block; color: var(--snow); font-size: 17px; font-weight: 800; font-stretch: 100%; }
.strip figcaption span { color: var(--lake-hi); }
/* Wide enough for four, the strip shows exactly four to the wrap's edge, so no card is cut mid-word; the rest scroll. */
@media (min-width: 1000px) {
  .strip { margin: 0; padding: 0; scroll-padding-inline: 0; }
  .strip figure { flex-basis: calc((100% - 6px) / 4); }
}
.dark #hangar { padding-bottom: clamp(24px, 3vw, 40px); }
.all { margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--snow); border-bottom: 1px solid var(--rule-dark); }
/* A flex summary has no list marker, so the open and closed state is drawn: plus closed, minus open. */
.all summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 0; font-weight: 700; cursor: pointer; }
.all summary::before { content: "+"; width: 1ch; color: var(--lake-hi); font-size: 22px; font-weight: 800; line-height: 1; }
.all[open] summary::before { content: "\2212"; }
.all[open] summary { margin-bottom: 12px; }
.dark .sheet caption, .dark .sheet thead th, .dark .sheet tbody th small, .dark .sheet .num::before { color: var(--dim); }
.dark .sheet thead th { background: var(--slate); border-bottom-color: var(--snow); }
.dark .sheet td, .dark .sheet tbody th { border-bottom-color: var(--rule-dark); }
.dark .sheet .num { color: var(--lake-hi); }
.dark .sheet .pic img { background: var(--lake-deep); }
.dark .bar { background: var(--snow); }
@media (max-width: 899px) { .dark .sheet tr { border-bottom-color: var(--rule-dark); } }

/* The closing plate and the colophon. */
.plate--cta { min-height: 80svh; }
.plate--cta .plate-head { padding-top: clamp(80px, 12vh, 140px); }
.facts-row { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--dim);
  font-size: 15px; font-weight: 600; font-stretch: 88%; }
.dark .foot { background: var(--lake-ink); }

/* The paper: a ribbon down the left edge that unrolls through "Paper on." and is cut at "The cut.", one torn piece
   falling away. It exists only where scroll timelines and timeline-scope do; elsewhere there is no ribbon. */
.paper, .paper-torn { display: none; }

/* Hard cuts. Where the browser has scroll timelines and the visitor wants motion, each frame enters as a stepped
   wipe, each section head cuts in whole, and the impact's speed cuts in over its plate: clip-path, never a fade. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .moment .frame, .impact { animation: wipe steps(4, jump-end) both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .cutin { animation: cut-in steps(1, jump-end) both; animation-timeline: view(); animation-range: entry 50% entry 51%; }
    .impact-n { animation: cut-in steps(1, jump-end) both; animation-timeline: view(); animation-range: entry 90% entry 91%; }
    .scrub { height: 320svh; view-timeline: --scrub block; }
    .scrub-stage { position: sticky; top: 0; }
    .scrub-frame img { animation: scrub steps(10, jump-none) both; animation-timeline: --scrub; animation-range: contain 0% contain 100%; }
    .scrub-hint { display: inline; }
    @media (max-width: 760px) { .scrub { height: auto; } .scrub-stage { position: relative; } }
    body:has(#still:checked) :is(.moment .frame, .impact, .cutin, .impact-n, .scrub-frame img) { animation: none; }
    body:has(#still:checked) .scrub { height: auto; }
    body:has(#still:checked) .scrub-hint { display: none; }
  }
}
@supports (timeline-scope: --a) and (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .moment--cut { timeline-scope: --cut-frame; }
    .moment--cut .frame { view-timeline: --cut-frame block; }
    .schwing { animation: cut-in steps(1, jump-end) both; animation-timeline: --cut-frame; animation-range: entry 70% entry 71%; }
    body:has(#still:checked) .schwing { animation: none; }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
    body.dark { timeline-scope: --paper-on, --the-cut; }
    .moment--paper { view-timeline: --paper-on block; }
    .moment--cut { view-timeline: --the-cut block; }
    .paper { display: block; position: fixed; left: 0; top: 0; z-index: 2; width: 56px; height: 100svh; pointer-events: none; }
    .paper path { fill: none; stroke: var(--snow); stroke-width: 6; stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05;
      animation: unroll linear both, sever steps(1, jump-end) both; animation-timeline: --paper-on, --the-cut;
      animation-range: cover 0% cover 100%, cover 50% cover 51%; }
    .paper-torn { display: block; position: fixed; left: 20px; top: 0; z-index: 2; width: 14px; height: 120px; background: var(--snow); opacity: 0;
      pointer-events: none; clip-path: polygon(0 0, 100% 0, 100% 80%, 60% 100%, 30% 86%, 0 100%);
      animation: flutter linear both; animation-timeline: --the-cut; animation-range: cover 50% cover 90%; }
    body:has(#still:checked) :is(.paper, .paper-torn) { display: none; }
  }
}
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes cut-in { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
@keyframes scrub { from { translate: 0 0; } to { translate: 0 calc(-100% * 9 / 10); } }
@keyframes unroll { to { stroke-dashoffset: 0; } }
@keyframes sever { to { opacity: 0; } }
@keyframes flutter {
  0% { opacity: 0; transform: translate(0, 40svh) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(60px, 120svh) rotate(140deg); }
}
