/* Hydrax Context — shared stylesheet for cover, deck, script.
   Design tokens lifted from canton-interview.html so all pages share one vocabulary. */

:root {
  --bg: #1a1a1a;
  --bg-raised: #242424;
  --bg-elev: rgba(36, 36, 36, 0.78);
  --border: rgba(205, 200, 194, 0.2);
  --border-soft: rgba(205, 200, 194, 0.1);
  --text: #f5f5f5;
  --text-muted: #bcbcbc;
  --text-dim: #888888;
  --accent: #cdc8c2;
  --accent-soft: rgba(205, 200, 194, 0.08);
  --teal: #4fd1c5;
  --teal-soft: rgba(79, 209, 197, 0.18);
  --amber: #f6c177;
  --max: 1200px;
  --max-prose: 760px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 12px 32px rgba(0, 0, 0, 0.3);
  --font-sans: "Inter", "SF Pro Text", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(ellipse 1200px 800px at 70% -10%, rgba(205, 200, 194, 0.05), transparent 60%),
    linear-gradient(rgba(205, 200, 194, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 200, 194, 0.02) 1px, transparent 1px);
  background-size: auto, 60px 60px, 60px 60px;
  min-height: 100vh;
}

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

/* ─── Top nav ────────────────────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.topnav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text);
}
.topnav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.topnav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.topnav-links a {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.topnav-links a:hover { background: var(--accent-soft); color: var(--text); }
.topnav-links a.active { color: var(--text); background: var(--accent-soft); }
.topnav-links a .ext-arrow { font-size: 11px; opacity: 0.6; }
.topnav-links svg { width: 14px; height: 14px; }

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 32px 64px;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 20px 0;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 20px 0;
  color: var(--text);
  max-width: 820px;
}
.hero h1 .accent { color: var(--accent); }
.hero-lede {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 36px 0;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin: 0 0 36px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.hero-meta .meta-item { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 14px; height: 14px; color: var(--accent); }
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 120ms ease, border 120ms ease;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
  border-color: var(--accent);
}
.btn-primary:hover { background: #ddd6cd; color: #1a1a1a; }
.btn svg { width: 16px; height: 16px; }
.hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.status-pill.amber .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(246, 193, 119, 0.18); }

/* ─── Article body ───────────────────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 32px;
  border-top: 1px solid var(--border-soft);
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 14px 0;
}
.section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 24px 0;
  color: var(--text);
  max-width: 720px;
}
.section h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 10px 0;
  color: var(--text);
}
.prose {
  max-width: var(--max-prose);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-muted);
}
.prose p { margin: 0 0 18px 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--accent); font-style: normal; }
.prose ul, .prose ol { margin: 0 0 20px 0; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
.prose a { border-bottom: 1px solid rgba(205, 200, 194, 0.4); }
.prose a:hover { border-bottom-color: var(--text); }

/* ─── Card grid (primitives, planes, deep-dives) ─────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 28px 0 8px 0;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border 160ms ease, transform 160ms ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text);
  line-height: 1.3;
}
.card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}
.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 18px; height: 18px; color: var(--accent); }

/* ─── Compare blocks ─────────────────────────────────────────────────── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare > div {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.compare h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px 0;
}
.compare ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--text-muted); }

/* ─── Appendix grid ───────────────────────────────────────────────────── */
.appendix {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 32px 96px;
  border-top: 1px solid var(--border-soft);
}
.appendix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.appx-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: border 160ms ease, transform 160ms ease;
  position: relative;
  overflow: hidden;
}
.appx-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.appx-card .appx-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.appx-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}
.appx-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 14px 0;
}
.appx-card .appx-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Footer ──────────────────────────────────────────────────────────── */
.sitefoot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.sitefoot a { color: var(--text-muted); }
.sitefoot a:hover { color: var(--text); }

/* ─── Script-page specific ────────────────────────────────────────────── */
.segment {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
}
@media (max-width: 720px) { .segment { grid-template-columns: 1fr; gap: 12px; } }
.segment .seg-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.segment h3 { margin-top: 0; }
.segment .seg-time {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
}

/* ─── Deck-page nav offset ────────────────────────────────────────────── */
/* Deck slides use absolute positioning at 1280×720; the topnav sits above. */
.deck-wrapper { padding-top: 0; }
