@font-face { font-family: Bricolage; src: url(/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@view-transition { navigation: auto; }

:root {
  --bg: #07080b; --panel: #0e1015; --line: #ffffff17; --ink: #f1f2ec; --mute: #9296a3; --lime: #c6ff3d; --accent: var(--lime);
  --display: Bricolage, ui-rounded, system-ui, sans-serif; --mono: "JB Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 1.05rem/1.65 var(--display); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Blueprint grid + film grain: the page's atmosphere. */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; }
body::before {
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 72px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 72px 100%;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0, #000 20%, transparent 85%);
}
body::after {
  z-index: 50; opacity: .07; mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: #000; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -99rem; } .skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--lime); color: #000; padding: .5rem 1rem; }

.mono { font: 500 .74rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 0; }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); margin-right: .6rem; box-shadow: 0 0 .8rem var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; line-height: .95; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8.6vw, 7.4rem); font-weight: 800; }
h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--accent); }
h1 small { display: block; font-size: .32em; font-weight: 500; letter-spacing: -.01em; color: var(--mute); margin-top: .6rem; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); }
h3 { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.15; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 1rem clamp(1rem, 4vw, 3rem); backdrop-filter: blur(14px) saturate(1.4); background: #07080bb3; border-bottom: 1px solid var(--line);
}
.brand { font: 700 .95rem var(--mono); letter-spacing: .12em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.brand i { width: .7rem; height: .7rem; background: var(--lime); rotate: 45deg; }
.brand b { color: var(--lime); font-weight: 400; margin-inline: -.35rem; }
.top nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.top nav a { font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); text-decoration: none; transition: color .2s; }
.top nav a:hover { color: var(--lime); }

