@font-face{font-family:'PublicPixel';src:url('../../assets/fonts/PublicPixel.woff2') format('woff2');font-weight:400;font-display:swap}

:root{
  --ink:#05070a;
  --ink-2:#0b0e12;
  --green:#8fd635;
  --bone:#eceae2;
  --bone-dim:#8b9086;
  --line:rgba(255,255,255,.12);
  --f-pix:'PublicPixel',monospace;
  --f-mono:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;
  --ease:cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--ink);color:var(--bone);
  font-family:var(--f-mono);line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.wrap{max-width:1120px;margin-inline:auto;padding-inline:1.6rem}

/* ---------- CRT OVERLAY ---------- */
.crt{position:fixed;inset:0;z-index:50;pointer-events:none;mix-blend-mode:overlay}
.crt-scan{
  position:absolute;inset:0;
  background:repeating-linear-gradient(to bottom,rgba(255,255,255,.05) 0px,transparent 1px,transparent 3px);
  opacity:.5;
}
.crt-vignette{position:absolute;inset:0;box-shadow:inset 0 0 18vw rgba(0,0,0,.7)}
/* a single bright scanline that sweeps the screen, like a tube refreshing */
.crt-sweep{
  position:absolute;left:0;right:0;height:28vh;
  background:linear-gradient(to bottom,transparent,rgba(143,214,53,.06) 45%,rgba(255,255,255,.05) 50%,transparent);
  animation:crtSweep 7s linear infinite;
}
@keyframes crtSweep{from{top:-30vh}to{top:100vh}}
/* the whole tube dips in brightness now and then */
.crt-flicker{position:absolute;inset:0;background:rgba(143,214,53,.035);opacity:0;animation:crtFlicker 6s steps(1,end) infinite}
@keyframes crtFlicker{
  0%,7%,7.6%,42%,42.4%,79%,79.7%,100%{opacity:0}
  7.3%,42.2%,79.4%{opacity:1}
}

/* ---------- SCROLL PROGRESS ---------- */
.progress{
  position:fixed;top:0;left:0;height:2px;width:100%;z-index:60;pointer-events:none;
  background:linear-gradient(90deg,var(--green),#e6ff9c);
  box-shadow:0 0 14px rgba(143,214,53,.85);
  transform:scaleX(0);transform-origin:0 50%;
}

/* ---------- REVEAL ---------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s var(--ease),transform .6s var(--ease)}
.reveal.is-in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}

/* ---------- NAV ---------- */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:20;
  display:flex;align-items:center;gap:1.4rem;
  padding:.8rem 1.6rem;border-bottom:1px solid var(--line);
}
.nav::before{
  content:'';position:absolute;inset:0;z-index:-1;
  background:rgba(5,7,10,.75);backdrop-filter:blur(8px);
}
.nav-brand img{image-rendering:pixelated;height:22px;width:auto}
.nav-links{display:flex;gap:1.3rem;align-items:center;margin-left:auto}
.nav-links a{
  font-family:var(--f-pix);font-size:.5rem;letter-spacing:.1em;color:var(--bone);
  transition:color .2s;
}
.nav-links a:hover{color:var(--green)}
.nav-back{padding-right:1.3rem;margin-right:-.1rem;border-right:1px solid var(--line)}
.nav-cta{display:none}
.nav-burger{display:none;background:none;border:0;color:var(--bone);font-size:1.4rem;cursor:pointer}

