@font-face {
  font-family: Syne;
  src: url("/assets/fonts/syne.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("/assets/fonts/outfit.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050605;
  --ink: #f2f4ee;
  --muted: #8b9184;
  --lime: #b6ff00;
  --lime-2: #d4ff4a;
  --line: rgba(182, 255, 0, 0.18);
  --display: Syne, "Arial Black", sans-serif;
  --sans: Outfit, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --side: 228px;
  --cube-w: min(980px, calc(100vw - var(--side) - 140px));
  --cube-h: min(620px, calc(100vh - 80px));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--lime); color: #050605; }

.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% 12%, rgba(182,255,0,.08), transparent 58%),
    radial-gradient(700px 480px at 88% 80%, rgba(182,255,0,.05), transparent 55%),
    linear-gradient(#050605, #070a07);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(182,255,0,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182,255,0,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}
.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-12px);
  z-index: 80; background: var(--lime); color: #050605;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  padding: 10px 16px; opacity: 0; pointer-events: none; transition: .25s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.nav-toggle {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 40;
  width: 48px; height: 48px; border: 1px solid var(--line);
  background: rgba(5,6,5,.85);
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--lime); }

.sidebar {
  position: fixed; top: 0; left: 0; z-index: 30;
  width: var(--side); height: 100vh; padding: 16px 12px;
}
.sidebar-slab {
  height: 100%; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 18px;
  border: 1px solid var(--line);
  background: #080a08;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-family: var(--display); letter-spacing: .08em; font-size: 14px; }
.brand-copy small { font-family: var(--mono); color: var(--lime); letter-spacing: .18em; font-size: 10px; }
.side-nav { display: flex; flex-direction: column; gap: 8px; }
.side-link {
  display: flex; gap: 10px; align-items: center;
  padding: 11px 12px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--muted); text-align: left;
}
.side-link span { color: var(--lime); }
.side-link.is-active, .side-link:hover { color: var(--ink); border-color: var(--lime); background: rgba(182,255,0,.06); }
.side-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.side-actions .wide { grid-column: 1 / -1; }
.ca-box { margin-top: auto; border: 1px solid var(--line); padding: 10px; background: rgba(0,0,0,.25); }
.ca-box.wide { width: min(520px, 100%); margin: 8px auto 0; }
.ca-label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--muted); margin-bottom: 6px; }
.ca-row { display: flex; gap: 8px; align-items: center; }
.ca-row code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; color: var(--lime);
}
.ca-copy {
  padding: 7px 10px; background: var(--lime); color: #050605;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  border: 1px solid transparent;
}
.btn.lime { background: var(--lime); color: #050605; box-shadow: 0 0 22px rgba(182,255,0,.25); }
.btn.lime:hover { background: var(--lime-2); }
.btn.ghost { border-color: var(--line); color: var(--lime); }
.btn.ghost:hover { border-color: var(--lime); }

.progress-rail {
  position: fixed; top: 50%; right: 16px; z-index: 25;
  display: flex; flex-direction: column; gap: 10px; transform: translateY(-50%);
}
.progress-dot {
  width: 40px; height: 40px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.progress-dot.is-active { background: var(--lime); color: #050605; border-color: var(--lime); }

.scroll-track { position: relative; z-index: 1; height: 420vh; }
.sticky-viewport {
  position: sticky; top: 0; height: 100vh;
  perspective: 1600px; display: grid; place-items: center;
  padding: 28px 72px 28px calc(var(--side) + 36px);
  overflow: hidden;
}
.cube-stage { width: 100%; height: 100%; display: grid; place-items: center; transform-style: preserve-3d; }
.cube {
  position: relative; width: var(--cube-w); height: var(--cube-h);
  transform-style: preserve-3d; will-change: transform;
}
.face {
  position: absolute; inset: 0; transform-style: preserve-3d;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.face-hero { transform: rotateX(0deg) translateZ(calc(var(--cube-h) / 2)); }
.face-ticker { transform: rotateX(-90deg) translateZ(calc(var(--cube-h) / 2)); }
.face-biao { transform: rotateX(-180deg) translateZ(calc(var(--cube-h) / 2)); }
.face-culture { transform: rotateX(-270deg) translateZ(calc(var(--cube-h) / 2)); }

.plate {
  height: 100%; overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(12,16,12,.96), rgba(5,6,5,.98)),
    radial-gradient(ellipse at 70% 40%, rgba(182,255,0,.08), transparent 50%);
  padding: clamp(18px, 2.4vw, 36px);
}

.badge {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--lime);
  border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px;
}
.badge.center { margin: 0 auto 18px; display: table; }
.display {
  font-family: var(--display); font-weight: 800; letter-spacing: -.04em; line-height: .88;
  font-size: clamp(40px, 5.4vw, 84px); margin: 8px 0;
  text-shadow: 0 0 40px rgba(182,255,0,.2);
}
.display.sm { font-size: clamp(28px, 5vw, 64px); }
.sub {
  font-family: var(--display); letter-spacing: .14em; color: var(--lime);
  font-size: clamp(14px, 1.6vw, 20px); margin: 0;
}
.lede { color: var(--muted); font-size: clamp(16px, 1.8vw, 22px); line-height: 1.35; margin: 0; }
.lede.dim { max-width: 40ch; }

.hero-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 1.05fr .9fr;
  grid-template-rows: 1fr auto;
  grid-template-areas: "copy mascot" "hint hint";
  align-items: center; gap: 12px;
}
.hero-copy { grid-area: copy; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-ctas.center { justify-content: center; }
.hero-mascot { grid-area: mascot; display: grid; place-items: center; }
.hero-mascot img {
  max-height: calc(var(--cube-h) * .78); width: auto;
  filter: drop-shadow(0 24px 30px rgba(0,0,0,.5)) drop-shadow(0 0 24px rgba(182,255,0,.25));
  animation: float 6s ease-in-out infinite;
}
.hint {
  grid-area: hint; margin: 0; text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--muted);
}

.split {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center;
  height: calc(100% - 80px);
}
.split-panel h3 { font-family: var(--display); margin: 0 0 8px; letter-spacing: .08em; }
.split-tick { font-family: var(--display); color: var(--lime); font-size: 28px; margin: 0 0 10px; }
.split-panel ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 18px; }
.split-panel li { margin: 4px 0; }
.split-core { text-align: center; }
.split-core img { width: 120px; height: 120px; border-radius: 24px; margin: 0 auto 10px; border: 1px solid var(--line); }
.split-core strong { font-family: var(--display); letter-spacing: .1em; color: var(--lime); }
.note { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.biao-layout {
  height: 100%; display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: center;
}
.biao-break img {
  max-height: calc(var(--cube-h) * .7); margin: 0 auto;
  filter: drop-shadow(0 0 28px rgba(182,255,0,.3));
  animation: float 6s ease-in-out infinite;
}
.biao-copy p { color: var(--muted); font-size: 18px; line-height: 1.4; }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 16px; }
.tiles span {
  text-align: center; padding: 14px 8px; border: 1px solid var(--line);
  font-family: var(--display); font-size: 12px; letter-spacing: .08em; color: var(--lime);
}

