/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; letter-spacing: -0.015em; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.nav-links { display: flex; gap: 28px; font-size: 13.5px; color: var(--fg-dim); }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 999px;
  background: transparent; color: var(--fg);
  border: 1px solid var(--line-strong);
  cursor: pointer; font-size: 16px;
  display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.04); border-color: var(--fg); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.lang-toggle button {
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 6px; color: var(--fg-mute);
  font-family: inherit; font-size: inherit; letter-spacing: inherit;
  transition: color 0.2s;
}
.lang-toggle button.active { color: var(--accent); }
.lang-toggle button:hover { color: var(--fg); }
.lang-sep { color: var(--fg-mute); }

/* ============ Hero shared ============ */
.hero {
  position: relative; overflow: hidden;
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex; align-items: center;
}
.hero-inner { position: relative; z-index: 2; }
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: 0.7;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  width: 720px; height: 720px;
  left: 50%; top: 50%; transform: translate(-50%, -55%);
  background: radial-gradient(circle at 50% 50%, var(--accent-glow), transparent 60%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.hero-title { margin: 0 0 28px; }
.hero-title .line { display: block; }
.accent-fg { color: var(--accent); }
.hero-lead { margin: 0 0 40px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 80px; }
.hero-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 1080px;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 8px; }
.meta-tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--fg);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  align-self: flex-start;
  background: color-mix(in oklab, var(--surface) 50%, transparent);
}
.meta-lab { font-size: 13px; color: var(--fg-dim); letter-spacing: 0; line-height: 1.4; max-width: 22ch; }

.rail-tagline {
  font-size: 11px; letter-spacing: 0.16em; color: var(--accent);
  text-transform: uppercase; margin: 0 0 10px;
}
.kpi-desc { font-size: 13px; color: var(--fg-dim); line-height: 1.45; margin-top: 4px; max-width: 30ch; }
.dash-kpis .kpi { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dash-kpis .kpi:last-child { border-bottom: 0; }

/* Hero v2 */
.hero-v2 .hero-orb { transform: translate(-50%, -50%); width: 920px; height: 920px; }
.hero-v2-headrow { display: flex; gap: 60px; align-items: end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.hero-v2-title { margin: 0; }
.hero-v2-stack { min-width: 320px; }
.phase-ticker {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px 22px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  min-width: 320px;
}
.ticker-lab { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.18em; }
.ticker-display { display: flex; gap: 16px; margin: 10px 0 14px; font-size: 18px; }
.ticker-item { color: var(--fg-mute); transition: color 0.4s; }
.ticker-item.active { color: var(--accent); text-shadow: 0 0 16px var(--accent-glow); }
.ticker-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.ticker-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.6s cubic-bezier(0.2,0.7,0.2,1); }
.hero-v2-chips {
  margin-top: 80px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  padding-top: 32px; border-top: 1px solid var(--line);
}
.hero-chip-thumb {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 50%, transparent);
  padding: 12px;
  transition: border-color 0.4s, transform 0.4s;
}
.hero-chip-thumb.lit { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 24px 60px -20px var(--accent-glow); }
.hero-chip-thumb svg { width: 100%; height: auto; opacity: 0.8; transition: opacity 0.4s; }
.hero-chip-thumb.lit svg { opacity: 1; }
.hero-chip-lab { display: block; font-size: 11px; color: var(--fg-mute); letter-spacing: 0.12em; padding: 6px 4px 2px; }