.btn{
  font-family:var(--f-pix);font-size:.55rem;letter-spacing:.08em;padding:.85rem 1.3rem;
  border:1px solid var(--line);display:inline-flex;align-items:center;gap:.6rem;justify-content:center;
  transition:transform .2s var(--ease),border-color .2s,background .2s;cursor:pointer;
}
.btn-lg{font-size:.6rem;padding:1rem 1.6rem}
.btn-buy{background:var(--green);color:#0a1006;border-color:var(--green)}
.btn-buy:hover{transform:translateY(-2px);box-shadow:0 10px 26px -10px rgba(143,214,53,.65)}
.btn-ghost{color:var(--bone);background:rgba(255,255,255,.03)}
.btn-ghost:hover{border-color:var(--bone);transform:translateY(-2px)}
.btn-badge{display:inline-block;transition:transform .2s var(--ease)}
.btn-badge:hover{transform:translateY(-2px) scale(1.03)}
.btn-badge img{image-rendering:pixelated}

/* ---------- HERO ---------- */
.hero{position:relative;min-height:100svh;overflow:hidden;display:grid;grid-template-rows:1fr auto}
/* three independent layers, each nudged a different amount by main.js on
   pointer-move / scroll — same recipe as Skinator's hl/data-depth hero */
.stage{position:absolute;inset:0;z-index:0;overflow:hidden}
.hl{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;will-change:transform}
.hl-bg{z-index:1;object-fit:cover}
.hl-ship{z-index:2;transform:scale(.96)}
.hl-title{z-index:3;transform:scale(.96)}
.hero-scrim{
  position:absolute;inset:0;
  background:linear-gradient(to bottom,rgba(5,7,10,.2) 0%,transparent 35%,transparent 55%,rgba(5,7,10,.92) 92%);
}
.hero-kicker{
  position:absolute;z-index:2;top:6.5rem;left:50%;translate:-50% 0;width:100%;
  text-align:center;padding-inline:1.6rem;margin:0;
  font-size:clamp(.85rem,2vw,1.05rem);max-width:34ch;color:var(--bone);
  text-shadow:0 3px 20px rgba(0,0,0,.95);
}
.hero-kicker em{color:var(--green);font-style:normal}
.hero-content{
  position:relative;z-index:2;grid-row:2;text-align:center;
  padding:0 1.6rem 6rem;display:flex;flex-direction:column;align-items:center;gap:1.6rem;
}
.hero-cta{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center;align-items:center}
.hero-scroll{
  position:absolute;left:50%;translate:-50% 0;bottom:1.6rem;z-index:2;
  display:flex;flex-direction:column;align-items:center;gap:.5rem;
  font-family:var(--f-pix);font-size:.44rem;letter-spacing:.2em;color:var(--bone-dim);
}
.hero-scroll span{width:1px;height:32px;background:linear-gradient(to bottom,transparent,var(--green));animation:scrollPulse 2s ease-in-out infinite}
@keyframes scrollPulse{0%,100%{opacity:.2;transform:scaleY(.6)}50%{opacity:1;transform:scaleY(1)}}

/* ---------- SECTIONS ---------- */
.section{padding:clamp(4rem,9vw,7rem) 0;position:relative}
.section-dark{background:var(--ink-2);border-block:1px solid var(--line)}
.h2{
  font-family:var(--f-pix);font-size:clamp(1.2rem,3vw,1.8rem);
  display:flex;align-items:baseline;gap:1rem;margin-bottom:.9rem;letter-spacing:.02em;
}
.h2-num{
  font-family:var(--f-pix);font-size:.6rem;color:var(--green);letter-spacing:.2em;
  border:1px solid rgba(143,214,53,.4);padding:.4rem .6rem;flex:none;
}
.lede{color:var(--bone-dim);font-size:1rem;max-width:60ch;margin-bottom:2.6rem}

/* ---------- TRAILER ---------- */
#trailer{
  background-image:
    linear-gradient(rgba(5,7,10,.7),rgba(5,7,10,.7)),
    url('../assets/hero/trailer-bg-tile.gif');
  background-repeat:repeat;background-size:auto,600px 360px;
}
.trailer-frame{
  border:1px solid var(--line);background:#000;padding:clamp(.5rem,1.4vw,1rem);
  box-shadow:0 40px 90px -50px rgba(143,214,53,.4);
}
.trailer-frame iframe{display:block;width:100%;aspect-ratio:16/9;border:0;background:#000}

/* ---------- STORY ---------- */
.story-wrap{display:grid;grid-template-columns:1.3fr 1fr;gap:clamp(2rem,5vw,4rem);align-items:center}
.story-copy p{color:var(--bone-dim)}
.story-copy em{color:var(--bone);font-style:italic}
.quote{
  border-left:2px solid var(--green);padding-left:1rem;margin-top:1.6rem;
  font-style:italic;color:var(--bone);
}
.quote cite{display:block;margin-top:.4rem;font-style:normal;font-size:.8rem;color:var(--bone-dim)}
.story-art{border-radius:6px;filter:drop-shadow(0 20px 50px rgba(0,0,0,.6))}

/* ---------- FEATURES ---------- */
.feat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1.2rem}
.feat{border:1px solid var(--line);padding:1.6rem;background:rgba(255,255,255,.02)}
.feat-icon{font-size:1.6rem;color:var(--green);display:block;margin-bottom:.8rem}
.feat h3{font-family:var(--f-pix);font-size:.72rem;letter-spacing:.04em;margin:0 0 .7rem;line-height:1.5}
.feat p{color:var(--bone-dim);font-size:.9rem;margin:0}

/* ---------- THE HORRORS ---------- */
/* flex + wrap + justify-center — unlike an auto-fill grid, this centers
   whatever's left in an incomplete last row instead of hugging the left */
.horror-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:.7rem}
.horror{
  flex:0 1 100px;aspect-ratio:1;border:1px solid var(--line);background:rgba(255,255,255,.02);
  display:grid;place-items:center;padding:.8rem;transition:border-color .2s,transform .2s var(--ease),background .2s;
}
.horror img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.horror:hover{border-color:var(--green);transform:translateY(-3px);background:rgba(143,214,53,.06)}

/* ---------- BUY ---------- */
.buy{text-align:center;background:radial-gradient(60% 60% at 50% 30%,rgba(143,214,53,.08),transparent 70%)}
/* native clip is 350x155 — kept at its own aspect ratio rather than
   squashed to the requested 350x115 so the pixel art doesn't distort */
.buy-gif{
  width:min(85%,380px);margin:0 auto 1.6rem;
  border:1px solid var(--line);background:#000;image-rendering:pixelated;
}
.buy-lede{color:var(--bone-dim);max-width:52ch;margin:0 auto 2rem}
.buy-cta{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}

