/* ===== Design tokens ===== */
:root {
  --bg-primary: #0B0D10;
  --bg-surface: #14171B;
  --border-hairline: #22262C;
  --text-primary: #EDEFF2;
  --text-muted: #8B93A1;

  --confirmed: #34D399;
  --inferred: #F5B84E;
  --assumed: #EF6461;
  --opaque: #4B5563;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --wrap-width: 1180px;
  --wrap-narrow-width: 640px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

button, input, select { font: inherit; color: inherit; }

.wrap {
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: var(--wrap-narrow-width);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--confirmed);
  color: var(--bg-primary);
  padding: 12px 16px;
  z-index: 100;
  font-family: var(--font-mono);
}
.skip-link:focus {
  left: 24px;
  top: 24px;
}

/* ===== Focus states ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--confirmed);
  outline-offset: 2px;
}

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--confirmed);
  margin-bottom: 16px;
}
.eyebrow-opaque { color: var(--text-muted); }
.eyebrow-confirmed { color: var(--confirmed); }
.eyebrow-assumed { color: var(--assumed); }

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 24px;
}

.hero-subhead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 36px;
}

.section-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 20ch;
}

.section-subhead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-para {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 68ch;
  margin-top: 40px;
}

.prose {
  max-width: 68ch;
  margin-bottom: 40px;
}
.prose p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.prose p:last-child { margin-bottom: 0; }
.prose em { color: var(--text-muted); font-style: italic; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--confirmed);
  color: #04140D;
}
.btn-primary:hover { opacity: 0.88; }

.btn-small {
  padding: 10px 18px;
  font-size: 0.9rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hairline);
}
.btn-ghost:hover { border-color: var(--text-muted); }

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ===== Hero ===== */
.hero {
  padding-top: 96px;
  overflow: hidden;
}

.hero-inner {
  padding-bottom: 48px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-microline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-graph-wrap {
  padding: 40px 0 80px;
  border-bottom: 1px solid var(--border-hairline);
}

.provenance-graph {
  width: 100%;
  height: auto;
}

.pg-lines line {
  stroke-width: 2;
  stroke-linecap: round;
}

.pg-nodes .pg-node,
.pg-fade-point .pg-node {
  stroke-width: 2;
}
.pg-node.confirmed { fill: var(--confirmed); stroke: var(--confirmed); }
.pg-node.inferred { fill: var(--inferred); stroke: var(--inferred); }
.pg-node.assumed { fill: var(--assumed); stroke: var(--assumed); }
.pg-node.opaque {
  fill: rgba(75, 85, 99, 0.35);
  stroke: var(--opaque);
  stroke-dasharray: 3 3;
}

.pg-ring {
  fill: none;
  stroke: var(--inferred);
  stroke-width: 1.5;
  opacity: 0.6;
}

.pg-fade-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--text-muted);
}

.pg-state-labels text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--text-muted);
}

/* graph entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .pg-line {
    stroke-dasharray: 105;
    stroke-dashoffset: 105;
    animation: pg-draw 0.5s ease-out forwards;
    animation-delay: calc(var(--i) * 0.15s);
  }
  .pg-nodes .pg-node,
  .pg-fade-point {
    opacity: 0;
    animation: pg-appear 0.35s ease-out forwards;
    animation-delay: calc(var(--i) * 0.15s + 0.1s);
  }
  .pg-ring {
    animation: pg-pulse 2.4s ease-in-out infinite;
    animation-delay: 1.2s;
    transform-origin: 480px 130px;
  }
}

@keyframes pg-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes pg-appear {
  to { opacity: 1; }
}
@keyframes pg-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50% { opacity: 0.7; transform: scale(1.08); }
}

/* ===== Sections ===== */
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.section:last-of-type { border-bottom: none; }

/* ===== Mockup (product screenshot) ===== */
.mockup {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 48px;
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-hairline);
}

.mockup-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.mockup-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--confirmed);
  border: 1px solid var(--confirmed);
  border-radius: 999px;
  padding: 3px 10px;
}

.mockup-body {
  display: flex;
  flex-wrap: wrap;
}

.mockup-graph {
  flex: 1 1 480px;
  padding: 32px 20px;
  min-width: 0;
}

.m-node.confirmed { fill: var(--confirmed); }
.m-node.inferred { fill: var(--inferred); }
.m-node.assumed { fill: var(--assumed); }
.m-node.opaque { fill: rgba(75, 85, 99, 0.4); stroke: var(--opaque); stroke-width: 1.5; stroke-dasharray: 2 2; }
.m-ring { fill: none; stroke: var(--inferred); stroke-width: 1.5; opacity: 0.5; }
.m-fade-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  fill: var(--text-muted);
}

.mockup-sidebar {
  flex: 0 0 260px;
  border-left: 1px solid var(--border-hairline);
  padding: 24px 22px;
}

.mockup-sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.mockup-metric { margin-bottom: 18px; }
.mockup-metric:last-child { margin-bottom: 0; }

.mockup-metric-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mockup-bar {
  height: 6px;
  background: var(--border-hairline);
  border-radius: 3px;
  overflow: hidden;
}

.mockup-bar-fill { height: 100%; }
.mockup-bar-fill.confirmed { background: var(--confirmed); }
.mockup-bar-fill.opaque { background: var(--opaque); }

/* ===== Cards ===== */
.cards {
  display: grid;
  gap: 24px;
}

.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 28px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.card-body {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ===== Vocabulary chips ===== */
.chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 24px;
}

.chip-term {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--confirmed);
  margin-bottom: 10px;
}

.chip-def {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ===== Stats ===== */
.stat-grid { margin-bottom: 0; }

.stat-card {
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 28px 24px;
}

.stat-number {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: var(--text-primary);
  margin-bottom: 10px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stat-source {
  color: var(--text-muted);
  opacity: 0.8;
}

/* ===== How it works flow ===== */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.flow-step {
  border-top: 2px solid var(--border-hairline);
  padding-top: 20px;
}

.flow-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.flow-dot.confirmed { background: var(--confirmed); }
.flow-dot.inferred { background: var(--inferred); }
.flow-dot.assumed { background: var(--assumed); }
.flow-dot.gradient {
  background: linear-gradient(90deg, var(--opaque), var(--confirmed));
}

.flow-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.flow-body {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Early access form ===== */
.section-early-access {
  background: var(--bg-surface);
}

.access-form {
  margin-top: 8px;
}

.form-row {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-hairline);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text-primary);
}

.form-input:focus {
  border-color: var(--confirmed);
}

.form-input::placeholder { color: var(--text-muted); }

.form-error-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--assumed);
}

.form-microcopy {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.access-success {
  border: 1px solid var(--confirmed);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
}

.success-text {
  font-family: var(--font-mono);
  color: var(--confirmed);
  font-size: 1.05rem;
}

/* ===== Footer ===== */
.footer {
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.footer-brand .wordmark {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

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

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text-primary); }

.footer-copyright {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .mockup-sidebar { flex: 1 1 100%; border-left: none; border-top: 1px solid var(--border-hairline); }
}

@media (max-width: 640px) {
  .nav-inner { height: 64px; }
  .hero { padding-top: 64px; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-graph-wrap { padding: 24px 0 48px; }
  .footer-inner { flex-direction: column; }
  .btn-small { padding: 8px 14px; font-size: 0.85rem; }
}
