/* ================================================================
   Civic Deck — styles.css
   Aligned with brand guidelines (mono-first, terminal aesthetic,
   dark mode, Vic-as-hero-visual, no gradient-heavy SaaS).
   ================================================================ */

/* ----- fonts ----- */
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Italic-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Italic-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ----- design tokens ----- */
:root {
  /* canvas */
  --civic-dark: #030711;
  --bg-surface: #050B18;
  --bg-card: #0A1120;
  --bg-hover: #111C30;
  --civic-slate: #1C2A3A;
  --border-accent: #2A3A50;

  /* brand */
  --civic-purple: #7C3BED;
  --civic-purple-dim: #5B2BB3;
  --civic-purple-glow: rgba(124, 59, 237, 0.32);
  --civic-blue: #0BBFEF;
  --accent-dim: #1A0A38;

  /* text */
  --text-primary: #DDE4EF;
  --text-secondary: #728096;
  --text-muted: #3A4A5C;

  /* semantic */
  --ok: #7C3BED;
  --ok-bg: rgba(124, 59, 237, 0.12);
  --block: #EF4343;
  --block-bg: rgba(239, 67, 67, 0.10);
  --warn: #F59F0A;
  --info: #0BBFEF;

  /* fonts */
  --mono: "Geist Mono", "SF Mono", "JetBrains Mono", ui-monospace, "Courier New", monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* spacing */
  --slide-pad-x: clamp(24px, 5vw, 96px);
  --slide-pad-y: clamp(40px, 6vh, 96px);
  --gap: 16px;
  --radius: 6px;
  --radius-lg: 10px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.1s;
  --t-med: 0.3s;
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* honor the `hidden` HTML attribute even on elements with explicit display */
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
code, kbd, pre { font-family: var(--mono); }

/* tighten word-spacing for mono body text — mono fonts render space chars at full cell width */
.terminal-table,
.auth-footer,
.auth-tag,
.eco-big,
.eco-tile h3,
.eco-tile li,
.cta-url,
.cta-label,
.cta-meta,
.pillar-title,
.pillar-glyph,
.feature h3,
.feature-glyph,
.scope-strip,
.step-title,
.started-title,
.started-meta,
.hero-meta,
.cta-contact,
.cta-role,
.chip,
.terminal-title,
.auth-time,
.pillar-body:where(.mono) {
  word-spacing: -0.1em;
}

/* ----- html / body ----- */
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background: var(--civic-dark);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100dvh;
  background: var(--civic-dark);
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* keep selectable for anything people might want to copy */
a[href^="mailto:"],
a[href^="http"],
code,
.cta-url,
.auth-footer-key {
  user-select: text;
  -webkit-user-select: text;
}

::selection { background: var(--civic-purple); color: #fff; }

/* ----- persistent chrome ----- */
.chrome {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}
.chrome > * { pointer-events: auto; }

.wordmark {
  position: fixed;
  top: clamp(20px, 3vh, 32px);
  left: clamp(24px, 3vw, 40px);
  display: inline-flex;
  align-items: center;
  transition: opacity var(--t-fast);
  view-transition-name: civic-mark;
  opacity: 0.85;
}
.wordmark:hover { opacity: 1; }
.wordmark-logo {
  width: clamp(76px, 7vw, 100px);
  height: auto;
  display: block;
}

.dots {
  position: fixed;
  right: clamp(18px, 2vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.dots a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  border-left: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast), padding var(--t-fast);
}
.dots a:hover { color: var(--text-secondary); }
.dots a.is-active {
  color: var(--civic-purple);
  border-left-color: var(--civic-purple);
  padding-left: 4px;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: 45;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--civic-purple);
  transition: width 0.2s linear;
}

/* ----- toast ----- */
.toast {
  position: fixed;
  bottom: clamp(20px, 3vh, 32px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius);
  padding: 8px 14px;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .toast-sep { color: var(--text-muted); margin: 0 4px; }
.toast kbd {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border-accent);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text-primary);
}

