:root {
  --bg: #000;
  --fg: #fff;
  --dim: #8a8a8a;
  --faint: #2a2a2a;
  --line: #1c1c1c;
  --panel: rgba(10, 10, 10, 0.82);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --display: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #000; }

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: flex; align-items: flex-end;
  padding: 24px;
  transition: opacity .6s ease, visibility .6s;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot-log { font-size: 13px; color: #ccc; white-space: pre-wrap; }

/* ---------- background ---------- */
#bg { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; }
.scanlines {
  pointer-events: none; position: fixed; inset: 0; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: .12em; }
.brand img { border-radius: 8px; }
.nav nav { display: flex; gap: 28px; font-size: 13px; color: var(--dim); }
.nav nav a:hover { color: var(--fg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  background: var(--fg); color: var(--bg);
  border: 1px solid var(--fg);
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s ease, background .2s, color .2s;
}
.btn:hover { background: var(--bg); color: var(--fg); transform: translateY(-2px); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); transition: left .5s;
}
.btn:hover::after { left: 140%; }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-sm { padding: 9px 16px; font-size: 12px; }
.btn-lg { padding: 18px 40px; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100vh - 66px);
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  padding: 40px clamp(16px, 5vw, 72px);
  max-width: 1400px; margin: 0 auto;
}
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .14em; color: var(--dim);
  border: 1px solid var(--faint); padding: 6px 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 50% { opacity: .4; box-shadow: 0 0 0 6px rgba(255,255,255,0); } }

