:root {
  --bg: #0a0e17;
  --bg-raised: #111827;
  --bg-card: #151c2c;
  --fg: #e2e8f0;
  --fg-muted: #94a3b8;
  --fg-dim: #64748b;
  --cyan: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.15);
  --amber: #ff9100;
  --amber-glow: rgba(255, 145, 0, 0.15);
  --green: #4ade80;
  --green-glow: rgba(74, 222, 128, 0.15);
  --border: rgba(148, 163, 184, 0.1);
  --radius: 12px;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; }

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 3rem;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
}
.hero-orb--cyan {
  width: 500px; height: 500px;
  background: var(--cyan);
  top: -10%; right: 5%;
  opacity: 0.12;
  animation: drift 20s ease-in-out infinite alternate;
}
.hero-orb--amber {
  width: 350px; height: 350px;
  background: var(--amber);
  bottom: 10%; left: -5%;
  opacity: 0.08;
  animation: drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  border: 1px solid rgba(0,229,255,0.25);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  background: var(--cyan-glow);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--cyan);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* Node graph */
.node-graph {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
}

.node-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.edge {
  stroke: var(--cyan);
  stroke-width: 1;
  opacity: 0.2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 3s ease forwards;
}
.edge--cross { stroke: var(--amber); opacity: 0.1; }
.edge--1 { animation-delay: 0.2s; }
.edge--2 { animation-delay: 0.5s; }
.edge--3 { animation-delay: 0.8s; }
.edge--4 { animation-delay: 1.1s; }
.edge--5 { animation-delay: 1.5s; }
.edge--6 { animation-delay: 1.8s; }

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 2;
}

.node--core {
  width: 80px; height: 80px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--cyan), #0091a1);
  box-shadow: 0 0 40px var(--cyan-glow), 0 0 80px rgba(0,229,255,0.08);
}

.node-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

.node--agent {
  width: 56px; height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.node--a1 { top: 8%; left: 12%; }
.node--a2 { top: 12%; right: 8%; }
.node--a3 { bottom: 12%; right: 10%; }
.node--a4 { bottom: 18%; left: 8%; }

.node-label {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.node--agent .node-label {
  color: var(--fg-muted);
  font-size: 0.5rem;
}

/* Hero stats */
.hero-stats {
  position: relative;
  max-width: 1200px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  width: 100%;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--fg-dim);
  line-height: 1.5;
}

/* ── MANIFESTO ── */
.manifesto {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

.manifesto-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.manifesto h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 3rem;
  max-width: 700px;
}

.manifesto-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.manifesto-col p {
  color: var(--fg-muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.75;
}

.manifesto-col strong {
  color: var(--cyan);
  font-weight: 600;
}

/* ── PRODUCTS ── */
.products {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(0,229,255,0.02) 50%, transparent);
}

.products-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.products h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  border-color: rgba(0,229,255,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.product-card--memory:hover { border-color: rgba(0,229,255,0.3); }
.product-card--orchestrator:hover { border-color: rgba(255,145,0,0.3); }
.product-card--safety:hover { border-color: rgba(74,222,128,0.3); }

.product-icon {
  margin-bottom: 1.5rem;
}

.product-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.product-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.product-spec {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.8rem;
}

.spec-key {
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

.spec-val {
  color: var(--fg);
  font-family: var(--font-heading);
  font-weight: 500;
}

/* ── PROTOCOL ── */
.protocol {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

.protocol-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.protocol h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 1rem;
}

.protocol-desc {
  color: var(--fg-muted);
  max-width: 640px;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.protocol-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.flow-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.flow-connector {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flow-connector::after {
  content: '';
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  opacity: 0.3;
}

.flow-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(0,229,255,0.15);
  margin-bottom: 0.8rem;
  line-height: 1;
}

.flow-text h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.flow-text p {
  color: var(--fg-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ── ARCHITECTURE ── */
.architecture {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(255,145,0,0.02) 50%, transparent);
}

.architecture-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.architecture h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 3rem;
}

.arch-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.arch-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.arch-layer {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arch-layer--filled {
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.12);
  color: var(--fg);
}

.arch-layer--gap {
  background: rgba(255,145,0,0.06);
  border: 1px dashed rgba(255,145,0,0.25);
  color: var(--fg-muted);
}

.gap-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: var(--amber-glow);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.arch-caption {
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 700px;
  line-height: 1.6;
}

/* ── CLOSING ── */
.closing {
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing-glow {
  position: absolute;
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 70%);
  pointer-events: none;
}

.closing-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.closing h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: 1.5rem;
}

.closing p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.closing-bold {
  color: var(--fg) !important;
  font-weight: 500;
  font-size: 1.1rem !important;
}

/* ── FOOTER ── */
.site-footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--fg-dim);
  margin-bottom: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--fg-dim);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero { padding: 4rem 1.5rem 2rem; min-height: auto; }
  .hero-content { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right { order: -1; }
  .node-graph { max-width: 280px; }
  .hero-stats { grid-template-columns: 1fr; gap: 1.5rem; }
  .manifesto-columns { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .protocol-flow { flex-direction: column; }
  .flow-connector { width: 100%; height: 30px; }
  .flow-connector::after { width: 2px; height: 30px; }
  .arch-comparison { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .manifesto, .products, .protocol, .architecture { padding: 4rem 1.5rem; }
  .closing { padding: 5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .hero-badge { font-size: 0.6rem; }
  .hero-sub { font-size: 0.95rem; }
  .stat-num { font-size: 1.5rem; }
}