/* ============================================================
   johnx Design System — reveal.js theme  (slides surface)
   Grounded in johnx-design-system/project/colors_and_type.css.
   A new "slides" surface, sibling to research-notes + dashboard.
   Paper light by default; .dark sections invert to ink.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ---------- Tokens (subset lifted verbatim from colors_and_type.css) ---------- */
:root {
  --paper-50:#ffffff; --paper-100:#f8f8f6; --paper-200:#ededea; --paper-300:#ededea;
  --paper-400:#e6e6e2; --paper-500:#dcdcd8; --paper-600:#d4d4d0;
  --ink-50:#eae7e2; --ink-100:#8a8680; --ink-200:#6d6a65; --ink-300:#2a2a2a;
  --ink-400:#1b1b1b; --ink-500:#111111; --ink-600:#1a1a1a; --ink-700:#1f1f1f;
  --slate-300:#c4cad0; --slate-500:#6d7782; --slate-600:#525a64; --sage-500:#6b7a72;

  /* ink dark by default — coheres with the co-speakers' decks; orange accent */
  --accent:#ee9540;
  --background:#1e1e1e; --foreground:var(--ink-50);
  --card:#1a1a1a; --muted-foreground:var(--ink-100);
  --primary:var(--accent); --border:#2f2d2a;
  --meridian:#3a3833; --meridian-accent:var(--accent);
  --entry-divider:#2a2a2a; --hair:#2a2a2a;

  /* priority / status hues (near-monochrome, used sparingly) */
  --p0:#b54d4d; --p1:#b58a4d; --p2:#8a8a82; --p3:#c4c4be;
  --hue-good:#6e8a72; --hue-warn:#9a8e7a;

  --radius:0.5rem; --radius-sm:4px; --radius-md:6px; --radius-lg:8px; --radius-full:9999px;

  --font-display:"Source Serif 4","Source Serif Pro","Georgia",serif;
  --font-sans:"Inter",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --font-mono:"JetBrains Mono","Menlo",ui-monospace,monospace;

  --tracking-tight:-0.015em; --tracking-eyebrow:0.2em;
}

/* dark section override — now identical to the base ink surface */
.reveal section.dark {
  --paper-50:#1a1a1a; --paper-200:#1f1f1f;
}

/* ============================================================
   Reveal frame
   ============================================================ */
.reveal-viewport { background:var(--background); }
.reveal {
  font-family:var(--font-sans);
  font-size:33px;                 /* lifted for projection legibility from across a room */
  color:var(--foreground);
  -webkit-font-smoothing:antialiased;
}

/* per-slide surface colour (so .dark sections paint their own bg) */
.reveal .slides > section,
.reveal .slides > section > section { background:var(--background); }

/* Left-aligned editorial layout — the system is single-column, never centred chrome */
.reveal .slides { text-align:left; }
.reveal .slides section {
  top:0 !important;
  height:100%;
  box-sizing:border-box;
  padding:88px 92px 80px 104px;   /* left gutter leaves room for the meridian */
  display:flex; flex-direction:column; justify-content:center;
  overflow:hidden;                /* clip the meridian's lower fade at the slide edge */
}
.reveal .slides section.top { justify-content:flex-start; }

/* ---------- The meridian (the one true motif) ---------- */
/* Anchored to the main title: the hollow-ring origin dot sits at the title's
   vertical centre, and a 1px line descends from it, fading out like a
   fountain-pen rule running dry. Geometry mirrors .rn-compass. */
.reveal .slides section:not(.no-meridian) > h1,
.reveal .slides section:not(.no-meridian) > h2 { position:relative; }

.reveal .slides section:not(.no-meridian) > h1::before,
.reveal .slides section:not(.no-meridian) > h2::before {
  content:""; position:absolute; left:-53px; top:0.56em; transform:translateY(-50%);
  width:9px; height:9px; border-radius:50%; border:1px solid var(--meridian-accent);
  background:radial-gradient(circle, var(--meridian-accent) 0%, var(--meridian-accent) 30%, transparent 32%, transparent 100%);
}
/* the rule starts exactly at the ring's lower edge (4.5px radius + 1px border) */
.reveal .slides section:not(.no-meridian) > h1::after,
.reveal .slides section:not(.no-meridian) > h2::after {
  content:""; position:absolute; left:-48px; top:calc(0.56em + 5.5px); width:1px; height:560px;
  background:linear-gradient(to bottom, var(--meridian) 0%, var(--meridian) 62%, transparent 100%);
}

