:root {
  --bg: #f4f6f8;
  --bg-soft: #ffffff;
  --silver: #eef1f5;
  --graphite: #2a3441;
  --steel: #4a5568;
  --ink: #0f1c2e;
  --navy: #0f2744;
  --navy-deep: #0a1628;
  --muted: #64748b;
  --line: rgba(15, 28, 46, 0.1);
  --violet: #7c3aed;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #22c55e;
  --amber: #f59e0b;
  --shadow: 0 20px 60px rgba(15, 28, 46, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --cmd-bg: #141c28;
  --cmd-panel: #1a2433;
  --cmd-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 40%, var(--silver) 100%);
  color: var(--ink);
  overflow-x: hidden;
}

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

.subtle-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 39, 68, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 39, 68, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 10%, transparent 70%);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}

body[data-page="home"] header:not(.header-scrolled) {
  background: rgba(10, 22, 40, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-page="home"] header:not(.header-scrolled) .brand,
body[data-page="home"] header:not(.header-scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.88);
}

body[data-page="home"] header:not(.header-scrolled) .nav-links a:hover,
body[data-page="home"] header:not(.header-scrolled) .nav-links a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

body[data-page="home"] header:not(.header-scrolled) .mobile-toggle span {
  background: white;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), var(--blue), var(--cyan));
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
  position: relative;
}

.mark::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

.mark::after {
  content: "";
  position: absolute;
  inset: 17px;
  background: white;
  border-radius: 999px;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--violet);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  transition: color 150ms, background 150ms;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: rgba(37, 99, 235, 0.08);
}

.nav-app {
  color: var(--violet) !important;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.06);
}

.nav-cta {
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--blue); }

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: 180ms ease;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-menu-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 22px;
  display: grid;
  gap: 8px;
}

.mobile-menu a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-weight: 600;
  color: var(--ink);
}

body.menu-open .mobile-menu { display: block; }
body.menu-open .mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .mobile-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero-cinematic {
  position: relative;
  background: linear-gradient(165deg, #0a1628 0%, #0f2744 42%, #1a365d 100%);
  color: white;
  padding: 100px 0 88px;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-cinematic::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(124, 58, 237, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(6, 182, 212, 0.08), transparent);
  pointer-events: none;
}

.hero-network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.hero-cinematic .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
}

.hero-copy {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-copy.hero-entered {
  opacity: 1;
  transform: translateY(0);
}

.hero-visual-wrap {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.hero-grid:has(.hero-entered) .hero-visual-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-cinematic h1 {
  margin: 0 0 12px;
  color: white;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.hero-subtitle {
  display: block;
  color: #a5b4fc;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-cinematic .lead {
  color: rgba(255, 255, 255, 0.78);
  max-width: 580px;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.home-supporting {
  display: block;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  background: white;
  transition: all 0.18s ease;
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); }

.btn.primary {
  background: var(--violet);
  border-color: var(--violet);
  color: white;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
}

.btn.primary:hover { background: #6d28d9; }

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn.app-btn {
  background: rgba(6, 182, 212, 0.15);
  color: #a5f3fc;
  border-color: rgba(6, 182, 212, 0.35);
}

.btn.app-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.55);
}

/* Cognitive runtime preview */
.cmd-center {
  border: 1px solid var(--cmd-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  font-size: 0.78rem;
  background: var(--cmd-bg);
}

.cmd-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--cmd-border);
}

.cmd-topbar span {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.cmd-live {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cmd-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
}

.cmd-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  padding: 10px;
}

.cmd-panel {
  background: var(--cmd-panel);
  border: 1px solid var(--cmd-border);
  border-radius: 8px;
  padding: 12px;
  min-height: 100px;
}

.cmd-panel.wide { grid-column: 1 / -1; }

.cmd-panel h4 {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.cmd-map {
  height: 72px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.35), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.2), transparent 35%),
    linear-gradient(135deg, #1e293b, #0f172a);
  position: relative;
  overflow: hidden;
}

.cmd-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

.cmd-nodes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cmd-node {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  font-size: 0.68rem;
  font-weight: 600;
}

.cmd-node.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.cmd-node.cyan {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #67e8f9;
}