/* ---------- FOOTER ---------- */
.foot{border-top:1px solid var(--line);padding:1.6rem;background:var(--ink-2)}
.foot-wrap{
  max-width:1120px;margin-inline:auto;display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:.8rem;font-family:var(--f-pix);font-size:.48rem;color:var(--bone-dim);
}
.foot-back:hover{color:var(--green)}

/* ================= POLISH ================= */

/* -- hero kicker reads like a line being typed into a terminal -- */
.hero-kicker::after{
  content:'';display:inline-block;width:.55em;height:1.05em;margin-left:.18em;
  background:var(--green);vertical-align:-.18em;animation:caret 1.1s steps(1,end) infinite;
}
@keyframes caret{0%,50%{opacity:1}50.01%,100%{opacity:0}}

/* -- section headings decode out of noise (text swapped by JS) -- */
.h2-t{display:inline-block}
.h2-t.is-decoding{color:var(--green);text-shadow:0 0 14px rgba(143,214,53,.5)}
/* the index chip breathes so the eye catches the section marker */
.h2-num{animation:numPulse 3.4s ease-in-out infinite}
@keyframes numPulse{
  0%,100%{box-shadow:0 0 0 rgba(143,214,53,0);border-color:rgba(143,214,53,.4)}
  50%{box-shadow:0 0 16px -2px rgba(143,214,53,.45);border-color:rgba(143,214,53,.9)}
}

/* -- feature cards: a green edge wipes in on hover -- */
.feat{position:relative;overflow:hidden;transition:border-color .25s,transform .25s var(--ease),background .25s}
.feat::before{
  content:'';position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--green);
  transform:scaleY(0);transform-origin:50% 100%;transition:transform .35s var(--ease);
}
.feat:hover{border-color:rgba(143,214,53,.45);transform:translateY(-4px);background:rgba(143,214,53,.04)}
.feat:hover::before{transform:scaleY(1);transform-origin:50% 0}
.feat:hover .feat-icon{animation:iconJitter .4s steps(2,end) 2}
@keyframes iconJitter{0%{transform:none}33%{transform:translate(1px,-1px)}66%{transform:translate(-1px,1px)}100%{transform:none}}

/* -- the horrors twitch: JS flips one tile at a time -- */
.horror{position:relative;overflow:hidden}
.horror img{transition:transform .25s var(--ease)}
.horror:hover img{transform:scale(1.12)}
.horror.is-glitch img{
  transform:translateX(3px) scale(1.04);
  filter:invert(1) drop-shadow(0 0 6px rgba(143,214,53,.9));
}
.horror.is-glitch{border-color:var(--green);background:rgba(143,214,53,.1)}

/* -- buy panel: the CTA pulses so it reads as the end of the page -- */
.btn-buy{position:relative;overflow:hidden}
.btn-buy::after{
  content:'';position:absolute;top:0;bottom:0;width:45%;left:-60%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);
  animation:sheen 4.5s ease-in-out infinite;
}
@keyframes sheen{0%,72%{left:-60%}88%,100%{left:120%}}

/* -- links in the nav get an underline that draws in -- */
.nav-links a{position:relative}
.nav-links a::after{
  content:'';position:absolute;left:0;right:100%;bottom:-.35rem;height:1px;
  background:var(--green);transition:right .28s var(--ease);
}
.nav-links a:hover::after{right:0}
.nav-back::after{display:none}
/* the bar tightens once you leave the hero */
.nav.is-stuck{padding-block:.55rem}
.nav.is-stuck::before{background:rgba(5,7,10,.92)}

/* -- TV power-on flash, same recipe as Skinator's -- */
.tv-power{
  position:fixed;left:0;right:0;top:50%;height:2px;z-index:999;pointer-events:none;
  background:#fff;box-shadow:0 0 60px 12px rgba(255,255,255,.85);opacity:0;
}
.tv-power.is-live{animation:tvPowerOn .5s var(--ease) forwards}
@keyframes tvPowerOn{
  0%{opacity:1;transform:scaleX(.2) scaleY(1)}
  45%{opacity:1;transform:scaleX(1) scaleY(1)}
  100%{opacity:0;transform:scaleX(1) scaleY(320)}
}

/* -- respect the setting: kill every ambient loop -- */
@media (prefers-reduced-motion:reduce){
  .crt-sweep,.crt-flicker,.h2-num,
  .btn-buy::after,.hero-scroll span,.hero-kicker::after{animation:none}
  .hl{transform:none !important}
  .progress{display:none}
  .tv-power{display:none}
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:860px){
  .story-wrap{grid-template-columns:1fr}
  .story-art{max-width:340px;margin-inline:auto}
}
@media (max-width:760px){
  .nav-links{
    position:fixed;top:56px;left:0;right:0;bottom:0;background:var(--ink);
    flex-direction:column;align-items:flex-start;padding:1.6rem;gap:1.4rem;display:none;overflow-y:auto;
  }
  .nav-links.is-open{display:flex}
  .nav-back{border-right:0;padding-right:0;border-bottom:1px solid var(--line);padding-bottom:1rem;width:100%}
  .nav-burger{display:block;margin-left:auto}
  .nav-cta{display:none}
}
