@font-face {
  font-family: 'Poppins';
  src: url('/static/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('/static/fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('/static/fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #4a4a4a;
  --line: #e5e5e5;
  --lavender: #b4ace6;
  --lavender-deep: #7c72c7;
  --lavender-tint: #eae6f8;
  --indigo: #818cf8;
  --surface: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 56px rgba(10, 10, 10, 0.12);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --paper: #070912;
  --ink: #ffffff;
  --muted: #c8c8d0;
  --line: rgba(255, 255, 255, 0.15);
  --lavender-tint: rgba(180, 172, 230, 0.12);
  --surface: rgba(9, 12, 24, 0.82);
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Poppins, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 68px;
  padding: 0 max(18px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand,
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.brand__wordmark {
  font-weight: 600;
}

.brand__by {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.site-nav a,
.header-action,
.site-footer__nav a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.site-nav span {
  color: var(--lavender-deep);
  margin-right: 5px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
}

.theme-toggle {
  position: relative;
  width: 58px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle__thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--lavender);
  transition: transform 180ms ease;
}

[data-theme='dark'] .theme-toggle__thumb {
  transform: translateX(24px);
}

.theme-toggle__icon {
  position: absolute;
  top: 8px;
  width: 16px;
  height: 16px;
}

.theme-toggle__icon--sun {
  left: 8px;
}

.theme-toggle__icon--moon {
  right: 8px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 52px;
  align-items: center;
  min-height: 100vh;
  padding: 114px max(24px, calc((100vw - 1180px) / 2)) 64px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 76%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 76%, transparent) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, black 0%, black 68%, transparent 100%);
}

.hero__copy,
.hero__stage,
.premise,
.section,
.cta {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--lavender-deep);
  box-shadow: 0 0 0 6px var(--lavender-tint);
}

.hero h1 {
  margin: 0;
  font-size: clamp(4.5rem, 10vw, 8.6rem);
  line-height: 0.89;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
}

.accent {
  color: var(--lavender-deep);
}

.hero__lede {
  max-width: 720px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.7;
}

.hero__actions,
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.button--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.button--ghost {
  background: var(--surface);
}

.hero__note {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hero__note span {
  color: var(--lavender-deep);
  font-weight: 700;
}

.hero__stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quark-stage {
  display: block;
  width: 100%;
  color: var(--lavender-deep);
}

.stage-orbits circle {
  stroke: color-mix(in srgb, var(--ink) 28%, transparent);
}

.stage-links {
  stroke: var(--lavender-deep);
  stroke-width: 1.4;
  opacity: 0.62;
}

.stage-shell,
.stage-triad {
  fill: none;
  stroke: var(--ink);
  stroke-linejoin: round;
}

.stage-shell {
  stroke-width: 12;
}

.stage-triad {
  stroke-width: 8;
}

.stage-quark {
  stroke: var(--ink);
  stroke-width: 5;
}

.stage-quark--top {
  fill: var(--lavender);
}

.stage-quark--right {
  fill: var(--indigo);
}

.stage-quark--left {
  fill: var(--lavender-deep);
}

.stage-nucleus {
  fill: var(--ink);
}

.stage-nodes rect {
  fill: var(--paper);
  stroke: var(--line);
}

.stage-nodes text {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-anchor: middle;
}

.premise,
.section,
.cta {
  padding: 84px max(24px, calc((100vw - 1180px) / 2));
}

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

.premise__kicker,
.section__num,
.card__num {
  margin: 0 0 14px;
  color: var(--lavender-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.premise h2,
.section__head h2,
.section--deep h2,
.cta h2 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.premise p:not(.premise__kicker),
.section__head p:not(.section__num),
.card p,
.workflow p,
.roadmap p {
  color: var(--muted);
  line-height: 1.65;
}

.premise p:not(.premise__kicker) {
  max-width: 900px;
  font-size: 1.12rem;
}

.section--alt {
  background: color-mix(in srgb, var(--lavender-tint) 44%, transparent);
}

.section__head {
  max-width: 820px;
  margin-bottom: 30px;
}

.section__head--split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 42px;
  max-width: none;
  align-items: end;
}

.cards,
.workflow,
.evidence-grid,
.roadmap {
  display: grid;
  gap: 16px;
}

.cards--four,
.evidence-grid,
.roadmap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.workflow li,
.evidence,
.roadmap article {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.card h3,
.workflow h3,
.roadmap h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.workflow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0;
  list-style: none;
}

.workflow span,
.evidence span {
  display: block;
  margin-bottom: 18px;
  color: var(--lavender-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.evidence strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.section--deep {
  background: var(--ink);
  color: var(--paper);
}

.section--deep .section__num,
.section--deep h2,
.section--deep h3 {
  color: var(--paper);
}

.section--deep p {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}

.section--deep .roadmap article {
  background: color-mix(in srgb, var(--paper) 8%, transparent);
  border-color: color-mix(in srgb, var(--paper) 18%, transparent);
}

.cta {
  text-align: center;
}

.cta .eyebrow,
.cta__actions {
  justify-content: center;
}

.cta h2 {
  margin-inline: auto;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 28px max(24px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__meta {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero,
  .section__head--split,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .cards--four,
  .workflow,
  .evidence-grid,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .brand__by {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stage-orbits circle {
    transform-origin: 310px 310px;
    animation: orbit-pulse 8s linear infinite;
  }

  .stage-orbits circle:nth-child(2) {
    animation-duration: 11s;
  }

  .stage-orbits circle:nth-child(3) {
    animation-duration: 14s;
  }

  @keyframes orbit-pulse {
    to { transform: rotate(360deg); }
  }
}
