/* THAAS coming-soon website. Plain CSS, no frameworks, nothing loaded from other websites.
   Colours are the app's (design/README.md). Phone first (375 px), then tablet and desktop.
   Scroll effects: js/main.js writes one number, --p (0 to 1), on each scene; everything here is CSS that reads it.
   Without the script, or with "reduce motion" on, the page is a still page and every word is readable. */

@font-face{font-family:"Fredoka";src:url("../fonts/fredoka.woff2") format("woff2");font-weight:300 700;font-style:normal;font-display:swap}
@font-face{font-family:"Nunito";src:url("../fonts/nunito.woff2") format("woff2");font-weight:200 1000;font-style:normal;font-display:swap}

:root{
  --page:#131417;--panel:#1C1E23;--text:#ECEDEF;--quiet:#9EA3AE;
  --teal:#2FD4C2;--gold:#F3C256;--coral:#FF7C6B;--cream:#FBEFE3;
  --lac1:#240D10;--lac2:#0C0507;--glow:#7A1E1E;--line:rgba(255,255,255,.1);
  --head:"Fredoka",ui-rounded,"Segoe UI",system-ui,sans-serif;
  --body:"Nunito",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --ease:cubic-bezier(.2,.7,.2,1);
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--text);font:600 1.0625rem/1.6 var(--body);-webkit-font-smoothing:antialiased;overflow-x:clip}
h1,h2,h3,p,ol,ul{margin:0}
ol,ul{padding:0;list-style:none}
svg{display:block}
/* Text inside a drawing is measured once and scaled, not measured again at every size it passes through while it moves (that was most of the work of the zoom and of the dealing) */
svg text,svg tspan{text-rendering:geometricPrecision}
em,i{font-style:normal}
a{color:inherit}
a:focus-visible{outline:2px solid var(--teal);outline-offset:4px;border-radius:10px}
.defs{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}

/* The name: Fredoka, the T gold and HAAS cream, a little room between the letters (as the app draws it) */
.wm{font:600 1em/1 var(--head);letter-spacing:.05em;color:var(--cream);white-space:nowrap}
.wm>span{color:var(--gold)}

/* ---------- Top bar ---------- */
.bar{position:absolute;z-index:50;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:max(12px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));
  transition:background-color .35s,box-shadow .35s}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none}
.brand .mark{width:34px;height:34px}
.brand .wm{font-size:1.5rem}
.chip{padding:.45rem .8rem;border:1px solid var(--line);border-radius:999px;color:var(--quiet);font:800 .72rem/1 var(--body);letter-spacing:.14em;text-transform:uppercase;transition:opacity .35s,transform .35s}
.motion .bar{position:fixed}
.motion .chip{opacity:0;transform:translateY(-4px)}
.motion .scrolled .bar{background:rgba(19,20,23,.78);-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);box-shadow:0 1px 0 var(--line)}
.motion .scrolled .chip{opacity:1;transform:none}

/* ---------- 1. Hero ---------- */
.hero{position:relative;display:flex;flex-direction:column;align-items:center;min-height:100vh;min-height:100svh;
  padding:calc(70px + env(safe-area-inset-top)) 20px 0;overflow:hidden;text-align:center;
  background:linear-gradient(180deg,var(--lac1),var(--lac2))}
.hero::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.12;
  background:repeating-linear-gradient(45deg,rgba(255,122,89,.6) 0 3px,transparent 3px 46px),repeating-linear-gradient(-45deg,rgba(243,194,86,.4) 0 3px,transparent 3px 46px);
  -webkit-mask-image:radial-gradient(ellipse 70% 60% at 50% 55%,transparent 20%,#000 92%);mask-image:radial-gradient(ellipse 70% 60% at 50% 55%,transparent 20%,#000 92%)}
.hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:22%;z-index:4;pointer-events:none;background:linear-gradient(180deg,transparent,var(--page))}
.glow{position:absolute;left:50%;bottom:-8%;width:140%;aspect-ratio:1.5;translate:-50% 0;pointer-events:none;
  background:radial-gradient(closest-side,rgba(122,30,30,.95),rgba(122,30,30,.35) 55%,transparent)}
.hero-in{position:relative;z-index:3;max-width:44rem;margin-block:auto;padding-block:8px 18px}
.pill{display:inline-block;margin-bottom:1.1rem;padding:.5rem 1rem;border:1px solid rgba(243,194,86,.4);border-radius:999px;background:rgba(243,194,86,.08);
  color:var(--gold);font:800 clamp(.64rem,2.9vw,.76rem)/1.2 var(--body);letter-spacing:.1em;text-transform:uppercase}