/* ---------- buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.5rem; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #07080b; font: 700 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: translate .2s, box-shadow .2s;
}
a.btn:hover { translate: 0 -2px; box-shadow: 0 .8rem 2.5rem -0.6rem var(--accent); }
.btn.ghost { background: #ffffff0a; color: var(--ink); border-color: var(--line); }
a.btn.ghost:hover { border-color: var(--accent); box-shadow: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100svh - 3.4rem); display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(1rem, 4vw, 3rem) 0; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: -20% -10% auto 35%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent); filter: blur(40px); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1s; }
.gl .scene { opacity: 1; } .gl .stack { opacity: 0; visibility: hidden; }
/* Static icons: shown until WebGL is ready, and for good when it is unavailable. */
.stack { position: absolute; z-index: -1; right: 8vw; top: 50%; translate: 0 -50%; display: grid; grid-template-columns: repeat(2, clamp(6rem, 13vw, 11rem)); gap: 1.6rem; transition: opacity .6s, visibility .6s; }
.stack img { border-radius: 22.5%; box-shadow: 0 2rem 4rem #000a; }
.stack img:nth-child(odd) { rotate: -6deg; translate: 0 1.2rem; } .stack img:nth-child(even) { rotate: 5deg; }
.hero-copy { max-width: 46rem; }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .8, .2, 1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; } .hero-copy > :nth-child(n+5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; translate: 0 2rem; } }
.eyebrow { margin-bottom: 1.4rem; color: var(--ink); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--mute); max-width: 34rem; margin: 1.6rem 0 0; }
.hero[data-hover]:not([data-hover=""])::after { content: "→ open " attr(data-hover); position: absolute; right: clamp(1rem, 4vw, 3rem); top: 1.2rem; font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(2.5rem, 7vh, 5rem) calc(-1 * clamp(1rem, 4vw, 3rem)) 0; border-top: 1px solid var(--line); background: #07080b99; backdrop-filter: blur(8px); }
.stats div { padding: 1.1rem clamp(1rem, 4vw, 3rem); border-right: 1px solid var(--line); }
.stats dd { margin: .2rem 0 0; font: 700 clamp(1.5rem, 3vw, 2.4rem)/1 var(--display); letter-spacing: -.03em; color: var(--ink); text-transform: none; }

.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: .9rem 0; background: var(--lime); }
.ticker div { display: flex; gap: 2.5rem; width: max-content; animation: slide 40s linear infinite; }
.ticker span { color: #07080b; font-weight: 700; white-space: nowrap; }
@keyframes slide { to { translate: -50% 0; } }

/* ---------- sections ---------- */
.wrap { max-width: 82rem; margin: 0 auto; padding: clamp(4rem, 11vw, 9rem) clamp(1rem, 4vw, 3rem) 0; }
.narrow { max-width: 54rem; }
.sec { margin-bottom: clamp(2rem, 5vw, 4rem); } .sec .mono { color: var(--accent); margin-bottom: 1rem; }

.game-row {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; padding: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem; border: 1px solid var(--line); border-radius: 2rem; position: relative; overflow: hidden;
  background: radial-gradient(60rem 30rem at 100% 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--panel);
}
.game-row:nth-of-type(even) .game-shots { order: -1; }
.game-row .mono { color: var(--accent); }
.num { display: inline-block; padding: .1rem .5rem; margin-right: .5rem; border: 1px solid var(--accent); border-radius: 999px; }
.game-row h3 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; line-height: .95; margin: 1.2rem 0 .6rem; }
.game-row h3 a { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 1.1rem; }
.game-row h3 img { width: 1em; height: 1em; border-radius: 22.5%; flex: none; }
.tagline { font-size: 1.25rem; color: var(--accent); margin: 0 0 1rem; }
.game-copy > p:not(.mono, .tagline, .cta) { color: var(--mute); max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chips li { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #ffffff08; color: var(--ink); }

.game-shots, .shots { display: flex; justify-content: center; gap: clamp(.8rem, 2vw, 1.5rem); }
.phone { margin: 0; flex: 0 1 15rem; border-radius: 2.2rem; padding: .45rem; background: linear-gradient(160deg, #3a3d47, #15171d 40%); box-shadow: 0 2.5rem 5rem -1.5rem color-mix(in srgb, var(--accent) 45%, #000), 0 0 0 1px #ffffff14; transition: rotate .5s, translate .5s; }
.phone img { display: block; border-radius: 1.8rem; }
.game-shots .phone:first-child { rotate: -5deg; translate: 0 1rem; } .game-shots .phone:last-child { rotate: 4deg; translate: 0 -1rem; }
.game-row:hover .phone { rotate: 0deg; translate: 0; }

.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border: 1px solid var(--line); border-radius: 1.5rem; overflow: hidden; background: var(--line); gap: 1px; }
.cells > div { background: var(--panel); padding: clamp(1.4rem, 3vw, 2.2rem); transition: background .3s; }
.cells > div:hover { background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.cells .mono { color: var(--accent); margin-bottom: 2.5rem; }
.cells p:last-child { color: var(--mute); margin: .6rem 0 0; font-size: .98rem; }
.stackline { display: flex; flex-wrap: wrap; gap: .5rem 0; margin-top: 2rem; }
.stackline span:not(:last-child)::after { content: "/"; color: var(--lime); margin-inline: 1rem; }
.note { color: var(--mute); margin-top: 1.5rem; }

.faq details { border-top: 1px solid var(--line); } .faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--accent); transition: rotate .25s; }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { margin: 0 0 1.5rem; color: var(--mute); max-width: 44rem; }

/* ---------- game page ---------- */
.game-hero { min-height: 78svh; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 2rem; padding-bottom: 3rem; }
.game-hero h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
.tile-stage { position: relative; aspect-ratio: 1; min-width: 0; }
.stack.solo { position: absolute; inset: 0; right: auto; top: auto; translate: none; display: grid; place-items: center; grid-template-columns: none; }
.stack.solo img { width: 55%; rotate: -5deg; }
.crumbs { margin-bottom: 2rem; } .crumbs a { color: var(--mute); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 2.5rem; margin: 2.5rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.facts dd { margin: .2rem 0 0; color: var(--ink); font-size: .85rem; }
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about h3 { margin: 2rem 0 .6rem; color: var(--accent); font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.big { font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.45; letter-spacing: -.01em; margin: 0; }
.prose p:not(.big) { color: var(--mute); }
.shots .phone:nth-child(even) { translate: 0 2.5rem; }

.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.more a { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1.4rem; background: var(--panel); color: var(--ink); text-decoration: none; transition: border-color .2s, translate .2s; }
.more a:hover { border-color: var(--accent); translate: 0 -3px; }
.more img { border-radius: 22.5%; flex: none; }
.more b { display: block; font-size: 1.2rem; letter-spacing: -.02em; } .more small { color: var(--mute); line-height: 1.3; display: block; }

/* ---------- documents (privacy, support, 404) ---------- */
.doc { padding-top: clamp(3rem, 7vw, 5rem); }
.doc h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); margin-bottom: 1.2rem; }
.doc h2 { font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; margin: 3rem 0 .8rem; }
.doc > p, .doc li { color: #c9ccd6; } .doc > p.big { color: var(--ink); margin-top: 1.5rem; }
.doc li { margin: .4rem 0; } .doc li::marker { color: var(--accent); }

/* ---------- footer ---------- */
.foot { margin-top: clamp(5rem, 12vw, 10rem); border-top: 1px solid var(--line); padding: 3.5rem clamp(1rem, 4vw, 3rem) 2rem; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2rem; max-width: 82rem; margin: 0 auto; }
.foot-grid .mono { color: var(--lime); margin-bottom: .8rem; }
.foot-grid a { display: block; color: var(--ink); text-decoration: none; padding: .15rem 0; opacity: .8; } .foot-grid a:hover { color: var(--lime); opacity: 1; }
.wordmark { font: 800 clamp(4rem, 19vw, 19rem)/.8 var(--display); letter-spacing: -.06em; white-space: nowrap; text-align: center; margin: 4rem 0 1.5rem; color: transparent; -webkit-text-stroke: 1px #ffffff2e; user-select: none; }
.fine { text-align: center; }

/* ---------- scroll reveal (progressive: no JS, skipped where unsupported) ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
}

@media (max-width: 860px) {
  .top nav a:nth-child(-n+3) { display: none; }
  .hero { justify-content: flex-end; }
  .hero:not(.game-hero) .hero-copy { padding-top: 46svh; }
  .stack:not(.solo) { right: 50%; top: 24%; translate: 50% -50%; grid-template-columns: repeat(2, 5.5rem); gap: 1rem; }
  .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .game-row, .game-hero, .about { grid-template-columns: 1fr; }
  .game-row:nth-of-type(even) .game-shots { order: 0; }
  .game-hero .tile-stage { order: -1; max-height: 42svh; margin-inline: auto; width: min(100%, 42svh); }
  .facts { grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
  .shots { overflow-x: auto; justify-content: flex-start; padding-bottom: 3rem; scroll-snap-type: x mandatory; } .shots .phone { flex: 0 0 62%; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
