*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --void: #050805;
  --surface: #0a0f0a;
  --card: #0d140d;
  --border: rgba(0, 255, 136, 0.1);
  /* Monochrome black + green palette. Legacy accent names are kept but all
     point to green shades so the whole UI stays on-theme. */
  --green: #00ff88;
  --green-bright: #5dffae;
  --green-dim: #00b36a;
  --green-deep: #007a47;
  --green-lime: #aaff33;
  --cyan: var(--green);
  --violet: var(--green-dim);
  --orange: var(--green-bright);
  --amber: var(--green-lime);
  --text: #e6ffe6;
  --muted: rgba(200, 255, 210, 0.42);
  --mono: "JetBrains Mono", monospace;
  --display: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;
  --comic: "Bangers", cursive;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
a,
.chip,
.tama-char,
.pdot {
  cursor: pointer;
}

/* ══════════════════════════════════ BURGER ══════════════════════════════════ */
#burger {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 20, 12, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
#burger:hover {
  border-color: var(--green);
}
#burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
#burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#burger.open span:nth-child(2) {
  opacity: 0;
}
#burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Overlay behind the drawer ── */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ══════════════════════════════════ SIDEBAR (DRAWER) ══════════════════════════════════ */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  z-index: 260;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 76px 0 24px;
  gap: 6px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
}
#sidebar.open {
  transform: translateX(0);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 20px;
  margin-bottom: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark svg {
  color: #08080f;
  width: 16px;
  height: 16px;
}
#sidebar-logo-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  background: transparent;
  border: none;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: 0 2px 2px 0;
  transform: scaleY(0);
  transition: transform 0.2s;
}
.nav-item.active {
  color: var(--cyan);
}
.nav-item.active::before {
  transform: scaleY(1);
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.nav-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ══════════════════════════════════ PAGE (standalone document) ══════════════════════════════════ */
.page {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Each page is now its own HTML document: grow with content, leave room
   for the fixed burger, and scroll naturally. */
.page-doc {
  min-height: 100vh;
  padding-top: 88px;
  padding-bottom: 48px;
  overflow: visible;
}

/* ══════════════════════════════════ PAGE 1 — HERO ══════════════════════════════════ */
.page-hero-block,
#page-hero {
  height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
#canvas-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  padding: 0 32px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  border: 1px solid rgba(0, 255, 136, 0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  background: rgba(0, 255, 136, 0.04);
}

/* Hero top pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(0, 255, 136, 0.03);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hero-pill:hover {
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.08);
}
.hero-pill svg {
  width: 12px;
  height: 12px;
}
.hero-pill-live {
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.25);
  cursor: default;
}
.hero-pill-live:hover {
  background: rgba(0, 255, 136, 0.03);
}

/* Hero stats row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  justify-content: center;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hstat {
  flex: 1 1 120px;
  background: rgba(10, 20, 12, 0.85);
  padding: 18px 16px;
  text-align: center;
}
.hstat-v {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--green);
  line-height: 1;
}
.hstat-l {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
}
.badge-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  animation: blink 1.2s step-end infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
h1 {
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.grad {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 55%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 36px;
  font-weight: 300;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-btns-center {
  justify-content: center;
}
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  padding: 13px 26px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: var(--void);
  border: none;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-p:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}
.btn-p svg {
  width: 14px;
  height: 14px;
}
.btn-g {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 13px 26px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-g:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-g svg {
  width: 14px;
  height: 14px;
}
.scroll-hint {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
  color: inherit;
  transition: opacity 0.2s;
}
.scroll-hint:hover {
  opacity: 0.6;
}
.scroll-hint span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.scroll-hint svg {
  width: 14px;
  height: 14px;
  color: rgba(232, 232, 240, 0.6);
  animation: bounce-hint 2s ease infinite;
}
@keyframes bounce-hint {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Ticker on hero bottom */
.ticker-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(3, 8, 4, 0.82);
  border-top: 1px solid var(--border);
  padding: 9px 0;
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  gap: 48px;
  animation: tick-scroll 30s linear infinite;
  white-space: nowrap;
}
@keyframes tick-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.tick-item {
  font-family: var(--mono);
  font-size: 10px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
}
.t-name {
  color: var(--muted);
  letter-spacing: 0.08em;
}
.t-price {
  color: var(--text);
}
.t-up {
  color: var(--green);
}
.t-dn {
  color: var(--muted);
}