/* ----- help dialog ----- */
.help {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: 13px;
  z-index: 60;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.help::backdrop { background: rgba(3, 7, 17, 0.7); backdrop-filter: blur(2px); }
.help h3 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--civic-purple);
}
.help table { border-collapse: collapse; width: 100%; }
.help td { padding: 6px 12px 6px 0; vertical-align: top; color: var(--text-secondary); }
.help td:first-child { color: var(--text-primary); white-space: nowrap; }
.help kbd {
  font-size: 11px;
  background: var(--bg-hover);
  border: 1px solid var(--border-accent);
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 2px;
  color: var(--text-primary);
}
.help button {
  margin-top: 16px;
  padding: 6px 14px;
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.help button:hover { color: var(--civic-purple); border-color: var(--civic-purple); }

/* ============================================================
   slide structure
   ============================================================ */
.deck {
  /* each section is the scroll-snap container */
}
.slide {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: var(--slide-pad-y) var(--slide-pad-x);
  display: grid;
  place-items: center;
  border-bottom: 1px solid transparent; /* used by print mode */
  overflow: hidden;
}
.slide-inner {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vh, 32px);
}

/* ----- typographic primitives ----- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--civic-purple);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.kicker .caret {
  display: inline-block;
  color: var(--civic-purple);
  animation: caret-blink 1s steps(2) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

.display {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.4rem, 7.5vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}
.display-line {
  display: block;
  word-spacing: -0.15em;
}
.display-word {
  display: inline-block;
}
.display-word--accent { color: var(--civic-purple); }

.heading {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  word-spacing: -0.15em;
  margin: 0;
  text-wrap: balance;
  color: var(--text-primary);
}

.subheading {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 58ch;
  margin: 0;
}
.subheading--wide { max-width: 72ch; }

.lede {
  font-family: var(--sans);
  font-size: clamp(1.2rem, 1.55vw, 1.5rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 56ch;
  margin: 0;
}
.lede strong {
  font-weight: 700;
  color: var(--text-primary);
}

.pullquote {
  font-family: var(--sans);
  font-style: italic;
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-secondary);
  border-left: 2px solid var(--civic-purple);
  padding: 8px 0 8px 18px;
  margin: 4px 0 0;
  max-width: 70ch;
}

/* ============================================================
   SLIDE 1 — HERO
   ============================================================ */
.slide--hero .slide-inner {
  gap: clamp(18px, 2vh, 28px);
}
.slide--hero .lede { margin-top: 4px; }
.hero-meta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: clamp(15px, 1.15vw, 18px);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: clamp(24px, 4vh, 64px);
}
.hero-meta .meta-sep { color: var(--text-muted); }

.mascot--hero {
  position: absolute;
  right: clamp(32px, 5vw, 96px);
  bottom: clamp(28px, 5vh, 72px);
  width: clamp(140px, 18vw, 240px);
  filter: drop-shadow(0 0 28px var(--civic-purple-glow));
  animation: mascot-float 6s ease-in-out infinite;
}
.mascot--hero img { width: 100%; height: auto; }
@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================================
   SLIDE 2 — COMPARISON
   ============================================================ */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: stretch;
  margin-top: clamp(16px, 3vh, 40px);
}
.compare-col {
  padding: clamp(20px, 2.2vw, 32px);
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.compare-col--bad { border-color: rgba(239, 67, 67, 0.20); }
.compare-col--good { border-color: rgba(124, 59, 237, 0.28); }
.compare-header {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0;
  color: var(--text-secondary);
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--civic-slate);
}
.compare-col--bad .compare-header { color: #C4856A; }
.compare-col--good .compare-header { color: var(--civic-purple); }

.compare-list { display: flex; flex-direction: column; gap: 14px; }
.compare-list li {
  font-family: var(--sans);
  font-size: clamp(1.15rem, 1.35vw, 1.3rem);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-primary);
}
.compare-col--bad .compare-list li { color: var(--text-secondary); }
.compare-sign {
  font-family: var(--mono);
  font-weight: 600;
  flex: 0 0 auto;
  line-height: 1.45;
}
.compare-sign--bad { color: var(--block); }
.compare-sign--good { color: var(--civic-purple); }

