/* THE ARCADE flight — the Arcade's flagship scroll scene (SCROLL DOWN ANIMATIONS seat, Opus worker B, 2026-10-17).
   Two hosts share it: the home page "Games" portal card (#play a.bigscene → .arc-run) and the /games/ hero (#arcHero).
   Engine + art map: /arcade-scene/arcade-scene.js · sources: /arcade-scene/SOURCES.md (every tile, clip and piece is the
   game's own pixels — ANY-APP §22). Mode flags live on <html>, set before the host is laid out (CLS 0):
     html.arc-m  = JS + motion   → tall run, sticky stage, the 3D flight
     html.arc-rm = JS + reduced  → the still grid of real captures
     neither     = JS off        → the still grid (home) / the plain hero text (/games/) */

/* ---------- the still grid (JS off + reduced motion) ---------- */
.arc-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:4px;background:#05060f}
.arc-grid img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:6px}
.bigscene.arc .arc-grid img{aspect-ratio:4/3;object-position:50% 50%;transition:none}
.bigscene.arc:hover .arc-grid img{transform:none}
.bigscene .arc-tilt{position:absolute;width:0;height:0;overflow:hidden}   /* the home tilt script's harmless target */
@media(max-width:560px){.arc-grid{grid-template-columns:repeat(4,1fr);gap:3px;padding:3px}}
.arc-stage,.arc-title,.arc-sub{display:none}

/* /games/ hero: JS off shows the hero exactly as before; reduced motion adds the still grid under the text */
.arc-hero .arc-grid{display:none}
html.arc-rm .arc-hero .arc-grid{display:grid;max-width:1060px;margin:26px auto 0;border-radius:18px;overflow:hidden;
  border:1px solid rgba(120,140,220,.18)}

