/* ============================================================
   Vetfab.ai — Design tokens (R&D redesign, v2)
   Brand direction per vetfab_context.md §6: buffer-gate mark,
   Electric Indigo primary, void background, monochrome-capable.
   To change brand colours, edit the values below.
   ============================================================ */

:root {
  /* Brand colours */
  --void: #0C0D10;
  --indigo: #5B4FE8;
  --signal: #8075FF;
  --offwhite: #E9E7F0;
  --amber: #D98F2B;

  /* Dark theme (default — this brand is dark-first) */
  --bg: #0C0D10;
  --bg-elevated: #14161C;
  --bg-subtle: #1A1D26;
  --text-primary: #E9E7F0;
  --text-secondary: #9A9FB0;
  --text-tertiary: #7B8299;
  --border: #262A36;
  --accent: var(--signal);
  --accent-strong: var(--indigo);
  --cta-bg: var(--indigo);
  --cta-text: #FFFFFF;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-wordmark: 'Fredoka', 'Segoe UI', sans-serif;

  --container-width: 1140px;
  --radius: 10px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg: #F6F5F9;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #ECEAF3;
  --text-primary: #14151A;
  --text-secondary: #4B4E5C;
  --text-tertiary: #7B7E8C;
  --border: #DCDAE6;
  --accent: var(--indigo);
  --accent-strong: var(--indigo);
  --cta-bg: var(--indigo);
  --cta-text: #FFFFFF;
  --shadow: 0 1px 3px rgba(20, 21, 26, 0.08), 0 1px 2px rgba(20, 21, 26, 0.04);
}

/* ============================================================
   Reset & base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p {
  color: var(--text-secondary);
}

code, .mono {
  font-family: var(--font-mono);
}

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

section {
  padding: 64px 0;
}

/* ============================================================
   Background schematic texture (deep-tech cue)
   ============================================================ */

.schematic-bg {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  opacity: 0.5;
}

/* ============================================================
   Header / Navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .site-header {
  background: rgba(246, 245, 249, 0.85);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-wordmark);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand img {
  width: 0.75em;
  height: 0.75em;
}

.nav-brand .ai {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-cta {
  background: var(--cta-bg);
  color: var(--cta-text) !important;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  opacity: 0.9;
  text-decoration: none;
}

.theme-toggle {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.2s ease;
}

.theme-toggle:hover {
  filter: brightness(1.2);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 6px;
}

.menu-toggle svg {
  width: 26px;
  height: 26px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--cta-bg);
  color: var(--cta-text);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero p.lead {
  font-size: 1.1rem;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

/* ============================================================
   Sections / cards
   ============================================================ */

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-head .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head p {
  margin-top: 12px;
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent);
}

.card .icon-box svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.96rem;
}

/* ============================================================
   Stats strip
   ============================================================ */

.stats-strip {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat .number {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--accent);
}

.stat .label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   CTA band
   ============================================================ */

.cta-band {
  background: linear-gradient(135deg, var(--indigo), #3C2FB8);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  color: #FFFFFF;
}

.cta-band h2 {
  color: #FFFFFF;
  margin-bottom: 12px;
}

.cta-band p {
  color: #D9D6FA;
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta-band .btn-secondary {
  border-color: rgba(255,255,255,0.3);
  color: #FFFFFF;
}

.cta-band .btn-primary {
  background: #FFFFFF;
  color: var(--indigo);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-wordmark);
  font-weight: 700;
  font-size: 1.33rem;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 0.75em;
  height: 0.75em;
}

.footer-brand .ai {
  color: var(--accent);
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* ============================================================
   Forms
   ============================================================ */

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

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(91, 79, 232, 0.12);
  color: var(--signal);
  border: 1px solid var(--indigo);
}

.form-status.error {
  display: block;
  background: rgba(217, 143, 43, 0.1);
  color: var(--amber);
  border: 1px solid var(--amber);
}

/* ============================================================
   Page header (non-home pages)
   ============================================================ */

.page-header {
  padding: 56px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-header p {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 1.05rem;
}

/* ============================================================
   Pills / badges
   ============================================================ */

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  color: var(--accent);
  border: 1px solid var(--border);
}

.pill-amber {
  background: rgba(217, 143, 43, 0.12);
  color: var(--amber);
  border-color: rgba(217, 143, 43, 0.3);
}

.pill-secondary {
  background: transparent;
  color: var(--text-tertiary);
}

/* ============================================================
   Domain / capability cards (Services + Training pages)
   ============================================================ */

.domain-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  cursor: pointer;
  gap: 16px;
}

.domain-header:hover {
  background: var(--bg-subtle);
}

.domain-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.domain-header .icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.domain-header .icon-box svg {
  width: 22px;
  height: 22px;
}

.domain-header h3 {
  margin-bottom: 2px;
}

.domain-header .sub {
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

.domain-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--text-tertiary);
}

.domain-chevron svg {
  width: 22px;
  height: 22px;
}

.domain-card.open .domain-chevron {
  transform: rotate(180deg);
}

.domain-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.domain-card.open .domain-body {
  max-height: 2000px;
}

.domain-body-inner {
  padding: 0 28px 26px;
  border-top: 1px solid var(--border);
}

.level-group {
  margin-top: 20px;
}

.level-group h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 10px;
}

.level-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.level-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}

.level-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   Timeline / process steps
   ============================================================ */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.process-step .step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  margin: 0 auto 16px;
  position: relative;
  z-index: 2;
}

.process-step h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 0.88rem;
}