.cmd-timeline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
}

.cmd-timeline span {
  flex: 1;
  background: linear-gradient(180deg, var(--violet), rgba(124, 58, 237, 0.3));
  border-radius: 2px 2px 0 0;
}

.cmd-timeline span:nth-child(1) { height: 40%; }
.cmd-timeline span:nth-child(2) { height: 65%; }
.cmd-timeline span:nth-child(3) { height: 50%; }
.cmd-timeline span:nth-child(4) { height: 80%; }
.cmd-timeline span:nth-child(5) { height: 55%; }
.cmd-timeline span:nth-child(6) { height: 70%; }

/* Sections */
section { padding: 72px 0; }

.section-head {
  max-width: 800px;
  margin-bottom: 36px;
}

.section-head.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-head.centered .section-text {
  margin-left: auto;
  margin-right: auto;
}

.kicker {
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--ink);
}

.section-text {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 720px;
}

.stage-notice {
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  font-size: 0.92rem;
  color: var(--steel);
  line-height: 1.6;
}

.stage-notice strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.band-silver {
  background: var(--silver);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.not-chatbot {
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: white;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.not-chatbot p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.module-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  transition: border-color 200ms, box-shadow 200ms;
}

.module-card:hover {
  border-color: var(--violet);
  box-shadow: var(--shadow);
}

.module-code {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.module-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.module-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Dark band */
.dark-band {
  background: linear-gradient(135deg, var(--navy), var(--graphite));
  color: white;
  padding: 64px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.dark-band h2 { color: white; }
.dark-band .section-text { color: rgba(255, 255, 255, 0.7); }
.dark-band .kicker { color: #a5b4fc; }

.stack {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.layers {
  display: grid;
  gap: 10px;
}

.layer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.layer span:first-child { font-weight: 700; }
.layer span:last-child {
  color: #c4b5fd;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
}

/* Stack list */
.stack-list {
  display: grid;
  gap: 10px;
  max-width: 840px;
  margin: 0 auto;
}

.stack-layer {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
}

.stack-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
}

.stack-layer p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Roadmap */
.timeline { display: grid; gap: 12px; }

.step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 8px 32px rgba(15, 28, 46, 0.06);
}

.step strong {
  color: var(--violet);
  font-size: 0.85rem;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

/* App promo */
.app-promo-section {
  padding: 72px 0;
  background: linear-gradient(180deg, #0a1628, #0f2744);
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-promo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

.app-promo .kicker { color: #a5b4fc; }
.app-promo h2 { color: white; margin: 0 0 12px; }
.app-promo p { color: #94a3b8; line-height: 1.6; margin: 0; }

.app-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.app-promo-actions .btn.primary {
  background: var(--violet);
  border-color: var(--violet);
}

.app-promo-actions .btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.app-promo-steps { display: grid; gap: 10px; }

.app-promo-section .install-step {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.app-promo-section .install-step h3 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: #a5b4fc;
}

.app-promo-section .install-step p {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

/* CTA */
.cta-band {
  display: grid;
  grid-template-columns: 1.1fr auto;
  align-items: center;
  gap: 28px;
  padding: 48px;
  border-radius: var(--radius-lg);
  color: white;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 25rem),
    linear-gradient(135deg, var(--navy-deep), #312e81 58%, #155e75);
  box-shadow: var(--shadow);
}

.cta-band h2 { color: white; margin: 0 0 10px; }
.cta-band p { color: #cbd5e1; line-height: 1.7; margin: 0; }

.eco-band {
  padding: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy), #1a365d);
  color: white;
  text-align: center;
}

.eco-band h2 { color: white; margin-bottom: 12px; }
.eco-band p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.eco-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.eco-links a {
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
}

.eco-links a:hover { background: rgba(255, 255, 255, 0.18); }

/* Footer */
footer {
  padding: 48px 0 56px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 8px;
}

.footer-col h4 {
  color: white;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] { transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .stack,
  .app-promo,
  .cta-band { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .dark-band { padding: 32px; }
  .cmd-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .hero-cinematic { padding: 72px 0 64px; min-height: auto; }
  .card-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .step { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .cta-band { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .hero-copy,
  .hero-visual-wrap { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
}