/* ============================================================
   Typography
   ============================================================ */
.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  font-family:var(--font-display); color:var(--foreground);
  text-transform:none; text-shadow:none; margin:0 0 0.4em; text-wrap:balance;
  letter-spacing:var(--tracking-tight); line-height:1.12; font-weight:500;
}
.reveal h1 { font-size:2.1em; font-weight:400; }
.reveal h2 { font-size:1.5em; }
.reveal h3 { font-size:1.12em; font-weight:600; }
.reveal p, .reveal li { line-height:1.5; }
.reveal .lede { font-size:1.18em; color:var(--foreground); max-width:54ch; font-weight:400; line-height:1.4; }
/* Definition: the key statement on a concept slide, set apart as a quiet quote. */
.reveal p.definition {
  font-family:var(--font-display);
  font-style:italic;
  font-weight:400;
  font-size:1.2em;
  line-height:1.4;
  color:var(--foreground);
  max-width:36ch;
  border-left:2px solid var(--meridian-accent);
  padding-left:24px;
}
.reveal strong { font-weight:600; color:var(--foreground); }
.reveal em { font-style:italic; }

/* Eyebrow — tiny sans small-caps marginalia */
.reveal .eyebrow {
  font-family:var(--font-sans); font-size:0.7em; font-weight:600;
  font-variant:small-caps; text-transform:lowercase;
  letter-spacing:var(--tracking-eyebrow); color:var(--muted-foreground);
  margin:0 0 0.7em;
}

.reveal .muted { color:var(--muted-foreground); }
.reveal .small { font-size:0.82em; }
.reveal .fine { font-size:0.62em; color:var(--muted-foreground); }   /* true fine print: sources, attributions */

/* Lists — restrained, marker in muted */
.reveal ul, .reveal ol { margin:0.2em 0 0; padding-left:1.1em; }
.reveal ul { list-style:none; padding-left:0; }
.reveal ul > li { position:relative; padding-left:1.1em; margin:0.42em 0; }
.reveal ul > li::before {
  content:""; position:absolute; left:0; top:0.62em; width:5px; height:5px;
  border-radius:50%; background:var(--muted-foreground); opacity:0.5;
}
.reveal ol { counter-reset:li; }
.reveal ol > li { margin:0.42em 0; }

/* Links */
.reveal a { color:var(--primary); text-decoration:underline;
  text-decoration-color:color-mix(in oklab, var(--primary) 30%, transparent);
  text-underline-offset:2px; transition:text-decoration-color .15s; }
.reveal a:hover { color:var(--primary); text-decoration-color:var(--primary); }

/* Code — JetBrains Mono on paper-200, hairline border, 6px radius */
.reveal code { font-family:var(--font-mono); font-size:0.82em;
  background:var(--paper-200); border:1px solid var(--border);
  padding:0.08em 0.4em; border-radius:var(--radius-sm); color:var(--foreground); }
.reveal pre { width:100%; box-shadow:none; font-size:0.6em; margin:0.6em 0; }
.reveal pre code { display:block; padding:18px 20px; border-radius:var(--radius-lg);
  border:1px solid var(--border); background:var(--paper-200); line-height:1.5;
  overflow:visible; max-height:none; }

.reveal blockquote {
  font-family:var(--font-display); font-style:italic; font-size:1.05em;
  color:var(--foreground); background:none; box-shadow:none; width:auto;
  border-left:1px solid var(--meridian); padding:0.1em 0 0.1em 20px; margin:0.6em 0;
}
.reveal blockquote .attrib { display:block; font-family:var(--font-sans);
  font-style:normal; font-size:0.7em; color:var(--muted-foreground); margin-top:0.5em; }

/* ============================================================
   Components (lifted from dashboard kit.css idioms)
   ============================================================ */

/* Pills — rounded-full, 1px border. Examples ride these (use .no-dot). */
.reveal .pill {
  display:inline-flex; align-items:center; gap:8px; padding:6px 17px;
  font-family:var(--font-sans); font-size:0.78em; font-weight:500; letter-spacing:0.01em;
  border-radius:var(--radius-full); border:1px solid var(--border);
  background:var(--paper-50); color:var(--foreground); white-space:nowrap;
}
.reveal .pill::before { content:""; width:6px; height:6px; border-radius:50%;
  background:var(--primary); opacity:0.7; }
