/* ============================================================
   Modora Explained — deck styles
   Built on the Deliverance Road design system.
   Slide canvas: 1920 x 1080. No em/en dashes anywhere.
   ============================================================ */

:root {
  /* ---- deck type scale (projection sizes, all >= 24px) ---- */
  --d-display:   96px;   /* title cover */
  --d-term:      78px;   /* flash-card term */
  --d-title:     58px;   /* slide titles */
  --d-divider:   72px;   /* part divider headline */
  --d-subtitle:  38px;
  --d-lead:      33px;
  --d-body:      28px;
  --d-label:     24px;   /* smallest allowed */
  --d-eyebrow:   24px;

  /* ---- rhythm ---- */
  --pad-x:       120px;
  --pad-top:     88px;
  --pad-bottom:  78px;
  --gap-title:   44px;
  --gap-item:    26px;

  /* ---- functional flow legend (tuned to palette) ---- */
  --flow-human:   #B8884A;  --flow-human-wash:  #F4ECDD;
  --flow-gate:    #C0613D;  --flow-gate-wash:   #F4DDD2;
  --flow-ai:      #6E5D86;  --flow-ai-wash:     #E8E3EF;
  --flow-stored:  #2F7F6B;  --flow-stored-wash: #DCEAE5;
  --flow-app:     #58708A;  --flow-app-wash:    #E0E6EC;
}

/* deck-stage hides itself until defined */
deck-stage:not(:defined) { visibility: hidden; }

