/* ============================================================================
   STARTER STYLES — vanilla interactive HTML presentation
   ----------------------------------------------------------------------------
   Structure of this file:
     1. :root design tokens   (copied from assets/shared/theme.css — re-theme here)
     2. Base + slide layout   (scroll-snap presentation engine)
     3. Title slide
     4. Generic content       (headings, text, lists, two-column, images)
     5. Reusable components    (stat boxes, callouts, data tables, buttons)
     6. Presentation chrome    (progress bar, dots, counter, nav hint, notes panel)
     7. Responsive tweaks

   It is fully self-contained and offline: no @import, no CDN, no web fonts.
   The JavaScript in script.js expects the IDs/classes used here — see
   starter/README.md for the HTML<->JS contract before renaming anything.
   ========================================================================== */

/* ---- 1. DESIGN TOKENS (copied from assets/shared/theme.css) -------------- */
:root {
  --bg: #0f1419;
  --bg-slide: #fafaf7;
  --bg-panel: #ffffff;
  --bg-accent: #f4f1eb;
  --border: #e2dfd8;
  --border-strong: #c9c4b8;
  --ink: #1a1a2e;
  --ink-muted: #55556b;
  --ink-dim: #8a8a9e;
  --navy: #1d3557;
  --navy-deep: #0f1e33;
  --navy-light: #2c5282;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --red: #9b2c2c;
  --red-light: #e53e3e;
  --green: #2a7f62;
  --highlight: #fef3c7;
  --highlight-strong: #fcd34d;
  --serif: Georgia, 'Times New Roman', 'Crimson Pro', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.25);
}

/* ---- 2. BASE + SLIDE LAYOUT ---------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-snap-type: y mandatory;   /* each slide snaps into place */
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Each slide is a full-viewport section that snaps to the top of the screen. */
section.slide {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 80px;
  position: relative;
  background: var(--bg-slide);
  border-bottom: 2px solid var(--border);
}
section.slide:last-of-type { border-bottom: none; }

/* Small slide-number badge, top-right of each slide. */
.slide-number {
  position: absolute;
  top: 24px;
  right: 32px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}

/* ---- 3. TITLE SLIDE ------------------------------------------------------ */
section.slide.title-slide {
  background: var(--navy);
  color: var(--bg-slide);
  text-align: center;
}
section.slide.title-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(212, 160, 23, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
  pointer-events: none;
}
section.slide.title-slide .eyebrow {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
section.slide.title-slide h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 1.04;
  max-width: 1600px;
  position: relative;
  z-index: 1;
  margin-bottom: 56px;
}
section.slide.title-slide .subtitle {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-style: italic;
  line-height: 1.4;
  color: rgba(250, 250, 247, 0.85);
  max-width: 1000px;
  position: relative;
  z-index: 1;
}
section.slide.title-slide .attribution {
  font-family: var(--mono);
  font-size: clamp(0.9375rem, 1.1vw, 1.15rem);
  color: rgba(250, 250, 247, 0.55);
  position: relative;
  z-index: 1;
  margin-top: 64px;
}

/* ---- 4. GENERIC CONTENT -------------------------------------------------- */
/* A centered column that holds most slide content. */
.slide-content {
  width: 100%;
  max-width: 1360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.slide-content.centered { align-items: center; text-align: center; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.slide-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 32px;
}

.slide-content p {
  font-size: clamp(1.2rem, 1.5vw, 1.5rem);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 1120px;
  margin-bottom: 1em;
}
.slide-content p strong { color: var(--ink); }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem) !important;
  line-height: 1.45 !important;
  color: var(--ink) !important;
}

.slide-content ul, .slide-content ol {
  margin: 0.5em 0 1em 1.4em;
  color: var(--ink-muted);
}
.slide-content li {
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.5;
  margin-bottom: 0.6em;
}
.slide-content li strong { color: var(--ink); }

.mark { background: var(--highlight); padding: 0.05em 0.3em; border-radius: 3px; color: var(--ink); }

/* Two-column layout for side-by-side content (text + image, compare/contrast). */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  width: 100%;
  align-items: center;
}

/* Responsive image inside a slide. */
.slide-image {
  max-width: 100%;
  max-height: 62vh;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}
