/* Features — one lap of a Driver Development Centre.

   TWO PRESENTATIONS OF ONE MARKUP (templates/features.html):

   1. The LIST VIEW is everything down to the "3D TOUR" banner below. It is the
      default: plain sections, the recordings inline with the browser's own
      controls. No WebGL, reduced motion, no JavaScript and crawlers all get it.
   2. The 3D TOUR is every rule under `html.f3d-on`. The same sections become
      the stops of a scroll-driven tour over a fixed WebGL stage
      (static/js/features_3d.js). The page still scrolls natively; nothing here
      or in the script captures the wheel.

   Every class is prefixed f3d-. Bare names (.btn, .card, .nav) are component
   classes in input.css and would restyle the rest of the site. */

/* ══ tokens — scoped to the page so nothing leaks into the app shell ══ */
.f3d-page{
  --f3-red:#E32636; --f3-red-2:#b8202d; --f3-blue:#5BC3F9; --f3-gold:#F5C542; --f3-green:#2BD17E;
  --f3-bg:#050810; --f3-panel:#0A1322; --f3-blue-rgb:91,195,249;
  --f3-line:rgba(120,148,210,.12); --f3-line-2:rgba(120,148,210,.22); --f3-line-3:rgba(120,148,210,.36);
  --f3-text:#F0F3F8; --f3-dim:#B8C2D6; --f3-muted:#8493AE;
  /* The site's type: Inter for headlines (900) and copy, Orbitron only on the
     small letter-spaced labels. */
  --f3-head:'Inter',var(--font-sans),system-ui,sans-serif;
  --f3-eye:'Orbitron',var(--font-display),sans-serif;
  --f3-navh:58px;
  background:#050810; color:var(--f3-text);
}
.f3d{position:relative; overflow-x:clip; font-family:var(--f3-head);
  background:
    radial-gradient(1200px 700px at 80% -5%, rgba(20,40,86,.55), transparent 55%),
    radial-gradient(900px 600px at -5% 60%, rgba(91,195,249,.06), transparent 60%),
    linear-gradient(180deg,#050810 0%,#03060D 50%,#050810 100%)}
/* :where() keeps element rules scoped WITHOUT class specificity — a plain
   `.f3d a` would outrank .f3d-btn and strip its colour
   (lesson_element_rule_outranks_new_class). */
:where(.f3d) a{color:inherit; text-decoration:none}
.f3d :is(h1,h2,h3){font-family:var(--f3-head); color:#fff; margin:0}
.f3d p{margin:0}
.f3d-stage{display:none}
.f3d-only-3d,.f3d-nogl-note{display:none !important}
html.f3d-nogl .f3d-needs-gl{display:none !important}
html.f3d-nogl .f3d-nogl-note{display:block !important}

/* Labels: Orbitron, small, letter-spaced. */
.f3d-eyebrow{display:flex; align-items:center; gap:10px; font-family:var(--f3-eye); font-weight:700; font-size:11px;
  letter-spacing:.26em; text-transform:uppercase; color:var(--f3-blue)}
.f3d-eyebrow i{font-style:normal; opacity:.45}
.f3d-pill{display:inline-flex; align-items:center; gap:.55rem; font-family:var(--f3-eye); font-size:.68rem; font-weight:800;
  letter-spacing:.26em; text-transform:uppercase; color:var(--f3-blue); border:1px solid rgba(var(--f3-blue-rgb),.3);
  background:rgba(var(--f3-blue-rgb),.08); padding:.5rem .95rem; border-radius:999px}
.f3d-pill:before{content:""; flex:none; width:6px; height:6px; border-radius:50%; background:var(--f3-blue); box-shadow:0 0 10px var(--f3-blue)}

/* Buttons. */
.f3d-btn{display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 22px; border-radius:10px;
  font-family:var(--f3-head); font-weight:800; font-size:14px; letter-spacing:.02em; cursor:pointer; border:1px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; text-align:center}
.f3d-btn svg{width:17px; height:17px; flex:none}
.f3d-btn-primary{background:linear-gradient(180deg,var(--f3-red),var(--f3-red-2)); color:#fff; box-shadow:0 12px 34px rgba(227,38,54,.34), inset 0 1px 0 rgba(255,255,255,.22)}
.f3d-btn-primary:hover{transform:translateY(-2px); box-shadow:0 18px 44px rgba(227,38,54,.46), inset 0 1px 0 rgba(255,255,255,.26); color:#fff}
.f3d-btn-ghost{background:rgba(10,19,34,.55); color:var(--f3-text); border-color:var(--f3-line-3); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px)}
.f3d-btn-ghost:hover{border-color:var(--f3-blue); color:#fff; background:rgba(var(--f3-blue-rgb),.1)}
.f3d :is(a,button,input,video):focus-visible{outline:2px solid var(--f3-blue); outline-offset:3px; border-radius:6px}
.f3d-cta-row{display:flex; flex-wrap:wrap; gap:12px; align-items:center}

/* ══ opening ══ */
.f3d-hero{position:relative; padding:clamp(56px,7vw,104px) 0 clamp(36px,4vw,60px)}
.f3d-hero-in{max-width:1320px; margin:0 auto; padding:0 30px}
.f3d-hero h1{margin-top:clamp(14px,1.5vw,20px); font-weight:900; font-size:clamp(34px,5vw,72px); line-height:1.02; letter-spacing:.02em;
  text-transform:uppercase; text-wrap:balance; text-shadow:0 18px 60px rgba(0,0,0,.7)}
.f3d-hero h1 span{color:var(--f3-blue)}
.f3d-hero-in>p{margin-top:clamp(14px,1.6vw,22px); max-width:58ch; font-size:clamp(15px,1.16vw,17.5px); line-height:1.62; color:var(--f3-dim); text-wrap:pretty}
.f3d-hero-in>p a{border-bottom:1px solid rgba(var(--f3-blue-rgb),.45)}
.f3d-hero-in>p a:hover{color:var(--f3-blue)}
.f3d-hero .f3d-cta-row{margin-top:clamp(22px,2.4vw,32px)}
.f3d-nogl-note{margin-top:16px !important; font-size:13.5px; color:var(--f3-muted)}

/* ══ navigation ══ */
.f3d-nav{position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:16px; padding:0 max(18px,calc((100% - 1320px)/2 + 30px));
  min-height:var(--f3-navh); background:rgba(5,9,18,.86); -webkit-backdrop-filter:blur(14px) saturate(1.3); backdrop-filter:blur(14px) saturate(1.3);
  border-top:1px solid var(--f3-line); border-bottom:1px solid var(--f3-line)}
.f3d-sectors{list-style:none; display:flex; flex:1; gap:6px; margin:0; padding:0; min-width:0}
.f3d-sector{position:relative; flex:1 1 0; min-width:0}
.f3d-sector-link{display:flex; align-items:center; gap:9px; padding:9px 12px; border-radius:9px; font-weight:800; font-size:13.5px; color:var(--f3-dim);
  white-space:nowrap; transition:color .18s, background .18s}
.f3d-sector-link b{font-family:var(--f3-eye); font-size:10.5px; letter-spacing:.1em; color:var(--f3-muted); transition:color .18s}
.f3d-sector-link span{overflow:hidden; text-overflow:ellipsis}
.f3d-sector-link:hover{color:#fff; background:rgba(var(--f3-blue-rgb),.08)}
.f3d-sector.f3d-is-on .f3d-sector-link{color:#fff}
.f3d-sector.f3d-is-on .f3d-sector-link b{color:var(--f3-blue)}
.f3d-ticks{display:none; list-style:none; margin:0; padding:0}
.f3d-nav-tools{display:flex; align-items:center; gap:8px; flex:none}
.f3d-switch{display:flex; padding:3px; border-radius:10px; border:1px solid var(--f3-line-2); background:rgba(10,19,34,.7)}
.f3d-switch button{padding:7px 12px; border:0; border-radius:7px; background:none; color:var(--f3-dim); font:800 12px/1 var(--f3-head); letter-spacing:.03em; cursor:pointer; white-space:nowrap}
.f3d-switch button[aria-pressed="true"]{background:rgba(var(--f3-blue-rgb),.16); color:#fff; box-shadow:inset 0 0 0 1px rgba(var(--f3-blue-rgb),.45)}
.f3d-step{display:inline-grid; place-items:center; width:38px; height:38px; border-radius:9px; border:1px solid var(--f3-line-2); background:rgba(10,19,34,.7); color:#fff; cursor:pointer}
.f3d-step svg{width:17px; height:17px}
.f3d-step:hover{border-color:var(--f3-blue)}
.f3d-step:disabled{opacity:.35; cursor:default}

/* ══ stations (list view) ══ */
.f3d-station{max-width:1320px; margin:0 auto; padding:clamp(48px,6vw,88px) 30px 0; scroll-margin-top:var(--f3-navh)}
.f3d-station-head{max-width:860px}
.f3d-station-head h2{margin-top:14px; display:flex; flex-direction:column; gap:10px}
.f3d-verb{font-weight:900; font-size:clamp(34px,5.2vw,76px); line-height:.98; letter-spacing:.02em; text-transform:uppercase; color:#fff}
.f3d-sub{font-weight:800; font-size:clamp(19px,2vw,28px); line-height:1.2; letter-spacing:-.01em; color:var(--f3-blue); text-wrap:balance}
.f3d-station-head p{margin-top:14px; max-width:62ch; font-size:clamp(15px,1.12vw,17px); line-height:1.62; color:var(--f3-dim)}

.f3d-feature{display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:clamp(22px,3.4vw,54px); align-items:center;
  padding:clamp(30px,4vw,56px) 0; border-bottom:1px solid var(--f3-line); scroll-margin-top:var(--f3-navh)}
.f3d-feature:nth-of-type(even) .f3d-card{order:2}
.f3d-feature:nth-of-type(even){grid-template-columns:minmax(0,7fr) minmax(0,5fr)}
.f3d-card h3{margin-top:12px; font-weight:900; font-size:clamp(23px,2.3vw,34px); line-height:1.08; letter-spacing:-.015em; text-wrap:balance}
.f3d-line{margin-top:10px !important; font-size:clamp(14.5px,1.08vw,16.5px); line-height:1.55; color:var(--f3-dim); text-wrap:pretty}
.f3d-more{white-space:nowrap; color:var(--f3-blue); border-bottom:1px solid rgba(var(--f3-blue-rgb),.45)}
.f3d-more:hover{color:#fff; border-bottom-color:#fff}
.f3d-why{margin:18px 0 0; display:grid; gap:12px}
.f3d-why>div{position:relative; padding-left:16px}
.f3d-why>div:before{content:""; position:absolute; left:0; top:3px; bottom:3px; width:2px; border-radius:2px; background:var(--f3-blue)}
.f3d-why-problem:before{background:var(--f3-red) !important}
.f3d-why-then:before{background:var(--f3-gold) !important}
.f3d-why dt{font-family:var(--f3-eye); font-weight:700; font-size:10px; letter-spacing:.2em; text-transform:uppercase; color:var(--f3-muted)}
.f3d-why dd{margin:4px 0 0; font-size:14.5px; line-height:1.5; color:var(--f3-text)}
.f3d-facts{list-style:none; display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 0; padding:0}
.f3d-facts li{display:flex; align-items:baseline; gap:7px; padding:7px 11px; border-radius:9px; border:1px solid var(--f3-line-2); background:rgba(10,19,34,.55)}
.f3d-facts b{font-weight:900; font-size:17px; color:#fff; font-variant-numeric:tabular-nums}
.f3d-facts span{font-size:12px; color:var(--f3-dim)}
.f3d-note{margin-top:12px !important; font-size:12.5px; color:var(--f3-muted)}

/* The recording, framed as the browser window it was recorded in. */
.f3d-media{margin:0; min-width:0}
.f3d-frame{border-radius:12px; overflow:hidden; border:1px solid var(--f3-line-2); background:#060B16; box-shadow:0 30px 80px rgba(0,0,0,.55)}
.f3d-frame-bar{display:flex; align-items:center; gap:12px; padding:9px 12px; border-bottom:1px solid var(--f3-line); background:rgba(10,19,34,.9)}
.f3d-dots{display:flex; gap:5px}
.f3d-dots i{width:8px; height:8px; border-radius:50%; background:rgba(120,148,210,.3)}
.f3d-url{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 11.5px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:var(--f3-muted)}
.f3d-rec{flex:none; display:inline-flex; align-items:center; gap:6px; font-family:var(--f3-eye); font-weight:700; font-size:9px; letter-spacing:.18em; color:var(--f3-green)}
.f3d-rec:before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor}
.f3d-shot{position:relative; aspect-ratio:1400/686; background:#04070e}
.f3d-poster{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.f3d-video{position:relative; display:block; width:100%; height:100%; object-fit:cover}
.f3d-still{display:block; width:100%; height:auto; aspect-ratio:1400/686; background:#04070e; object-fit:cover}
.f3d-bigplay{position:absolute; left:50%; top:50%; width:74px; height:74px; margin:-37px 0 0 -37px; display:grid; place-items:center; border-radius:50%;
  border:1px solid rgba(255,255,255,.5); background:rgba(5,10,20,.62); color:#fff; cursor:pointer; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  box-shadow:0 14px 40px rgba(0,0,0,.5); transition:transform .18s ease, background .18s ease}
.f3d-bigplay[hidden]{display:none}
.f3d-bigplay:hover{transform:scale(1.08); background:rgba(var(--f3-blue-rgb),.35)}
.f3d-bigplay svg{width:26px; height:26px; margin-left:4px; fill:currentColor}
html.f3d-on .f3d-poster,html.f3d-on .f3d-bigplay{display:none}
.f3d-media figcaption{margin-top:10px; font-size:12.5px; color:var(--f3-muted)}

/* ══ join blocks ══ */
.f3d-mid{padding:clamp(30px,4vw,56px) 0}
.f3d-mid-in{max-width:760px; padding:clamp(22px,2.6vw,34px); border-radius:18px; border:1px solid var(--f3-line-2);
  background:linear-gradient(180deg,rgba(14,26,48,.78),rgba(6,12,24,.86))}
.f3d-mid-h{margin-top:12px !important; font-weight:900; font-size:clamp(22px,2.4vw,32px); line-height:1.1; color:#fff; letter-spacing:-.01em}
.f3d-mid-in>p:not(.f3d-mid-h){margin-top:10px; font-size:15px; line-height:1.55; color:var(--f3-dim)}
.f3d-mid .f3d-cta-row{margin-top:18px}

.f3d-join{padding:clamp(64px,8vw,120px) 30px; text-align:center}
.f3d-join-in{max-width:880px; margin:0 auto; display:flex; flex-direction:column; align-items:center}
.f3d-join h2{margin-top:16px; font-weight:900; font-size:clamp(30px,4.4vw,60px); line-height:1.04; letter-spacing:.01em; text-transform:uppercase; text-wrap:balance}
.f3d-join h2 span{color:var(--f3-blue)}
.f3d-join-loop{margin-top:18px !important; font-weight:800; font-size:clamp(16px,1.5vw,20px); color:#fff}
.f3d-join-in>p:not(.f3d-join-loop):not(.f3d-claim){margin-top:12px; max-width:60ch; font-size:clamp(15px,1.12vw,17px); line-height:1.6; color:var(--f3-dim)}
.f3d-join-in>p a{border-bottom:1px solid rgba(var(--f3-blue-rgb),.45)}
.f3d-join .f3d-cta-row{margin-top:26px; justify-content:center}
.f3d-claim{margin-top:22px !important; font-size:12.5px; color:var(--f3-muted)}
.f3d-credit{margin-top:8px !important; font-size:11.5px !important; line-height:1.5; color:var(--f3-muted); opacity:.8}
.f3d-credit a{border-bottom:1px solid rgba(var(--f3-blue-rgb),.35)}
.f3d-credit a:hover{color:var(--f3-blue)}
.f3d-foot{position:relative; z-index:5; background:#04070e}

/* ══ full-size recording ══ */
.f3d-box{width:min(1400px,94vw); max-width:none; max-height:94vh; padding:0; border:1px solid var(--f3-line-3); border-radius:16px; background:#060B16; color:var(--f3-text);
  box-shadow:0 40px 120px rgba(0,0,0,.7); overflow:hidden; font-family:'Inter',var(--font-sans),system-ui,sans-serif}
/* the page behind the full-size view does not rubber-band or pull to refresh while it is held (features_3d.js: holdPage) */
html.f3d-box-open{overscroll-behavior:none}
.f3d-box::backdrop{background:rgba(2,5,11,.82); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px)}
.f3d-box[open]{display:flex; flex-direction:column; animation:f3d-pop .28s cubic-bezier(.2,.7,.3,1)}
@keyframes f3d-pop{from{opacity:0; transform:scale(.96) translateY(10px)}to{opacity:1; transform:none}}
.f3d-box-head{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 18px; border-bottom:1px solid rgba(120,148,210,.14)}
.f3d-box-head .f3d-eyebrow{display:flex; gap:10px; font-family:'Orbitron',var(--font-display),sans-serif; font-weight:700; font-size:10px; letter-spacing:.24em; text-transform:uppercase; color:#5BC3F9}
.f3d-box-head .f3d-eyebrow i{font-style:normal; opacity:.45}
.f3d-box-head h2{margin:5px 0 0; font-weight:900; font-size:clamp(17px,1.7vw,22px); line-height:1.15; color:#fff}
.f3d-box-close{flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:10px; border:1px solid rgba(120,148,210,.3); background:rgba(10,19,34,.8); color:#fff; cursor:pointer}
.f3d-box-close:hover{border-color:#5BC3F9}
.f3d-box-close svg{width:18px; height:18px}
.f3d-box-media{min-height:0; background:#04070e}
.f3d-box-media :is(video,img){display:block; width:100%; height:auto; max-height:calc(94vh - 150px); aspect-ratio:1400/686; object-fit:contain; background:#04070e}
.f3d-box-line{margin:0; padding:13px 18px 16px; font-size:14.5px; line-height:1.5; color:#B8C2D6}

@media (max-width:860px){
  .f3d-hero-in,.f3d-station{padding-left:18px; padding-right:18px}
  .f3d-feature,.f3d-feature:nth-of-type(even){grid-template-columns:minmax(0,1fr); gap:18px}
  .f3d-feature:nth-of-type(even) .f3d-card{order:0}
  .f3d-nav{gap:8px; padding:0 10px}
  .f3d-sectors{gap:0; overflow-x:auto; scrollbar-width:none}
  .f3d-sectors::-webkit-scrollbar{display:none}
  .f3d-sector{flex:none}
  .f3d-sector-link{padding:9px 9px; font-size:12.5px}
  .f3d-join{padding-left:18px; padding-right:18px}
  .f3d-btn{flex:1 1 auto}
}

/* ════════════════════════════════════════════════════════════════════════
   3D TOUR — only when html.f3d-on is set (by the script in the page head).

   HOW THE TEXT BEHAVES, because it is the part that is easy to break: in the
   tour the sections are only the scroll track (tall, empty of visible flow
   content). Each section's `.f3d-panel` is PINNED to a fixed place in the
   view and shown only while its stop is the current one, so copy never
   scrolls half out of the window and two panels are never on screen
   together. The script sets --f3-vis (0..1) on the section.
   ════════════════════════════════════════════════════════════════════════ */
html.f3d-on .f3d-only-3d{display:revert !important}
html.f3d-on .f3d-btn.f3d-only-3d{display:inline-flex !important}
html.f3d-on .f3d-step.f3d-only-3d{display:inline-grid !important}
html.f3d-on .f3d-only-flat{display:none !important}
html.f3d-on .f3d{background:#07090d}
html.f3d-on .f3d-stage{display:block; position:fixed; left:0; top:0; width:100%; height:100vh; height:100lvh; z-index:0; overflow:hidden;
  background:radial-gradient(1200px 800px at 66% 42%, #1a212d 0%, #0d1118 55%, #07090d 100%)}
html.f3d-on #f3dCanvas{display:block; width:100%; height:100%; opacity:0; transition:opacity .9s ease}
html.f3d-on.f3d-ready #f3dCanvas{opacity:1}
html.f3d-on .f3d-stage:after{content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(125% 95% at 58% 45%, rgba(4,6,10,0) 62%, rgba(4,6,10,.42) 100%)}
/* Cinema bars: they slide in while the camera travels and through the opening,
   and out when it arrives. Moved by transform only; the lower one is taller by
   the sector bar it sits behind. */
.f3d-bar-t,.f3d-bar-b,.f3d-gantry{display:none}
html.f3d-on .f3d-bar-t,html.f3d-on .f3d-bar-b{display:block; position:absolute; left:0; right:0; height:7.5vh; background:#03050a; pointer-events:none; will-change:transform; z-index:1}
html.f3d-on .f3d-bar-t{top:0; height:calc(7.5vh + 34px); transform:translateY(-100%)}
html.f3d-on .f3d-bar-b{bottom:0; height:calc(7.5vh + 58px); transform:translateY(100%)}
/* The start lights of the opening: five lamps in a housing, hung under the top bar. */
html.f3d-on.f3d-intro .f3d-gantry{display:flex; position:absolute; left:50%; top:calc(7.5vh + 62px); transform:translateX(-50%); gap:13px; padding:11px 15px; border-radius:13px;
  background:linear-gradient(#151a24,#090c12); border:1px solid rgba(160,178,205,.2); box-shadow:0 18px 50px rgba(0,0,0,.6); z-index:2; transition:opacity .45s ease, transform .45s ease}
html.f3d-on .f3d-gantry i{display:block; width:24px; height:24px; border-radius:50%; background:#2b0d10; box-shadow:inset 0 0 0 2px rgba(0,0,0,.55)}
html.f3d-on .f3d-gantry i.f3d-is-on{background:radial-gradient(circle at 40% 35%,#ff9484,#ff2020 55%,#b40000); box-shadow:0 0 20px 5px rgba(255,44,32,.8), 0 0 56px 16px rgba(255,44,32,.36)}
html.f3d-on .f3d-gantry.f3d-is-out{opacity:0; transform:translateX(-50%) translateY(-14px)}
/* Chapter cards: a film's title for each room, between the cinema bars, as the
   camera comes in from somewhere else. The numeral is an outline behind the
   room's verb; the room's name sits under it between two rules. */
.f3d-chapter{display:none}
html.f3d-on .f3d-chapter{display:flex; flex-direction:column; align-items:center; justify-content:center; position:absolute; inset:0; z-index:1; pointer-events:none; text-align:center; opacity:0;
  transition:opacity .4s ease}
html.f3d-on .f3d-chapter.f3d-is-on{opacity:1; transition-duration:.25s}
html.f3d-on .f3d-chapter:before{content:""; position:absolute; inset:0; background:radial-gradient(60% 50% at 50% 50%, rgba(3,6,12,.72), rgba(3,6,12,0) 100%)}
html.f3d-on .f3d-chapter>b{position:absolute; left:50%; top:50%; font:900 clamp(130px,25vw,380px)/1 Inter,system-ui,sans-serif; letter-spacing:-.04em; color:transparent; -webkit-text-stroke:2px rgba(79,195,255,.5);
  transform:translate(-38%,-56%) scale(1.08); opacity:0; transition:transform 1.5s cubic-bezier(.16,.8,.2,1), opacity .5s ease}
html.f3d-on .f3d-chapter.f3d-is-on>b{transform:translate(-50%,-56%); opacity:1}
html.f3d-on .f3d-chapter>strong{position:relative; font:900 clamp(46px,10.5vw,170px)/.95 Inter,system-ui,sans-serif; text-transform:uppercase; color:#fff; letter-spacing:.22em; margin-right:-.22em;
  text-shadow:0 0 40px rgba(79,195,255,.45), 0 6px 30px rgba(0,0,0,.6); clip-path:inset(0 100% 0 0); transition:clip-path .55s cubic-bezier(.2,.8,.2,1), letter-spacing 1.5s cubic-bezier(.16,.8,.2,1), margin-right 1.5s cubic-bezier(.16,.8,.2,1)}
html.f3d-on .f3d-chapter.f3d-is-on>strong{clip-path:inset(0 -10% 0 -10%); letter-spacing:-.01em; margin-right:0}
html.f3d-on .f3d-chapter>span{position:relative; display:flex; align-items:center; gap:18px; margin-top:clamp(12px,2vw,26px); font:700 clamp(10px,1.15vw,16px)/1 Orbitron,Inter,sans-serif; letter-spacing:.42em; text-transform:uppercase; color:#7fd8ff;
  opacity:0; transform:translateY(10px); transition:opacity .4s ease .25s, transform .6s cubic-bezier(.2,.8,.2,1) .25s}
html.f3d-on .f3d-chapter>span:before,html.f3d-on .f3d-chapter>span:after{content:""; width:clamp(26px,6vw,90px); height:1px; background:linear-gradient(90deg, rgba(127,216,255,0), rgba(127,216,255,.9))}
html.f3d-on .f3d-chapter>span:after{transform:scaleX(-1)}
html.f3d-on .f3d-chapter.f3d-is-on>span{opacity:1; transform:none}
/* while a room's title is up, its own panel waits for it */
html.f3d-on.f3d-titling .f3d-station-head .f3d-panel{opacity:0 !important; transform:translateY(14px)}
html.f3d-on .f3d-station-head .f3d-panel{transition:opacity .45s ease, transform .6s cubic-bezier(.2,.8,.2,1)}
/* Dragging turns the view (or the car): the scene shows a hand, and says so once. */
html.f3d-on #f3dCanvas{cursor:grab; touch-action:pan-y}
html.f3d-on.f3d-dragging #f3dCanvas,html.f3d-on.f3d-dragging{cursor:grabbing}
html.f3d-on.f3d-dragging .f3d{user-select:none; -webkit-user-select:none}
.f3d-hint{display:none}
html.f3d-on .f3d-hint{display:flex; align-items:center; gap:10px; position:absolute; left:50%; bottom:calc(58px + 22px); transform:translate(-50%,10px); padding:9px 16px 9px 13px; border-radius:999px;
  font:700 10.5px/1 Orbitron,Inter,sans-serif; letter-spacing:.16em; text-transform:uppercase; color:#cfeaff; background:rgba(8,13,22,.82); border:1px solid rgba(127,216,255,.32);
  box-shadow:0 10px 30px rgba(0,0,0,.45); opacity:0; pointer-events:none; z-index:1; white-space:nowrap; transition:opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1)}
html.f3d-on .f3d-hint.f3d-is-on{opacity:1; transform:translate(-50%,0)}
html.f3d-on .f3d-hint>i{position:relative; width:26px; height:12px; flex:none; animation:f3d-hint 1.6s ease-in-out infinite}
html.f3d-on .f3d-hint>i:before{content:""; position:absolute; left:0; right:0; top:5px; height:2px; border-radius:2px; background:#7fd8ff}
html.f3d-on .f3d-hint>i:after{content:""; position:absolute; left:0; right:0; top:1px; height:10px;
  background:linear-gradient(135deg,transparent 46%,#7fd8ff 46%,#7fd8ff 54%,transparent 54%) left/8px 5px no-repeat, linear-gradient(45deg,transparent 46%,#7fd8ff 46%,#7fd8ff 54%,transparent 54%) left bottom/8px 5px no-repeat,
  linear-gradient(45deg,transparent 46%,#7fd8ff 46%,#7fd8ff 54%,transparent 54%) right top/8px 5px no-repeat, linear-gradient(135deg,transparent 46%,#7fd8ff 46%,#7fd8ff 54%,transparent 54%) right bottom/8px 5px no-repeat}
@keyframes f3d-hint{0%,100%{transform:translateX(-3px)} 50%{transform:translateX(3px)}}
@media (prefers-reduced-motion:reduce){ html.f3d-on .f3d-hint>i{animation:none} }
html.f3d-on .f3d-veil{position:absolute; inset:0; z-index:2; background:#06080c; opacity:0; pointer-events:none; transition:opacity .2s ease}
html.f3d-on .f3d-veil.f3d-is-on{opacity:1}

/* Everything but the stage sits above it and lets the pointer through to the
   scene; only the things a visitor reads or presses take it back. */
html.f3d-on .f3d>:not(.f3d-stage):not(.f3d-nav){position:relative; z-index:1; pointer-events:none}
html.f3d-on .f3d :is(a,button,input,.f3d-panel){pointer-events:auto}
html.f3d-on .f3d-nav{pointer-events:auto}
html.f3d-on .f3d .f3d-is-off :is(.f3d-panel,.f3d-panel *,.f3d-cue){pointer-events:none}

/* The scroll track. */
html.f3d-on .f3d-hero{min-height:100vh; padding:0}
html.f3d-on .f3d-station{max-width:none; padding:0; margin:0}
html.f3d-on .f3d-station-head{max-width:none; min-height:76vh}
html.f3d-on .f3d-feature{display:block; min-height:96vh; padding:0; border:0}
html.f3d-on .f3d-mid{min-height:90vh; padding:0}
html.f3d-on .f3d-join{min-height:135vh; padding:0}
html.f3d-on .f3d-media{position:absolute; left:0; top:0; width:2px; height:2px; overflow:hidden; opacity:0; pointer-events:none}

/* The pinned panels. */
html.f3d-on .f3d-panel{position:fixed; z-index:3; left:max(22px,4.6vw); top:50%; margin:0; isolation:isolate;
  opacity:var(--f3-vis,0); transform:translateY(-50%) translateY(calc((1 - var(--f3-vis,0)) * 14px))}
html.f3d-on .f3d-hero .f3d-panel{opacity:var(--f3-vis,1); transform:translateY(-50%) translateY(calc((1 - var(--f3-vis,1)) * 14px))}

/* Opening. */
html.f3d-on .f3d-hero-in{width:min(540px,38vw); max-width:none; padding:0}
html.f3d-on .f3d-hero-in:before,html.f3d-on .f3d-station-in:before{content:""; position:absolute; z-index:-1; inset:-22% -34% -22% -60%; pointer-events:none;
  background:radial-gradient(closest-side,rgba(6,8,12,.9) 0%,rgba(6,8,12,.62) 55%,rgba(6,8,12,0) 100%)}
html.f3d-on .f3d-hero h1{font-size:clamp(32px,4vw,60px)}
.f3d-cue{position:absolute; left:50%; bottom:calc(var(--f3-navh) + 14px); transform:translateX(-50%); align-items:center; gap:10px;
  font-family:var(--f3-eye); font-weight:700; font-size:10px; letter-spacing:.24em; text-transform:uppercase; color:var(--f3-dim); white-space:nowrap}
html.f3d-on .f3d-cue.f3d-only-3d{display:inline-flex !important; position:fixed; z-index:3; opacity:var(--f3-vis,1)}
.f3d-cue:hover{color:#fff}
.f3d-cue-mouse{display:block; width:20px; height:32px; border-radius:11px; border:1.5px solid currentColor; position:relative}
.f3d-cue-mouse i{position:absolute; left:50%; top:6px; width:3px; height:7px; margin-left:-1.5px; border-radius:2px; background:var(--f3-blue); animation:f3d-wheel 1.6s ease-in-out infinite}
@keyframes f3d-wheel{0%{transform:translateY(0); opacity:1}70%{transform:translateY(10px); opacity:0}100%{transform:translateY(0); opacity:0}}

/* Station labels pinned to the bays in the opening and closing overviews. */
html.f3d-on .f3d-tags{position:absolute; inset:0; z-index:1; pointer-events:none}
html.f3d-on .f3d-tag{position:absolute; left:0; top:0; display:inline-flex; align-items:center; gap:7px; padding:6px 11px; border-radius:999px;
  border:1px solid rgba(var(--f3-blue-rgb),.45); background:rgba(8,11,17,.82); color:#fff; font-weight:800; font-size:12.5px; white-space:nowrap;
  opacity:0; visibility:hidden; transition:opacity .3s ease, border-color .18s, background .18s; will-change:transform; pointer-events:none}
html.f3d-on .f3d-tag b{font-family:var(--f3-eye); font-size:10px; letter-spacing:.1em; color:var(--f3-blue)}
html.f3d-on .f3d-tag.f3d-is-on{opacity:1; visibility:visible; pointer-events:auto}
html.f3d-on .f3d-tag:hover{border-color:#fff; background:rgba(var(--f3-blue-rgb),.24)}
html.f3d-on .f3d-tip{position:absolute; left:0; top:0; padding:6px 10px; border-radius:8px; background:rgba(8,11,17,.92); border:1px solid rgba(var(--f3-blue-rgb),.5);
  color:#fff; font-weight:700; font-size:12px; white-space:nowrap; opacity:0; z-index:3; pointer-events:none; transition:opacity .15s; will-change:transform}
html.f3d-on .f3d-tip.f3d-is-on{opacity:1}

/* Arriving at a station: its name, low in the corner, so the room itself is the picture. */
html.f3d-on .f3d-station-in{top:auto; bottom:calc(var(--f3-navh) + 34px); width:min(500px,42vw); padding:22px 24px 22px;
  border-radius:18px; border:1px solid var(--f3-line-2); background:linear-gradient(180deg,rgba(11,17,30,.94),rgba(7,11,20,.97));
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); box-shadow:0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  transform:translateY(calc((1 - var(--f3-vis,0)) * 14px))}
html.f3d-on .f3d-station-in:before{content:none}
html.f3d-on .f3d-verb{font-size:clamp(34px,3.8vw,60px)}
html.f3d-on .f3d-sub{color:var(--f3-blue); font-size:clamp(17px,1.5vw,22px)}
html.f3d-on .f3d-station-head p{color:var(--f3-dim); font-size:15px; line-height:1.55}

/* A feature: its card on the left, the scene's screen framed on the right by
   the camera. The inline recording is still in the document (it IS the
   screen's texture) but is not shown twice. */
html.f3d-on .f3d-feature:nth-of-type(even) .f3d-card{order:0}
html.f3d-on .f3d-card{width:min(430px,40vw); padding:24px 24px 18px; border-radius:18px; border:1px solid var(--f3-line-2);
  background:linear-gradient(180deg,rgba(12,16,24,.9),rgba(7,9,14,.95)); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  box-shadow:0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05)}
html.f3d-on .f3d-card h3{font-size:clamp(22px,2vw,30px)}
html.f3d-on .f3d-line{font-size:14.5px}
html.f3d-on .f3d-why{margin-top:14px; gap:10px}
html.f3d-on .f3d-why dd{font-size:13.8px}
html.f3d-on .f3d-facts{margin-top:14px}

.f3d-player{align-items:center; gap:10px; margin-top:16px; padding-top:14px; border-top:1px solid var(--f3-line)}
html.f3d-on .f3d-player.f3d-only-3d{display:flex !important}
.f3d-play{flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:50%; border:1px solid rgba(var(--f3-blue-rgb),.5); background:rgba(var(--f3-blue-rgb),.12); color:#fff; cursor:pointer}
.f3d-play:hover{background:rgba(var(--f3-blue-rgb),.26)}
.f3d-play svg{width:16px; height:16px; fill:currentColor}
.f3d-play .f3d-ico-play{display:none}
.f3d-play.f3d-is-paused .f3d-ico-play{display:block}
.f3d-play.f3d-is-paused .f3d-ico-pause{display:none}
.f3d-scrub{flex:1; min-width:0; height:22px; margin:0; background:none; cursor:pointer; -webkit-appearance:none; appearance:none}
.f3d-scrub::-webkit-slider-runnable-track{height:4px; border-radius:2px; background:linear-gradient(90deg,var(--f3-blue) var(--f3-pos,0%),rgba(120,148,210,.28) var(--f3-pos,0%))}
.f3d-scrub::-moz-range-track{height:4px; border-radius:2px; background:rgba(120,148,210,.28)}
.f3d-scrub::-moz-range-progress{height:4px; border-radius:2px; background:var(--f3-blue)}
.f3d-scrub::-webkit-slider-thumb{-webkit-appearance:none; appearance:none; width:14px; height:14px; margin-top:-5px; border-radius:50%; background:#fff; box-shadow:0 0 0 3px rgba(var(--f3-blue-rgb),.35)}
.f3d-scrub::-moz-range-thumb{width:14px; height:14px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 3px rgba(var(--f3-blue-rgb),.35)}
.f3d-expand{flex:none; display:inline-flex; align-items:center; gap:7px; min-height:38px; padding:0 12px; border-radius:9px; border:1px solid var(--f3-line-3); background:rgba(10,19,34,.7);
  color:#fff; font:800 12.5px/1 var(--f3-head); cursor:pointer; white-space:nowrap}
.f3d-expand:hover{border-color:var(--f3-blue)}
.f3d-expand svg{width:15px; height:15px}

html.f3d-on .f3d-mid-in{width:min(500px,44vw); max-width:none; -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); background:linear-gradient(180deg,rgba(12,16,24,.9),rgba(7,9,14,.95))}
html.f3d-on .f3d-join{text-align:left}
html.f3d-on .f3d-join-in{width:min(580px,46vw); max-width:none; align-items:flex-start; padding:28px; border-radius:20px; border:1px solid var(--f3-line-2);
  background:linear-gradient(180deg,rgba(12,16,24,.88),rgba(7,9,14,.94)); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px)}
html.f3d-on .f3d-join h2{font-size:clamp(26px,3.2vw,46px)}
html.f3d-on .f3d-join .f3d-cta-row{justify-content:flex-start}

/* The sector bar: fixed along the bottom, one segment per station, one tick
   per feature, filled as far as the visitor has walked. */
html.f3d-on .f3d-nav{position:fixed; left:0; right:0; top:auto; bottom:0; z-index:40; padding:0 max(14px,2.4vw); gap:14px; border-bottom:0;
  background:linear-gradient(180deg,rgba(8,11,17,.76),rgba(6,8,12,.95)); transition:transform .3s ease, opacity .3s ease}
html.f3d-on .f3d-nav.f3d-is-away{transform:translateY(110%); opacity:0}
html.f3d-on .f3d-sectors{gap:10px}
html.f3d-on .f3d-sector{padding:7px 0 9px}
html.f3d-on .f3d-sector-link{padding:3px 2px 7px; font-size:12.5px; border-radius:6px}
html.f3d-on .f3d-sector-link:hover{background:none}
html.f3d-on .f3d-ticks{display:flex; position:relative; height:4px; border-radius:2px; background:rgba(150,165,195,.22)}
html.f3d-on .f3d-ticks:before{content:""; position:absolute; left:0; top:0; bottom:0; width:calc(var(--f3-fill,0) * 100%); border-radius:2px;
  background:linear-gradient(90deg,rgba(var(--f3-blue-rgb),.7),var(--f3-blue)); box-shadow:0 0 12px rgba(var(--f3-blue-rgb),.6)}
html.f3d-on .f3d-ticks li{position:relative; flex:1}
html.f3d-on .f3d-ticks a{position:absolute; right:-7px; top:-12px; width:28px; height:28px; display:grid; place-items:center}
html.f3d-on .f3d-ticks a:before{content:""; width:8px; height:8px; border-radius:50%; background:#10141c; border:1.5px solid rgba(175,190,220,.65); transition:transform .18s, background .18s, border-color .18s}
html.f3d-on .f3d-ticks a.f3d-is-done:before{background:var(--f3-blue); border-color:var(--f3-blue)}
html.f3d-on .f3d-ticks a.f3d-is-on:before{background:#fff; border-color:#fff; transform:scale(1.5); box-shadow:0 0 12px rgba(255,255,255,.7)}
html.f3d-on .f3d-ticks a:hover:before,html.f3d-on .f3d-ticks a:focus-visible:before{transform:scale(1.6); border-color:#fff}
html.f3d-on .f3d-ticks a span{position:absolute; bottom:30px; right:50%; transform:translateX(50%) translateY(4px); padding:6px 10px; border-radius:8px; background:rgba(8,11,17,.96);
  border:1px solid rgba(var(--f3-blue-rgb),.5); color:#fff; font-weight:700; font-size:12px; white-space:nowrap; opacity:0; visibility:hidden; transition:opacity .15s, transform .15s; pointer-events:none}
html.f3d-on .f3d-ticks a:hover span,html.f3d-on .f3d-ticks a:focus-visible span{opacity:1; visibility:visible; transform:translateX(50%)}
html.f3d-on .f3d-sector:last-child .f3d-ticks li:last-child a span{right:0; transform:translateY(4px)}
html.f3d-on .f3d-sector:last-child .f3d-ticks li:last-child a:is(:hover,:focus-visible) span{transform:none}

/* Phones and narrow or portrait windows: the scene's screen sits in the top of
   the view, the panel is pinned under it, playback sits right under the
   screen it controls and the three reasons become a swipe row. */
@media (max-width:860px), (orientation:portrait){
  html.f3d-on .f3d-panel,html.f3d-on .f3d-hero .f3d-panel{left:12px; right:12px; top:auto; bottom:calc(var(--f3-navh) + 10px); width:auto;
    transform:translateY(calc((1 - var(--f3-vis,0)) * 14px))}
  html.f3d-on .f3d-hero .f3d-panel{bottom:calc(var(--f3-navh) + 46px); transform:translateY(calc((1 - var(--f3-vis,1)) * 14px))}
  html.f3d-on .f3d-hero-in:before,html.f3d-on .f3d-station-in:before{inset:-70px -20px -120px -20px;
    background:linear-gradient(180deg,rgba(6,8,12,0) 0%,rgba(6,8,12,.82) 26%,rgba(6,8,12,.95) 100%)}
  html.f3d-on .f3d-hero h1{font-size:clamp(28px,8.2vw,40px)}
  html.f3d-on .f3d-hero-in>p{font-size:14.2px; line-height:1.48}
  html.f3d-on .f3d-hero .f3d-btn{min-height:44px}
  html.f3d-on .f3d-station-in{left:12px; right:12px; bottom:calc(var(--f3-navh) + 10px); width:auto; padding:16px 16px 18px}
  html.f3d-on .f3d-card{display:flex; flex-direction:column; max-height:calc(100vh - 38vh - var(--f3-navh) - 14px); max-height:calc(100svh - 38svh - var(--f3-navh) - 14px);
    overflow-y:auto; padding:12px 16px 14px; border-radius:16px; scrollbar-width:none}
  html.f3d-on .f3d-card::-webkit-scrollbar{display:none}
  html.f3d-on .f3d-player.f3d-only-3d{order:-1; flex:none; margin:0 0 12px; padding:0 0 12px; border-top:0; border-bottom:1px solid var(--f3-line)}
  html.f3d-on .f3d-card h3{margin-top:8px; font-size:21px}
  html.f3d-on .f3d-line{margin-top:6px !important; font-size:13.8px; line-height:1.45}
  html.f3d-on .f3d-why{display:flex; flex:none; gap:10px; margin:12px -16px 0; padding:0 16px 4px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none}
  html.f3d-on .f3d-why::-webkit-scrollbar{display:none}
  html.f3d-on .f3d-why>div{flex:0 0 84%; scroll-snap-align:start; padding:10px 12px 10px 14px; border-radius:11px; background:rgba(150,165,195,.08)}
  html.f3d-on .f3d-why>div:before{top:10px; bottom:10px; left:5px}
  html.f3d-on .f3d-why dd{font-size:13.4px; line-height:1.42}
  html.f3d-on .f3d-facts{flex:none; margin-top:10px; gap:6px}
  html.f3d-on .f3d-facts li{padding:5px 9px}
  html.f3d-on .f3d-facts b{font-size:15px}
  html.f3d-on .f3d-mid-in{padding:18px}
  html.f3d-on .f3d-join-in{padding:18px; max-height:calc(100vh - 34vh - var(--f3-navh)); overflow-y:auto}
  html.f3d-on .f3d-join h2{font-size:clamp(22px,6.4vw,32px)}
  html.f3d-on .f3d-nav{padding:0 8px; gap:6px; overflow:visible}
  html.f3d-on .f3d-sectors{gap:5px; overflow:visible}
  html.f3d-on .f3d-sector{flex:1 1 0}
  html.f3d-on .f3d-sector-link{justify-content:center; padding:3px 0 7px}
  html.f3d-on .f3d-sector-link span{display:none}
  html.f3d-on .f3d-sector.f3d-is-on{flex:4 1 0}
  html.f3d-on .f3d-sector.f3d-is-on .f3d-sector-link span{display:inline}
  html.f3d-on .f3d-ticks a span{display:none}
  html.f3d-on .f3d-switch button[aria-pressed="true"]{display:none}
  html.f3d-on .f3d-step.f3d-only-3d{display:none !important}
  .f3d-cue{font-size:9px; letter-spacing:.18em}
}

/* Short windows (a laptop with the browser's toolbars open): the opening has to
   fit one screen with its button visible, so the station chips, which the bay
   labels and the sector bar already repeat, give up their rows. */
@media (max-height:800px) and (min-width:861px) and (orientation:landscape){
  html.f3d-on .f3d-hero h1{font-size:clamp(30px,min(4vw,7.4vh),60px)}
  html.f3d-on .f3d-card{padding:18px 20px 14px}
  html.f3d-on .f3d-why{margin-top:10px; gap:8px}
  html.f3d-on .f3d-facts{margin-top:10px}
  html.f3d-on .f3d-player{margin-top:12px; padding-top:10px}
}

@media (prefers-reduced-motion:reduce){
  .f3d-cue-mouse i{animation:none}
  .f3d-box[open]{animation:none}
  .f3d-btn{transition:none}
}