/* ============ Marquee ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: color-mix(in oklab, var(--bg-2) 60%, transparent);
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 32s linear infinite;
  width: max-content;
}
.marquee-set { display: flex; gap: 60px; align-items: center; padding-right: 60px; }
.marquee-set span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--fg-dim); white-space: nowrap; }
.marquee-set .dot { color: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ Bots showcase ============ */
.bots-section { position: relative; height: 380vh; }
.bots-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding-top: 80px; overflow: hidden; }
.bots-stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
  width: 100%;
}
.bots-rail { display: flex; flex-direction: column; gap: 24px; }
.rail-head { max-width: 460px; }
.rail-title { margin: 10px 0 12px; }
.rail-lead { font-size: 15px; }
.rail-list { display: flex; flex-direction: column; gap: 4px; }
.rail-item {
  display: grid; grid-template-columns: 60px 1fr; gap: 16px;
  padding: 14px 0;
  opacity: 0.4;
  transition: opacity 0.5s;
  border-top: 1px solid var(--line);
}
.rail-item.active { opacity: 1; }
.rail-bullet { position: relative; padding-top: 4px; }
.rail-num { font-size: 12px; color: var(--fg-mute); letter-spacing: 0.18em; }
.rail-line {
  position: absolute; left: 4px; top: 24px; width: 2px; height: 56px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
.rail-line span { display: block; width: 100%; background: var(--accent); transition: width 0.4s; height: 100%; }
.rail-line span { width: 0%; }
/* width is set inline via React */
.rail-name { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.rail-name-en { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.rail-name-vi { font-size: 16px; color: var(--fg-mute); line-height: 1.2; }
.rail-desc { color: var(--fg-dim); margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; max-width: 50ch; }
.rail-metrics { display: flex; gap: 24px; flex-wrap: wrap; }
.rail-metric { display: flex; flex-direction: column; gap: 2px; }
.rail-metric-k { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.12em; }
.rail-metric-v { font-size: 13px; }

.bots-display { position: relative; }
.display-frame {
  position: relative;
  aspect-ratio: 1.05 / 1;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 50%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.chip-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; transform: scale(0.92) translateY(20px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.chip-stage.active { opacity: 1; transform: none; }
.chip-stage svg { width: 88%; height: 88%; }
.display-readouts {
  position: absolute;
  bottom: 20px; left: 20px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 10px;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 280px;
}
.readout-row { display: flex; justify-content: space-between; gap: 16px; white-space: nowrap; }
.readout-k { color: var(--fg-mute); letter-spacing: 0.14em; white-space: nowrap; }
.readout-v { color: var(--fg); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.readout-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); animation: pulse 1.8s ease-in-out infinite; }
.display-progress { display: flex; gap: 6px; margin-top: 16px; }
.progress-cell { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-cell span { display: block; height: 100%; background: var(--accent); transition: width 0.2s linear; }

/* ============ Demo section ============ */
.demo-section { padding: 160px 0; position: relative; }
.demo-head { max-width: 700px; margin-bottom: 60px; }
.demo-head .h-section { margin: 12px 0 16px; }
.demo-frame {
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--bg-2);
  padding: 18px;
  box-shadow: 0 60px 120px -40px rgba(0,0,0,0.6);
}

.dash-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 18px; border-bottom: 1px solid var(--line); }
.dash-tabs { display: flex; gap: 4px; }
.dash-tab {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--fg-mute); padding: 6px 12px; border-radius: 999px;
  border: 1px solid transparent;
}
.dash-tab.active { color: var(--fg); border-color: var(--line-strong); background: color-mix(in oklab, var(--surface) 70%, transparent); }
.dash-stats { display: flex; gap: 28px; }
.dash-stat { display: flex; flex-direction: column; gap: 2px; position: relative; }
.dash-stat .lab { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.14em; font-family: var(--font-mono); text-transform: uppercase; }
.dash-stat .val { font-size: 16px; }
.dash-stat .pulse { position: absolute; top: 2px; right: -14px; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); animation: pulse 1.4s ease-in-out infinite; }
.dash-svg { width: 100%; height: auto; display: block; padding: 12px 0; }

.dash-foot { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; padding: 18px 12px 8px; border-top: 1px solid var(--line); }
.feed-head { font-size: 10px; letter-spacing: 0.18em; color: var(--fg-mute); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.feed-row {
  display: grid; grid-template-columns: 16px 80px 60px 1fr 50px;
  gap: 12px; align-items: center; padding: 8px 0; font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s;
}
.feed-row:hover, .feed-row.active { background: color-mix(in oklab, var(--accent) 6%, transparent); }
.feed-dot { width: 8px; height: 8px; border-radius: 999px; }
.feed-dot.long { background: var(--good); box-shadow: 0 0 8px var(--good); }
.feed-dot.short { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.feed-bot { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.12em; }
.feed-side { font-size: 10px; letter-spacing: 0.12em; }
.feed-side.long { color: var(--good); }
.feed-side.short { color: var(--bad); }
.feed-note { color: var(--fg-dim); }
.feed-time { font-size: 10px; color: var(--fg-mute); text-align: right; }
.dash-kpis { display: flex; flex-direction: column; gap: 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.kpi-label { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.14em; font-family: var(--font-mono); }
.kpi-val { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin: 2px 0 6px; }
.kpi-val span { font-size: 14px; color: var(--fg-mute); margin-left: 2px; }
.kpi-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.kpi-bar span { display: block; height: 100%; background: var(--accent); }

/* ============ FAQ ============ */
.faq-section { padding: 140px 0; }
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 80px; align-items: start; }
.faq-head .h-section { margin: 12px 0 16px; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--line); padding: 20px 0; cursor: pointer; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { display: grid; grid-template-columns: 40px 1fr 32px; align-items: center; gap: 12px; }
.faq-num { font-size: 11px; color: var(--fg-mute); letter-spacing: 0.14em; }
.faq-text { font-size: 18px; letter-spacing: -0.015em; }
.faq-toggle { font-size: 22px; color: var(--fg-mute); text-align: right; transition: transform 0.3s, color 0.3s; }
.faq-item.open .faq-toggle { color: var(--accent); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.2,0.7,0.2,1); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner {
  overflow: hidden;
  padding-left: 52px;
  color: var(--fg-dim);
  font-size: 15px; line-height: 1.55;
}
.faq-item.open .faq-a-inner { padding-top: 14px; }

/* ============ Risk ============ */
.risk-section { padding: 60px 0 120px; }
.risk-inner {
  display: grid; grid-template-columns: 80px 1fr; gap: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 44px;
  background: color-mix(in oklab, var(--surface) 50%, transparent);
}
.risk-mark {
  width: 56px; height: 56px; border-radius: 14px;
  background: oklch(0.78 0.16 60 / 0.12);
  border: 1px solid oklch(0.78 0.16 60 / 0.4);
  color: oklch(0.78 0.16 60);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 500;
}
.risk-body .eyebrow { display: block; margin-bottom: 14px; }
.risk-text { font-size: 15px; line-height: 1.6; color: var(--fg-dim); margin: 0 0 12px; max-width: 80ch; }
.risk-text-en { font-size: 13px; color: var(--fg-mute); font-style: italic; margin: 0; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 120px 0 32px; position: relative; overflow: hidden; }
.footer::before {
  content: ""; position: absolute; left: 50%; top: -200px; width: 800px; height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow), transparent 60%);
  filter: blur(60px); transform: translateX(-50%);
  pointer-events: none;
}
.footer-cta { text-align: center; max-width: 800px; margin: 0 auto 100px; position: relative; }
.footer-title { margin: 0 0 40px; }
.access-form {
  display: flex; gap: 8px; max-width: 520px; margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
}
.access-form input {
  flex: 1; background: transparent; border: 0; color: var(--fg);
  font-family: inherit; font-size: 14px; outline: none;
}
.access-form input::placeholder { color: var(--fg-mute); }
.access-note { display: block; margin-top: 16px; font-size: 11px; color: var(--fg-mute); letter-spacing: 0.14em; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid var(--line); }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--fg-dim); }
.footer-h { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.18em; margin-bottom: 4px; }
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--fg); }
.footer-sub { color: var(--fg-mute); margin: 0; font-size: 13px; }
.footer-base { display: flex; justify-content: space-between; padding-top: 24px; font-size: 11px; color: var(--fg-mute); letter-spacing: 0.1em; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .bots-stage { grid-template-columns: 1fr; gap: 40px; }
  .bots-section { height: auto; }
  .bots-sticky { position: relative; height: auto; padding: 80px 0; }
  .display-frame { aspect-ratio: 1.2/1; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-v2-headrow { gap: 24px; }
  .hero-v2-chips { grid-template-columns: 1fr; }
  .dash-foot { grid-template-columns: 1fr; }
  .dash-stats { display: none; }
}