.hero h1{font-size:clamp(3.9rem,19vw,8.6rem);padding-left:.05em;margin-bottom:.16em}
.tagline{font:600 clamp(1.3rem,5.6vw,2.3rem)/1.2 var(--head);color:var(--cream);text-wrap:balance}
.names{margin-top:.85rem;color:var(--quiet);font-weight:700;font-size:clamp(.9rem,3.7vw,1.1rem)}
.names i{color:var(--gold);margin:0 .2em}

.fan{position:relative;z-index:2;flex:none;aspect-ratio:808/688;margin-bottom:-7%;
  width:min(1040px,126vw,calc((100vh - 250px) * 1.45));width:min(1040px,126vw,calc((100svh - 250px) * 1.45))}
.fcard{position:absolute;left:29.58%;top:15.99%;width:40.84%;aspect-ratio:330/480;transform-origin:50% 127.08%;transform:rotate(var(--a));will-change:transform;
  animation:deal 1.3s cubic-bezier(.16,.84,.24,1) both,breathe 8s ease-in-out infinite;
  animation-delay:calc(.35s + var(--k)*.09s),calc(2.2s + var(--k)*.45s)}
.fcard svg{width:100%;height:100%;overflow:visible}
.c1{--a:-24deg;--k:2;z-index:1}.c2{--a:-12deg;--k:1;z-index:2}.c3{--a:0deg;--k:0;z-index:5}.c4{--a:12deg;--k:1;z-index:2}.c5{--a:24deg;--k:2;z-index:1}
.hero.off .fcard{animation-play-state:paused}
/* Loops nobody can see stand still: js/main.js marks far-away scenes .idle (and the hero .off) and the rank parts that are not on show are not .live */
.motion .idle *,.motion .off *,.motion .rays:not(.live),.motion .ult:not(.live) *{animation-play-state:paused !important}
.cue{position:absolute;z-index:5;left:50%;bottom:14px;translate:-50% 0;width:44px;height:44px;display:grid;place-items:center;color:var(--cream);opacity:.8;animation:nudge 2.4s ease-in-out infinite}
.cue svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

@keyframes rise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@keyframes deal{from{opacity:0;transform:translateY(10%) rotate(0deg) scale(.88)}to{opacity:1;transform:translateY(0) rotate(var(--a)) scale(1)}}
@keyframes breathe{0%,100%{translate:0 0;scale:1}50%{translate:0 -1.6%;scale:1.012}}
@keyframes nudge{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}
.hero-in>*{animation:rise .9s var(--ease) both}
.hero-in>.pill{animation-delay:.05s}.hero-in>h1{animation-delay:.15s}.hero-in>.tagline{animation-delay:.3s}.hero-in>.names{animation-delay:.42s}

.motion .hero .fan{transform:translate3d(0,calc(var(--p,0)*-9%),0) scale(calc(1 + var(--p,0)*.24));opacity:calc(1 - var(--p,0)*1.15)}
.motion .hero-in{transform:translate3d(0,calc(var(--p,0)*80px),0) scale(calc(1 - var(--p,0)*.08));opacity:calc(1 - var(--p,0)*2)}

/* ---------- 2. One sentence ---------- */
.statement{padding:clamp(88px,20vh,200px) 22px;background:var(--page)}
.big{max-width:17em;margin:0 auto;font:600 clamp(2.1rem,7.6vw,4.8rem)/1.1 var(--head);letter-spacing:-.012em;text-align:center;text-wrap:balance}
.big em{color:var(--gold)}
.motion .statement{padding:0;height:260vh;height:calc(100svh*2.6)}
.motion .statement .pin{position:sticky;top:0;height:100vh;height:100svh;display:grid;place-items:center;padding:0 22px}
.motion .w{opacity:calc(.16 + .84*clamp(0,(var(--p,0) - var(--k,0))*14,1))}

/* ---------- 3. The five games ---------- */
.games{padding:clamp(80px,14vh,140px) 20px;background:linear-gradient(180deg,var(--lac1),var(--lac2))}
.head{text-align:center}
.eyebrow{margin-bottom:.55rem;color:var(--gold);font:800 .78rem/1 var(--body);letter-spacing:.18em;text-transform:uppercase}
.games h2,.perks h2,.finale h2{font:700 clamp(2.1rem,7.4vw,4.2rem)/1.06 var(--head);letter-spacing:-.01em;text-wrap:balance}
.games h2 em,.finale h2 em{color:var(--gold)}
.list{display:grid;gap:56px 28px;max-width:1100px;margin:clamp(36px,7vh,72px) auto 0;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))}
.game{display:grid;justify-items:center;gap:22px;text-align:center}
.gcard{position:relative;width:min(220px,62vw);aspect-ratio:330/480}
.gcard svg{width:100%;height:100%;overflow:visible}
.shade{display:none}
.gtext h3{font:700 clamp(2rem,6vw,2.8rem)/1.05 var(--head)}
.gtext p{max-width:22rem;margin:.5rem auto 0;color:var(--quiet);font-weight:700}
.dots{display:none}

