/*
  Sherlock Cao studio site - "Night Arcade"
  Design read: indie mobile-game studio site for players + store/partner reviewers,
  playful-but-credible, native CSS on the games' own night/candy palette.
  Dials: VARIANCE 7 / MOTION 5 / DENSITY 3. Dark-only on purpose (every game ships on a night-sky UI).
  Locks: accent = candy yellow #FFC531 (PLAY button in Tilt Maze + Gravity Spin) · radius = 20px cards / 14px small / pill buttons.
*/
@font-face{font-family:"Lilita One";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/lilita-normal-400.woff2) format("woff2")}
@font-face{font-family:Outfit;font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/outfit-normal-400.woff2) format("woff2")}

:root{
  --bg:#0B0F1C; --surface:#131A2E; --surface-2:#1A2340; --line:rgba(238,241,248,.09);
  --text:#EEF1F8; --muted:#A3ACC2; --accent:#FFC531; --accent-ink:#2A1F00;
  --r:20px; --r-sm:14px; --shadow:0 24px 60px rgba(3,6,18,.55);
  --ease:cubic-bezier(.16,1,.3,1);
  color-scheme:dark;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:Outfit,system-ui,sans-serif;font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;min-height:100dvh;display:flex;flex-direction:column}
main{flex:1}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}
.wrap{max-width:1200px;margin:0 auto;padding:0 32px}
.display{font-family:"Lilita One",Outfit,sans-serif;font-weight:400;letter-spacing:.01em;line-height:1.04}
.skip{position:absolute;left:-999px;top:8px;background:var(--accent);color:var(--accent-ink);padding:10px 16px;border-radius:999px;z-index:30}
.skip:focus{left:16px}

/* starfield: fixed + pointer-events none, painted once */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(1px 1px at 12% 18%,rgba(255,255,255,.55) 50%,transparent 51%),
    radial-gradient(1px 1px at 78% 12%,rgba(255,255,255,.4) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 42%,rgba(255,255,255,.35) 50%,transparent 51%),
    radial-gradient(1px 1px at 30% 66%,rgba(255,255,255,.35) 50%,transparent 51%),
    radial-gradient(1px 1px at 88% 74%,rgba(255,255,255,.45) 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 88%,rgba(255,255,255,.3) 50%,transparent 51%),
    radial-gradient(900px 500px at 85% -10%,rgba(40,70,160,.28),transparent 70%);
}