/* ══════════════════════════════════ PAGE 2 — YOXO ══════════════════════════════════ */
#page-neuro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--void);
}
.page-half {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.page-half:first-child {
  border-right: 1px solid var(--border);
}
.page-half::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 179, 106, 0.06) 0%, transparent 70%);
}
.half-intro {
  margin-bottom: 20px;
  align-self: flex-start;
}

/* ── Device shell ── */
.tama-device {
  background: linear-gradient(145deg, #0c170f, #06100a);
  border: 1.5px solid rgba(0, 255, 136, 0.14);
  border-radius: 40px 40px 80px 80px;
  padding: 24px 22px 32px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  box-shadow: 0 0 80px rgba(0, 179, 106, 0.1), 0 40px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.tama-device::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 25%;
  right: 25%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  border-radius: 2px;
  opacity: 0.5;
}
.dev-brand {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(0, 255, 136, 0.25);
}

/* Screen */
.tama-screen {
  width: 100%;
  min-height: 230px;
  background: #050a06;
  border: 1.5px solid rgba(0, 255, 136, 0.1);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7);
}
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.07) 2px,
    rgba(0, 0, 0, 0.07) 4px
  );
  pointer-events: none;
  border-radius: 16px;
  z-index: 4;
}

/* Speech bubble */
.speech-bubble {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #12121e;
  border: 2.5px solid #12121e;
  border-radius: 16px;
  padding: 8px 14px;
  font-family: var(--comic);
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-align: center;
  min-width: 160px;
  max-width: 240px;
  word-break: break-word;
  z-index: 5;
  box-shadow: 3px 3px 0 #12121e;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.speech-bubble.vis {
  opacity: 1;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #12121e;
}
.speech-bubble::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: white;
  z-index: 1;
}

/* Character */
.tama-char {
  position: relative;
  margin-top: 40px;
  user-select: none;
}
.char-body {
  width: 86px;
  height: 86px;
  background: radial-gradient(ellipse at 35% 30%, #14331f, #061008);
  border-radius: 50%;
  border: 2.5px solid var(--cyan);
  position: relative;
  animation: idle-bob 2.6s ease-in-out infinite;
  box-shadow: 0 0 22px rgba(0, 255, 136, 0.18), inset 0 -8px 18px rgba(0, 0, 0, 0.5);
  transition: border-color 0.4s, box-shadow 0.4s;
}
@keyframes idle-bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-9px) scale(1.02);
  }
}
.char-body.m-happy {
  border-color: var(--green);
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.3), inset 0 -8px 18px rgba(0, 0, 0, 0.5);
}
.char-body.m-excited {
  border-color: var(--orange);
  box-shadow: 0 0 32px rgba(93, 255, 174, 0.4), inset 0 -8px 18px rgba(0, 0, 0, 0.5);
  animation: excited-shake 0.35s ease-in-out infinite;
}
.char-body.m-thinking {
  border-color: var(--violet);
  box-shadow: 0 0 28px rgba(0, 179, 106, 0.3), inset 0 -8px 18px rgba(0, 0, 0, 0.5);
}
.char-body.m-alert {
  border-color: var(--amber);
  box-shadow: 0 0 28px rgba(170, 255, 51, 0.35), inset 0 -8px 18px rgba(0, 0, 0, 0.5);
}
@keyframes excited-shake {
  0%,
  100% {
    transform: translateY(-4px) rotate(-3deg) scale(1.06);
  }
  50% {
    transform: translateY(-10px) rotate(3deg) scale(1.09);
  }
}

/* Antenna */
.char-antenna {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.antenna-stick {
  width: 2.5px;
  height: 18px;
  background: var(--cyan);
  border-radius: 2px;
  animation: antenna-sway 3s ease-in-out infinite;
  transform-origin: bottom center;
}
.antenna-orb {
  width: 9px;
  height: 9px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1.4s ease infinite;
  margin-bottom: -1px;
}
@keyframes antenna-sway {
  0%,
  100% {
    transform: translateX(-50%) rotate(-8deg);
  }
  50% {
    transform: translateX(-50%) rotate(8deg);
  }
}

/* Eyes */
.char-eyes {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}
.char-eye {
  width: 13px;
  height: 13px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: blink-eye 4s ease-in-out infinite;
  transition: background 0.3s, border-radius 0.3s, transform 0.3s;
  position: relative;
}
.char-eye::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 4px;
  height: 4px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
}
@keyframes blink-eye {
  0%,
  88%,
  100% {
    transform: scaleY(1);
  }
  93% {
    transform: scaleY(0.05);
  }
}
.m-happy .char-eye {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  border-radius: 50% 50% 0 0;
}
.m-excited .char-eye {
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  transform: scale(1.2);
}
.m-thinking .char-eye {
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet);
}
.m-alert .char-eye {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
  transform: scale(1.25);
}

