/* ============================================================================
   DECK BASE  —  layout engine shared by every slide, theme-agnostic.
   ----------------------------------------------------------------------------
   Provides: reset, the 12-column Bauhaus grid, the color-BLOCK primitives,
   list/agenda structures, kickers, boxed labels, and the typographic scale.
   Colors + fonts come from the active theme (.theme-01 / .theme-02) via tokens.
   Built for reveal.js (each slide is a <section>), but the utility classes work
   in any HTML deck.
   ========================================================================== */

/* ---------- Reset / stage -------------------------------------------------- */
.reveal, .reveal .slides { height: 100%; }
.reveal .slides section {
  height: 100%; width: 100%;
  padding: 0; margin: 0;
  text-align: left;
  box-sizing: border-box;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.reveal .slides section > * { box-sizing: border-box; }
.reveal ::selection { background: var(--accent); color: var(--on-accent); }

/* A slide's full-bleed canvas. Every layout mounts inside .stage. */
.stage {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: var(--grid-gap, 0);
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}
.stage.pad { padding: var(--edge, 6%); }

/* ---------- Typographic scale (fluid, 16:9 @ any size) --------------------- */
:root {
  --step--1: clamp(0.72rem, 0.9vw + 0.4rem, 1rem);
  --step-0:  clamp(0.95rem, 1.1vw + 0.5rem, 1.35rem);
  --step-1:  clamp(1.3rem, 1.6vw + 0.6rem, 2rem);
  --step-2:  clamp(1.9rem, 2.6vw + 0.6rem, 3.2rem);
  --step-3:  clamp(2.8rem, 4.4vw + 0.5rem, 5.5rem);
  --step-4:  clamp(4rem, 7.5vw, 9rem);       /* section display  */
  --step-5:  clamp(5.5rem, 12vw, 16rem);     /* ultra hero word  */
}

/* ---------- Type primitives ------------------------------------------------ */
.hero {
  font-family: var(--font-hero);
  font-size: var(--step-5);
  line-height: 1.04; letter-spacing: -0.01em;   /* Anton has tall caps — <1.0 makes stacked/wrapped lines collide */
  text-transform: uppercase; margin: 0;
  padding-block: 0.02em;                          /* guard against the caps bleeding into the element above */
}
.display {
  font-family: var(--font-display);
  font-weight: 900; font-size: var(--step-3);
  line-height: 0.94; letter-spacing: -0.02em;
  text-transform: uppercase; margin: 0;
}
.display-sm { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2);
  line-height: 1.0; letter-spacing: -0.015em; text-transform: uppercase; margin: 0; }
.lead { font-size: var(--step-1); font-weight: 500; line-height: 1.28; margin: 0; max-width: 34ch; }
.body { font-size: var(--step-0); font-weight: 400; line-height: 1.5; margin: 0; max-width: 60ch; }
.small { font-size: var(--step--1); line-height: 1.45; }

/* Kicker / eyebrow — the tiny label above a header */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--accent); margin: 0 0 0.9em;
}

/* Boxed label — the little filled tag ("INTRODUCE THE CAMPAIGN") */
.tag {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5em 0.9em; background: var(--accent); color: var(--on-accent);
}

/* Big index numeral (01 / 02 / 03) */
.numeral {
  font-family: var(--font-display); font-weight: 900;
  font-size: var(--step-4); line-height: 0.8; letter-spacing: -0.03em;
  color: var(--accent);
}

/* ---------- Color BLOCK primitives (the Bauhaus grid signature) ------------ */
/* Place a solid field of color anywhere on the 12x8 grid.
   Usage: <div class="block block--red" style="--c1:1;--c2:5;--r1:1;--r2:9"></div> */