.compare-divider {
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    var(--civic-slate) 15%,
    var(--civic-slate) 85%,
    transparent 100%);
  align-self: stretch;
}

/* ============================================================
   SLIDE 3 — ARCHITECTURE
   ============================================================ */
.slide--architecture .slide-inner {
  align-self: stretch;
  height: 100%;
  gap: 10px;
}
.slide--architecture .heading { font-size: clamp(1.2rem, 2.2vw, 2rem); max-width: none; white-space: nowrap; }
.slide--architecture .subheading { font-size: clamp(0.95rem, 1.1vw, 1.1rem); max-width: 56ch; }

.architecture {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin-top: -20px;
}
.arch-stage {
  position: relative;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  min-height: 440px;
}
.arch-mascot { width: clamp(200px, 24vw, 340px); }
.arch-mascot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(180px, 22vw, 300px);
  filter: drop-shadow(0 0 40px var(--civic-purple-glow));
  z-index: 2;
  animation: mascot-float-centered 6s ease-in-out infinite;
}
@keyframes mascot-float-centered {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 10px)); }
}
.arch-mascot img { width: 100%; height: auto; }
.arch-lines {
  display: none;
}
.arch-lines .tentacle {
  fill: none;
  stroke: var(--civic-purple);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.55;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1.2s var(--ease);
}
.slide--architecture.is-active .arch-lines .tentacle { stroke-dashoffset: 0; }
.slide--architecture.is-active .arch-lines .tentacle[data-tentacle="2"] { transition-delay: 0.15s; }
.slide--architecture.is-active .arch-lines .tentacle[data-tentacle="3"] { transition-delay: 0.30s; }
.slide--architecture.is-active .arch-lines .tentacle[data-tentacle="4"] { transition-delay: 0.45s; }

.pillar {
  position: absolute;
  width: clamp(270px, 30vw, 400px);
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.pillar:hover {
  border-color: var(--civic-purple);
  background: var(--bg-hover);
  transform: translateY(-2px);
}
.pillar-glyph {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--civic-purple);
  letter-spacing: 0.05em;
}
.pillar-title {
  font-family: var(--mono);
  font-size: clamp(23px, 1.9vw, 28px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text-primary);
}
.pillar-body {
  font-family: var(--sans);
  font-size: clamp(19px, 1.45vw, 22px);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.pillar--tl { top: clamp(16px, 3vh, 40px);  left:  clamp(20px, 4%, 80px); }
.pillar--tr { top: clamp(16px, 3vh, 40px);  right: clamp(20px, 4%, 80px); }
.pillar--bl { bottom: clamp(16px, 3vh, 40px); left:  clamp(20px, 4%, 80px); }
.pillar--br { bottom: clamp(16px, 3vh, 40px); right: clamp(20px, 4%, 80px); }

/* ============================================================
   SLIDE 4 — GUARDRAILS
   ============================================================ */
.guardrails-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 3vw, 56px);
  margin-top: clamp(8px, 1vh, 16px);
  align-items: start;
}
.steps { display: flex; flex-direction: column; gap: 20px; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--civic-slate);
}
.step:first-child { border-top: 1px solid var(--border-accent); }
.step-num {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 300;
  color: var(--civic-purple);
  line-height: 1;
}
.step-title {
  font-family: var(--mono);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.step-body p {
  font-family: var(--sans);
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* terminal window */
.terminal {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(124, 59, 237, 0.06),
              0 20px 60px rgba(0, 0, 0, 0.4);
}
.terminal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--civic-slate);
}
.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-accent);
}
.terminal-dot:nth-child(1) { background: #3A2A44; }
.terminal-dot:nth-child(2) { background: #3A3A2A; }
.terminal-dot:nth-child(3) { background: #2A3A2A; }
.terminal-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.terminal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: clamp(12px, 1vw, 14px);
}
.terminal-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--civic-slate);
  background: var(--bg-card);
}
.terminal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--civic-slate);
  color: var(--text-primary);
  vertical-align: middle;
}
.terminal-table tbody tr:last-child td { border-bottom: 0; }
.terminal-table code {
  font-family: var(--mono);
  color: var(--text-primary);
  background: transparent;
}
.terminal-table tr[data-row-state="block"] td {
  background: linear-gradient(90deg, var(--block-bg) 0%, transparent 40%);
  border-left: 2px solid var(--block);
}
.terminal-table tr[data-row-state="block"] td:not(:first-child) {
  border-left: 0;
}
.terminal-table tr[data-row-state="ok"] td:first-child {
  border-left: 2px solid transparent;
}