.culture-plate { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; }
.disclaimer { color: var(--muted); font-size: 12px; max-width: 52ch; font-weight: 300; }

.lab { position: relative; z-index: 1; padding: 80px 0 60px 0; margin-left: var(--side); }
.lab .badge { margin-left: 40px; }
.lab .display { margin-left: 40px; }
.lab-rail {
  display: flex; gap: 16px; overflow-x: auto; padding: 24px 40px 40px;
  scroll-snap-type: x mandatory; cursor: grab;
}
.lab-rail figure { flex: 0 0 min(70vw, 380px); margin: 0; border: 1px solid var(--line); scroll-snap-align: start; }
.lab-rail img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.lab-rail figcaption {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--lime); padding: 14px 16px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 980px) {
  :root { --side: 0px; --cube-w: min(94vw, 920px); --cube-h: min(78vh, 620px); }
  .nav-toggle { display: flex; }
  .sidebar {
    width: min(86vw, 320px); transform: translateX(-110%);
    transition: transform .28s ease; background: rgba(5,6,5,.3);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .sticky-viewport { padding: 72px 52px 24px 16px; }
  .hero-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "mascot" "copy" "hint";
    text-align: center; justify-items: center;
  }
  .hero-copy { align-items: center; }
  .hero-mascot img { max-height: 28vh; }
  .split, .biao-layout { grid-template-columns: 1fr; }
  .biao-break { order: -1; }
  .split-core { order: -1; }
  .tiles { grid-template-columns: 1fr; }
  .lab { margin-left: 0; }
  .progress-dot { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-track { height: auto; }
  .sticky-viewport { position: relative; height: auto; perspective: none; display: block; padding: 24px 16px 40px calc(var(--side) + 24px); }
  .cube-stage, .cube { display: block; width: 100%; height: auto; transform: none !important; }
  .face { position: relative; inset: auto; width: 100%; height: auto; min-height: 70vh; margin-bottom: 20px; transform: none !important; backface-visibility: visible; }
  .hero-mascot img, .biao-break img { animation: none; }
}