/* ---------- motion: home card ---------- */
.arc-run{position:relative;--arc-top:calc(var(--navh,122px) + 14px);--arc-h:min(calc(100svh - var(--navh,122px) - 30px),820px);--arc-T:120svh}
html.arc-m .arc-run{height:calc(var(--arc-h) + var(--arc-T))}
html.arc-m .arc-run .bigscene.arc{position:sticky;top:var(--arc-top);height:var(--arc-h);opacity:1;transform:none;transition:border-color .5s,box-shadow .5s;
  background:#03040b;contain:layout paint;isolation:isolate}
html.arc-m .arc-run .arc-grid{display:none}
@media(max-width:560px){
  /* the phone menu bar is a 3×3 rail (~190 px, ~235 px under 350 px), taller than --navh; the bottom ~110 px are the JOIN / ✦ chips */
  .arc-run{--arc-top:198px;--arc-h:max(380px,calc(100svh - 198px - 112px));--arc-T:110svh}
  html.arc-m .arc-run .bigscene.arc{display:block}
  html.arc-m .arc-run .bigscene.arc .badge{position:absolute;top:12px;left:12px;margin:0}
  html.arc-m .arc-run .bigscene.arc .enter{position:absolute;left:14px;right:14px;bottom:14px;margin:0}
}

/* ---------- motion: /games/ hero ---------- */
html.arc-m header.hero.arc-hero{display:block;min-height:0;height:calc(100svh + var(--arc-T,100svh));padding:0;margin:0}
html.arc-m .arc-hero .arc-pin{position:sticky;top:0;height:100svh;overflow:hidden;contain:layout paint;isolation:isolate}
html.arc-m .arc-hero .arc-stage{top:var(--navh,122px);bottom:0}
html.arc-m .arc-hero .arc-copy{position:absolute;left:0;right:0;top:calc(var(--navh,122px) + 2svh);z-index:4;text-align:center;padding:0 18px;
  transform-origin:50% 0;text-shadow:0 0 30px rgba(3,4,12,.9);will-change:transform;pointer-events:none}
html.arc-m .arc-hero .arc-copy h1.title{font-size:clamp(44px,9vw,120px);display:inline-block}
html.arc-m .arc-hero .arc-copy .subtitle{max-width:620px;margin:14px auto 0;text-shadow:0 2px 18px #000,0 0 3px #000}
html.arc-m .arc-hero .arc-copy .kicker{text-shadow:0 2px 12px #000}
html.arc-m .arc-hero .arc-copy::before{content:"";position:absolute;left:50%;top:50%;width:min(900px,96vw);height:150%;z-index:-1;
  transform:translate(-50%,-50%);background:radial-gradient(closest-side,rgba(3,4,12,.72),rgba(3,4,12,.35) 60%,transparent);pointer-events:none}

/* ---------- the stage (both hosts) ---------- */
html.arc-m .arc-stage{display:block;position:absolute;inset:0;overflow:hidden;pointer-events:none;
  background:radial-gradient(70% 60% at 50% 50%,#0b1030 0%,#05060f 62%,#020208 100%)}
html.arc-m .arc-world{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d}
html.arc-m .arc-pl{position:absolute;left:0;top:0;display:block;border-radius:10px;overflow:hidden;visibility:hidden;
  backface-visibility:hidden;will-change:transform,opacity;background:#05060f;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--c) 55%,transparent),0 0 46px -6px color-mix(in srgb,var(--c) 60%,transparent)}
html.arc-m .arc-pl img,html.arc-m .arc-pl video{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;
  aspect-ratio:auto;object-fit:cover;object-position:50% 50%;transition:none;transform:none}
html.arc-m .bigscene.arc:hover .arc-pl img{transform:none}
html.arc-m .arc-pl video{opacity:0;transition:opacity .7s ease}
html.arc-m .arc-pl video.on{opacity:1}
/* the landed wall: every tile opens its game (arcade-scene.js toggles .arc-tap at the end of the flight) */
html.arc-m .arc-tap .arc-pl.arc-w{pointer-events:auto;cursor:pointer;transition:filter .18s ease,box-shadow .18s ease}
html.arc-m .arc-tap .arc-pl.arc-w:hover{filter:brightness(1.14) saturate(1.1);
  box-shadow:0 0 0 2px var(--c),0 0 60px -4px color-mix(in srgb,var(--c) 85%,transparent)}
html.arc-m .arc-tap .arc-pl.arc-w:hover b::after{content:" \25B8 PLAY";color:var(--c)}
html.arc-m .arc-tap .arc-pl.arc-w:active{filter:brightness(1.3)}
html.arc-rm .arc-hero .arc-grid img{cursor:pointer}
html.arc-m .arc-pl b{position:absolute;left:12px;bottom:11px;z-index:2;font:500 17px/1 Michroma,'Space Grotesk',sans-serif;letter-spacing:.12em;
  color:#fff;text-transform:uppercase;padding:8px 11px 7px;border-radius:9px;background:rgba(3,4,12,.72);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 60%,transparent);white-space:nowrap;transform-origin:0 100%;
  max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis}
html.arc-m .arc-world img.arc-pc{position:absolute;left:0;top:0;display:block;height:auto;max-width:none;aspect-ratio:auto;object-fit:fill;
  visibility:hidden;transition:none;will-change:transform,opacity;backface-visibility:hidden;pointer-events:none}
html.arc-m .arc-cv{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:2}
html.arc-m .arc-glow{position:absolute;inset:-10%;z-index:1;opacity:.35;will-change:opacity;
  background:radial-gradient(34% 30% at 50% 50%,rgba(110,231,255,.22),rgba(167,139,250,.08) 55%,transparent 75%)}
html.arc-m .arc-vig{position:absolute;inset:0;z-index:3;
  background:radial-gradient(120% 100% at 50% 50%,transparent 55%,rgba(2,2,8,.75) 100%),
             linear-gradient(180deg,rgba(2,2,8,.0) 70%,rgba(2,2,8,.55) 100%)}
.arc-hero .arc-vig{background:radial-gradient(120% 100% at 50% 50%,transparent 55%,rgba(6,6,18,.7) 100%),
             linear-gradient(180deg,rgba(6,6,18,0) 90%,#060612 100%)!important}

/* home: the title that lands at the climax + the count line; ENTER rises with it */
html.arc-m .bigscene.arc .arc-title{display:block;position:absolute;left:0;right:0;top:5%;z-index:4;text-align:center;pointer-events:none;
  font:400 clamp(26px,5.2vw,58px)/1 Michroma,sans-serif;letter-spacing:.08em;color:#fff;opacity:0;will-change:transform,opacity;
  text-shadow:0 0 28px rgba(61,255,200,.55),0 0 2px #fff,0 4px 30px #000;transform-origin:50% 50%}
html.arc-m .bigscene.arc .arc-title i{font-style:normal;display:block;line-height:1.08}
html.arc-m .bigscene.arc .arc-title i:first-child{font-size:.62em;letter-spacing:.5em;margin-right:-.5em;color:#bff8ea}
@media(max-width:599px){html.arc-m .bigscene.arc .arc-title{font-size:26px;top:52px}html.arc-m .bigscene.arc .arc-sub{top:86px}html.arc-m .bigscene.arc .arc-title i{display:inline}
  html.arc-m .bigscene.arc .arc-title i:first-child{font-size:1em;letter-spacing:.08em;margin:0;color:#fff}}
html.arc-m .bigscene.arc .arc-sub{display:block;position:absolute;left:0;right:0;top:calc(5% + clamp(34px,6.2vw,70px));z-index:4;text-align:center;
  font-size:10.5px;letter-spacing:.28em;text-transform:uppercase;color:#bff8ea;opacity:0;pointer-events:none;text-shadow:0 2px 10px #000}
html.arc-m .bigscene.arc .badge,html.arc-m .bigscene.arc .enter{z-index:5}
html.arc-m .bigscene.arc .enter{opacity:0;will-change:opacity,transform}
html.arc-m .bigscene.arc:focus-visible .enter,html.arc-m .bigscene.arc.arc-done .enter{opacity:1!important}
html.arc-m .arc-cue{position:absolute;left:50%;bottom:16px;z-index:5;transform:translateX(-50%);font-size:10.5px;letter-spacing:.3em;
  text-transform:uppercase;color:rgba(232,236,255,.7);text-shadow:0 2px 10px #000;pointer-events:none;white-space:nowrap}

@media(max-width:349px){.arc-run{--arc-top:242px;--arc-h:max(360px,calc(100svh - 242px - 112px))}}
@media(max-width:599px){html.arc-m .arc-pl b{font-size:11px;letter-spacing:.04em;left:9px;bottom:8px;padding:5px 7px 4px;white-space:normal;line-height:1.15}}
/* phones: the /games/ menu rail is ~190 px (taller than --navh) and the JOIN / ✦ chips own the bottom ~110 px */
@media(max-width:560px){html.arc-m .arc-hero .arc-stage{top:196px}html.arc-m .arc-hero .arc-copy{top:202px}}
@media(max-width:349px){html.arc-m .arc-hero .arc-stage{top:240px}html.arc-m .arc-hero .arc-copy{top:246px}}
/* returning visitors (/scene-memory.js): a seen flight boots FINISHED — no pin travel, the wall at normal card height */
html.arc-m.scm-f-play #arcHome,html.arc-m.scm-f-games-hero #arcHero{--arc-T:0px}
/* reduced motion: the /games/ hero's pin is a flex item of the centred hero column, so it shrank to its text and the still grid
   grew 118 → 206 px tiles when the web font landed (CLS 0.19). Full width from the first paint. */
html.arc-rm .arc-hero .arc-pin{align-self:stretch;width:100%}