html, body { margin: 0; background: #0d0d0d; }

/* ---- base slide ---- */
.slide {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background: var(--dr-paper);
  color: var(--fg-1);
  font-family: var(--font-body);
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.slide.dark { background: var(--dr-ink); color: var(--dr-paper); }
.slide.dark h1, .slide.dark h2, .slide.dark h3, .slide.dark .slide-title { color: var(--dr-paper); }
.slide.soft { background: var(--dr-paper-soft); }

/* ---- shared bits ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--d-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--dr-bronze-80);
  margin: 0;
  white-space: nowrap;
}
.header .row { gap: 40px; }
/* icons: never let closed paths flood-fill (capture/export robustness) */
.who svg, .medallion svg, .legend svg, .flash svg, .three svg { fill: none; stroke: currentColor; }
.dark .eyebrow { color: var(--dr-bronze-40); }

.slide-title {
  font-family: var(--font-display);
  font-size: var(--d-title);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.slide-lead {
  font-size: var(--d-lead);
  line-height: 1.45;
  color: var(--fg-2);
  margin: 0;
  max-width: 26ch;
}
.dark .slide-lead { color: var(--dr-paper-soft); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* hairline rule under a header block */
.head-rule { height: 1px; background: var(--dr-ink-15); border: 0; width: 100%; }
.dark .head-rule { background: rgba(243,239,232,0.18); }

/* slide footer mark */
.foot {
  position: absolute;
  left: var(--pad-x); right: var(--pad-x); bottom: 40px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 24px; color: var(--dr-ink-40);
  letter-spacing: 0.04em;
}
.foot .mono { font-size: 24px; }
.dark .foot { color: rgba(243,239,232,0.45); }

/* small trail-blaze mark */
.blaze { display:inline-flex; gap:6px; align-items:flex-end; }
.blaze i { display:block; width:11px; background: var(--dr-ink); border-radius:1px; }
.blaze i:first-child { height:20px; }
.blaze i:last-child { height:30px; margin-bottom:10px; }
.dark .blaze i { background: var(--dr-paper); }

/* ============================================================
   FLASH CARD layout (slides 4-12)
   ============================================================ */
.flash {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  flex: 1;
  align-items: start;
  margin-top: 18px;
}
.flash-left { display: flex; flex-direction: column; gap: 30px; }
.flash-num {
  font-family: var(--font-mono);
  font-size: var(--d-label);
  color: var(--dr-bronze-80);
  letter-spacing: 0.04em;
}
.flash-term {
  font-family: var(--font-display);
  font-size: var(--d-term);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
}
.flash-def {
  font-size: var(--d-lead);
  line-height: 1.42;
  color: var(--fg-1);
  margin: 0;
  max-width: 22ch;
}
.flash-def b { color: var(--dr-ink); font-weight: 600; }

.flash-right { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }

/* analogy tinted box */
.analogy {
  background: var(--dr-bronze-15);
  border: 1px solid var(--dr-bronze-40);
  border-radius: var(--radius-2);
  padding: 30px 34px;
}
.analogy .tag, .modora .tag, .note .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--d-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.analogy .tag { color: var(--dr-bronze-80); }
.analogy p { font-size: var(--d-body); line-height: 1.4; margin: 0; color: var(--fg-1); }

/* "In Modora:" box */
.modora {
  background: var(--dr-jade-15);
  border: 1px solid #9CC4B9;
  border-radius: var(--radius-2);
  padding: 30px 34px;
}
.modora .tag { color: var(--dr-jade); }
.modora p { font-size: var(--d-body); line-height: 1.4; margin: 0; color: var(--fg-1); }
.modora p b { font-weight: 600; }

/* generic note box (neutral) */
.note {
  background: var(--dr-white);
  border: 1px solid var(--dr-ink-15);
  border-radius: var(--radius-2);
  padding: 28px 32px;
}
.note .tag { color: var(--fg-3); }
.note p { font-size: var(--d-body); line-height:1.4; margin:0; }

/* icon medallion for flash cards */
.medallion {
  width: 96px; height: 96px;
  border-radius: var(--radius-2);
  background: var(--dr-ink);
  color: var(--dr-paper);
  display: flex; align-items: center; justify-content: center;
}
.medallion svg { width: 52px; height: 52px; }

/* ============================================================
   FLOW diagram (slides 3, 15, 16-22)
   ============================================================ */
.flow {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.flow.center { align-items: center; }

.fbox {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius-2);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1.5px solid var(--dr-ink-15);
  background: var(--dr-white);
}
.fbox .who {
  font-family: var(--font-mono);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 9px;
}
.fbox .who svg { width: 26px; height: 26px; flex: none; }
.fbox .what {
  font-size: var(--d-label);
  line-height: 1.32;
  color: var(--fg-1);
  margin: 0;
}
.fbox .label-serif {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

/* colour variants */
.fbox.human  { background: var(--flow-human-wash);  border-color: var(--flow-human); }
.fbox.human  .who { color: var(--flow-human); }
.fbox.gate   { background: var(--flow-gate-wash);   border-color: var(--flow-gate); }
.fbox.gate   .who { color: var(--flow-gate); }
.fbox.ai     { background: var(--flow-ai-wash);     border-color: var(--flow-ai); }
.fbox.ai     .who { color: var(--flow-ai); }
.fbox.stored { background: var(--flow-stored-wash); border-color: var(--flow-stored); }
.fbox.stored .who { color: var(--flow-stored); }
.fbox.app    { background: var(--flow-app-wash);    border-color: var(--flow-app); }
.fbox.app    .who { color: var(--flow-app); }

/* gate gets a heavier presence */
.fbox.gate { border-width: 2.5px; }

/* arrow between boxes */
.arrow { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; color: var(--dr-ink-40); }
.arrow svg { width: 34px; height: 22px; }
.flow.center .arrow { align-self: center; }

/* ============================================================
   LEGEND bar (repeats on flow slides)
   ============================================================ */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  padding: 18px 26px;
  background: var(--dr-paper-soft);
  border: 1px solid var(--dr-ink-15);
  border-radius: var(--radius-2);
}
.legend .leg-title {
  font-family: var(--font-mono);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-right: 6px;
}
.legend .item { display: flex; align-items: center; gap: 10px; font-size: 24px; color: var(--fg-1); }
.legend .dot { width: 18px; height: 18px; border-radius: 3px; flex: none; }
.dot.human { background: var(--flow-human); }
.dot.gate { background: var(--flow-gate); }
.dot.ai { background: var(--flow-ai); }
.dot.stored { background: var(--flow-stored); }
.dot.app { background: var(--flow-app); }

/* three-bullet footer for function slides */
.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 6px;
}
.three .col { display: flex; flex-direction: column; gap: 8px; }
.three .k {
  font-family: var(--font-mono);
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dr-bronze-80);
}
.three .v { font-size: var(--d-label); line-height: 1.34; color: var(--fg-1); margin: 0; }
.three .col.never .k { color: var(--flow-gate); }

/* ============================================================
   PART DIVIDER
   ============================================================ */
.divider {
  justify-content: center;
  gap: 30px;
}
.divider .part-no {
  font-family: var(--font-mono);
  font-size: var(--d-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dr-bronze-40);
}
.divider h2 {
  font-family: var(--font-display);
  font-size: var(--d-divider);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
}
.divider .sub { font-size: var(--d-lead); color: var(--dr-paper-soft); margin: 0; max-width: 34ch; line-height: 1.4; }

/* progress ticks on divider */
.ticks { display: flex; gap: 12px; margin-top: 22px; }
.ticks .t { font-family: var(--font-mono); font-size: 24px; letter-spacing: 0.1em; color: rgba(243,239,232,0.4); }
.ticks .t.on { color: var(--dr-bronze); }

/* ============================================================
   Generic helpers
   ============================================================ */
.header { display: flex; flex-direction: column; gap: 14px; }
.header .row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 24px;
  padding: 7px 16px;
  border-radius: var(--radius-1);
  border: 1px solid var(--dr-ink-15);
  background: var(--dr-white);
  letter-spacing: 0.02em;
}

/* promise / recap list */
.plist { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.plist li {
  display: grid; grid-template-columns: 56px 1fr; gap: 24px; align-items: start;
  font-size: var(--d-body); line-height: 1.36; margin: 0;
}
.plist .n {
  font-family: var(--font-mono); font-size: 26px; color: var(--dr-bronze-80);
  border-bottom: 2px solid var(--dr-bronze-40); padding-bottom: 2px; text-align: center;
}
.plist li b { font-weight: 600; }

/* golden rules cards */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rule {
  background: var(--dr-white);
  border: 1px solid var(--dr-ink-15);
  border-radius: var(--radius-2);
  padding: 30px 30px 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.rule .rn { font-family: var(--font-mono); font-size: 24px; color: var(--dr-bronze-80); letter-spacing: 0.08em; }
.rule .rt { font-family: var(--font-display); font-size: 34px; line-height: 1.1; }
.rule .rd { font-size: 24px; line-height: 1.36; color: var(--fg-2); margin: 0; }

/* entrance animation — transform-only so snapshot/export tools never blank
   (html-to-image and friends render running animations at frame 0; an
   opacity:0 start would capture as invisible, a translate start stays visible) */
@media (prefers-reduced-motion: no-preference) {
  [data-deck-active] .anim  { animation: rise 0.5s var(--ease-standard) both; }
  [data-deck-active] .anim2 { animation: rise 0.55s var(--ease-standard) 0.07s both; }
  [data-deck-active] .anim3 { animation: rise 0.6s var(--ease-standard) 0.14s both; }
}
@keyframes rise {
  from { transform: translateY(18px); }
  to { transform: none; }
}
