:root {
  --radius: 0.25rem;
  --ink: oklch(0.14 0.021 274);
  --surface: oklch(0.201 0.023 274);
  --surface-2: oklch(0.253 0.026 274);
  --brand-pale: oklch(0.94 0.01 260);
  --brand-indigo: oklch(0.53 0.253 274);
  --brand-cyan: oklch(0.61 0.204 259);
  --brand-teal: oklch(0.71 0.132 173);
  --hairline: oklch(1 0 0 / 10%);
  --background: var(--ink);
  --foreground: oklch(1 0 0);
  --muted-foreground: oklch(0.72 0.011 274);
  --border: oklch(1 0 0 / 12%);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--background) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  color: var(--foreground);
  width: 2rem;
  height: 2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-family: var(--font-display);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--brand-indigo);
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 1.7rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--foreground);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-indigo);
  background: color-mix(in srgb, var(--brand-indigo) 14%, transparent);
  color: var(--foreground);
  padding: 0.8rem 1.3rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.button:hover,
.button:focus-visible {
  background: color-mix(in srgb, var(--brand-indigo) 22%, transparent);
}

.button-ghost {
  border-color: var(--border);
  background: transparent;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
}

.button-secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--muted-foreground);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(255,255,255,0.4);
  color: var(--foreground);
  background: rgba(255,255,255,0.04);
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand-indigo) 22%, transparent) 0 1px, transparent 1px),
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand-cyan) 14%, transparent) 0 1px, transparent 1px);
  background-size: 28px 28px, 56px 56px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1.15fr 1fr;
  padding: 6rem 0 7rem;
}

.hero-copy h1 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
  color: var(--brand-indigo);
}

.hero-lead {
  margin: 1.2rem 0 0;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.7;
  max-width: 38rem;
}

.hero-body {
  margin: 1.4rem 0 0;
  color: var(--muted-foreground);
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art[data-network-diagram] {
  width: min(30rem, 78vw);
  aspect-ratio: 1 / 1;
}

.hero-art svg {
  width: 100%;
  height: 100%;
  color: var(--foreground);
}

.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-surface {
  background: rgba(255,255,255,0.02);
}

.eyebrow,
.eyebrow-pale {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--brand-indigo);
}

.eyebrow-pale {
  color: var(--brand-pale);
}

.rule-accent::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0.6rem;
  background: var(--brand-indigo);
}

.card-grid {
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  border: 1px solid var(--border);
  background: var(--border);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--background);
  padding: 2.5rem 1.6rem;
  text-align: center;
}

.card-icon {
  display: flex;
  justify-content: center;
  color: var(--foreground);
  margin-bottom: 1.2rem;
}

.card-icon svg {
  width: 3rem;
  height: 3rem;
}

.card h2,
.section h2,
.deploy-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card p,
.section-copy,
.deploy-card p {
  margin: 0.9rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.94rem;
  line-height: 1.75;
}

.evidence-grid,
.architecture-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.section h2 {
  margin-top: 1rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  text-transform: none;
  max-width: 14ch;
}

.timeline {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
}

.timeline-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 0.75rem;
}

.timeline-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-indigo) 16%, transparent);
  color: var(--brand-indigo);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
}

.diagram-panel {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  padding: 1.4rem;
}

.main-diagram {
  width: 100%;
  height: auto;
  color: var(--foreground);
}

.deployment-grid {
  display: grid;
  gap: 1px;
  margin-top: 3rem;
  border: 1px solid var(--border);
  background: var(--border);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deploy-card {
  background: var(--background);
  padding: 2rem 1.5rem;
}

.deploy-kicker {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--brand-indigo);
}

.site-footer {
  padding: 2.3rem 0 3rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  width: 100%;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-brand svg {
  width: 1.45rem;
  height: 1.45rem;
}

.footer-github a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;  
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .hero-grid,
  .evidence-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    justify-content: flex-start;
  }

  .card-grid,
  .deployment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-row {
    flex-wrap: wrap;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .hero-section {
    padding-top: 1rem;
  }

  .hero-grid {
    padding: 3.5rem 0 4.5rem;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
  }
}