.image-caption {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin-top: 12px;
  text-align: center;
}

/* ---- 5. REUSABLE COMPONENTS ---------------------------------------------- */
/* Stat box — a big number with a label. Drop several in a row. */
.stats-row { display: flex; gap: 24px; flex-wrap: wrap; margin: 12px 0; }
.stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  min-width: 160px;
}
.stat-box .value {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-box .label {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 8px;
}

/* Callout — a highlighted aside for a key point. */
.callout {
  border-left: 4px solid var(--gold);
  background: var(--bg-accent);
  padding: 18px 24px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}
.callout.warn { border-left-color: var(--red); }
.callout.good { border-left-color: var(--green); }
.callout p { margin-bottom: 0; color: var(--ink); }

/* Data table — simple, readable. */
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  background: var(--navy);
  color: var(--bg-slide);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.data-table tr:last-child td { border-bottom: none; }

/* Button — for any interactive widget you add (kept from the reference deck). */
.demo-btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-slide);
  background: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.demo-btn:hover { background: var(--navy-light); }
.demo-btn:active { transform: translateY(1px); }
.demo-btn.secondary { background: var(--gold); }
.demo-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- 5b. WORKED-EXAMPLE SPLIT LAYOUT ------------------------------------- */
/* Two-column slides used by Deck 2's phase/iteration walkthroughs: a left column
   (conversation bubbles or phase highlights) flows via an arrow into a right pane
   that shows a rendered cycle doc or a live artifact in a scrollable <iframe>. */
.split-slide { max-width: 1560px; }
.split-slide .slide-title {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  margin-bottom: 16px;
}
/* Tight one-line intro under a split-slide title (e.g. "what this iteration achieves"). */
.split-slide p.intro {
  font-size: clamp(1rem, 1.2vw, 1.25rem) !important;
  line-height: 1.45 !important;
  color: var(--ink-muted) !important;
  max-width: none !important;
  margin-bottom: 20px;
}
.split-slide p.intro strong { color: var(--ink); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr);
  gap: 30px;
  width: 100%;
  align-items: start;
}
.split .col-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.split .col-right { display: flex; flex-direction: column; min-width: 0; }

/* The → between the two columns (becomes ↓ when stacked on narrow screens). */
.flow-arrow {
  align-self: center;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
  user-select: none;
}

/* Conversation bubbles (Part 1 phase slides). Compact, to fit 5-6 turns per slide. */
.bubbles { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  font-family: var(--sans);
  font-size: clamp(0.82rem, 0.95vw, 0.98rem);
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 13px;
  max-width: 93%;
  box-shadow: var(--shadow-sm);
}
.bubble .who {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.bubble p { margin: 0; font-size: inherit; line-height: inherit; }
.bubble.user {
  align-self: flex-end;
  background: var(--navy);
  border-bottom-right-radius: 4px;
}
/* High-contrast instructor text on the navy bubble: white body, gold bold. */
.bubble.user p { color: #ffffff; }
.bubble.user .who { color: var(--gold-light); }
.bubble.user strong { color: var(--gold-light); font-weight: 700; }
.bubble.assistant {
  align-self: flex-start;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble.assistant p { color: var(--ink); }
.bubble.assistant .who { color: var(--gold); }

/* Phase highlights / numbered phase list (Part 2 iteration slides). Compact: 6 phases fit. */
.highlights { display: flex; flex-direction: column; gap: 8px; }
.hl {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 7px 14px;
  box-shadow: var(--shadow-sm);
}
.hl .hl-phase {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.hl p { margin: 0; font-size: clamp(0.85rem, 0.95vw, 0.98rem); line-height: 1.38; color: var(--ink-muted); }

/* Right-pane header: label on the left, a "launch in new tab" button on the right. */
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pane-head .pane-label { margin: 0; }
.launch-btn {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--gold-light);
  color: var(--navy-deep);
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.launch-btn:hover { background: var(--gold); }
.launch-btn:active { transform: translateY(1px); }
.hl p strong { color: var(--ink); }

/* The right-hand pane: a label, a fixed-height scrollable iframe, and an open link. */
.pane-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.doc-pane {
  height: clamp(340px, 58vh, 560px);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: var(--shadow-md);
}
.doc-pane iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg-slide);
}
.pane-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.pane-link:hover { color: var(--gold-light); }
.pane-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.pane-links a {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.pane-links a:hover { color: var(--gold-light); }

/* ---- 5c. CLOSING CTA / PATH GRID (mirrors Deck 1's closing slide) -------- */
.cta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}
.cta-btn {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.cta-btn.primary { background: var(--gold-light); color: var(--navy-deep); }
.cta-btn.primary:hover { background: var(--gold); }
.cta-btn.ghost {
  background: transparent;
  color: var(--bg-slide);
  border: 2px solid rgba(250, 250, 247, 0.5);
}
.cta-btn.ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.cta-btn:active { transform: translateY(1px); }

/* "Choose your path" grid: option description on the left, its CTA button on the right. */
.path-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px 44px;
  align-items: center;
  max-width: 1120px;
  margin: 44px auto 0;
  text-align: left;
  position: relative;
  z-index: 1;
}
.path-option {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  color: rgba(250, 250, 247, 0.85);
  margin: 0;
}
.path-grid .cta-btn { justify-self: stretch; text-align: center; white-space: nowrap; }

/* Takeaway chips — a centered row of short key-point cards (closing-summary slide). */
.takeaway-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  max-width: 1100px;
  margin: 36px auto 0;
}
.chip {
  flex: 1 1 260px;
  max-width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.45;
  color: var(--ink-muted);
}
.chip strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--navy);
  margin-bottom: 8px;
}