/* nav (z-index scale: nav 20, skip link 30) */
.nav{position:sticky;top:0;z-index:20;background:rgba(11,15,28,.8);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.nav .wrap{height:68px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:12px;font-weight:600;font-size:18px}
.mark{width:34px;height:34px;border-radius:10px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-family:"Lilita One";font-size:17px;flex:none}
.nav ul{display:flex;gap:32px;list-style:none;font-size:15px;color:var(--muted)}
.nav ul a{transition:color .2s}
.nav ul a:hover,.nav ul a[aria-current]{color:var(--text)}

/* buttons */
.btn{display:inline-flex;align-items:center;gap:10px;height:52px;padding:0 26px;border-radius:999px;font-weight:600;font-size:16px;white-space:nowrap;transition:transform .25s var(--ease),background .25s}
.btn-primary{background:var(--accent);color:var(--accent-ink)}
.btn-ghost{border:1px solid rgba(238,241,248,.22);color:var(--text)}
.btn-ghost:hover{background:rgba(238,241,248,.06)}
.btn:active{transform:scale(.98)}
.badge{display:inline-block;height:56px}
.badge img{height:100%;width:auto;margin-left:-9px}

/* phone frame: 9:16 to match store screenshots exactly */
.phone{width:230px;aspect-ratio:9/16;border-radius:28px;overflow:hidden;border:6px solid #1E2641;box-shadow:var(--shadow);background:#0d1222;flex:none}
.phone img{width:100%;height:100%;object-fit:cover}
.phone.tall img{object-position:50% 45%}

/* home hero */
.hero{padding:72px 0 88px}
.hero .wrap{display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center}
.hero h1{font-size:clamp(44px,5.6vw,76px)}
.hero h1 em{font-style:normal;color:var(--accent)}
.hero p{margin-top:22px;max-width:32ch;font-size:20px;color:var(--muted)}
.cta-row{display:flex;gap:14px;margin-top:36px;flex-wrap:wrap}
.hero-art{position:relative;height:520px}
.hero-art .phone{position:absolute}
.p1{left:4%;top:60px;transform:rotate(-8deg)}
.p2{left:34%;top:0;z-index:2}
.p3{left:64%;top:70px;transform:rotate(7deg)}

section{padding:96px 0}
.sec-title{font-size:clamp(34px,3.6vw,48px)}
.sec-sub{color:var(--muted);margin-top:12px;max-width:52ch}

/* games bento: 3 games -> 3 cells (1 tall + 2) */
.bento{display:grid;grid-template-columns:1.25fr 1fr;grid-template-rows:auto auto;gap:22px;margin-top:44px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;position:relative}
.card.big{grid-row:span 2}
.card .key{aspect-ratio:1024/500;width:100%;object-fit:cover}
.card .body{padding:26px 28px 28px;display:flex;gap:18px;align-items:flex-start}
.card .icon{width:64px;height:64px;border-radius:16px;flex:none}
.card h3{font-family:"Lilita One";font-weight:400;font-size:28px;line-height:1.1}
.card h3 a::after{content:"";position:absolute;inset:0;z-index:1}
.card p{color:var(--muted);margin-top:6px;font-size:16px}
.card .badge{position:relative;z-index:2;margin-top:16px}
.minis{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:0 28px 28px;margin-top:auto}
.minis img{width:100%;aspect-ratio:4/5;object-fit:cover;object-position:50% 42%;border-radius:var(--r-sm);border:1px solid var(--line)}
.facts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.fact{font-size:13px;font-weight:600;padding:5px 12px;border-radius:999px;background:var(--surface-2);color:#D6DCEB}
.fact.live{background:var(--accent);color:var(--accent-ink)}
.more{display:inline-flex;align-items:center;gap:6px;margin-top:14px;font-weight:600;font-size:15px;color:var(--accent)}

/* how we build */
.how .wrap{display:grid;grid-template-columns:1fr 1fr;gap:64px;align-items:center}
.how ul{list-style:none;margin-top:32px}
.how li{padding:22px 0;border-top:1px solid var(--line)}
.how li strong{display:block;font-size:20px;font-weight:600}
.how li span{color:var(--muted);font-size:16px}
.shot-pair{display:flex;gap:20px;justify-content:center}
.shot-pair .phone:last-child{margin-top:64px}

/* game page */
.back{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:15px;margin-top:36px}
.back:hover{color:var(--text)}
.g-hero{padding:28px 0 72px}
.g-hero .wrap{display:grid;grid-template-columns:.95fr 1.05fr;gap:56px;align-items:center}
.g-title{display:flex;align-items:center;gap:20px}
.g-title .icon{width:92px;height:92px;border-radius:22px;box-shadow:var(--shadow)}
.g-hero h1{font-size:clamp(40px,4.6vw,62px)}
.g-hero .lede{margin-top:22px;font-size:20px;color:var(--muted);max-width:38ch}
.g-hero .facts{margin-top:22px}
.g-cta{margin-top:28px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.soon{display:inline-flex;align-items:center;height:52px;padding:0 24px;border-radius:999px;border:1px dashed rgba(255,197,49,.5);color:var(--accent);font-weight:600}
.g-key{border-radius:var(--r);overflow:hidden;border:1px solid var(--line);box-shadow:var(--shadow)}
.g-key img{width:100%;aspect-ratio:1024/500;object-fit:cover}
.gallery{display:flex;gap:22px;overflow-x:auto;scroll-snap-type:x mandatory;padding:8px 32px 28px;margin:36px auto 0;max-width:1200px;scrollbar-width:thin;scrollbar-color:var(--surface-2) transparent}
.gallery .phone{scroll-snap-align:start;width:220px;box-shadow:0 16px 40px rgba(3,6,18,.5)}
.play{display:grid;grid-template-columns:1fr 1fr;gap:64px;align-items:start}
.steps{list-style:none;margin-top:28px;counter-reset:s}
.steps li{counter-increment:s;display:grid;grid-template-columns:44px 1fr;gap:16px;padding:16px 0;border-top:1px solid var(--line);font-size:18px}
.steps li::before{content:counter(s);width:36px;height:36px;border-radius:12px;background:var(--surface-2);color:var(--accent);font-family:"Lilita One";font-size:18px;display:grid;place-items:center}
.feature-list{display:grid;gap:14px;margin-top:28px}
.feature{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);padding:20px 22px}
.feature strong{display:block;font-size:18px;font-weight:600}
.feature span{color:var(--muted);font-size:16px}
.g-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.others{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:36px}
.other{display:flex;align-items:center;gap:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:20px 22px;transition:border-color .3s}
.other:hover{border-color:rgba(255,197,49,.35)}
.other img{width:64px;height:64px;border-radius:16px}
.other strong{font-family:"Lilita One";font-weight:400;font-size:24px;display:block;line-height:1.1}
.other span{color:var(--muted);font-size:15px}

/* legal + support prose */
.doc{max-width:760px;padding:28px 0 96px}
.doc .meta{color:var(--muted);margin-top:10px;font-size:15px}
.doc h1{font-size:clamp(36px,4vw,52px);margin-top:20px}
.doc h2{font-family:"Lilita One";font-weight:400;font-size:26px;margin:44px 0 12px;line-height:1.15}
.doc h3{font-size:18px;font-weight:600;margin:22px 0 4px}
.doc p,.doc li{color:#CDD3E2;max-width:68ch}
.doc p+p{margin-top:12px}
.doc ul{margin:12px 0 0 22px}
.doc li{margin:6px 0}
.doc a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.doc strong{color:var(--text)}
.callout{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);padding:20px 22px;margin-top:18px}

/* 404 */
.nf{padding:120px 0;text-align:left}
.nf h1{font-size:clamp(48px,7vw,96px)}
.nf p{color:var(--muted);font-size:20px;margin-top:16px;max-width:40ch}

/* footer */
footer{border-top:1px solid var(--line);padding:56px 0 64px}
footer .wrap{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px}
footer h2{font-size:14px;color:var(--muted);font-weight:500;margin-bottom:12px}
footer li{list-style:none;margin:6px 0}
footer a{transition:color .2s}
footer a:hover{color:var(--accent)}
.contact-big{overflow-wrap:anywhere;font-family:"Lilita One";font-size:clamp(26px,7vw,32px);line-height:1.1}
.contact-big a{border-bottom:3px solid var(--accent)}
.about{color:var(--muted);font-size:15px;margin-top:18px;max-width:40ch}

/* motion: entry + reveal communicate reading order; all gated by reduced-motion */
@media (prefers-reduced-motion:no-preference){
  .rise{opacity:0;transform:translateY(22px);animation:rise .8s var(--ease) forwards;animation-delay:calc(var(--i,0)*90ms)}
  @keyframes rise{to{opacity:1;transform:var(--t,none)}}
  .js .reveal{opacity:0;transform:translateY(28px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
  .js .reveal.in{opacity:1;transform:none}
  .card{transition:transform .35s var(--ease),border-color .35s}
  .card:hover{transform:translateY(-4px);border-color:rgba(255,197,49,.35)}
  .btn-primary:hover{transform:translateY(-2px)}
}

@media (max-width:900px){
  .wrap{padding:0 20px}
  .nav ul{gap:18px;font-size:14px}
  .nav .wrap{height:60px}
  .hero{padding:40px 0 56px}
  .hero .wrap,.how .wrap,footer .wrap,.g-hero .wrap,.play,.others{grid-template-columns:1fr}
  .hero-art{height:400px}
  .hero-art .phone{width:160px;border-radius:22px;border-width:5px}
  .p1{left:0}.p2{left:calc(50% - 80px)}.p3{left:auto;right:0}
  .bento{grid-template-columns:1fr}
  .card.big{grid-row:auto}
  section{padding:64px 0}
  .shot-pair .phone{width:44%}
  .g-hero{padding:20px 0 48px}
  .g-hero .wrap{gap:32px}
  .g-title .icon{width:72px;height:72px;border-radius:18px}
  .gallery{padding:8px 20px 24px}
  .gallery .phone{width:180px}
  .play{gap:40px}
}
@media (max-width:420px){
  .brand-name{display:none}
  .minis{gap:8px;padding:0 20px 22px}
  .card .body{padding:22px 20px 24px;gap:14px}
  .card .icon{width:52px;height:52px;border-radius:13px}
}