h1, h2, h3 { font-family: var(--display); line-height: 1; }
.hero h1 { font-size: clamp(64px, 12vw, 168px); letter-spacing: -.04em; margin: 24px 0 6px; }
.ticker { font-size: clamp(18px, 2.4vw, 28px); letter-spacing: .3em; color: var(--dim); }
.lead { margin: 28px 0 34px; font-size: clamp(15px, 1.4vw, 18px); color: #d6d6d6; min-height: 3.4em; max-width: 560px; }
.lead::after { content: "▌"; animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 22px; font-family: var(--display); }
.hero-stats span { font-size: 11px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }

/* glitch */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: .8;
}
.glitch::before { animation: glitch1 3.2s infinite steps(1); color: #fff; mix-blend-mode: difference; }
.glitch::after { animation: glitch2 2.7s infinite steps(1); color: #777; }
@keyframes glitch1 {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  90% { clip-path: inset(10% 0 60% 0); transform: translate(-6px, 0); }
  93% { clip-path: inset(50% 0 20% 0); transform: translate(6px, 0); }
  96% { clip-path: inset(80% 0 5% 0); transform: translate(-3px, 0); }
}
@keyframes glitch2 {
  0%, 84%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  86% { clip-path: inset(30% 0 40% 0); transform: translate(5px, 2px); }
  90% { clip-path: inset(70% 0 10% 0); transform: translate(-5px, -2px); }
}

/* cat visual */
.hero-visual { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }
.cat-wrap {
  position: absolute; inset: 12%;
  border-radius: 50%; overflow: hidden;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 0 80px rgba(255,255,255,.08);
  transition: transform .2s ease-out;
}
.cat-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-scan {
  position: absolute; left: 0; right: 0; height: 22%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.22), transparent);
  animation: scan 3.4s linear infinite;
  mix-blend-mode: overlay;
}
@keyframes scan { from { top: -25%; } to { top: 105%; } }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.reticle { position: absolute; inset: 8%; pointer-events: none; }
.reticle i { position: absolute; width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.7); }
.reticle i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.orbit { position: absolute; border-radius: 50%; border: 1px dashed #333; inset: 4%; animation: spin 40s linear infinite; }
.o2 { inset: -2%; border-style: solid; border-color: #1a1a1a; animation-duration: 60s; animation-direction: reverse; }
.o3 { inset: 9%; border-color: #444; border-style: dotted; animation-duration: 22s; }
.orbit::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hud { position: absolute; font-size: 11px; letter-spacing: .1em; color: var(--dim); line-height: 1.7; }
.hud span { color: var(--fg); }
.hud-tl { top: 0; left: 0; }
.hud-tr { top: 0; right: 0; text-align: right; }
.hud-bl { bottom: 0; left: 0; }
.hud-br { bottom: 0; right: 0; text-align: right; }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--fg); background: var(--fg); color: var(--bg); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: marquee 30s linear infinite; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: 1320px; margin: 0 auto; padding: 120px clamp(16px, 4vw, 48px) 40px; }
.section-head { margin-bottom: 48px; }
.kicker { font-size: 12px; letter-spacing: .2em; color: var(--dim); margin-bottom: 14px; }
.section h2 { font-size: clamp(36px, 6vw, 72px); letter-spacing: -.03em; }
.sub { color: var(--dim); margin-top: 16px; max-width: 640px; }
.fine { color: #555; font-size: 12px; margin-top: 18px; text-align: center; }
.center { text-align: center; margin-top: 48px; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- console grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 14px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--faint);
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
  position: relative;
  transition: border-color .3s;
}
.panel:hover { border-color: #666; }
.panel-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .12em; color: var(--dim);
  padding: 9px 14px; border-bottom: 1px solid var(--faint);
  white-space: nowrap;
}
.panel-bar span:last-child { color: var(--fg); }
.lights { display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #666; }
.lights i:first-child { background: #fff; }
.live { animation: blink 1.2s steps(1) infinite; }
.panel-canvas { flex: 1; width: 100%; height: 100%; display: block; }

.panel-term { grid-column: span 2; grid-row: span 2; }
.term {
  flex: 1; padding: 14px 16px; font-size: 13px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.term p { white-space: pre-wrap; word-break: break-word; color: #cfcfcf; }
.term p .t { color: #555; }
.term p .ok { color: #fff; font-weight: 700; }
.term p .warn { background: #fff; color: #000; padding: 0 4px; }
.term p.cur::after { content: "█"; animation: blink 1s steps(1) infinite; }

.tasks { list-style: none; padding: 12px 14px; display: flex; flex-direction: column; gap: 11px; font-size: 12px; overflow: hidden; }
.tasks li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.tasks li .pb { grid-column: 1 / -1; height: 3px; background: var(--faint); }
.tasks li .pb i { display: block; height: 100%; background: #fff; width: 0; transition: width .3s linear; }
.tasks li.fin { color: #555; }
.tasks li.fin .pb i { background: #555; }

.vitals { padding: 16px 14px; display: flex; flex-direction: column; gap: 16px; font-size: 12px; }
.vital { display: grid; grid-template-columns: 1fr 64px; gap: 6px 10px; align-items: center; }
.vital label { grid-column: 1 / -1; color: var(--dim); }
.vital span { text-align: right; }
.bar { height: 8px; border: 1px solid #333; padding: 1px; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 8px); width: 0; transition: width .8s ease; }

.panel-chat { grid-column: span 3; grid-row: span 1; }
.chat { flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 8px 12px; border: 1px solid var(--faint); }
.msg.bot { align-self: flex-start; }
.msg.bot::before { content: "BOTCAT › "; color: var(--dim); }
.msg.me { align-self: flex-end; background: #fff; color: #000; }
.chat-form { display: flex; border-top: 1px solid var(--faint); }
.chat-form input {
  flex: 1; background: transparent; border: 0; color: var(--fg);
  font-family: var(--mono); font-size: 14px; padding: 12px 16px; outline: none; min-width: 0;
}
.chat-form .btn { border: 0; border-left: 1px solid var(--faint); }

/* ---------- story ---------- */
.story { position: relative; display: flex; flex-direction: column; gap: 22px; padding-left: 40px; }
.story::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(#fff, #222); }
.chapter { position: relative; border: 1px solid var(--faint); background: var(--panel); padding: 28px 30px; max-width: 860px; }
.chapter::before {
  content: ""; position: absolute; left: -37px; top: 32px; width: 11px; height: 11px;
  background: #000; border: 2px solid #fff; border-radius: 50%;
}
.chapter:nth-child(even) { margin-left: auto; }
.ch-no { font-size: 11px; letter-spacing: .2em; color: var(--dim); }
.chapter h3 { font-size: 28px; margin: 10px 0 12px; }
.chapter p { color: #cfcfcf; }
.chapter em { color: #fff; }

/* ---------- tokenomics ---------- */
.tok-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tok { border: 1px solid var(--faint); background: var(--panel); padding: 34px 22px; text-align: center; transition: background .3s, color .3s; }
.tok:hover { background: #fff; color: #000; }
.tok:hover span { color: #444; }
.tok b { display: block; font-family: var(--display); font-size: clamp(26px, 3.2vw, 44px); }
.tok span { font-size: 12px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.spec { margin-top: 14px; border: 1px solid var(--faint); display: grid; grid-template-columns: repeat(3, 1fr); }
.spec div { padding: 18px 22px; border-right: 1px solid var(--faint); border-bottom: 1px solid var(--faint); display: flex; flex-direction: column; gap: 4px; }
.spec span { font-size: 11px; letter-spacing: .16em; color: var(--dim); }

/* ---------- steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps li { border: 1px solid var(--faint); background: var(--panel); padding: 28px 24px; position: relative; overflow: hidden; }
.step-no { font-family: var(--display); font-size: 64px; color: transparent; -webkit-text-stroke: 1px #555; line-height: 1; display: block; margin-bottom: 18px; }
.steps h3 { font-size: 22px; margin-bottom: 12px; }
.steps p { color: #bdbdbd; font-size: 14px; }
.steps li::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #fff; transition: width .5s; }
.steps li:hover::after { width: 100%; }

/* ---------- roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--faint); }
.rm { padding: 30px 24px; border-right: 1px solid var(--faint); position: relative; }
.rm:last-child { border-right: 0; }
.rm span { font-size: 12px; letter-spacing: .16em; color: var(--dim); }
.rm h3 { font-size: 24px; margin: 12px 0 10px; }
.rm p { color: #bdbdbd; font-size: 14px; }
.rm.done { background: #fff; color: #000; }
.rm.done span, .rm.done p { color: #333; }
.rm.active::before { content: "IN PROGRESS"; position: absolute; top: 12px; right: 14px; font-size: 10px; letter-spacing: .14em; animation: blink 1.2s steps(1) infinite; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 120px 20px 50px; border-top: 1px solid var(--line); margin-top: 120px; }
.footer img { border-radius: 14px; margin-bottom: 18px; }
.foot-name { font-family: var(--display); font-weight: 700; letter-spacing: .2em; font-size: 18px; }
.disclaimer { color: #666; font-size: 12px; max-width: 720px; margin: 22px auto; }
.copy { color: #444; font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .panel-term { grid-column: span 2; }
  .panel-chat { grid-column: span 2; }
  .steps, .tok-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .rm:nth-child(2) { border-right: 0; }
  .rm:nth-child(-n+2) { border-bottom: 1px solid var(--faint); }
}
@media (max-width: 820px) {
  .nav nav { display: none; }
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 24px; }
  .hero-visual { max-width: 420px; order: -1; }
  .spec { grid-template-columns: repeat(2, 1fr); }
  .chapter:nth-child(even) { margin-left: 0; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .panel-term, .panel-chat { grid-column: span 1; }
  .panel-term { grid-row: span 2; }
  .panel-chat { grid-row: span 2; }
  .steps, .tok-grid, .roadmap, .spec { grid-template-columns: 1fr; }
  .rm { border-right: 0; border-bottom: 1px solid var(--faint); }
  .story { padding-left: 28px; }
  .chapter { padding: 22px 20px; }
  .chapter::before { left: -25px; }
  .story::before { left: 4px; }
  .hud { font-size: 9px; }
  .hero-stats { gap: 22px; }
  .term { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
}