/* Mouth */
.char-mouth {
  position: absolute;
  top: 47px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  border: 2.5px solid var(--cyan);
  border-top: none;
  border-radius: 0 0 20px 20px;
  transition: all 0.3s;
}
.m-happy .char-mouth {
  border-color: var(--green);
  width: 26px;
  height: 13px;
}
.m-excited .char-mouth {
  border-color: var(--orange);
  width: 30px;
  height: 14px;
  animation: mouth-talk 0.3s ease infinite;
}
.m-thinking .char-mouth {
  border-color: var(--violet);
  border-top: 2.5px solid var(--violet);
  border-radius: 20px;
  height: 4px;
}
.m-alert .char-mouth {
  border-color: var(--amber);
  border-top: 2.5px solid var(--amber);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}
@keyframes mouth-talk {
  0%,
  100% {
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    transform: translateX(-50%) scaleY(0.25);
  }
}

/* Arms */
.char-arm {
  position: absolute;
  width: 11px;
  height: 26px;
  background: linear-gradient(to bottom, #14331f, #0c2014);
  border: 2px solid var(--cyan);
  border-radius: 6px;
  top: 28px;
}
.arm-l {
  left: -11px;
  transform: rotate(22deg);
  transform-origin: top right;
  animation: arm-l 2.6s ease-in-out infinite;
}
.arm-r {
  right: -11px;
  transform: rotate(-22deg);
  transform-origin: top left;
  animation: arm-r 2.6s ease-in-out infinite;
}
@keyframes arm-l {
  0%,
  100% {
    transform: rotate(22deg);
  }
  50% {
    transform: rotate(42deg);
  }
}
@keyframes arm-r {
  0%,
  100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: rotate(-42deg);
  }
}
.m-excited .arm-l {
  animation: arm-el 0.35s ease infinite;
}
.m-excited .arm-r {
  animation: arm-er 0.35s ease infinite;
}
@keyframes arm-el {
  0%,
  100% {
    transform: rotate(55deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}
@keyframes arm-er {
  0%,
  100% {
    transform: rotate(-55deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* Legs */
.char-legs {
  display: flex;
  gap: 12px;
  margin-top: -3px;
}
.char-leg {
  width: 11px;
  height: 16px;
  background: linear-gradient(to bottom, #14331f, #0c2014);
  border: 2px solid var(--cyan);
  border-radius: 4px 4px 7px 7px;
  animation: leg-step 2.6s ease-in-out infinite;
}
.char-leg:last-child {
  animation-delay: 1.3s;
}
@keyframes leg-step {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* Mood tag */
.mood-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 255, 136, 0.07);
  color: var(--cyan);
  border: 1px solid rgba(0, 255, 136, 0.15);
  transition: all 0.4s;
  z-index: 5;
}

/* Stats */
.tama-stats {
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 0 2px;
}
.ts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ts-lbl {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ts-lbl svg {
  width: 9px;
  height: 9px;
}
.ts:nth-child(1) .ts-lbl svg {
  color: var(--green);
}
.ts:nth-child(2) .ts-lbl svg {
  color: var(--cyan);
}
.ts:nth-child(3) .ts-lbl svg {
  color: var(--violet);
}
.ts-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ts-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.9s ease;
}
.f-hp {
  background: var(--green);
}
.f-en {
  background: var(--cyan);
}
.f-fo {
  background: var(--violet);
}

/* Device buttons */
.dev-btns {
  display: flex;
  gap: 16px;
}
.dev-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.04);
  color: var(--muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 255, 136, 0.1);
  transform: scale(1.12);
}
.dev-btn svg {
  width: 15px;
  height: 15px;
}

/* Section heading inside page */
.page-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cyan);
  opacity: 0.7;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.page-hed {
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 340px;
}

/* ── Chat Panel ── */
.chat-panel {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 520px;
}
.chat-hdr {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.chat-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-av svg {
  width: 15px;
  height: 15px;
  color: #08080f;
}
.chat-hdr-info {
  flex: 1;
}
.chat-hdr-name {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.chat-hdr-status {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.chat-hdr-status::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.2s step-end infinite;
}
.groq-badge {
  font-family: var(--mono);
  font-size: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 179, 106, 0.1);
  color: var(--violet);
  border: 1px solid rgba(0, 179, 106, 0.2);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.groq-badge.live {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.25);
}
.groq-badge.demo {
  background: rgba(93, 255, 174, 0.1);
  color: var(--orange);
  border-color: rgba(93, 255, 174, 0.25);
}

.chat-msgs {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msgs::-webkit-scrollbar {
  width: 3px;
}
.chat-msgs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.msg-row.user {
  flex-direction: row-reverse;
}
.msg-av-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-av-sm.ag {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.msg-av-sm.us {
  background: linear-gradient(135deg, var(--violet), var(--orange));
}
.msg-av-sm.ag svg {
  width: 12px;
  height: 12px;
  color: #08080f;
}
.msg-av-sm.us svg {
  width: 12px;
  height: 12px;
  color: #fff;
}

.msg-bubble {
  max-width: 76%;
  font-family: var(--comic);
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  padding: 9px 14px;
  word-break: break-word;
  animation: bubble-pop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes bubble-pop {
  0% {
    transform: scale(0.55);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.msg-bubble.ag {
  background: #fff;
  color: #12121e;
  border: 2.5px solid #12121e;
  box-shadow: 3px 3px 0 #12121e;
  border-radius: 16px 16px 16px 3px;
}
.msg-bubble.us {
  background: linear-gradient(135deg, var(--green-dim), #0a5a34);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 3px 3px 0 rgba(0, 179, 106, 0.35);
  border-radius: 16px 16px 3px 16px;
}
.msg-bubble .caret {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: #12121e;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.typing-bubble {
  background: #fff;
  color: #12121e;
  border: 2.5px solid #12121e;
  box-shadow: 3px 3px 0 #12121e;
  border-radius: 16px 16px 16px 3px;
  padding: 10px 16px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.t-dot {
  width: 6px;
  height: 6px;
  background: #12121e;
  border-radius: 50%;
  animation: tdot 1s ease infinite;
}
.t-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.t-dot:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes tdot {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

.chat-chips {
  padding: 10px 16px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.chip {
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  background: rgba(0, 255, 136, 0.04);
  color: var(--cyan);
  transition: all 0.2s;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chip svg {
  width: 10px;
  height: 10px;
}
.chip:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.4);
  transform: translateY(-1px);
}

.chat-inp-row {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  align-items: flex-end;
}
.chat-inp {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--body);
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  max-height: 80px;
  line-height: 1.5;
}
.chat-inp::placeholder {
  color: var(--muted);
}
.chat-inp:focus {
  border-color: rgba(0, 255, 136, 0.3);
}
.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.chat-send:hover {
  opacity: 0.82;
  transform: scale(1.08);
}
.chat-send:disabled {
  opacity: 0.4;
  transform: none;
}
.chat-send svg {
  width: 14px;
  height: 14px;
  color: #08080f;
}

/* ══════════════════════════════════ PAGE 3 — FEATURES ══════════════════════════════════ */
#features {
  background: var(--surface);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.feat-header {
  padding: 48px 52px 32px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.feat-lead {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 12px;
  font-weight: 300;
}
.how-lead {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Infrastructure grid — 6 cards */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.infra-card {
  background: var(--card);
  padding: 32px 28px;
  position: relative;
  transition: background 0.2s;
}
.infra-card:hover {
  background: #0f1c12;
}
.infra-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  opacity: 0.4;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.infra-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.infra-ico svg {
  width: 16px;
  height: 16px;
}
.infra-ttl {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.infra-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.bento {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  overflow: hidden;
}
.bc {
  background: var(--card);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}
.bc:hover {
  background: #0f1c12;
}
.bc::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.bc:hover::after {
  opacity: 1;
}
.bc1 {
  grid-column: span 5;
  grid-row: span 2;
}
.bc2 {
  grid-column: span 4;
}
.bc3 {
  grid-column: span 3;
}
.bc4 {
  grid-column: span 4;
}
.bc5 {
  grid-column: span 3;
}
.bc-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.bc-ico svg {
  width: 16px;
  height: 16px;
}
.ico-c {
  background: rgba(0, 255, 136, 0.1);
  color: var(--cyan);
}
.ico-v {
  background: rgba(0, 179, 106, 0.1);
  color: var(--violet);
}
.ico-o {
  background: rgba(93, 255, 174, 0.1);
  color: var(--orange);
}
.ico-g {
  background: rgba(0, 255, 136, 0.1);
  color: var(--green);
}
.bc-ttl {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.bc-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.mini-term {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
}
.tl {
  display: flex;
  gap: 6px;
  margin-bottom: 5px;
  line-height: 1.5;
}
.tl:last-child {
  margin-bottom: 0;
}
.tp {
  color: var(--cyan);
  opacity: 0.7;
}
.to {
  color: rgba(0, 255, 136, 0.7);
  padding-left: 14px;
}
.tw {
  color: rgba(93, 255, 174, 0.8);
  padding-left: 14px;
}

/* ══════════════════════════════════ PAGE 4 — LIVE AGENT ══════════════════════════════════ */
#page-agent,
.page-agent-section {
  background: var(--void);
  justify-content: flex-start;
  padding: 48px 52px 52px;
  gap: 32px;
}
.agent-wrap {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tdot-r {
  background: var(--green-deep);
}
.tdot-y {
  background: var(--green-dim);
}
.tdot-g {
  background: var(--green);
}
.tdot-r,
.tdot-y,
.tdot-g {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-title {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.05em;
}
.term-live {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ldot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1s ease infinite;
}
#agent-log {
  flex: 1;
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  overflow-y: auto;
  min-height: 0;
}
#agent-log::-webkit-scrollbar {
  width: 4px;
}
#agent-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
.l-ts {
  color: rgba(255, 255, 255, 0.22);
  margin-right: 10px;
}
.l-ag {
  color: var(--violet);
}
.l-ac {
  color: var(--cyan);
}
.l-va {
  color: var(--green);
}
.l-wa {
  color: var(--orange);
}
.l-di {
  color: var(--muted);
}

/* Stats bar in agent page */
.agent-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.ast {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ast-v {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ast-l {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 2px;
}
.i-green {
  color: var(--green);
}
.i-cyan {
  color: var(--cyan);
}
.i-orange {
  color: var(--orange);
}
.i-violet {
  color: var(--violet);
}

/* ══════════════════════════════════ PAGE 5 — HOW + CTA ══════════════════════════════════ */
#page-how {
  background: linear-gradient(160deg, var(--void) 0%, #08120b 100%);
  justify-content: center;
  align-items: center;
  padding: 92px 52px 52px;
  gap: 48px;
}
.how-top {
  text-align: center;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 960px;
}
.step-card {
  background: var(--card);
  padding: 28px 24px;
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cyan);
  opacity: 0.45;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-num svg {
  width: 12px;
  height: 12px;
}
.step-ttl {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.step-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.step-arr {
  position: absolute;
  top: 50%;
  right: -1px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: var(--cyan);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  opacity: 0.12;
  z-index: 1;
}
.step-card:last-child .step-arr {
  display: none;
}

.cta-box {
  text-align: center;
}
.cta-ttl {
  font-family: var(--display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.cta-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ══════════════════════════════════ RESPONSIVE ══════════════════════════════════ */
@media (max-width: 900px) {
  .infra-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #page-neuro {
    grid-template-columns: 1fr;
  }
  #page-neuro .page-half:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .chat-panel {
    max-width: 100%;
    height: 440px;
  }
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .bc1,
  .bc2,
  .bc3,
  .bc4,
  .bc5 {
    grid-column: span 1;
    grid-row: auto;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  #page-agent,
  .page-agent-section {
    padding: 32px 24px;
  }
  #page-how {
    padding: 88px 24px 32px;
    gap: 28px;
  }
}

/* ── Phones / tablets: stack columns & relax fixed heights ── */
@media (max-width: 760px) {
  #page-hero {
    height: auto;
    min-height: 100vh;
    padding-top: 80px;
  }
  #canvas-3d {
    opacity: 0.5;
  }
  .hero-content {
    padding-top: 20px;
  }
  #page-neuro {
    display: flex;
    flex-direction: column;
  }
  .page-half {
    padding: 28px 20px;
    width: 100%;
  }
  .half-intro {
    text-align: left;
  }
  .chat-panel {
    height: 460px;
  }
  .feat-header {
    padding: 40px 24px 24px;
  }
  .infra-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    max-width: 100%;
    margin-left: 16px;
    margin-right: 16px;
  }
  .hstat {
    flex: 1 1 calc(50% - 1px);
  }
  .hero-pills {
    padding: 0 8px;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .agent-stats {
    flex-wrap: wrap;
  }
  .ast {
    flex: 1 1 calc(50% - 8px);
  }
  #page-agent,
  .page-agent-section {
    gap: 20px;
  }
  .agent-wrap {
    min-height: 320px;
  }
  .tama-device {
    width: 280px;
  }
}

@media (max-width: 460px) {
  #burger {
    top: 12px;
    left: 12px;
  }
  .page {
    padding-top: 68px;
  }
  h1 {
    font-size: clamp(36px, 11vw, 54px);
  }
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .btn-p,
  .btn-g {
    width: 100%;
    justify-content: center;
  }
  .agent-stats {
    gap: 10px;
  }
  .tama-device {
    width: 100%;
    max-width: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
