/* assets/site-1.css: the shared shell for every public page (home, portfolio, game demos).
 *
 * One file so the pages cannot drift apart again. /assets/* is cached as immutable, so this
 * file is versioned by NAME: change it, rename it (site-2.css) and update the <link> tags.
 *
 * One theme, one accent. #c8102e is the fill (white text on it is 6.4:1); #ff5560 is the
 * accent when it has to be read as text on the dark ground (#c8102e there is only 3.3:1).
 */
:root{
  color-scheme: dark;
  --bg:#0b0c0e; --surf:#131519; --surf2:#0f1114; --surf3:#1a1d22;
  --ink:#f2f4f7; --body:#c3c8d0; --faint:#8b929d;
  --line:#1e2126; --line2:#2a2e35;
  --acc:#c8102e; --acc-ink:#ff5560;
  --sans:"Geist",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.16,1,.3,1);
  --gut:clamp(16px,3vw,40px);
  --max:1600px;
  /* the edge every piece of art gets, whatever its own edge does (black-bled and white-bled
     art both read on a dark page) */
  --card-edge:0 0 0 1px rgba(255,255,255,.09),0 14px 34px -10px rgba(0,0,0,.8),0 6px 30px -12px rgba(200,16,46,.28);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:clip}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{background:var(--bg);color:var(--body);font-family:var(--sans);font-size:17px;line-height:1.6;
  -webkit-font-smoothing:antialiased;overflow-x:clip}
img{display:block;max-width:100%}
a{color:inherit}
button{font:inherit}
::selection{background:rgba(200,16,46,.35);color:#fff}
:focus-visible{outline:2px solid var(--acc-ink);outline-offset:3px}

/* the constellation field sits behind everything. In-flow page parts are lifted above it.
   Overlays (lightbox, dialogs) are NOT in this list: they carry their own position:fixed. */
#neural{position:fixed;inset:0;z-index:0;pointer-events:none}
.site-nav,main,.site-foot{position:relative;z-index:1}

/* ---- nav: wordmark, a few plain links, one action ---- */
.site-nav{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:clamp(14px,2.4vw,30px);
  padding:14px var(--gut);background:rgba(11,12,14,.94)}
.site-nav .mark{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);
  font-weight:700;font-size:16px;letter-spacing:-.01em;white-space:nowrap}
.site-nav .mark img{width:30px;height:30px;border-radius:7px}
.site-nav .mark b{color:var(--acc-ink);font-weight:700}
.site-nav .sp{flex:1}
.site-nav .lk{font-size:15px;font-weight:500;color:var(--body);text-decoration:none;
  padding:6px 2px;position:relative;transition:color .2s}
.site-nav .lk::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--acc);
  transform:scaleX(0);transform-origin:left;transition:transform .3s var(--ease)}
.site-nav .lk:hover,.site-nav .lk[aria-current="page"]{color:var(--ink)}
.site-nav .lk:hover::after,.site-nav .lk[aria-current="page"]::after{transform:scaleX(1)}
@media (max-width:720px){
  .site-nav .lk.opt{display:none}
  .site-nav .mark .wm{display:none}
}

/* ---- buttons: flat, one fill, fully round, decided once ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;border:0;cursor:pointer;
  font-size:15px;font-weight:600;line-height:1;padding:14px 24px;border-radius:999px;text-decoration:none;
  transition:transform .2s var(--ease),background .2s,color .2s;white-space:nowrap}
.btn:active{transform:scale(.97)}
.btn.primary{background:var(--acc);color:#fff}
.btn.primary:hover{background:#e0122f;transform:translateY(-2px)}
.btn.quiet{background:var(--surf3);color:var(--ink)}
.btn.quiet:hover{background:#262a31;transform:translateY(-2px)}
.btn.sm{padding:10px 17px;font-size:14px}
.btn .arr{transition:transform .25s var(--ease)}
.btn:hover .arr{transform:translateX(4px)}
@media (prefers-reduced-motion:reduce){.btn:hover,.btn:active{transform:none}}

/* ---- layout helpers ---- */
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--gut)}
.h2{font-size:clamp(34px,5.2vw,76px);line-height:.98;letter-spacing:-.035em;color:var(--ink);
  font-weight:700;margin:0}
.lede{font-size:clamp(17px,1.5vw,20px);color:var(--body);max-width:52ch;margin:22px 0 0;line-height:1.55}
.acc{color:var(--acc-ink)}

/* ---- staged entrances: the parts of a block arrive in order, once ----
   Content is visible by default; the script adds .rv-on to <html> before hiding anything, so a
   failed script never leaves a section invisible. */
.rv-on .rv{opacity:0;transform:translateY(24px);
  transition:opacity .8s var(--ease),transform .8s var(--ease);transition-delay:calc(var(--i,0) * 80ms)}
.rv-on .rv.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.rv-on .rv{opacity:1;transform:none;transition:none}}

/* ---- footer: the name comes back at full width ---- */
.site-foot{padding:110px var(--gut) 34px;max-width:var(--max);margin:0 auto}
.site-foot .big{font-size:clamp(40px,9.6vw,168px);font-weight:700;letter-spacing:-.05em;line-height:.86;
  color:var(--ink);margin:0;white-space:nowrap}
.site-foot .big b{color:var(--acc-ink);font-weight:700}
.site-foot .row{display:flex;flex-wrap:wrap;gap:12px 28px;align-items:center;margin-top:34px;
  font-size:15px;color:var(--faint)}
.site-foot .row a{color:var(--body);text-decoration:none}
.site-foot .row a:hover{color:var(--ink)}
.site-foot .row .sp{flex:1}
.site-foot .kai{color:var(--acc-ink)}
