/* Dev Cheat Codes · same world as the reels: paper, dot grid, ink outlines, lime highlights, pixel HUD. */
@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/silkscreen-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/silkscreen-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe7dc;
  --ink: #15131a;
  --ink-2: #3a3642;
  --grey: #6b6773;
  --lime: #c6ff3d;
  --lime-dark: #8fbf1f;
  --violet: #5b3df5;
  --term: #1b1922;
  --white: #fff;
  --radius: 18px;
  --shadow: 6px 6px 0 var(--ink);
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  /* Dot grid + paper grain, like the video backgrounds. */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(21, 19, 26, 0.13) 1px, transparent 1.4px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .07 0 0 0 0 .1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 22px 22px, 160px 160px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
img, canvas { display: block; max-width: 100%; }
mark { background: var(--lime); color: var(--ink); padding: 0 .12em; border-radius: .14em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--lime); padding: 8px 12px; border-radius: 8px; font-family: var(--pixel); z-index: 10; }
.skip:focus { top: 12px; }

/* Pixel icons are drawn from the same bitmaps as the reels (app.js fills data-px). */
.px { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.px svg { width: 100%; height: 100%; display: block; }
.px-lg { width: 34px; height: 34px; }

/* ── HUD ──────────────────────────────────────────────────────────── */
.hud {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  font-family: var(--pixel); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px solid rgba(21, 19, 26, .08);
}
.hud-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.hud-xp { display: flex; align-items: center; gap: 10px; }
.hud-xp-label { font-weight: 700; }
.xp-bar { display: inline-flex; gap: 4px; }
.xp-bar i { width: 18px; height: 12px; border: 2px solid var(--ink); border-radius: 2px; background: transparent; transition: background .35s; }
.xp-bar i.on { background: var(--lime); }
.xp-bar i.pop { animation: pip .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pip { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.xp-count { font-variant-numeric: tabular-nums; }
.hud-links { display: flex; align-items: center; gap: 6px; }
.hud-links a, .sfx {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 34px; padding: 0 10px;
  border: 2px solid var(--ink); border-radius: 9px; background: var(--white); text-decoration: none; font-family: var(--pixel); font-size: 12px;
  box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.hud-links a:hover, .sfx:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.sfx b { margin-left: 4px; font-weight: 700; }
.sfx[aria-pressed="false"] b { color: var(--grey); }

/* ── Hero ─────────────────────────────────────────────────────────── */
main { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-areas: "copy stage" "console stage";
  column-gap: clamp(24px, 5vw, 72px);
  align-items: end;
  padding: clamp(28px, 6vw, 72px) 0 clamp(36px, 6vw, 64px);
}
.hero-copy { grid-area: copy; }
.eyebrow { font-family: var(--pixel); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; color: var(--ink-2); }
.blink { color: var(--violet); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
h1 {
  font-size: clamp(48px, 7.4vw, 104px); line-height: .95; letter-spacing: -.035em; font-weight: 800; margin: 0;
  font-optical-sizing: auto;
}
h1 mark { padding: 0 .08em; }
.lede { font-size: clamp(17px, 1.6vw, 21px); max-width: 30em; margin: 22px 0 0; color: var(--ink-2); }

.stage { grid-area: stage; position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 420px; }
.bot { width: min(100%, 440px); height: auto; aspect-ratio: 560 / 700; position: relative; z-index: 1; }
.shadow { width: 46%; height: 18px; margin-top: -14px; border-radius: 50%; background: rgba(21, 19, 26, .16); filter: blur(2px); }
.bubble {
  position: absolute; z-index: 2; top: 2%; left: 0; max-width: 60%;
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px; padding: 10px 14px;
  font-family: var(--pixel); font-size: 13px; line-height: 1.35; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 80% 100%; transition: transform .25s cubic-bezier(.2, 1.5, .4, 1);
}
.bubble::after {
  content: ""; position: absolute; right: 18%; bottom: -12px; width: 18px; height: 18px; background: var(--white);
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) skew(10deg, 10deg);
}
.bubble.pop { transform: scale(1.08); }

/* ── Console (the code box) ──────────────────────────────────────── */
.console { grid-area: console; margin-top: 34px; max-width: 620px; }
.console-label { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.console-row { display: flex; gap: 12px; align-items: stretch; }
.screen {
  position: relative; flex: 1; min-width: 0; border-radius: 16px; background: var(--term); border: 3px solid var(--ink); box-shadow: var(--shadow);
  overflow: hidden;
}
.screen::before { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .035) 0 2px, transparent 2px 4px);
}
.prompt { position: absolute; left: 20px; top: 50%; transform: translateY(-52%); color: var(--lime); opacity: .55; font-family: var(--pixel); font-size: clamp(24px, 3.4vw, 32px); pointer-events: none; }
.screen input {
  width: 100%; height: 76px; padding: 0 22px 0 54px; border: 0; outline: 0; background: transparent;
  color: var(--lime); caret-color: transparent; font-family: var(--pixel); font-size: clamp(28px, 4vw, 38px); letter-spacing: .14em; text-transform: uppercase;
  text-shadow: 0 0 12px rgba(198, 255, 61, .55);
}
.screen input::placeholder { color: rgba(198, 255, 61, .22); text-shadow: none; }
.caret { position: absolute; top: 50%; width: .62em; height: 1.05em; margin-top: -.55em; background: var(--lime); box-shadow: 0 0 10px rgba(198, 255, 61, .7); font-size: clamp(28px, 4vw, 38px); animation: blink 1s steps(1) infinite; pointer-events: none; left: 54px; }
.screen:not(.focused) .caret { opacity: .35; animation: none; }
.screen:focus-within { box-shadow: var(--shadow), 0 0 0 4px rgba(91, 61, 245, .35); }
.unlock {
  flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 0 26px; border: 3px solid var(--ink); border-radius: 16px;
  background: var(--lime); font-family: var(--pixel); font-weight: 700; font-size: 18px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: var(--shadow); transition: transform .1s, box-shadow .1s;
}
.unlock:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.unlock:active { transform: translate(5px, 5px); box-shadow: 1px 1px 0 var(--ink); }
.unlock[disabled] { opacity: .7; cursor: progress; }
.hint { margin: 16px 0 0; font-size: 15px; color: var(--grey); }
.status { min-height: 1.5em; margin: 6px 0 0; font-weight: 600; }
.status.bad { color: #b42318; }
.console.shake .screen { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }

/* ── Result card ──────────────────────────────────────────────────── */
.result { scroll-margin-top: 90px; margin: 0 0 clamp(48px, 7vw, 88px); outline: none; }
.card {
  position: relative; background: var(--white); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 10px 10px 0 var(--ink); overflow: hidden;
  animation: rise .55s cubic-bezier(.2, 1.2, .3, 1) both;
}
@keyframes rise { from { transform: translateY(26px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.card-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px;
  padding: 14px clamp(18px, 3vw, 32px); background: var(--lime); border-bottom: 3px solid var(--ink);
  font-family: var(--pixel); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.card-strip .px { margin-right: 8px; }
.card-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(22px, 4vw, 44px); }
.card h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -.03em; margin: 0; font-weight: 800; }
.tagline { font-size: clamp(18px, 1.8vw, 22px); margin: 14px 0 0; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.facts li { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; background: var(--paper); }
.steps { counter-reset: step; list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--lime);
  font-family: var(--pixel); font-size: 14px;
}
.step-text { padding-top: 3px; }
.cmd, .block {
  grid-column: 2; display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; padding: 12px 12px 12px 16px; border-radius: 12px;
  background: var(--term); color: #e9e6f0; font-family: var(--mono); font-size: 14px; line-height: 1.5;
}
.cmd code, .block p { flex: 1; min-width: 0; overflow-wrap: anywhere; margin: 0; }
.cmd code::before { content: "$ "; color: var(--lime); }
.block p { white-space: pre-wrap; max-height: 220px; overflow: auto; }
.copy {
  flex: none; border: 1.5px solid rgba(198, 255, 61, .55); color: var(--lime); background: transparent; border-radius: 8px; padding: 4px 10px;
  font-family: var(--pixel); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
}
.copy:hover { background: rgba(198, 255, 61, .12); }
.copy.done { background: var(--lime); color: var(--ink); }
.card-side { display: flex; flex-direction: column; gap: 14px; }
.links { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 3px solid var(--ink); border-radius: 14px;
  text-decoration: none; font-weight: 700; font-size: 17px; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; background: var(--white);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-lime { background: var(--lime); }
.btn-ghost { background: transparent; }
.share, .follow-mini { border: 2px dashed rgba(21, 19, 26, .35); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.share-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.share code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 15px; overflow-wrap: anywhere; }
.share .copy { border-color: var(--ink); color: var(--ink); }
.share .copy.done { background: var(--ink); color: var(--lime); }
.follow-mini a { font-weight: 700; }
.locked-card .card-strip { background: var(--paper-2); }
.countdown { font-family: var(--pixel); font-size: clamp(28px, 5vw, 48px); letter-spacing: .06em; margin: 18px 0 0; font-variant-numeric: tabular-nums; }

/* ── Levels ───────────────────────────────────────────────────────── */
.levels { padding: clamp(24px, 4vw, 40px) 0 clamp(48px, 7vw, 88px); }
.section-head { max-width: 640px; margin-bottom: 28px; }
h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1; letter-spacing: -.03em; font-weight: 800; margin: 0; }
.section-sub { margin: 12px 0 0; color: var(--ink-2); }
.level-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.level {
  position: relative; display: flex; flex-direction: column; background: var(--white); border: 3px solid var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.level:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 7px 8px 0 var(--ink); }
.level-cover { aspect-ratio: 9 / 13; background: var(--paper-2); border-bottom: 3px solid var(--ink); overflow: hidden; }
.level-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.level-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.level-num { font-family: var(--pixel); font-size: 12px; letter-spacing: .08em; color: var(--grey); text-transform: uppercase; }
.blanks { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px; }
.blanks i { width: 14px; height: 4px; border-radius: 1px; background: var(--ink); }
.level-code { align-self: flex-start; font-family: var(--pixel); font-weight: 700; font-size: 15px; letter-spacing: .1em; background: var(--ink); color: var(--lime); border-radius: 7px; padding: 3px 9px; }
.level-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.level-btn { margin-top: auto; align-self: flex-start; border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); padding: 5px 12px; font-family: var(--pixel); font-size: 12px; text-transform: uppercase; }
.level-btn:hover { background: var(--lime); }
.level.next { border-style: dashed; box-shadow: none; background: transparent; justify-content: center; align-items: center; text-align: center; padding: 26px 16px; min-height: 260px; }
.level.next:hover { transform: none; }
.level.next .px { width: 40px; height: 40px; margin-bottom: 12px; }
.level.next b { font-family: var(--pixel); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.level.next .countdown { font-size: 22px; margin-top: 8px; }
.empty { color: var(--grey); }

/* ── How it works ─────────────────────────────────────────────────── */
.how { padding-bottom: clamp(56px, 8vw, 104px); }
.how-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--white); }
.how-grid li { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 3vw, 32px); }
.how-grid li + li { border-left: 3px solid var(--ink); }
.how-grid b { font-size: 22px; letter-spacing: -.01em; margin-top: 6px; }
.how-grid span:last-child { color: var(--ink-2); }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); padding: clamp(48px, 8vw, 96px) var(--gutter) 40px; }
.footer > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.footer-big { font-size: clamp(36px, 6vw, 84px); line-height: 1; letter-spacing: -.035em; font-weight: 800; margin-top: 0; margin-bottom: 0; }
.footer-follow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.footer .btn { color: var(--ink); box-shadow: 4px 4px 0 var(--lime); border-color: var(--paper); }
.footer .btn-ghost { color: var(--paper); }
.footer .btn:hover { box-shadow: 6px 6px 0 var(--lime); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-top: 56px; padding-top: 24px; border-top: 1.5px solid rgba(244, 241, 234, .18); font-size: 15px; color: rgba(244, 241, 234, .75); }
.footer-meta p { margin: 0; }
.footer-meta a { color: var(--paper); }
.noscript { text-align: center; padding: 16px; }