/* row stream-in */
.terminal-table tbody tr {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.slide.is-active .terminal-table tbody tr { opacity: 1; transform: translateY(0); }
.slide.is-active .terminal-table tbody tr:nth-child(1) { transition-delay: 0.05s; }
.slide.is-active .terminal-table tbody tr:nth-child(2) { transition-delay: 0.18s; }
.slide.is-active .terminal-table tbody tr:nth-child(3) { transition-delay: 0.31s; }
.slide.is-active .terminal-table tbody tr:nth-child(4) { transition-delay: 0.44s; }

/* chips */
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.chip--ok { color: var(--ok); background: var(--ok-bg); }
.chip--block {
  color: var(--block);
  background: var(--block-bg);
  animation: block-pulse 2.5s ease-in-out infinite;
}
@keyframes block-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 67, 67, 0); }
  50% { box-shadow: 0 0 0 4px rgba(239, 67, 67, 0.12); }
}

.terminal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}
.terminal-wrap .terminal { width: 100%; }
.mascot--guardrails {
  position: relative;
  width: clamp(110px, 12vw, 150px);
  margin-right: clamp(-8px, -0.5vw, 0px);
  filter: drop-shadow(0 0 24px var(--civic-purple-glow));
  animation: mascot-float 6s ease-in-out infinite;
}
.mascot--guardrails img { width: 100%; height: auto; image-rendering: auto; }

/* ============================================================
   SLIDE 5 — VISIBILITY / LOG
   ============================================================ */
.log {
  margin-top: 4px;
  width: 100%;
}
.log-table th, .log-table td { white-space: nowrap; }
.log-table th:nth-child(2), .log-table td:nth-child(2) { white-space: normal; }
.log-table tbody tr:hover td { background: var(--bg-hover); }

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(12px, 2vh, 24px);
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.feature:hover {
  border-color: var(--civic-purple);
  background: var(--bg-hover);
  transform: translateY(-2px);
}
.feature-glyph {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--civic-purple);
  letter-spacing: 0.05em;
}
.feature h3 {
  font-family: var(--mono);
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text-primary);
}
.feature p {
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================
   SLIDE 6 — CONTROL / KILL SWITCH
   ============================================================ */
.control-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  margin-top: 4px;
}
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature--card {
  padding: 22px;
  min-height: 180px;
}
.feature--card h3 { font-size: clamp(16px, 1.2vw, 18px); }

.mascot--control {
  width: clamp(180px, 20vw, 280px);
  filter: drop-shadow(0 0 32px rgba(239, 67, 67, 0.35));
  animation: mascot-shudder 4s ease-in-out infinite;
}
@keyframes mascot-shudder {
  0%, 92%, 100% { transform: translateX(0); }
  94% { transform: translateX(-2px); }
  96% { transform: translateX(2px); }
  98% { transform: translateX(-1px); }
}