.reveal .pill.no-dot::before { display:none; }
.reveal .pill-row { display:flex; flex-wrap:wrap; gap:12px; margin:0.6em 0; }

/* Phase chip — mono, for the demo arc */
.reveal .phase-chip { font-family:var(--font-mono); font-size:0.55em; font-weight:500;
  color:var(--muted-foreground); letter-spacing:0.04em; }

/* Date / meta — sans small-caps (never mono) */
.reveal .date { font-family:var(--font-sans); font-variant:small-caps;
  text-transform:lowercase; letter-spacing:0.08em; color:var(--muted-foreground);
  font-size:0.7em; }

/* Two-column split */
.reveal .cols { display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:start; }
.reveal .cols-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; align-items:start; }

/* Card — border + lifted paper, no shadow */
.reveal .card { border:1px solid var(--border); background:var(--paper-50);
  border-radius:var(--radius-lg); padding:18px 20px; }
.reveal .card h3 { margin-bottom:0.25em; }
.reveal .card .sub { font-size:0.72em; color:var(--muted-foreground); line-height:1.5; }

/* Numbered principle row (kit.html idiom) */
.reveal .principle { display:flex; gap:20px; padding:18px 0; border-bottom:1px solid var(--border); align-items:baseline; }
.reveal .principle .num { font-family:var(--font-display); font-size:1.25em;
  color:var(--accent); width:38px; flex-shrink:0; font-variant:tabular-nums; }
.reveal .principle h3 { font-size:0.92em; font-weight:500; margin:0 0 2px; font-family:var(--font-sans); line-height:1.35; max-width:46ch; }
.reveal .principle p { font-size:0.78em; color:var(--muted-foreground); line-height:1.5; margin:0; }

