/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #06060a;
  --surface: #0d0d14;
  --surface2: #13131e;
  --border: #1e1e2e;
  --accent: #ff9500;
  --accent-dim: #ff950044;
  --teal: #00e5c8;
  --teal-dim: #00e5c822;
  --text: #e8e4dc;
  --text-muted: #6b6b7a;
  --text-dim: #3a3a4a;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
}

body {
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--text-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--text-dim) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/* radial glow top-right */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #ff950012 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== NAV ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,6,10,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-nav nav {
  display: flex;
  gap: 2rem;
}

.site-nav nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.site-nav nav a:hover { color: var(--text); }

/* ===== SECTION COMMON ===== */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 480px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.stat { display: flex; flex-direction: column; gap: 0.2rem; }

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Hero diagram */
.hero-diagram {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.network-svg {
  width: 100%;
  height: auto;
}

.flow-line {
  stroke-dashoffset: 0;
  animation: dash 3s linear infinite;
}

@keyframes dash {
  from { stroke-dashoffset: 20; }
  to { stroke-dashoffset: 0; }
}

/* ===== HOW IT WORKS ===== */
.hiw {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.hiw-header { margin-bottom: 3rem; }

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.3s;
}

.step:hover { border-color: var(--accent-dim); }

.step-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.step p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===== ARCHITECTURE ===== */
.arch {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.arch-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.arch-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.arch-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.arch-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.5;
}

.check {
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Architecture diagram */
.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arch-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.arch-layer-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.arch-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.arch-node {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

.arch-node.active {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.arch-arrow {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===== FEATURES ===== */
.features {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.features-header { margin-bottom: 3rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===== CLOSING ===== */
.closing {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

.closing-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.15em;
  border: 1px solid var(--teal-dim);
  border-radius: 100px;
  padding: 0.3rem 1rem;
  margin-bottom: 2rem;
}

.closing-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.closing-body {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.closing-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-sep { color: var(--accent-dim); }

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-sep { color: var(--text-dim); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 3rem 1.5rem 3rem;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-diagram { max-width: 100%; }

  .arch-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-stats { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .site-nav nav { display: none; }

  .hiw-steps,
  .features-grid {
    grid-template-columns: 1fr;
  }
}