.block {
  grid-column: var(--c1, 1) / var(--c2, 13);
  grid-row: var(--r1, 1) / var(--r2, 9);
  background: var(--block-bg, var(--accent));
  position: relative; overflow: hidden;
}
.block--red    { --block-bg: var(--red); }
.block--yellow { --block-bg: var(--yellow); }
.block--blue   { --block-bg: var(--blue); }
.block--navy   { --block-bg: var(--navy); }
.block--cream  { --block-bg: var(--cream); }
.block--ink    { --block-bg: var(--ink); }
.block--lime   { --block-bg: var(--lime); }
.block--orange { --block-bg: var(--orange); }
.block--white  { --block-bg: #fff; }

/* A photo that fills a grid block, cropped edge-to-edge */
.block img, .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content that sits ON the grid (over/among blocks) */
.cell {
  grid-column: var(--c1, 1) / var(--c2, 13);
  grid-row: var(--r1, 1) / var(--r2, 9);
  display: flex; flex-direction: column; justify-content: var(--jc, center);
  align-items: var(--ai, flex-start);
  padding: var(--cellpad, 8%); gap: 0.8em; position: relative; z-index: 2;
}

/* ---------- Lists / agendas (Creative-Brief structure) --------------------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55em; }
.list.big { gap: 0.35em; }
.list li {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--step-2); text-transform: uppercase; letter-spacing: -0.01em;
  line-height: 1.05; display: flex; align-items: baseline; gap: 0.6em;
}
.list li::before {
  content: ""; flex: 0 0 auto;
  width: 0.42em; height: 0.42em; border-radius: 50%;
  background: var(--accent); transform: translateY(-0.12em);
}
/* Numbered agenda variant */
.list.numbered { counter-reset: item; }
.list.numbered li::before {
  counter-increment: item; content: counter(item, decimal-leading-zero);
  width: auto; height: auto; border-radius: 0; background: none;
  color: var(--accent); font-family: var(--font-display); font-weight: 900;
  font-size: 0.7em; transform: none; letter-spacing: 0;
}
/* Ruled agenda rows (the boxed list from ref #2) */
.rows { display: grid; gap: 0; border-top: 2px solid currentColor; }
.rows .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7em 0.2em; border-bottom: 2px solid currentColor;
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-1); letter-spacing: 0.01em;
}
.rows .row .dot { width: 0.5em; height: 0.5em; border-radius: 50%; border: 2px solid currentColor; }

/* ---------- Flow / process chain (WHO → WHY → …) --------------------------- */
.flow { display: flex; flex-direction: column; gap: 0.1em; }
.flow .step {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-1); letter-spacing: -0.005em; line-height: 1.05;
}
.flow .step.big { font-size: var(--step-2); }
.flow .arrow { color: var(--accent); font-weight: 400; line-height: 0.8;
  font-size: 0.9em; opacity: 0.95; }
/* horizontal variant */
.flow.row { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.35em; }
.flow.row .arrow { transform: none; }

/* ---------- Behavioural loop (nodes + return arrow) ----------------------- */
.loop { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45em 0.55em; }
.loop .node {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: var(--step-0); letter-spacing: -0.005em; line-height: 1;
  border: 2px solid currentColor; padding: 0.45em 0.7em;
}
.loop .node.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.loop .arrow { color: var(--accent); font-weight: 400; }
.loopback {
  margin-top: 0.8em; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.14em; font-size: var(--step--1); color: var(--accent);
  display: flex; align-items: center; gap: 0.5em;
}

/* ---------- Framework reference cards (the "toolkit" slide) ---------------- */
.refgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; width: 100%; }
.refcard {
  border: 2px solid currentColor; padding: 0.7rem 0.8rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.refcard h4 {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: var(--step-0); letter-spacing: -0.01em; margin: 0; color: var(--accent);
}
.refcard p { font-size: clamp(0.6rem, 0.72vw + 0.35rem, 0.85rem); line-height: 1.35; margin: 0; }

/* ---------- Code / prompt block ------------------------------------------- */
.code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: clamp(0.7rem, 0.9vw + 0.3rem, 1rem);
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  background: rgba(255,255,255,0.06); border-left: 4px solid var(--accent);
  padding: 1.1em 1.3em; color: var(--ink); max-width: 60ch; margin: 0;
}
.theme-01 .code { background: rgba(0,0,0,0.05); }

/* ---------- Emphatic ❌ / ✅ contrast list --------------------------------- */
.pointlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5em; }
.pointlist li { font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-1); text-transform: none; letter-spacing: -0.01em;
  display: flex; gap: 0.5em; align-items: baseline; }
.pointlist li.no  { opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 2px; }
.pointlist li.yes { color: var(--accent); }

/* ---------- Quote ---------------------------------------------------------- */
.quote { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2);
  line-height: 1.12; letter-spacing: -0.01em; max-width: 24ch; }
.quote .mark { color: var(--accent); font-size: 1.4em; line-height: 0; }

/* ---------- Footer meta (company name / page no.) -------------------------- */
.meta { position: absolute; z-index: 3; font-family: var(--font-mono);
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); opacity: 0.75; }
.meta.tl { top: 4.5%; left: 6%; } .meta.tr { top: 4.5%; right: 6%; }
.meta.bl { bottom: 4.5%; left: 6%; } .meta.br { bottom: 4.5%; right: 6%; }

/* ---------- Helpers -------------------------------------------------------- */
.on-dark  { --ink: #fff; color: #fff; }
.on-light { --ink: var(--ink-dark); }
.accent-text { color: var(--accent); }
.stretch { align-self: stretch; }
.tight { letter-spacing: -0.03em; }
.mt-auto { margin-top: auto; }
.rule { height: 3px; width: 3.5rem; background: var(--accent); border: 0; margin: 0.2rem 0; }

/* reveal.js scaling: keep our fluid units honest regardless of reveal zoom */
.reveal .slides { text-align: left; }