.motion .games{padding:0;height:540vh;height:calc(100svh*5.4);background:var(--lac2)}
.motion .stage{--ch:min(clamp(220px,calc(100svh - 470px),560px),calc((100vw - 56px)*1.4545));
  position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto var(--ch) auto auto;grid-template-areas:"head" "deck" "text" "dots";
  align-content:center;row-gap:clamp(10px,2.2svh,22px);padding:72px 20px 20px;
  background:radial-gradient(60% 46% at 50% 44%,rgba(122,30,30,.62),rgba(122,30,30,0) 72%),linear-gradient(180deg,var(--lac1),var(--lac2))}
.motion .head{grid-area:head}
.motion .head h2{font-size:clamp(1.7rem,7.2vw,3.4rem)}
.motion .list,.motion .game{display:contents}
.motion .gcard{grid-area:deck;justify-self:center;align-self:center;width:calc(var(--ch)*.6875);height:var(--ch);aspect-ratio:auto;
  will-change:transform;transform-origin:50% 118%;
  transform:translate3d(calc(var(--o,0)*-135%),calc(var(--d,0)*-2.6%),0) rotate(calc(var(--o,0)*-20deg + var(--d,0)*4deg)) scale(calc(1 - var(--d,0)*.05));
  opacity:calc(clamp(0,(1 - var(--o,0))*2,1)*clamp(0,1 - (var(--d,0) - 2.5)*1.2,1))}
.motion .game:nth-child(1) .gcard{z-index:5}.motion .game:nth-child(2) .gcard{z-index:4}.motion .game:nth-child(3) .gcard{z-index:3}
.motion .game:nth-child(4) .gcard{z-index:2}.motion .game:nth-child(5) .gcard{z-index:1}
.motion .shade{display:block;position:absolute;inset:0;border-radius:11.5%/7.9%;background:#000;opacity:calc(var(--d,0)*.17);pointer-events:none}
.motion .gtext{grid-area:text;align-self:start;justify-self:center;width:100%;max-width:30rem;text-align:center;
  opacity:var(--a,0);transform:translate3d(0,calc((1 - var(--a,0))*22px),0);will-change:opacity,transform}
.motion .game:first-child .gtext{--a:1}
.motion .dots{grid-area:dots;display:flex;gap:9px;justify-content:center;align-self:center}
.dots span{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.22);transition:background-color .25s,transform .25s}
.dots span.on{background:var(--gold);transform:scale(1.4)}

@media (min-width:1000px),(orientation:landscape) and (max-height:520px) and (min-width:560px){
  .motion .stage{--ch:clamp(180px,calc(100svh - 240px),640px);
    grid-template-columns:minmax(0,440px) minmax(0,420px);grid-template-rows:auto var(--ch) auto;grid-template-areas:"head head" "deck text" "dots dots";
    column-gap:clamp(32px,6vw,96px);justify-content:center;padding-top:76px}
  .motion .gcard{justify-self:end}
  .motion .gtext{align-self:center;justify-self:start;text-align:left;max-width:26rem}
  .motion .gtext h3{font-size:clamp(2.4rem,4vw,3.6rem)}
  .motion .gtext p{margin-left:0;font-size:1.2rem;line-height:1.5}
}
@media (max-height:520px){
  .motion .stage{--ch:calc(100svh - 150px);padding-top:58px}
  .motion .eyebrow{display:none}
  .motion .head h2{font-size:1.6rem}
}

/* ---------- 5. The end ---------- */
.finale{position:relative;overflow:hidden;padding:clamp(96px,18vh,200px) 20px clamp(56px,10vh,110px);text-align:center;
  background:radial-gradient(70% 55% at 50% 100%,rgba(122,30,30,.9),rgba(122,30,30,0) 72%),linear-gradient(180deg,var(--page),var(--lac2))}
