@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: 'VT323'; src: url('../assets/fonts/vt323-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg-0: #0b1009;
  --bg-1: #111a0e;
  --bg-2: #18241300;
  --line: #2a3a22;
  --line-2: #3a4f2e;
  --text: #dfe9c8;
  --text-dim: #9fb08a;
  --text-faint: #6f7f5c;
  --lime: #b6e05a;
  --lime-2: #8fc23c;
  --lcd-green: #c3d19c;
  --ember: #ff7a1f;
  --ember-2: #ffb347;
  --danger: #ff5a4a;

  --font-pixel: 'Silkscreen', ui-monospace, monospace;
  --font-term: 'VT323', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius: 14px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.45);
  --ribbon-h: 0px;
  --top-h: 56px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--ribbon-h) + var(--top-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(140, 190, 70, .14), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(255, 122, 31, .07), transparent 60%),
    linear-gradient(rgba(182, 224, 90, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 224, 90, .035) 1px, transparent 1px);
  background-size: auto, auto, 8px 8px, 8px 8px;
  background-attachment: fixed;
  font-family: var(--font-term);
  font-size: 21px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--ribbon-h);
}
body::after { /* vignette */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
main, footer, header { position: relative; z-index: 1; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; }
a { color: var(--lime); }
:focus-visible { outline: 2px dashed var(--lime); outline-offset: 3px; }

.sr-only, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 40px; left: 12px; z-index: 100; background: var(--lime); color: #111; padding: 8px 12px; }

/* ── DEMO ribbon ───────────────────────────────────────────── */
.demo-ribbon {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--ribbon-h);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: .08em;
  color: #1a1206;
  background: repeating-linear-gradient(-45deg, var(--ember-2) 0 14px, #ffc56b 14px 28px);
  border-bottom: 2px solid #1a1206;
  white-space: nowrap; overflow: hidden;
}
.demo-ribbon strong { font-weight: 700; }
.demo-ribbon__dot { width: 8px; height: 8px; background: #1a1206; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

/* ── top bar ───────────────────────────────────────────────── */
.topbar {
  position: sticky; top: var(--ribbon-h); z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  background: rgba(11, 16, 9, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo__mark { width: 28px; height: 28px; fill: var(--lime); }
.logo__mark .logo__eye { fill: var(--bg-0); }
.logo__word { font-family: var(--font-pixel); font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.logo__word span { color: var(--lime); margin-left: 4px; }
.topnav { display: flex; gap: 20px; margin-left: auto; }
.topnav a { font-family: var(--font-pixel); font-size: 12px; color: var(--text-dim); text-decoration: none; letter-spacing: .06em; padding: 6px 0; }
.topnav a:hover { color: var(--lime); }
.buy-btn {
  margin-left: 4px; padding: 9px 14px; border-radius: 10px; white-space: nowrap; text-decoration: none;
  font-family: var(--font-pixel); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  color: #12200a; background: var(--lime); border: 2px solid #0a0f08; box-shadow: 0 3px 0 #3f5c17;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.buy-btn:hover { filter: brightness(1.1); }
.buy-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #3f5c17; }

/* ── buttons ───────────────────────────────────────────────── */
.btn {
  --b-bg: #1b2716; --b-fg: var(--text); --b-edge: #0a0f08; --b-hi: rgba(255,255,255,.07);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 14px;
  border: 2px solid var(--b-edge); border-radius: 12px;
  background: linear-gradient(180deg, var(--b-hi), transparent 60%), var(--b-bg);
  color: var(--b-fg);
  box-shadow: 0 4px 0 var(--b-edge), 0 6px 14px rgba(0,0,0,.35);
  cursor: pointer; text-align: left;
  transition: transform .08s var(--ease-out), box-shadow .08s var(--ease-out), filter .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { filter: brightness(1.12); }
.btn:active, .btn.is-pressed { transform: translateY(3px); box-shadow: 0 1px 0 var(--b-edge), 0 2px 6px rgba(0,0,0,.3); }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; filter: grayscale(.85) brightness(.7); transform: none; box-shadow: 0 4px 0 var(--b-edge); }
.btn__text { display: flex; flex-direction: column; line-height: 1.05; }
.btn__text b { font-family: var(--font-pixel); font-size: 14px; letter-spacing: .03em; }
.btn__text small { font-size: 17px; color: inherit; opacity: .72; }
.btn__icon { width: 26px; height: 26px; flex: none; }
.btn__icon svg { width: 100%; height: 100%; fill: currentColor; }
.btn--primary { --b-bg: var(--lime); --b-fg: #12200a; --b-edge: #3f5c17; }
.btn--hot { --b-bg: var(--ember); --b-fg: #1d0d02; --b-edge: #7a3206; }
.btn--toggle { --b-bg: #22301b; }
.btn--toggle[aria-pressed='true'] { --b-bg: #2f4a1a; --b-fg: var(--lime); }
.btn--toggle[aria-pressed='true'] .btn__icon svg { animation: spin 1.6s steps(8) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn--small { min-height: 40px; padding: 6px 10px; font-family: var(--font-pixel); font-size: 11px; gap: 6px; border-radius: 10px; box-shadow: 0 3px 0 var(--b-edge); }
.btn--small .btn__icon { width: 16px; height: 16px; }
.btn--ghost { --b-bg: transparent; --b-fg: var(--lime); --b-edge: var(--line-2); box-shadow: none; font-family: var(--font-pixel); font-size: 12px; justify-content: center; }
.btn--block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--lime); text-decoration: underline dashed; text-underline-offset: 4px; cursor: pointer; font: inherit; }

.badge { display: inline-block; font-family: var(--font-pixel); font-size: 10px; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-dim); vertical-align: middle; }
.badge--demo { background: var(--ember-2); color: #1a1206; border-color: #1a1206; font-weight: 700; }
.soon { font-family: var(--font-pixel); font-size: 11px; letter-spacing: .05em; color: var(--ember-2); padding: 3px 8px; border: 1px dashed currentColor; border-radius: 6px; white-space: nowrap; }

/* ── toasts ────────────────────────────────────────────────── */
.toasts { position: fixed; z-index: 60; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  background: #c8d6a0; color: #1b2512; border: 2px solid #1b2512;
  box-shadow: 0 6px 0 rgba(0,0,0,.35);
  font-size: 19px; line-height: 1.1;
  animation: toast-in .35s var(--spring) both;
}
.toast b { font-family: var(--font-pixel); font-size: 11px; letter-spacing: .04em; display: block; }
.toast .badge--demo { flex: none; }
.toast--burn { background: #ffcf8a; }
.toast--evo { background: var(--lime); }
.toast--err { background: #ffb3a8; }
.toast.is-out { animation: toast-out .3s ease-in both; }
@keyframes toast-in { from { transform: translateY(14px) scale(.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(40px); opacity: 0; } }

@media (max-width: 860px) {
  .topnav { display: none; }
  .buy-btn { margin-left: auto; }
}
@media (max-width: 600px) {
  :root { --top-h: 48px; }
  body { font-size: 20px; }
  .demo-ribbon { font-size: 9px; gap: 6px; }
  .logo__word { font-size: 15px; }
  .logo__mark { width: 22px; height: 22px; }
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toast { font-size: 17px; padding: 6px 10px; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
  .toast > div { min-width: 0; }
  .toast__text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toast:not(:last-child) { display: none; }
}
@media (max-width: 400px) {
  .demo-ribbon { font-size: 8px; letter-spacing: .03em; gap: 4px; }
  .buy-btn { font-size: 10px; padding: 7px 10px; }
  .logo__word { font-size: 13px; }
  .topbar { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