.scope-strip {
  margin-top: clamp(12px, 2vh, 20px);
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}
.scope-label {
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 8px;
}
.scope-chip {
  padding: 4px 10px;
  border: 1px solid var(--civic-slate);
  border-radius: 3px;
  color: var(--civic-purple);
  background: var(--ok-bg);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.scope-chip:hover { background: var(--bg-hover); border-color: var(--civic-purple); }
.scope-sep { color: var(--text-muted); }

/* ============================================================
   SLIDE 7 — AUTH
   ============================================================ */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  margin-top: 4px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.auth-card:hover {
  border-color: var(--civic-purple);
  transform: translateY(-2px);
}
.auth-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--civic-slate);
  flex-wrap: wrap;
}
.auth-tag {
  font-family: var(--mono);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--civic-purple);
}
.auth-time {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.auth-list { display: flex; flex-direction: column; gap: 12px; }
.auth-list li {
  font-family: var(--sans);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--text-primary);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.auth-mark {
  font-family: var(--mono);
  color: var(--civic-purple);
  flex: 0 0 auto;
  font-weight: 600;
}
.auth-footer {
  margin-top: clamp(16px, 3vh, 32px);
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: clamp(13px, 1.1vw, 16px);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.auth-footer-key { color: var(--civic-purple); font-weight: 600; }
.auth-footer-arrow { color: var(--text-muted); }

/* ============================================================
   SLIDE 8 — GET STARTED
   ============================================================ */
.started-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: stretch;
  margin-top: clamp(12px, 2vh, 24px);
}
.started-step {
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.started-step:hover {
  border-color: var(--civic-purple);
  transform: translateY(-2px);
}
.started-num {
  font-family: var(--mono);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 300;
  color: var(--civic-purple);
  line-height: 1;
}
.started-title {
  font-family: var(--mono);
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text-primary);
}
.started-step p {
  font-family: var(--sans);
  font-size: clamp(16.5px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.started-step code {
  color: var(--civic-purple);
  font-size: 0.92em;
  background: var(--ok-bg);
  padding: 1px 6px;
  border-radius: 3px;
}
.started-meta {
  font-family: var(--mono) !important;
  font-size: clamp(14px, 1.05vw, 16px) !important;
  color: var(--text-muted) !important;
  margin-top: auto !important;
  padding-top: 12px;
  border-top: 1px dashed var(--civic-slate);
  letter-spacing: 0.03em;
}
.started-meta .arrow { color: var(--civic-purple); }

.started-connector {
  align-self: center;
  height: 1px;
  width: 100%;
  background: var(--civic-slate);
  position: relative;
}
.started-connector span {
  position: absolute;
  inset: 0;
  background: var(--civic-purple);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s var(--ease) 0.2s;
}
.slide--started.is-active .started-connector span { transform: scaleX(1); }
.slide--started.is-active .started-connector:nth-of-type(2) span { transition-delay: 0.45s; }

/* ============================================================
   SLIDE 9 — ECOSYSTEM
   ============================================================ */
.eco-stage {
  position: relative;
  /* dynamic sizing: fit within viewport height, capped at 1080px wide.
     calc(55dvh * 9/5) = max width that keeps height ≤ 55% of viewport. */
  width: min(100%, 1080px, calc(55dvh * 9 / 5));
  margin: clamp(6px, 1vh, 14px) auto 0;
  aspect-ratio: 9 / 5;
  min-height: 340px;
}
.eco-mascot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(14vw, 16dvh, 180px);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 36px var(--civic-purple-glow));
  animation: mascot-float-centered 7s ease-in-out infinite;
}
.eco-lines {
  display: none;
}
.eco-lines .tentacle {
  fill: none;
  stroke: var(--civic-purple);
  stroke-width: 1.25;
  opacity: 0.4;
  stroke-linecap: round;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  transition: stroke-dashoffset 1s var(--ease);
}
.slide--ecosystem.is-active .eco-lines .tentacle { stroke-dashoffset: 0; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(1) { transition-delay: 0.05s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(2) { transition-delay: 0.12s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(3) { transition-delay: 0.19s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(4) { transition-delay: 0.26s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(5) { transition-delay: 0.33s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(6) { transition-delay: 0.40s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(7) { transition-delay: 0.47s; }
.slide--ecosystem.is-active .eco-lines .tentacle:nth-child(8) { transition-delay: 0.54s; }
.eco-mascot img { width: 100%; height: auto; }

.eco-tile {
  position: absolute;
  /* dynamic: shrink on smaller viewports (esp. narrow-height laptops) */
  width: clamp(170px, min(18vw, 22dvh), 240px);
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: clamp(10px, 1.2dvh, 16px) clamp(12px, 1.2vw, 18px);
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6dvh, 8px);
  z-index: 2;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.eco-tile:hover {
  border-color: var(--civic-purple);
  background: var(--bg-hover);
  transform: translate(-50%, calc(-50% - 2px));
}
.eco-tile h3 {
  font-family: var(--mono);
  font-size: clamp(13px, min(1.15vw, 1.7dvh), 17px);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--civic-purple);
  text-transform: lowercase;
}
.eco-tile ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.eco-tile li {
  font-family: var(--mono);
  font-size: clamp(11px, min(0.95vw, 1.5dvh), 15px);
  padding: 3px 8px;
  border: 1px solid var(--civic-slate);
  border-radius: 3px;
  color: var(--text-secondary);
  background: var(--bg-surface);
}
/* compass rose: 8 tiles arranged clockwise around Vic at center */
.eco-tile--1 { top:  6%; left: 50%; }   /* N  — 12 o'clock */
.eco-tile--2 { top: 22%; left: 83%; }   /* NE —  1–2 */
.eco-tile--3 { top: 50%; left: 92%; }   /* E  —  3 */
.eco-tile--4 {
  top: 78%;
  left: 81%;
  width: clamp(210px, min(22vw, 26dvh), 290px);
}   /* SE —  4–5  (wider for "payments & crm") */
.eco-tile--5 { top: 94%; left: 50%; }   /* S  —  6 */
.eco-tile--6 { top: 78%; left: 17%; }   /* SW —  7–8 */
.eco-tile--7 {
  top: 50%;
  left: 10%;
  width: clamp(210px, min(22vw, 26dvh), 290px);
}   /* W  —  9  (wider for "infrastructure" + longer vendor names) */
.eco-tile--8 { top: 22%; left: 17%; }   /* NW — 10–11 */

/* slide 9 — scrolling logos watermark: rose-height, full slide width, seamless loop */
.eco-watermark {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  mask-image: linear-gradient(to right,
    transparent 0%,
    rgba(0, 0, 0, 1) 8%,
    rgba(0, 0, 0, 1) 92%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    rgba(0, 0, 0, 1) 8%,
    rgba(0, 0, 0, 1) 92%,
    transparent 100%);
}
.eco-watermark-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: eco-watermark-scroll 60s linear infinite;
  will-change: transform;
}
.eco-watermark-track img {
  display: block;
  height: 100%;
  width: auto;
  flex-shrink: 0;
  user-select: none;
}
@keyframes eco-watermark-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.slide--ecosystem .slide-inner { gap: clamp(10px, 1.4dvh, 18px); }
.slide--ecosystem .heading { font-size: clamp(1.4rem, min(3vw, 3.5dvh), 2.6rem); }
.slide--ecosystem .subheading { font-size: clamp(0.95rem, min(1.2vw, 1.6dvh), 1.2rem); }

.eco-footer {
  margin-top: clamp(8px, 1.6dvh, 20px);
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.eco-big {
  font-family: var(--mono);
  font-size: clamp(20px, min(2.8vw, 3.8dvh), 40px);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.eco-sub {
  font-family: var(--sans);
  font-size: clamp(13px, min(1.05vw, 1.5dvh), 17px);
  color: var(--text-secondary);
}
.eco-sub a { color: var(--civic-purple); border-bottom: 1px solid currentColor; }

/* ============================================================
   SLIDE 10 — CTA
   ============================================================ */
.slide--cta .slide-inner {
  gap: clamp(20px, 3vh, 40px);
}
.display--cta {
  font-size: clamp(3rem, 10vw, 8rem);
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: clamp(12px, 2vh, 24px);
}
.cta-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 2.5vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.cta-card:hover {
  border-color: var(--civic-purple);
  transform: translateY(-3px);
  background: var(--bg-hover);
}
.cta-card--primary {
  background: var(--civic-purple);
  border-color: var(--civic-purple);
  color: #fff;
}
.cta-card--primary:hover {
  background: var(--civic-purple-dim);
  border-color: var(--civic-purple-dim);
  transform: translateY(-3px);
}
.cta-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.7;
}
.cta-card--primary .cta-label { opacity: 0.85; }
.cta-url {
  font-family: var(--mono);
  font-size: clamp(20px, 2.15vw, 28px);
  font-weight: 500;
  color: inherit;
  letter-spacing: -0.01em;
}
.cta-url .arrow {
  display: inline-block;
  transition: transform var(--t-fast);
  margin-left: 4px;
}
.cta-card:hover .cta-url .arrow { transform: translateX(4px); }
.cta-meta {
  font-family: var(--mono);
  font-size: clamp(14px, 1.05vw, 16px);
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--civic-slate);
  letter-spacing: 0.02em;
}
.cta-card--primary .cta-meta {
  color: rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 0.2);
}

.cta-footer {
  margin-top: auto;
  padding-top: clamp(20px, 4vh, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: clamp(15px, 1.15vw, 18px);
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 14px;
}
.cta-contact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cta-contact a { color: var(--text-primary); border-bottom: 1px solid var(--civic-slate); transition: border-color var(--t-fast); }
.cta-contact a:hover { border-bottom-color: var(--civic-purple); }
.cta-role { color: var(--text-muted); }

/* ============================================================
   reveal / entrance animations
   ============================================================ */
[data-reveal], [data-reveal-line] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.slide.is-active [data-reveal],
.slide.is-active [data-reveal-line] {
  opacity: 1;
  transform: translateY(0);
}
.slide.is-active [data-reveal]:nth-of-type(2) { transition-delay: 0.08s; }
.slide.is-active [data-reveal]:nth-of-type(3) { transition-delay: 0.16s; }
.slide.is-active [data-reveal]:nth-of-type(4) { transition-delay: 0.24s; }
.slide.is-active [data-reveal]:nth-of-type(5) { transition-delay: 0.32s; }

/* word-by-word reveal on display headlines */
.display-word {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.slide.is-active .display-word { opacity: 1; transform: translateY(0); }
.slide.is-active .display-line .display-word:nth-child(1) { transition-delay: 0.04s; }
.slide.is-active .display-line .display-word:nth-child(2) { transition-delay: 0.14s; }
.slide.is-active .display-line:nth-of-type(2) .display-word:nth-child(1) { transition-delay: 0.24s; }
.slide.is-active .display-line:nth-of-type(2) .display-word:nth-child(2) { transition-delay: 0.34s; }

/* ============================================================
   overview mode
   ============================================================ */
html.overview { scroll-snap-type: none; overflow: auto; }
html.overview body { padding: 24px; }
html.overview .chrome, html.overview .toast, html.overview .notes { display: none; }
html.overview .deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
html.overview .slide {
  min-height: 260px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--civic-slate);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color var(--t-fast), transform var(--t-fast);
  transform: scale(1);
  overflow: hidden;
}
html.overview .slide:hover { border-color: var(--civic-purple); transform: translateY(-3px); }
html.overview .slide-inner {
  transform: scale(0.28);
  transform-origin: top left;
  width: 357%;
  height: 357%;
  pointer-events: none;
}
html.overview .mascot, html.overview .arch-mascot, html.overview .eco-mascot { opacity: 0.5; }

/* ============================================================
   presenter notes panel
   ============================================================ */
.notes {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--civic-slate);
  padding: 16px 24px;
  max-height: 32vh;
  overflow-y: auto;
  z-index: 55;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
}
.notes.is-visible { transform: translateY(0); }
.notes-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.notes-counter { color: var(--civic-purple); }
.notes [data-notes-close] {
  margin-left: auto;
  font-size: 18px;
  color: var(--text-secondary);
  padding: 0 6px;
}
.notes [data-notes-close]:hover { color: var(--civic-purple); }

/* the in-slide <aside data-notes> is always hidden */
[data-notes] { display: none; }

/* ============================================================
   live / letterbox mode
   ============================================================ */
html.live {
  background: #000;
  scroll-snap-type: y mandatory;
}
html.live body {
  max-width: 177.77vh; /* 16:9 */
  margin: 0 auto;
  background: var(--civic-dark);
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  html { scroll-behavior: auto; }
  .kicker .caret { animation: none; opacity: 1; }
  [data-reveal], [data-reveal-line], .display-word,
  .terminal-table tbody tr { opacity: 1; transform: none; }
  .arch-lines .tentacle { stroke-dashoffset: 0 !important; }
  .started-connector span { transform: scaleX(1) !important; }
  .chip--block { animation: none; }
  .mascot--hero, .arch-mascot, .mascot--control, .eco-mascot { animation: none; }
}

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 900px) {
  .dots { display: none; }
  .compare { grid-template-columns: 1fr; }
  .compare-divider { display: none; }
  .guardrails-grid { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; }
  .controls { grid-template-columns: 1fr; }
  .mascot--control { justify-self: center; }
  .auth-grid { grid-template-columns: 1fr; }
  .started-grid { grid-template-columns: 1fr; }
  .started-connector { display: none; }
  .features-row { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .eco-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, auto);
    aspect-ratio: auto;
    min-height: 0;
    gap: 12px;
  }
  .eco-lines { display: none; }
  .eco-mascot {
    position: static;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    transform: none;
    animation: none;
  }
  .eco-tile {
    position: static;
    width: auto;
    transform: none;
  }
  .eco-tile:hover { transform: translateY(-2px); }
  .eco-tile--1 { grid-column: 1; grid-row: 2; }
  .eco-tile--2 { grid-column: 2; grid-row: 2; }
  .eco-tile--3 { grid-column: 1; grid-row: 3; }
  .eco-tile--4 { grid-column: 2; grid-row: 3; }
  .eco-tile--5 { grid-column: 1; grid-row: 4; }
  .eco-tile--6 { grid-column: 2; grid-row: 4; }
  .eco-tile--7 { grid-column: 1; grid-row: 5; }
  .eco-tile--8 { grid-column: 2; grid-row: 5; }
  .arch-stage { aspect-ratio: auto; min-height: 70vh; }
  .pillar { position: static; width: 100%; }
  .arch-mascot, .arch-lines { display: none; }
  .architecture { }
  .arch-stage { display: grid; grid-template-columns: 1fr; gap: 12px; }
}

/* ============================================================
   print / PDF export
   ============================================================ */
@media print {
  html, body { background: var(--civic-dark) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html { scroll-snap-type: none !important; }
  .chrome, .toast, .notes, .help { display: none !important; }
  .slide {
    min-height: auto;
    height: 1080px;
    width: 1920px;
    page-break-after: always;
    page-break-inside: avoid;
  }
  .slide:last-child { page-break-after: auto; }
  [data-reveal], [data-reveal-line], .display-word,
  .terminal-table tbody tr { opacity: 1 !important; transform: none !important; }
  .arch-lines .tentacle { stroke-dashoffset: 0 !important; }
  .started-connector span { transform: scaleX(1) !important; }
}
@page { size: 1920px 1080px; margin: 0; }