/* Clip placeholder — 16:9 framed slot for the demo recordings */
.reveal .clip {
  width:100%; aspect-ratio:16/9; border:1px solid var(--border);
  border-radius:var(--radius-lg); background:var(--paper-200);
  display:flex; align-items:center; justify-content:center;
  color:var(--muted-foreground); font-family:var(--font-mono); font-size:0.6em;
  letter-spacing:0.04em; position:relative;
}
.reveal .clip::before { content:"▶"; margin-right:10px; opacity:0.6; }
.reveal .clip.is-set { background:#000; border-color:#000; }
.reveal .clip video { width:100%; height:100%; border-radius:var(--radius-lg); object-fit:contain; }
.reveal .clip img { width:100%; height:100%; border-radius:var(--radius-lg); object-fit:contain; }
/* framed screenshot — shorter box so the full image shows and the caption stays on-slide */
.reveal .clip.shot { height:348px; aspect-ratio:auto; background:var(--paper-100);
  border:1px solid var(--border); padding:10px; }
.reveal .clip.shot::before { display:none; }
.reveal .clip.shot img { width:auto; max-width:100%; height:100%; object-fit:contain;
  border-radius:var(--radius-md); }
/* embedded video clip */
.reveal .clip.video { aspect-ratio:16/9; }
.reveal .clip.video::before { display:none; }
.reveal .clip iframe { width:100%; height:100%; border:0; border-radius:var(--radius-lg); }

/* Hairline rule */
.reveal hr { border:none; border-top:1px solid var(--hair); margin:0.6em 0; }

/* Status dot (priority / ceiling-floor signalling) */
.reveal .dot { display:inline-block; width:8px; height:8px; border-radius:50%;
  vertical-align:middle; margin-right:8px; }
.reveal .dot.good { background:var(--hue-good); }
.reveal .dot.warn { background:var(--p1); }
.reveal .dot.bad  { background:var(--p0); }

/* Agent-loop diagram — cells light up amber in sync with the step fragments. */
.reveal .loop-diagram { width:min(100%, 640px); margin:0.3em 0 0; }
.reveal .loop-diagram svg { width:100%; height:auto; display:block; }
.reveal .loop-diagram .cell { transition:stroke .3s ease, fill .3s ease, fill-opacity .3s ease; }
.reveal .loop-diagram .cell.on { stroke:#f2b25c; stroke-width:3; }
.reveal .loop-diagram .cell.on:not(.frame) { fill:#f2b25c; fill-opacity:0.18; }

/* ============================================================
   Title & section slides
   ============================================================ */
.reveal section.cover h1 { font-size:2.6em; }
.reveal section.cover .eyebrow { font-size:0.72em; }
.reveal section.section-divider h1 { font-size:2.3em; }
.reveal section.section-divider .index { font-family:var(--font-mono);
  font-size:0.6em; color:var(--muted-foreground); letter-spacing:0.04em; }

/* Big number / stat */
.reveal .stat { font-family:var(--font-display); font-size:3.2em; font-weight:400;
  line-height:1; letter-spacing:var(--tracking-tight); }
.reveal .stat-label { font-size:0.72em; color:var(--muted-foreground); }

/* ============================================================
   Running footer + slide number
   ============================================================ */
.reveal .deck-footer {
  position:fixed; bottom:20px; right:110px; z-index:30;   /* tucked beside the slide number, clear of slide content */
  font-family:var(--font-sans); font-variant:small-caps; text-transform:lowercase;
  letter-spacing:0.12em; font-size:14px; color:var(--muted-foreground);
}
.reveal .slide-number { background:none; color:var(--muted-foreground);
  font-family:var(--font-mono); font-size:13px; right:32px; bottom:20px; }

/* progress + controls in slate */
.reveal .progress { color:var(--primary); height:2px; }
.reveal .controls { color:var(--primary); }

/* fragments: keep it still — fade only, matching system restraint */
.reveal .fragment.fade-in { transition:opacity .25s ease; }

/* ============================================================
   Build-arc timeline — the Surveyor "built in a day" slide.
   A horizontal bar, segments sized by flex-grow = working minutes;
   planning in slate, build in sage, breaks hatched; pins above mark
   course-corrections. Paired stat strip for the payoff slide.
   ============================================================ */
.reveal .tl { position:relative; margin:2.4em 0 0.2em; }

/* pin band — reserved space above the bar so nothing collides with the title */
.reveal .tl-pinband { position:relative; height:130px; }
.reveal .tl-pin { position:absolute; bottom:0; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; width:140px; }
.reveal .tl-pin .lbl { font-family:var(--font-sans); font-size:0.45em; font-weight:500;
  line-height:1.26; color:var(--foreground); text-align:center;
  background:var(--paper-50); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:5px 9px; }
.reveal .tl-pin .lbl .dot { width:7px; height:7px; margin-right:5px; }
.reveal .tl-pin .stem { width:1px; background:var(--meridian-accent); opacity:0.55; }
.reveal .tl-pin.hi .stem { height:58px; }
.reveal .tl-pin.lo .stem { height:11px; }

/* the bar: phases + gaps, widths proportional via flex-grow */
.reveal .tl-bar { display:flex; height:62px; align-items:stretch; }
.reveal .tl-seg { position:relative; min-width:0; border-radius:var(--radius-md);
  display:flex; flex-direction:column; justify-content:center;
  padding:0 13px; overflow:hidden; margin:0 2px; }
.reveal .tl-seg .pn { font-family:var(--font-mono); font-size:0.42em; font-weight:600;
  letter-spacing:0.04em; opacity:0.6; line-height:1; }
.reveal .tl-seg .nm { font-family:var(--font-sans); font-size:0.5em; font-weight:600;
  line-height:1.1; margin-top:4px; white-space:nowrap; }
.reveal .tl-seg .dur { font-family:var(--font-sans); font-size:0.44em; font-weight:500;
  font-variant:tabular-nums; opacity:0.62; margin-top:3px; white-space:nowrap; }
/* planning = slate (cool); build = sage (warm-green) */
.reveal .tl-seg.plan { background:color-mix(in oklab, var(--slate-500) 24%, var(--paper-50));
  border:1px solid color-mix(in oklab, var(--slate-500) 50%, transparent); color:var(--ink-400); }
.reveal .tl-seg.build { background:color-mix(in oklab, var(--sage-500) 32%, var(--paper-50));
  border:1px solid color-mix(in oklab, var(--sage-500) 60%, transparent); color:var(--ink-400); }
/* gaps — not work: hatched, light, label only when wide */
.reveal .tl-seg.gap { background:repeating-linear-gradient(-45deg, transparent 0 5px,
    color-mix(in oklab, var(--ink-200) 13%, transparent) 5px 6px);
  border:1px dashed var(--border); align-items:center; justify-content:center; padding:0 4px; }
.reveal .tl-seg.gap .g { font-family:var(--font-sans); font-size:0.44em; font-weight:500;
  color:var(--muted-foreground); white-space:nowrap; letter-spacing:0.02em; }

.reveal .tl-axis { display:flex; justify-content:space-between; margin-top:8px;
  font-family:var(--font-sans); font-variant:small-caps; text-transform:lowercase;
  letter-spacing:0.06em; font-size:0.5em; color:var(--muted-foreground); }

.reveal .tl-legend { display:flex; gap:24px; flex-wrap:wrap; margin-top:1.9em;
  font-family:var(--font-sans); font-size:0.6em; color:var(--muted-foreground); align-items:center; }
.reveal .tl-legend .sw { display:inline-block; width:22px; height:11px; border-radius:3px;
  margin-right:7px; vertical-align:middle; }
.reveal .tl-legend .sw.plan { background:color-mix(in oklab, var(--slate-500) 30%, var(--paper-50));
  border:1px solid color-mix(in oklab, var(--slate-500) 45%, transparent); }
.reveal .tl-legend .sw.build { background:color-mix(in oklab, var(--sage-500) 34%, var(--paper-50));
  border:1px solid color-mix(in oklab, var(--sage-500) 50%, transparent); }
.reveal .tl-legend .item { white-space:nowrap; }

/* phase-span brackets under the bar — | Planning | Implementation | */
.reveal .tl-spans { display:flex; margin-top:14px; }
.reveal .tl-spans .sp { position:relative; margin:0 2px; }
.reveal .tl-spans .sp.lab { border-top:1px solid var(--meridian-accent); padding-top:10px;
  text-align:center; font-family:var(--font-sans); font-size:0.58em; color:var(--muted-foreground); }
.reveal .tl-spans .sp.lab::before, .reveal .tl-spans .sp.lab::after {
  content:""; position:absolute; top:-5px; width:1px; height:5px; background:var(--meridian-accent); }
.reveal .tl-spans .sp.lab::before { left:0; }
.reveal .tl-spans .sp.lab::after { right:0; }

/* stat strip + compact principle rows (the "what got built" payoff slide) */
.reveal .statstrip { display:flex; gap:60px; flex-wrap:wrap; margin-top:0.7em; }
.reveal .statstrip .s .stat { font-size:2.7em; }
.reveal .statstrip .s .stat-label { display:block; margin-top:6px; max-width:15ch;
  line-height:1.3; font-size:0.72em; }
.reveal .compact .principle { padding:11px 0; }
.reveal .compact .principle p { font-size:0.74em; }

/* Key-patterns flows — routine chips connected by arrows (visual cue, light text) */
.reveal .patterns { display:flex; flex-direction:column; gap:6px; margin-top:0.9em; }
.reveal .prow { display:flex; align-items:center; padding:15px 0; border-bottom:1px solid var(--hair); }
.reveal .prow .flow { display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.reveal .pchip { font-family:var(--font-sans); font-size:0.66em; font-weight:600;
  padding:7px 16px; border-radius:var(--radius-full); border:1px solid var(--border);
  background:var(--paper-50); white-space:nowrap; }
.reveal .pchip.accent { border-color:color-mix(in oklab, var(--slate-500) 55%, transparent);
  background:color-mix(in oklab, var(--slate-500) 15%, var(--paper-50)); }
.reveal .parr { color:var(--muted-foreground); font-size:0.62em; opacity:0.75; }

/* flow line — a light spectrum / pipeline: text nodes joined by arrows */
.reveal .flowline { display:flex; align-items:center; gap:11px; flex-wrap:wrap; }
.reveal .flowline .node { font-family:var(--font-sans); font-size:0.72em; font-weight:500; color:var(--foreground); }
.reveal .flowline .sep { font-family:var(--font-sans); color:var(--muted-foreground); opacity:0.55; font-size:0.72em; }
.reveal .flowline .hint { font-family:var(--font-sans); font-size:0.58em; font-style:italic; color:var(--muted-foreground); margin-left:8px; }

/* compact 3-up stack cards (the "What was built" snapshot) */
.reveal .cols-3.stack { align-items:stretch; }   /* equal-height cards, bottoms align */
.reveal .cols-3.stack .card { padding:15px 18px; }
.reveal .cols-3.stack .card h3 { margin-bottom:0.35em; }
.reveal .cols-3.stack .card p { margin:0.22em 0; font-size:0.76em; line-height:1.4; }

/* surface cards — "also:" alternatives row under each product */
.reveal .card .alt { font-size:0.55em; color:var(--muted-foreground); margin:0.8em 0 0;
  padding-top:0.7em; border-top:1px solid var(--hair); letter-spacing:0; white-space:nowrap; }
.reveal .card.surface h3 { font-family:var(--font-display); font-size:1.2em; font-weight:500; }