.finale .mark{width:clamp(104px,26vw,168px);height:auto;aspect-ratio:1;margin:0 auto 1.6rem;filter:drop-shadow(0 22px 44px rgba(0,0,0,.55))}
.finale .sub{margin-top:1rem;color:var(--quiet);font-size:clamp(1rem,3.8vw,1.25rem);font-weight:700}
.motion .finale .mark{transform:scale(calc(.62 + var(--p,0)*.38)) rotate(calc((1 - var(--p,0))*-14deg));opacity:calc(.25 + var(--p,0)*.75)}
.foot{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 24px;padding:18px 20px calc(24px + env(safe-area-inset-bottom));background:var(--lac2);color:var(--quiet);font-size:.85rem;text-align:center}

/* ---------- Reduce motion: a still page ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  html:not(.motion) .fcard,html:not(.motion) .hero-in>*,html:not(.motion) .cue{animation:none}
}

/* ---------- The switch that shows only on devices which ask for less motion (made by js/main.js) ---------- */
.calm{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:70;display:flex;justify-content:center;pointer-events:none}
.calm-box{pointer-events:auto;display:flex;align-items:center;gap:12px;max-width:100%;padding:8px 8px 8px 16px;border:1px solid rgba(255,255,255,.2);border-radius:20px;background:rgba(19,20,23,.95);color:var(--text);font:700 .82rem/1.3 var(--body);box-shadow:0 8px 28px -10px rgba(0,0,0,.7)}
.calm-on .calm-box{padding:5px}
.calm-text{flex:1 1 auto;color:var(--quiet)}
.calm-button{flex:none;cursor:pointer;padding:9px 14px;border:1px solid transparent;border-radius:999px;background:var(--teal);color:#05221e;font:800 .82rem/1 var(--body)}
.calm-button:hover{filter:brightness(1.08)}
.calm-button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.calm-on .calm-button{background:transparent;border-color:rgba(255,255,255,.2);color:var(--quiet)}

/* ---------- The ways to play: one scene each (Quick Match, Rooms, Offline mode, Ranked) ---------- */
.mode{--p:1;--accent:var(--teal);--you:var(--gold);padding:clamp(80px,14vh,140px) 20px;background:var(--page)}
.mode.offline{--accent:var(--gold);--you:var(--cream)}
.mstage{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(22px,4vh,40px);max-width:1100px;margin:0 auto}
.mhead{text-align:center}
.mode .eyebrow{color:var(--accent)}
.mode h2{font:700 clamp(1.9rem,7vw,4rem)/1.06 var(--head);letter-spacing:-.01em;text-wrap:balance}
.mode h2 em{color:var(--accent)}
.panel{justify-self:center;width:min(100%,360px);padding:20px 22px 24px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(160deg,#23262c,var(--panel) 62%);box-shadow:0 30px 60px -30px rgba(0,0,0,.7)}
.v-title{margin-bottom:16px;text-align:center;font:600 1.4rem/1.2 var(--head)}
.v-note{margin-top:14px;text-align:center;color:var(--quiet);font:800 .78rem/1 var(--body);letter-spacing:.12em;text-transform:uppercase}

/* Quick Match and Offline mode: seats that fill up */
.f-title{display:grid;margin-bottom:16px;text-align:center;font:600 1.4rem/1.2 var(--head)}
.f-title span{grid-area:1/1}
.f-a{opacity:calc(1 - clamp(0,(var(--p,0) - .58)*10,1))}
.f-b{color:var(--teal);opacity:clamp(0,(var(--p,0) - .6)*10,1)}
.seats{display:flex;justify-content:center;gap:14px;margin-bottom:18px}
.seats li{--t:0;--f:clamp(0,(var(--p,0) - var(--t))*10,1);position:relative;display:grid;place-items:center;width:52px;height:52px;border:2px dashed rgba(255,255,255,.28);border-radius:50%}
.seats li::before{content:"";position:absolute;inset:-2px;border-radius:50%;background:var(--accent);opacity:var(--f);transform:scale(calc(.6 + var(--f)*.4))}
.seats li:first-child{--t:-1}
.seats li:first-child::before{background:var(--you)}
.seats li:nth-child(2){--t:.12}.seats li:nth-child(3){--t:.28}.seats li:nth-child(4){--t:.44}
.seats svg{position:relative;width:60%;height:60%;fill:#031A22;opacity:var(--f)}
.meter{height:8px;border-radius:99px;background:#2A2D34;overflow:hidden}
.meter i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#7FF0E2);transform-origin:0 50%;transform:scaleX(clamp(0,(var(--p,0) - .06)/.56,1))}
.offline .seats{margin-bottom:0}

/* Rooms: Public slides to Private, and the leaderboard grows */
.toggle{position:relative;display:grid;grid-template-columns:1fr 1fr;margin-bottom:16px;padding:4px;border:1px solid var(--line);border-radius:99px;background:#16181c;text-align:center;font:800 .8rem/1 var(--body);letter-spacing:.1em;text-transform:uppercase}
.toggle span{position:relative;z-index:1;padding:.8rem 0}
.toggle i{position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);border:1px solid rgba(47,212,194,.6);border-radius:99px;background:rgba(47,212,194,.22);transform:translateX(calc(clamp(0,(var(--p,0) - .22)*6,1)*100%))}
.lb{display:grid;gap:10px}
.lb li{--w:.9;display:grid;grid-template-columns:22px 1fr;align-items:center;gap:12px}
.lb b{color:var(--quiet);font:700 1rem/1 var(--head);text-align:center}
.lb i{display:block;height:12px;border-radius:99px;background:linear-gradient(90deg,var(--gold),#FFE08A);transform-origin:0 50%;transform:scaleX(calc(clamp(0,(var(--p,0) - .1)*4,1)*var(--w)))}
.lb li:nth-child(2){--w:.68}.lb li:nth-child(3){--w:.46}

/* Offline mode: the airplane-mode switch turns on */
.v-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.v-row svg{flex:none;width:26px;height:26px;fill:none;stroke:var(--gold);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.v-row .v-title{flex:1;margin:0;text-align:left;font-size:1.2rem}
.sw{position:relative;flex:none;width:52px;height:30px;border-radius:99px;background:#2A2D34}
.sw::before{content:"";position:absolute;inset:0;border-radius:99px;background:var(--gold);opacity:clamp(0,(var(--p,0) - .06)*8,1)}
.sw i{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:#fff;transform:translateX(calc(clamp(0,(var(--p,0) - .06)*8,1)*22px))}

/* Ranked: every badge one after the other, then the details (when the page does not move, the badges stand in a grid) */
.ranks .lead{display:none}
.panel.showcase{width:min(100%,380px);padding:0;border:0;background:none;box-shadow:none}
.bstack{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:min(100%,300px);margin:0 auto}
.bstack svg{display:block;width:100%;height:auto;overflow:visible}
.lbls{display:none}
.nm{position:absolute;inset:0;text-align:center;opacity:var(--v,0);transform:translateY(calc((1 - var(--v,0))*14px))}
.nm b{display:block;font:700 clamp(1.8rem,7vw,2.8rem)/1.1 var(--head)}
.nm i{display:block;margin-top:.35rem;color:var(--accent);font:800 .8rem/1 var(--body);letter-spacing:.16em;text-transform:uppercase}
/* (the longer scene must beat the general .mode rule further down: three classes) */
.motion .mode.ranks{height:660vh;height:calc(100svh*6.6)}
.motion .bstack{position:relative;display:block;width:min(56vw,36svh,300px);aspect-ratio:1}
.motion .bstack svg{position:absolute;inset:0;width:100%;height:100%;opacity:var(--v,0);transform:translateY(calc((1 - var(--v,0))*12px)) scale(calc(.88 + var(--v,0)*.12));filter:drop-shadow(0 14px 22px rgba(0,0,0,.55))}
.motion .lbls{display:block;position:relative;height:4.2rem;margin-top:clamp(10px,2svh,22px)}
.motion .showcase{opacity:calc(1 - var(--v,0))}

/* The Ultimate Legend: the rainbow ring turns, the crown floats, the glow breathes, the sparkles twinkle, light rays turn behind it */
.rays{display:none}
.motion .rays{display:block;position:absolute;inset:-38%;border-radius:50%;pointer-events:none;opacity:calc(var(--v,0)*.85);
  background:repeating-conic-gradient(rgba(255,226,140,.26) 0 5deg,transparent 5deg 15deg);
  -webkit-mask-image:radial-gradient(closest-side,transparent 40%,#000 46%,transparent 74%);mask-image:radial-gradient(closest-side,transparent 40%,#000 46%,transparent 74%);
  animation:u-rays 70s linear infinite}
.motion .bstack svg.ult{transform:translateY(calc((1 - var(--v,0))*12px)) scale(calc(.72 + var(--v,0)*.28)) rotate(calc((1 - var(--v,0))*-14deg))}
.motion .ult .u-ring{transform-box:view-box;transform-origin:32px 32.5px;animation:u-spin 28s linear infinite}
.motion .ult .u-glow{transform-box:view-box;transform-origin:32px 32.5px;animation:u-pulse 4.6s ease-in-out infinite}
.motion .ult .u-crown{animation:u-float 5s ease-in-out infinite}
.motion .ult .u-glints path{transform-box:fill-box;transform-origin:center;animation:u-twinkle 3.6s ease-in-out infinite}
.motion .ult .u-glints path:nth-child(2){animation-delay:1.2s}
.motion .ult .u-glints path:nth-child(3){animation-delay:2.4s}
@keyframes u-spin{to{transform:rotate(360deg)}}
@keyframes u-rays{to{transform:rotate(360deg)}}
@keyframes u-pulse{0%,100%{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.06)}}
@keyframes u-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-1px)}}
@keyframes u-twinkle{0%,100%{opacity:.2;transform:scale(.6) rotate(0deg)}50%{opacity:1;transform:scale(1.25) rotate(25deg)}}
.motion .ranks .points li{opacity:var(--v,0);transform:translate3d(0,calc((1 - var(--v,0))*18px),0)}
@media (max-width:999px){.motion .ranks .mstage>.panel,.motion .ranks .points{grid-row:2;grid-column:1}}
@media (min-width:1000px){.motion .showcase{opacity:1}.motion .ranks .points li{opacity:1;transform:none}}

/* The details of every scene */
.points{display:grid;gap:12px;width:min(100%,34rem);margin:0 auto}
.points li{--b:0;--r:clamp(0,(var(--p,0) - var(--b))*9,1);padding:14px 18px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.03)}
.points li:nth-child(1){--b:.08}.points li:nth-child(2){--b:.2}.points li:nth-child(3){--b:.32}.points li:nth-child(4){--b:.44}
.points h3{font:600 1.15rem/1.25 var(--head)}
.points p{margin-top:2px;color:var(--quiet);font-size:.95rem;line-height:1.45;font-weight:700}
.motion .points li{opacity:var(--r);transform:translate3d(0,calc((1 - var(--r))*18px),0)}
.motion .mode{padding:0;height:240vh;height:calc(100svh*2.4)}
.motion .mstage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;align-content:center;gap:clamp(10px,2svh,18px);padding:72px 20px 20px;
  background:radial-gradient(60% 42% at 50% 40%,color-mix(in srgb,var(--accent) 11%,transparent),transparent 70%)}
@media (min-width:1000px),(orientation:landscape) and (max-height:520px) and (min-width:560px){
  .mstage{grid-template-columns:minmax(0,500px) minmax(0,400px);grid-template-areas:"head vis" "points vis";align-items:center;justify-content:center;column-gap:clamp(40px,6vw,96px)}
  .mode.flip .mstage{grid-template-columns:minmax(0,400px) minmax(0,500px);grid-template-areas:"vis head" "vis points"}
  .mhead{grid-area:head;text-align:left}
  .mstage>.panel{grid-area:vis;width:min(100%,400px)}
  .points{grid-area:points;margin:0;width:100%}
}
@media (max-height:520px){
  .motion .mstage{padding-top:58px}
  .mode .eyebrow,.v-note{display:none}
  .points li{padding:8px 14px}
  .points p{font-size:.85rem}
}
@media (max-height:700px) and (max-width:700px){.points p{font-size:.88rem;line-height:1.35}.points li{padding:10px 16px}.v-note{display:none}}

/* What each game can do (under the games) */
.tags{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:.8rem}
.tags li{padding:.3rem .65rem;border:1px solid var(--line);border-radius:99px;background:rgba(255,255,255,.04);font:800 .68rem/1 var(--body);letter-spacing:.06em;text-transform:uppercase}
.tags .soon{border-color:rgba(243,194,86,.4);color:var(--gold)}
@media (min-width:1000px){.motion .tags{justify-content:flex-start}}

/* ---------- Store badges (words only until the app is live; see README) ---------- */
.stores{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:1.15rem}
.stores{--bh:48px}
.store{display:block;line-height:0;cursor:default}
.store img{display:block;width:auto}
.store-a img{height:var(--bh)}
.store-g img{height:calc(var(--bh)*1.488);margin:calc(var(--bh)*-.244)}
.hero-in>.stores{animation-delay:.55s}
.finale .stores{margin-top:1.8rem}
.finale .stores{--bh:56px}

/* Phones: the pictures and the details of a scene have to fit on one screen */
@media (max-width:700px){
  .panel{padding:16px 18px 18px}
  .v-title{margin-bottom:10px;font-size:1.25rem}
  .v-note{display:none}
  .toggle{margin-bottom:12px}
  .toggle span{padding:.65rem 0}
  .points{gap:8px}
  .points li{padding:10px 14px}
  .points h3{font-size:1.05rem}
  .points p{font-size:.88rem;line-height:1.35}
}

/* Desktop: the headings of the ways to play stay on two lines */
@media (min-width:1000px){.mode h2{font-size:clamp(2.2rem,3.7vw,3rem)}}
@media (min-width:1000px){.panel.showcase{width:min(100%,420px)}.bstack{width:min(300px,38svh)}}

/* ---------- Phones and tablets: one story with one device, told while you scroll (js/main.js sets every moving part directly; t, how far along you are, goes 0 to 5) ---------- */
.device{--p:1;padding:clamp(80px,14vh,140px) 20px;background:var(--page)}
.dstage{display:grid;gap:clamp(20px,4vh,36px);max-width:1100px;margin:0 auto}
.dhead{text-align:center}
.device .eyebrow{color:var(--gold)}
.device h2{font:700 clamp(1.9rem,7vw,3.4rem)/1.06 var(--head);letter-spacing:-.01em;text-wrap:balance}
.device h2 em{color:var(--gold)}
.view{position:relative;width:min(100%,860px);aspect-ratio:1332/852;justify-self:center;overflow:hidden;border-radius:28px}
.caps{display:grid;gap:12px;width:min(100%,34rem);margin:0 auto}
.cap{padding:14px 18px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.03)}
.cap b{display:block;font:600 1.15rem/1.25 var(--head)}
.cap i{display:block;margin-top:2px;color:var(--quiet);font:700 .95rem/1.45 var(--body)}

/* the one device: a phone while the page does not move; the screen has the game's own background (the app paints it the same way for any screen shape) */
.dev{position:absolute;left:50%;top:50%;translate:-50% -50%;width:100%;aspect-ratio:2.02;box-sizing:border-box;border:2px solid #3a3d45;border-radius:4.5%/9%;background:#0b0b0d;box-shadow:0 40px 80px -30px rgba(0,0,0,.8)}
.screen{position:absolute;inset:4.2% 2.1%;overflow:hidden;border-radius:2.4%/4.9%;background:radial-gradient(75% 75% at 50% 118%,#7A1E1E 0%,rgba(122,30,30,0) 58%),linear-gradient(180deg,#240D10,#0C0507)}
.pic{position:absolute;inset:0;width:100%;height:100%;display:block}
.cam{position:absolute;display:block;aspect-ratio:1;border-radius:50%;background:#000;border:1px solid #2a2c31}
.cam-ph{left:1.3%;top:50%;width:1.1%;translate:0 -50%}
.cam-tb{display:none}
/* the page without motion shows the picture of the phone's screen, as it is */
.rgs,.rts,.rip,.sparks,.ban,.fly,.hold,.thr-back,.mess{display:none}
.thr{translate:847.67px 625.62px;rotate:20deg}
.cnew{translate:884.95px 670.9px;rotate:25deg}
.dim,.over,.plate{opacity:0}
.mc{translate:0 0}
.rip-f{fill:#FFF4D6}
.rip-a{fill:none;stroke:#FFD678}
.rip-b{fill:none;stroke:#fff}
.ms0{--hx:528.2;--hy:280.0;--dx:0.251;--dy:-0.068;--dg:13.35}
.ms1{--hx:528.2;--hy:280.0;--dx:-0.211;--dy:0.023;--dg:26.17}
.ms2{--hx:528.2;--hy:280.0;--dx:-0.074;--dy:0.115;--dg:-17.02}
.ms3{--hx:528.2;--hy:280.0;--dx:0.063;--dy:-0.194;--dg:-4.20}
.ms4{--hx:528.2;--hy:280.0;--dx:0.201;--dy:-0.102;--dg:8.61}
.ms5{--hx:533.6;--hy:274.6;--dx:-0.262;--dy:-0.011;--dg:21.43}
.ms6{--hx:539.0;--hy:269.2;--dx:-0.021;--dy:0.016;--dg:-6.22}
.md0{--hx:715.8;--hy:269.2;--dx:-0.696;--dy:-0.040;--dg:36.75}
.md1{--hx:715.8;--hy:269.2;--dx:-0.343;--dy:0.179;--dg:-40.36}
.md2{--hx:715.8;--hy:269.2;--dx:0.009;--dy:0.399;--dg:-17.48}
.md3{--hx:715.8;--hy:269.2;--dx:0.362;--dy:-0.341;--dg:5.41}
.md4{--hx:715.8;--hy:269.2;--dx:0.714;--dy:-0.122;--dg:28.29}
.md5{--hx:715.8;--hy:269.2;--dx:-0.043;--dy:0.010;--dg:-10.74}
.sp0{--ax:0.993;--ay:0.084;--rc:80;--st:0.060}
.sp1{--ax:0.963;--ay:0.189;--rc:124;--st:0.095}
.sp2{--ax:0.617;--ay:0.551;--rc:168;--st:0.130}
.sp3{--ax:0.491;--ay:0.610;--rc:102;--st:0.165}
.sp4{--ax:-0.120;--ay:0.695;--rc:146;--st:0.060}
.sp5{--ax:-0.269;--ay:0.674;--rc:80;--st:0.095}
.sp6{--ax:-0.787;--ay:0.432;--rc:124;--st:0.130}
.sp7{--ax:-0.871;--ay:0.343;--rc:168;--st:0.165}
.sp8{--ax:-0.993;--ay:-0.084;--rc:102;--st:0.060}
.sp9{--ax:-0.963;--ay:-0.189;--rc:146;--st:0.095}
.sp10{--ax:-0.617;--ay:-0.551;--rc:80;--st:0.130}
.sp11{--ax:-0.491;--ay:-0.610;--rc:124;--st:0.165}
.sp12{--ax:0.120;--ay:-0.695;--rc:168;--st:0.060}
.sp13{--ax:0.269;--ay:-0.674;--rc:102;--st:0.095}
.sp14{--ax:0.787;--ay:-0.432;--rc:146;--st:0.130}
.sp15{--ax:0.871;--ay:-0.343;--rc:80;--st:0.165}

.motion .view{width:min(100%,900px,calc((100svh - 350px)*1.5634))}
.motion .story{height:670vh;height:calc(100svh*6.7)}
.motion .device{padding:0}
.motion .dstage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;align-content:center;gap:clamp(12px,2.4svh,24px);padding:72px 20px 20px;
  background:radial-gradient(60% 42% at 50% 46%,rgba(243,194,86,.08),transparent 70%)}
/* where the story starts: a phone a little wider than the window, its picture, and nothing of the rest yet (the script moves every part from here) */
.motion .dev{width:106%;aspect-ratio:2.02}
.motion .cam-tb{display:block;left:50%;top:2.3%;translate:-50% 0;width:.9%;opacity:0}
.motion .sh-cut,.motion .sh-ready,.motion .fly,.motion .hold,.motion .rgs,.motion .rt,.motion .thr-back,.motion .mess,.motion .ban,.rip-f,.rip-a,.rip-b,.sp{opacity:0}
.motion .fly,.motion .hold,.motion .rgs,.motion .rts,.motion .thr-back,.motion .mess{display:block}
.motion .hold-fill{transform-box:fill-box;transform-origin:0 50%}
.motion .rg,.motion .rt{transform-box:view-box}
.motion .rg-tl{transform-origin:258px 41px}
.motion .rt-tl{transform-origin:292px 52px}
.motion .rg-tr{transform-origin:1087.5px 39.5px}
.motion .rt-tr{transform-origin:1220px 52px}
.motion .rg-meld{transform-origin:553.5px 88px}
.motion .rt-meld{transform-origin:622px 122px}
.motion .rg-piles{transform-origin:558px 206px}
.motion .rt-piles{transform-origin:627.4px 269.2px}
.motion .rg-instr{transform-origin:553.5px 348px}
.motion .rt-instr{transform-origin:622px 451px}
.motion .rg-players{transform-origin:1004px 124.5px}
.motion .rt-players{transform-origin:1130px 157px}
.motion .rg-you{transform-origin:108px 397px}
.motion .rt-you{transform-origin:126px 658px}
.motion .rg-hand{transform-origin:573.5px 390px}
.motion .rt-hand{transform-origin:658.5px 512px}
.motion .rg-btns{transform-origin:1004px 480px}
.motion .rt-btns{transform-origin:1130px 728px}
.motion .rip{display:block;translate:715.8px 269.2px}
.motion .sparks{display:block;translate:622px 269.2px}
.motion .ban{display:block;translate:622px 269.2px;scale:.3}
.motion .caps{position:relative;display:block;height:6.4rem}
.motion .cap{position:absolute;inset:0;padding:0;border:0;background:none;text-align:center;opacity:clamp(0,calc((var(--v,0) - .15)*1.18),1);transform:translateY(calc((1 - var(--v,0))*14px))}
.motion .cap b{font:700 clamp(1.4rem,5.6vw,2.2rem)/1.15 var(--head)}
.motion .cap i{margin-top:.45rem;font-size:clamp(.95rem,3.6vw,1.1rem)}
@media (max-width:700px){.motion .view{width:min(calc(100% + 40px),calc((100svh - 350px)*1.5634));border-radius:0}}
@media (min-width:1000px){.dstage{gap:28px}.view{width:min(100%,900px)}}