.process-line {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

/* ============================================================
   Two-col content
   ============================================================ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.two-col.reverse {
  direction: rtl;
}

.two-col.reverse > * {
  direction: ltr;
}

.feature-list {
  list-style: none;
  margin-top: 20px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

.feature-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(91, 79, 232, 0.14);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.feature-list .check svg {
  width: 13px;
  height: 13px;
}

/* ============================================================
   Team cards
   ============================================================ */

.team-card {
  text-align: center;
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--text-tertiary);
}

.team-avatar svg {
  width: 40px;
  height: 40px;
}

.team-card h3 {
  margin-bottom: 2px;
}

.team-card .role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.team-card p.bio {
  font-size: 0.9rem;
}

/* ============================================================
   Tape-out flow (NanoGyan page)
   ============================================================ */

.flow-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.flow-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  position: relative;
}

.flow-step .flow-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.flow-step h4 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.flow-step p {
  font-size: 0.8rem;
}

/* ============================================================
   PCB trace system — structural graphic language (redesign v3)
   Routed lines + via-dots replace decorative gradients/glows.
   Committed direction per Impeccable new-work concept-seed
   (grounded candidate 7: PCB trace art / gerber layers), fused
   into the existing indigo/void palette — no new colours.
   ============================================================ */

.trace-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

[data-theme="light"] .trace-canvas { opacity: 0.3; }

.trace-canvas .t-line { fill: none; stroke: var(--border); stroke-width: 1.5; }
.trace-canvas .t-line.live { stroke: var(--signal); opacity: 0.6; }
.trace-canvas .t-via { fill: var(--signal); }
.trace-canvas .t-via.pad { fill: var(--indigo); }

/* Board composition — an anchor node plus connected branch nodes,
   used where three things are genuinely unequal in weight instead
   of a uniform icon+heading+text card grid (the lazy container). */
.board {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 22px;
  align-items: stretch;
}

.board-anchor {
  grid-row: 1 / 3;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.board-anchor::before {
  content: "";
  position: absolute;
  top: 34px;
  right: -21px;
  width: 21px;
  height: 2px;
  background: var(--signal);
}

.board-anchor::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -23px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  transform: translateY(-50%);
}

.board-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.board-node::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -21px;
  width: 21px;
  height: 2px;
  background: var(--border);
}

.board-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -23px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  transform: translateY(-50%);
}

.board-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.board-anchor h3 { margin-bottom: 12px; }
.board-node h4 { margin-bottom: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text-primary); }
.board-node p { font-size: 0.93rem; }
.board-anchor p { font-size: 0.98rem; }
.board-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 0.9rem; }

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; grid-template-rows: auto; gap: 32px; }
  .board-anchor { grid-row: auto; }
  .board-anchor::before, .board-anchor::after,
  .board-node::before, .board-node::after { display: none; }
}

/* Rail composition — parallel, equal-weight items sharing one bus
   line (via-dots dropping to each node), for genuinely parallel
   content where board's hub/spoke hierarchy would misrepresent it. */
.rail { position: relative; padding-top: 28px; }

.rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 2px;
  background: var(--border);
}

.rail-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rail-node {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.rail-node::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  width: 2px;
  height: 28px;
  background: var(--border);
  transform: translateX(-50%);
}

.rail-node::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  transform: translate(-50%, -50%);
}

.rail-node h4 { margin-bottom: 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.rail-node p { font-size: 0.93rem; }
.rail-node .board-link { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 0.9rem; }

@media (max-width: 860px) {
  .rail-row { grid-template-columns: 1fr; }
  .rail::before { display: none; }
  .rail-node::before, .rail-node::after { display: none; }
}

/* ============================================================
   Motion — one authored moment: traces draw in on load, board/
   rail nodes power on as they enter view. Native CSS + JS only.
   ============================================================ */

.trace-canvas .t-line {
  transition: stroke-dashoffset 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.board-anchor, .board-node, .rail-node,
.card, .domain-card, .process-step {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
}

.board-anchor.in-view, .board-node.in-view, .rail-node.in-view,
.card.in-view, .domain-card.in-view, .process-step.in-view {
  opacity: 1;
  transform: translateY(0);
}

.board-anchor::before, .board-anchor::after,
.board-node::before, .board-node::after,
.rail-node::before, .rail-node::after {
  opacity: 0;
  transition: opacity 0.3s ease 0.4s, box-shadow 0.2s ease;
}

.board-anchor.in-view::before, .board-anchor.in-view::after,
.board-node.in-view::before, .board-node.in-view::after,
.rail-node.in-view::before, .rail-node.in-view::after {
  opacity: 1;
}

.board-node:hover, .rail-node:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.board-node:hover::after, .rail-node:hover::after {
  box-shadow: 0 0 8px 1px var(--signal);
}

@media (prefers-reduced-motion: reduce) {
  .trace-canvas .t-line { transition: none; }
  .board-anchor, .board-node, .rail-node { opacity: 1; transform: none; transition: none; }
  .board-anchor::before, .board-anchor::after,
  .board-node::before, .board-node::after,
  .rail-node::before, .rail-node::after { opacity: 1; transition: none; }
  .board-node:hover, .rail-node:hover { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .two-col.reverse {
    direction: ltr;
  }

  .hero-visual {
    order: -1;
  }

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

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .process-line { display: none; }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 48px 0;
  }

  .hero {
    padding: 48px 0;
  }

  .level-list {
    grid-template-columns: 1fr;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    padding: 40px 24px;
  }
}
