/*
 * Document builder — process deck, told as a story
 *
 * Rules, in priority order. Break them and it drifts back to looking generic:
 *
 * 1. ONE idea per slide. Nuance lives in the presenter notes.
 * 2. Structure with typography, hairlines and the custody line — never with a
 *    grid of bordered, shadowed cards.
 * 3. Hard scale contrast: a 12px label against a 58px statement.
 * 4. One accent per slide. Brand logos are the exception: they carry their own
 *    colour because recognition is the whole point of showing them.
 * 5. Nothing below 18px. This gets presented over a screen share.
 * 6. Columns and steps stay top-aligned so labels line up across the row.
 *
 * Characters: DiceBear "notionists" (CC0). Logos: simple-icons (CC0).
 */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #fcfbf7;
  --paper-2: #f4f1e8;
  --ink: #17150f;
  --ink-2: #5f5a4e;
  --ink-3: #9a9484;
  --rule: #e4e0d5;
  --accent: #2b3fe4;
  --accent-2: #e8eafb;
  --ok: #1c6b3d;
  --bad: #b23a2b;
  --bad-2: #f7e7e4;
  --amber: #f5b840;

  --sans: 'Geist', 'Helvetica Neue', -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #0d0c08;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#viewport { position: fixed; inset: 0; display: grid; place-items: center; }

#stage {
  position: relative;
  width: 1280px;
  height: 720px;
  transform-origin: center center;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 20px 70px rgb(0 0 0 / 0.55);
}

.slide {
  position: absolute;
  inset: 0;
  padding: 66px 88px 72px;
  display: none;
  flex-direction: column;
  background: var(--paper);
}
.slide.is-live { display: flex; animation: rise 0.3s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Type ───────────────────────────────────────────────────────────── */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label b { color: var(--accent); font-weight: 500; }

h1 { font-size: 84px; line-height: 0.98; letter-spacing: -0.04em; font-weight: 500; }

h2 {
  font-size: 44px;
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 500;
  max-width: 27ch;
  margin-top: 18px;
}
h2 em { font-style: normal; color: var(--accent); }

.statement {
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: -0.034em;
  font-weight: 500;
  max-width: 24ch;
}

.lead {
  font-size: 24px;
  line-height: 1.42;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  max-width: 50ch;
  margin-top: 20px;
}
.note { font-size: 19px; line-height: 1.45; color: var(--ink-2); max-width: 62ch; }
.note b { color: var(--ink); font-weight: 600; }

.canvas { flex: 1; display: flex; min-height: 0; margin-top: 38px; }
.canvas > .rows { align-self: center; }

.footline {
  margin-top: auto;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-2);
}
.footline b { color: var(--ink); font-weight: 600; }

/* ── The week: a proportional bar, not a calendar ──────────────────────
   The point of the timeline is the ratio — research took most of it, the
   build took under a day — so the phases are sized by flex, not by dates. */
.week { display: flex; width: 100%; align-items: stretch; gap: 4px; }
.phase { padding: 0; }
.phase .bar { height: 10px; background: var(--rule); border-radius: 2px; }
.phase.on .bar { background: var(--accent); }
.phase .ph {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin: 16px 0 10px;
}
.phase.on .ph { color: var(--accent); }
.phase h4 { font-size: 21px; line-height: 1.2; letter-spacing: -0.018em; font-weight: 500; }
.phase p { font-size: 16px; line-height: 1.38; color: var(--ink-2); margin-top: 10px; }

/* ── Tool logos ─────────────────────────────────────────────────────── */
.tool { display: inline-flex; align-items: center; gap: 8px; }
.tool img { width: 20px; height: 20px; }
.tool span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.tool.big img { width: 34px; height: 34px; }
.tool.big span { font-size: 16px; letter-spacing: 0.02em; color: var(--ink); }
.tool.lg img { width: 52px; height: 52px; }
/* stands in for the design system, which has no logo — keeps the row rhythm
   when a step isn't a branded tool */
.tool.big .swatch {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--accent);
  display: block;
  flex: 0 0 34px;
}