/* ---- 6. PRESENTATION CHROME ---------------------------------------------- */
/* These elements are driven by script.js. Keep their IDs/classes intact. */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 4px; width: 0%;
  background: var(--gold);
  z-index: 1000;
  transition: width 0.3s ease;
}

.slide-dots {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 999;
  background: rgba(15, 20, 25, 0.6);
  padding: 10px 16px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.slide-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s;
}
.slide-dot.active { background: var(--gold-light); transform: scale(1.4); }

.slide-counter {
  position: fixed; bottom: 20px; right: 24px;
  font-family: var(--mono); font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(15, 20, 25, 0.6);
  padding: 8px 14px; border-radius: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 999;
}

.nav-hint {
  position: fixed; bottom: 20px; left: 24px;
  font-family: var(--mono); font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(15, 20, 25, 0.6);
  padding: 8px 14px; border-radius: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 999;
}

/* Speaker-notes side panel. Toggled with the S key (see script.js). */
.speaker-notes-panel {
  position: fixed; top: 0; right: -480px;
  width: 460px; height: 100vh;
  background: var(--bg-panel);
  border-left: 3px solid var(--gold);
  padding: 40px 32px;
  overflow-y: auto;
  transition: right 0.3s ease;
  z-index: 1100;
  box-shadow: var(--shadow-lg);
}
.speaker-notes-panel.visible { right: 0; }
.speaker-notes-panel h3 {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.speaker-notes-panel h2 {
  font-family: var(--serif); font-size: 1.5rem;
  color: var(--navy); margin-bottom: 20px; line-height: 1.3;
}
.speaker-notes-panel p {
  font-family: var(--serif); font-size: 1.0625rem;
  line-height: 1.55; color: var(--ink); margin-bottom: 1em;
}
.speaker-notes-panel .close-notes {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none;
  font-size: 1.5rem; color: var(--ink-muted); cursor: pointer;
}

/* The per-slide notes source is hidden on the slide itself; the panel reads it. */
.speaker-notes { display: none; }

/* File-tree illustration — monospace, for showing artifact/folder structure. */
.file-tree {
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin: 0;
  white-space: pre;
  color: var(--ink-muted);
  overflow-x: auto;
}
.file-tree .dir { color: var(--navy); font-weight: 700; }
.file-tree .file { color: var(--ink); }
.file-tree .muted { color: var(--ink-dim); }

/* ---- 7. RESPONSIVE ------------------------------------------------------- */
@media (max-width: 760px) {
  section.slide { padding: 48px 28px; }
  .two-column { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; gap: 16px; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .bubble.user, .bubble.assistant { align-self: stretch; max-width: 100%; }
  .doc-pane { height: 52vh; }
  .speaker-notes-panel { width: 100%; right: -100%; }
  .nav-hint { display: none; }
}