/* ── Doc pages (privacy, terms) ───────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc h1 { font-size: clamp(40px, 6vw, 72px); }
.doc h2 { font-size: 26px; margin-top: 40px; letter-spacing: -.02em; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { font-family: var(--pixel); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); }

/* ── Entrance ─────────────────────────────────────────────────────── */
.reveal { animation: rise .7s cubic-bezier(.2, 1, .3, 1) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .26s; }

/* ── Small screens ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "console"; padding-top: 24px; }
  .stage { min-height: 0; margin-top: 8px; }
  .bot { width: min(52vw, 260px); }
  .bubble { left: auto; right: 54%; top: 0; max-width: 46%; font-size: 12px; }
  .console { margin-top: 18px; }
  .card-body { grid-template-columns: minmax(0, 1fr); }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .how-grid li + li { border-left: 0; border-top: 3px solid var(--ink); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hud { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .hud-brand span:last-child { display: none; }
  .xp-bar i { width: 12px; }
  .hud-links a, .sfx { min-width: 34px; padding: 0 8px; height: 32px; }
  .sfx { font-size: 0; } .sfx b { font-size: 11px; margin: 0; }
  .console-row { flex-direction: column; }
  .unlock { justify-content: center; height: 60px; }
  .screen input { height: 68px; }
  .level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .level-info { padding: 10px; }
  .blanks i { width: 11px; }
  .card { box-shadow: 6px 6px 0 var(--ink); border-radius: 20px; }
  .card-strip { font-size: 12px; letter-spacing: .05em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