/* ── Rows ───────────────────────────────────────────────────────────── */
.rows { width: 100%; display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row .tag {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  flex: 0 0 40px;
}
.row .face { flex: 0 0 46px; align-self: center; }
.row .face img { width: 46px; height: 46px; display: block; }
.row .main { font-size: 22px; line-height: 1.3; letter-spacing: -0.014em; flex: 1; }
.row .aside { font-size: 17px; line-height: 1.35; color: var(--ink-2); flex: 0 0 40%; }
.row .verdict {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 0 0 130px;
  text-align: right;
}
.row .verdict.cut { color: var(--bad); }
.row .verdict.keep { color: var(--ok); }
.row .verdict.rank { color: var(--accent); }
.row.hi .main { font-weight: 600; }
.row.dim .main, .row.dim .aside { color: var(--ink-3); }

/* ── Columns / steps ────────────────────────────────────────────────── */
.cols { display: flex; width: 100%; }
.col { flex: 1; padding: 0 32px; border-left: 1px solid var(--rule); }
.col:first-child { padding-left: 0; border-left: 0; }
.col:last-child { padding-right: 0; }
.col .ch {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.col.on .ch { color: var(--accent); }
.col ul { list-style: none; }
.col li { font-size: 21px; line-height: 1.28; letter-spacing: -0.01em; padding: 11px 0; }
.col li + li { border-top: 1px solid var(--rule); }

.steps { display: flex; width: 100%; }
.step { flex: 1; padding: 0 30px; border-left: 1px solid var(--rule); }
.step:first-child { padding-left: 0; border-left: 0; }
.step .n {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--rule);
  display: block;
  margin-bottom: 14px;
}
.step.on .n { color: var(--accent); }
.step h3 { font-size: 24px; line-height: 1.16; letter-spacing: -0.02em; font-weight: 500; }
.step p { font-size: 17px; line-height: 1.4; color: var(--ink-2); margin-top: 12px; }
.step .tool { margin-bottom: 14px; }

/* ── Chips ──────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; max-width: 94%; }
.chip {
  font-size: 18px;
  line-height: 1;
  padding: 11px 15px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
}
.chip.on { border-color: var(--ink); color: var(--ink); font-weight: 500; }

/* ── Table ──────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  padding: 0 0 13px;
}
th + th, td + td { padding-left: 28px; }
td {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  vertical-align: middle;
  color: var(--ink-2);
}
td:first-child { color: var(--ink); }
tr:last-child td { border-bottom: 1px solid var(--rule); }
tr.win td { color: var(--ink); }
tr.win td:first-child { font-weight: 600; }

/* ── Media ──────────────────────────────────────────────────────────── */
figure { overflow: hidden; }
figure img { display: block; width: 100%; border: 1px solid var(--rule); }
figcaption { font-size: 16px; line-height: 1.4; color: var(--ink-2); padding: 12px 0 0; }
figcaption b { color: var(--ink); font-weight: 600; }

/* A frame that links out. deck.js ignores clicks on <a>, so this won't advance
   the slide. Works with or without an <img> inside — when empty, the label is
   what makes it read as a deliberate live link rather than a missing image. */
a.framelink { display: block; text-decoration: none; color: inherit; }
a.framelink .frame { transition: border-color 0.15s, background 0.15s; }
a.framelink:hover .frame { border-color: var(--accent); background: var(--accent-2); }
a.framelink .open {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-top: 12px;
}
a.framelink:hover .open { text-decoration: underline; }

/* inline outbound link, e.g. the deployed prototype */
a.out {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid #b9c0f5;
}
a.out:hover { border-bottom-color: var(--accent); }
.slide--dark a.out { color: var(--amber); border-bottom-color: #6b5a2c; }
.slide--dark a.out:hover { border-bottom-color: var(--amber); }

/* the closing slide's hero link — big enough to read from the back of a room */
a.biglink {
  display: inline-block;
  margin: 34px 0 30px;
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: -0.01em;
  color: var(--amber);
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 2px solid #57492a;
  transition: border-color 0.15s, color 0.15s;
}
a.biglink:hover { color: #ffd479; border-bottom-color: var(--amber); }

/* competitor frames — neutral when empty so an unfilled slide still reads */
.frames { display: flex; gap: 20px; width: 100%; }
.frames > div { flex: 1; }
.frame {
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .ph {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.frames .cap { font-size: 17px; line-height: 1.35; margin-top: 12px; }
.frames .cap b { display: block; font-size: 19px; font-weight: 600; margin-bottom: 5px; color: var(--ink); }

/* ── Inverted / divider slides ──────────────────────────────────────── */
.slide--dark { background: var(--ink); color: var(--paper); justify-content: center; }
.slide--dark h1, .slide--dark .statement { color: #fff; }
.slide--dark .label { color: #7d7768; }
.slide--dark .label b { color: var(--amber); }
.slide--dark .lead { color: #a8a190; }
.slide--dark .cite {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6555;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid #302c22;
}
.slide--dark .meta { display: flex; gap: 26px; margin-top: 40px; padding-top: 22px; border-top: 1px solid #302c22; }
.slide--dark .meta span { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: #a8a190; }

.slide--part { background: var(--accent); color: #fff; justify-content: center; }
.slide--part .pn { font-family: var(--mono); font-size: 15px; letter-spacing: 0.2em; color: #a9b3f4; }
.slide--part h2 { font-size: 60px; color: #fff; max-width: 23ch; margin-top: 20px; }
.slide--part .lead { color: #ccd2f8; max-width: 46ch; }

/* ── Chrome ─────────────────────────────────────────────────────────── */
#progress {
  position: absolute; left: 0; bottom: 0; height: 2px;
  background: var(--accent); transition: width 0.3s var(--ease); z-index: 20;
}
.slide--dark #progress, .slide--part #progress { background: var(--amber); }

#hud {
  position: fixed; right: 16px; bottom: 12px; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: #6f6a5c; text-transform: uppercase;
}
#hud .k { border: 1px solid #2c2921; border-radius: 3px; padding: 3px 7px; background: #17150f; }

/* clock lives in the presenter drawer, so it's invisible while presenting */
#notes #timer {
  position: absolute;
  right: 30px;
  top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #6b6555;
  border: 1px solid #2c2921;
  border-radius: 3px;
  padding: 3px 8px;
}
#notes #timer.run { color: var(--amber); border-color: #574a26; }
#notes #timer.over { color: #db6b57; border-color: #5c332a; }

#notes {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 48vh; overflow-y: auto;
  background: #100f0a; color: #d8d1c1;
  border-top: 2px solid var(--amber);
  padding: 22px 30px 26px;
  transform: translateY(101%);
  transition: transform 0.28s var(--ease);
  font-size: 15px; line-height: 1.6;
}
#notes.open { transform: translateY(0); }
#notes h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber); font-weight: 500;
  margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap;
}
#notes h4 span { color: #6b6555; }
/* two kinds of line: a reminder (default) and something to say out loud (.q) */
#notes p { margin-bottom: 9px; max-width: 100ch; color: #a6a08f; }
#notes strong { color: #fff; font-weight: 600; }
#notes em { color: var(--amber); font-style: normal; }
#notes .q { color: #ece6d8; border-left: 2px solid var(--amber); padding-left: 14px; }
#notes .fill {
  border-left: 2px solid var(--amber);
  background: #1a1509;
  padding: 11px 15px;
  color: #e8cf95;
  margin-top: 14px;
}
#notes .fill b { color: var(--amber); }

#overview {
  position: fixed; inset: 0; z-index: 70; display: none;
  background: #100f0a; padding: 32px; overflow-y: auto;
}
#overview.open { display: block; }
#overview .oh {
  max-width: 1440px; margin: 0 auto 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #6b6555;
}
#overview .og { display: grid; grid-template-columns: repeat(6, 1fr); gap: 11px; max-width: 1440px; margin: 0 auto; }
#overview button {
  all: unset; cursor: pointer;
  border: 1px solid #2c2921; border-radius: 3px; padding: 10px 12px;
  background: #17150f; color: #d8d1c1; min-height: 72px;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color 0.15s, background 0.15s;
}
#overview button:hover { border-color: var(--amber); background: #201c12; }
#overview button.cur { border-color: var(--accent); background: #171a33; }
#overview button i { font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: 0.1em; color: #6b6555; }
#overview button b { font-size: 12.5px; font-weight: 500; line-height: 1.28; }
#overview button u {
  text-decoration: none; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #6b6555; margin-top: auto;
}
#overview button.fill { border-color: #574a26; }
#overview button.fill u::after { content: ' · fill'; color: var(--amber); }

/* SVG: ink on <svg> so per-element fill="…" attributes still win */
svg { display: block; fill: var(--ink); }
svg text { font-family: var(--sans); }
svg .m { font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
svg .ln { stroke: var(--rule); fill: none; }

@media print {
  html, body { overflow: visible; background: #fff; }
  #hud, #notes, #overview { display: none !important; }
  #viewport { position: static; display: block; }
  #stage { transform: none !important; box-shadow: none; }
  .slide { display: flex !important; position: relative; page-break-after: always; }
}
