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

:root {
  --bg:          #0a0a0b;
  --surface:     #111113;
  --surface-2:   #16161a;
  --border:      #1e1e24;
  --text:        #e8e8ed;
  --muted:       #6e6e7a;
  --muted-2:     #4a4a55;
  --accent:      #7c6af7;
  --accent-h:    #6a58e6;
  --accent-2:    #f06292;
  --accent-3:    #4dd0e1;
  --font:        'Inter', system-ui, sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */

header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.wordmark {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.nav-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ── Hero ── */

main { flex: 1; }

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  text-align: center;
}

.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text) 40%, color-mix(in srgb, var(--accent) 60%, var(--text)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }

.btn-ghost {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted-2); }

/* ── Sections (shared) ── */

.section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 3.5rem;
}

/* ── Timeline ── */

.story-section { background: var(--surface); }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.4;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -1.6rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.timeline-item--now .timeline-marker {
  background: var(--accent-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-3) 25%, transparent), 0 0 16px color-mix(in srgb, var(--accent-3) 30%, transparent);
}

.timeline-date {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-item--now .timeline-date { color: var(--accent-3); }

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.timeline-content p {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.timeline-content p:last-child { margin-bottom: 0; }

.timeline-content em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

/* ── Features grid ── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}

.feature-card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: background 0.15s;
}
.feature-card:hover { background: var(--surface-2); }

.feature-icon {
  font-size: 1.2rem;
  color: var(--accent);
  line-height: 1;
}

.feature-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.845rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ── Pipeline ── */

.pipeline-section { background: var(--surface); }

.pipeline {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  overflow-x: auto;
}

.pipeline-node {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  white-space: nowrap;
}

.pipeline-node--entry {
  border-color: var(--accent);
  color: var(--accent);
}

.pipeline-node--fanout {
  border-color: color-mix(in srgb, var(--accent-3) 50%, transparent);
  color: var(--accent-3);
}

.pipeline-note {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.pipeline-arrow {
  padding-left: 1.2rem;
  color: var(--muted-2);
  font-size: 0.8rem;
  line-height: 1.4;
}

.pipeline-split {
  display: flex;
  gap: 2rem;
  padding-left: 1rem;
}

.pipeline-branch {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pipeline-branch-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.pipeline-arrow--right {
  color: var(--muted-2);
}

.arch-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.arch-note {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.arch-note h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.arch-note p {
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--muted);
}

.arch-note code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ── Stack ── */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.stack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.15s;
}
.stack-item:hover { border-color: var(--muted-2); }

.stack-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.stack-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

footer p {
  font-size: 0.82rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover { color: var(--text); }

.footer-north {
  color: var(--muted-2);
  font-style: italic;
  font-size: 0.78rem;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero { padding: 5rem 1.25rem 4rem; }
  .cta-group { flex-direction: column; align-items: stretch; text-align: center; }
  .section { padding: 4rem 1.25rem; }
  .timeline { padding-left: 1.5rem; }
  .pipeline { padding: 1.5rem; font-size: 0.75rem; }
  .features-grid { grid-template-columns: 1fr; }
}
