/* FILE-MAP:
purpose: >
  Component and layout styles for the deck engine (audience + presenter) and the
  lead form. Consumes only variables from tokens.css so the Ezon token swap is
  zero-touch here.
depends_on:
  - path: ./tokens.css
    uses: [css custom properties]
used_by:
  - ./index.html
  - ./form.html
touches:
  db_tables: []
  env: []
  config_files: []
  cache_keys: []
effects: []
invariants:
  - no hardcoded colors/font sizes — tokens only
  - headings (h1, h2, h3, .statement, .num-hero, .kicker) are Sora with
    line-height 0.9 and negative tracking; body copy is Montserrat (Ezon DS §3,
    substituting either face is an anti-pattern)
  - every slide carries the Galaxy texture — a flat background is banned (DS §8)
END-FILE-MAP */

* { box-sizing: border-box; }

:root {
  /* Dimensão canônica do slide. O PDF de backup imprime exatamente isto,
     então mexer aqui exige regerar 06-ensaio/deck-backup.pdf. */
  --palco-w: 1600px;
  --palco-h: 900px;
}

html, body {
  margin: 0;
  height: 100%;
  /* Galaxy: the brand nebula photo over the master-dark gradient (DS §8).
     Texture layer first = on top; both layers are images, so the shorthand
     stacks cleanly. The photo covers and is dimmed by blend so type keeps its
     measured contrast — see ARQUITETURA.md for the ratios. */
  background: var(--bg-texture), var(--bg);
  background-size: cover, auto, auto, auto;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  background-blend-mode: soft-light, normal, normal, normal;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Deck shell ---------- */

#deck {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slide-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Palco de tamanho fixo ────────────────────────────────────────────────
   O deck é uma peça de proporção 16:9, não um site que reflui. Antes, num
   celular em retrato, o slide era esticado para a tela toda: o astronauta
   virava uma fatia vertical e o texto ia parar em qualquer lugar.
   Agora o palco tem SEMPRE 1600x900 e o JS aplica um `scale` para caber na
   tela. A composição no celular passa a ser idêntica à do projetor.

   Consequência que exige atenção: dentro do palco, `vw`/`vh` e as media
   queries continuariam olhando para o VIEWPORT (a tela do celular), não para
   o palco. Por isso, aqui dentro, toda medida é px fixo e todo breakpoint é
   container query. `container-type: size` faz as unidades `cq*` desta
   subárvore medirem o palco. */
.canvas {
  position: relative;
  flex: none;
  width: var(--palco-w);
  height: var(--palco-h);
  container-type: size;
  transform: scale(var(--escala, 1));
  transform-origin: center center;
}

/* Os --fs-* globais são clamp() em vw e servem à HUD, que fica FORA do palco
   e deve continuar respondendo à tela real. Aqui dentro eles viram constantes:
   os mesmos valores que o clamp produz num palco de 1600px, que é o que o
   projetor e o PDF de backup mostram. */
.canvas {
  --fs-hero: 100px;        /* DS hero 60pt */
  --fs-title: 73px;
  --fs-h2: 60px;           /* DS h2 36pt */
  --fs-h3: 53px;           /* DS h3 32pt */
  --fs-lead: 40px;         /* DS lead 24pt */
  --fs-body-lg: 33px;      /* DS body-lg 20pt */
  --fs-body: 30px;         /* DS body 18pt */
  --fs-body-sm: 27px;      /* DS body-sm 16pt */
  --fs-small: 23px;        /* DS caption 14pt */
  --fs-caption-sm: 20px;   /* DS caption-sm 12pt */
  --fs-mono: 20px;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* `safe` degrades to flex-start when the slide is taller than the stage;
     plain `center` overflows in BOTH directions and makes the top of a long
     STEP slide unreachable by scrolling. */
  justify-content: safe center;
  padding: 80px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* Headings — Sora, lh 0.9, negative tracking (DS §3 signature).
   NOTE: .statement and .num-hero are themselves <h1>, so every rule that must
   beat `.slide h1` (0,1,1) is scoped as `.slide .statement` (0,2,0). */
.slide h1, .slide h2, .slide h3 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.slide h1 {
  font-size: var(--fs-hero);       /* DS hero 60pt */
  font-weight: 700;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

/* Emphasis pair: Aurora Green on dark, Teal Profundo on light (DS §2) */
.slide h1 em { color: var(--accent-emphasis); font-style: normal; }

.slide h3 {
  font-size: var(--fs-h3);         /* DS h3 32pt */
  font-weight: 700;
  letter-spacing: var(--ls-title);
  margin: 0 0 var(--space-2);
}

.slide h2 {
  font-size: var(--fs-h2);         /* DS h2 36pt */
  font-weight: 700;
  letter-spacing: var(--ls-title);
  margin: 0 0 var(--space-3);
}

.slide p, .slide li {
  font-size: var(--fs-body);       /* DS body 18pt — dominant size */
  line-height: var(--lh-body);
  color: var(--text);
}

.slide ul, .slide ol { padding-left: 1.2em; margin: 0; }
.slide li { margin-bottom: var(--space-1); }

.slide .kicker {
  font-family: var(--font-display);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;          /* label, not a title: tracking stays positive */
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

.slide .subtitle { color: var(--text-muted); font-size: var(--fs-body-lg); }

/* Capa — arquétipo "Cover 1 / Dark" do sistema de slides da Ezon, e não uma
   capa centralizada genérica. Geometria medida sobre 180 slides reais em
   ezon-proposal-slides/kit/DESIGN.md §Hero: astronauta ancorado à direita,
   60,9cqw, sangrando topo/direita/base, crop `bottom right -5.5cqw`.
   Regra do sistema: SEM scrim sobre o hero — o contraste vem da separação
   espacial (coluna de texto à esquerda + respiro), e o título cruza a arte.
   `container-type: size` fica restrito à capa para que as unidades cq batam
   com a spec sem mexer no layout dos outros 50 slides. */
.slide[data-kind="cover"] {
  container-type: size;
  padding: 0;
  text-align: left;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}
.slide[data-kind="cover"] .hero-cover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60.9cqw;
  background-repeat: no-repeat;
  background-position: bottom right -5.5cqw;
  background-size: auto 100%;
  pointer-events: none;
  z-index: 1;
}
.slide[data-kind="cover"] .cover-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;
  padding: 11cqh 80px 3cqh;
}
/* Coluna de texto ≤58cqw: cruza a arte, mas o miolo do capacete fica livre. */
.slide[data-kind="cover"] h1 { max-width: 58cqw; margin-bottom: 0; }
.slide[data-kind="cover"] .cover-logo { width: 24cqw; height: auto; margin-top: 7cqh; }
.slide[data-kind="cover"] .cover-caption {
  margin-top: auto;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}

ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps li {
  counter-increment: step;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
ol.steps li::before {
  content: counter(step);
  flex: none;
  font-weight: 700;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: 50%;
  width: 1.6em;
  height: 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
}

/* ---------- Placeholder fields (step slides) ---------- */

.placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}

.placeholders label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: var(--fs-caption-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.placeholders input {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--fs-caption-sm);
  padding: 0.55em 0.8em;
  min-width: 12ch;
}

.placeholders input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.btn {
  font: inherit;
  font-size: var(--fs-caption-sm);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.55em 1em;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.btn:hover { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* ---------- Prompt block ---------- */

.prompt-block {
  position: relative;
  margin-top: var(--space-3);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prompt-block pre {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 405px;
  overflow-y: auto;
}

.prompt-block .ph-value { color: var(--accent-emphasis); font-weight: 600; }
.prompt-block .ph-empty { color: var(--warning); font-weight: 600; }

.copy-btn {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: var(--accent-contrast);
}

/* ---------- Downloads ---------- */

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.downloads a {
  color: var(--accent-emphasis);
  font-size: var(--fs-caption-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55em 1em;
}

.downloads a:hover { border-color: var(--accent); }

.downloads a::before { content: "↓ "; }

/* ---------- Waiting screen (audience, locked slide) ---------- */

.waiting {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
  background: var(--bg-texture), var(--bg);
  z-index: 10;
  padding: var(--space-3);
}

.waiting.visible { display: flex; }

.waiting .pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.35; }
}

.waiting h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-title);
}
.waiting p { color: var(--text-muted); font-size: var(--fs-body-sm); margin: 0; }

.slide.unlocking { animation: unlock var(--dur-slow) var(--ease); }

@keyframes unlock {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- HUD (bottom bar) ---------- */

.hud {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: var(--fs-caption-sm);
  color: var(--text-muted);
}

.hud .nav { display: flex; gap: var(--space-1); }

.hud .hud-left,
.hud .hud-right { display: flex; align-items: center; gap: var(--space-2); flex: none; }

/* Slide footer signature (DS §6 "Rodapé de slide"): the simple "ezon" wordmark
   left, @brunodaezon right. Simple wordmark (not the full Partners lockup) is
   what logos.md prescribes for nav-height strips — the PARTNERS descriptor turns
   to mush below ~40px. SVGs are cleaned exports from the canonical library:
   Illustrator metadata stripped (600KB -> 2KB) and viewBox retightened to the
   mark's own bounds so plain height sizing works. */
.hud .brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  flex: none;
}

.hud .wordmark {
  height: 1.05em;   /* wordmark is 4.39:1 — reads clean at HUD height */
  width: auto;
  display: block;
}

.hud .handle {
  color: var(--text-muted);
  font-size: var(--fs-caption-sm);
  white-space: nowrap;
}

/* A HUD vive FORA do palco e continua respondendo à tela real. */
@media (max-width: 720px) {
  .hud .handle { display: none; }
  .hud { flex-wrap: wrap; }
}

.hud .presenter-only { display: none; align-items: center; gap: var(--space-2); }

body.presenter .hud .presenter-only { display: flex; }

.hud .clients::before {
  content: "●";
  color: var(--success);
  margin-right: 0.4em;
}

.hud .clients.offline::before { color: var(--danger); }

.presenter-notes {
  display: none;
  font-size: var(--fs-caption-sm);
  color: var(--warning);
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.presenter .presenter-notes { display: block; }

.release-state { color: var(--text-muted); white-space: nowrap; }
.release-state strong { color: var(--text); }

/* The HUD is a single row: only the presenter note may shrink/ellipsize, every
   other item keeps its natural width (otherwise the chrome wraps mid-word). */
.hud .clients, .hud .btn { white-space: nowrap; }
.hud .presenter-notes { flex: 1 1 auto; min-width: 0; }

/* ---------- Lead form ---------- */

.form-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}

.form-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
}

/* The lead form is a phone-first web page, not a slide: it rides the page scale
   (see --fs-page-* in tokens.css), never the 1280-stage roles. */
.form-card h1 {
  font-family: var(--font-display);
  font-size: var(--fs-page-title);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-title);
  margin: 0 0 var(--space-1);
}
.form-card .subtitle { color: var(--text-muted); margin: 0 0 var(--space-3); font-size: var(--fs-page-body); }

.form-card label {
  display: block;
  font-size: var(--fs-page-body);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.form-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 0.7em 0.9em;
}

.form-card input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.form-card .btn-primary { width: 100%; padding: 0.85em; font-size: 1rem; margin-top: var(--space-1); }

.form-msg { margin-top: var(--space-2); font-size: var(--fs-page-body); min-height: 1.4em; }
.form-msg.ok { color: var(--success); }
.form-msg.err { color: var(--danger); }

/* ---------- Content layouts (F1 — storyboard archetypes) ---------- */

.center { text-align: center; }

/* FRASE — giant centered statement */
.frase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  text-align: center;
  flex: 1;
}

/* The DS Impact Statement is 66pt, but it carries ~15-char lines. The FRASE
   slides here run 25–32 chars per line, which overflows the stage at 6.88vw, so
   .statement is anchored one role down, on DS title (44pt). lh/tracking unchanged. */
.slide .statement {
  font-size: var(--fs-title);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

.slide .statement em { color: var(--accent-emphasis); font-style: normal; }

.punch { margin-top: var(--space-3); }

/* Pending-image placeholder (dashed, swap later) */
.img-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 220px;
  width: 100%;
  padding: var(--space-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-2);
}

.img-ph .ph-label {
  font-family: var(--font-mono);
  font-size: var(--fs-caption-sm);
  letter-spacing: 0.06em;
}

.img-ph .ph-hint {
  font-size: var(--fs-caption-sm);
  opacity: 0.7;
  max-width: 34ch;
}

.img-ph.small { min-height: 110px; max-width: 460px; margin-inline: auto; }
.img-ph.wide { min-height: 180px; }
.img-ph.ghost { opacity: 0.55; }

/* TIT+VIS — title left, dominant visual right */
.titvis {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-4);
  align-items: center;
}

/* COMP — compared columns */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.cols-3 { grid-template-columns: repeat(3, 1fr); }

.col-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.col-card h3 {
  margin: 0 0 var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-body-lg);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-title);
  color: var(--accent-emphasis);
}

.col-card p, .col-card li { font-size: var(--fs-body-sm); }
.col-card ul { padding-left: 1.1em; }

/* NUM — metric band: number in Aurora Green, Sora 800 (DS §6 "Metric band") */
.slide .num-hero {
  font-size: var(--fs-hero);
  font-weight: 800;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

.slide .num-hero em { color: var(--accent-emphasis); font-style: normal; }

.num-sub { font-size: var(--fs-body-lg); margin: 0 0 var(--space-2); }

/* MATRIZ — 3x3 autonomy grid with labeled axes */
.matriz-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-1);
  width: 100%;
  max-width: min(100%, 1080px);
  margin: var(--space-2) auto 0;
}

.matriz-wrap .axis-x {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-caption-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.matriz-wrap .axis-y {
  grid-column: 1;
  grid-row: 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-caption-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.matriz {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(108px, auto);
  gap: 6px;
}

.matriz .mhead {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em 0.5em;
  font-family: var(--font-display);
  font-size: var(--fs-caption-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.matriz .cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  padding: 0.5em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: center;
}

.matriz .cell.dim { opacity: 0.45; }

.matriz .cell.hl {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-elevated));
  color: var(--text);
}

.matriz .cell.hl.strong {
  border-width: 2px;
  background: color-mix(in srgb, var(--accent) 30%, var(--bg-elevated));
}

.matriz .cell.danger {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, var(--bg-elevated));
  color: var(--text);
}

.matriz .cell .c-t { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small); line-height: 1.05; }
.matriz .cell .c-d { font-size: var(--fs-caption-sm); color: var(--text-muted); }

/* Archetype art (Bruno's 9 renders). The `.nine` grid shows all of them at once,
   so rows get taller and the art carries the cell; a highlighted single cell in
   the earlier builds uses `.big` and shows the art larger. */
/* Fanned product shots: three real screens stacked with a slight offset so the
   set reads as "a product", not as one screenshot. Front-to-back order is
   reversed with z-index so the first (Raio-X, the thesis screen) sits on top. */
.shots {
  position: relative;
  align-self: center;
  display: flex;
  justify-content: center;
}

/* The FIRST shot stays in normal flow so the stack has an intrinsic height —
   with every image absolute the container collapses to a hairline. The other two
   are absolute and offset behind it. */
.shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.shots img:nth-child(n + 2) {
  position: absolute;
  inset: 0;
  margin: auto;
}

/* The fan only spreads right/down: spreading left pushed the back shot over the
   text column of the .titvis layout. */
.shots img:nth-child(1) { position: relative; z-index: 3; transform: translate(7%, 7%) rotate(1.5deg); }
.shots img:nth-child(2) { z-index: 2; transform: translate(3%, 0) rotate(-1deg); }
.shots img:nth-child(3) { z-index: 1; transform: translate(-2%, -7%) rotate(2deg); opacity: 0.9; }

/* Full-bleed photo slide with the statement laid over it. The scrim is a hard
   requirement, not decoration: a room photo has bright laptop screens and the
   headline has to clear 4.5:1 wherever it lands. */
.photo-hero {
  position: relative;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-hero figcaption {
  position: relative;
  width: 100%;
  padding: 45px 64px;
  background: linear-gradient(to top,
    rgba(10, 10, 10, 0.94) 0%,
    rgba(10, 10, 10, 0.82) 42%,
    rgba(10, 10, 10, 0) 100%);
}

.photo-hero figcaption .statement { margin-bottom: var(--space-1); }

/* Every matriz build has to fit a 720p stage without scrolling (the smallest
   projector we plan for), so the grid claims the leftover column height instead
   of asking for a fixed row size: header row auto, three content rows split what
   is left, art scales to whatever each cell ends up being. */
.slide:has(.matriz) .matriz-wrap { flex: 1 1 auto; min-height: 0; }
.matriz {
  height: 100%;
  grid-auto-rows: unset;
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
}

.matriz .cell.arq { gap: 0.1em; padding: 0.3em 0.3em 0.4em; justify-content: flex-end; min-height: 0; }

.matriz .cell.arq img {
  width: auto;
  max-width: 88%;
  height: 0;
  min-height: 0;
  flex: 1 1 auto;
  object-fit: contain;
  /* The renders are lit for white; a soft drop keeps them from floating on the
     Galaxy background without adding a plate behind each one. */
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55));
}

.slide:has(.matriz) .matriz-cap { margin-top: var(--space-2); flex: none; }
.slide:has(.matriz) > h2 { flex: none; }

.matriz .cell.arq .c-t { font-size: var(--fs-caption-sm); text-wrap: balance; }
.matriz .cell.arq.danger .c-t { color: var(--danger); }

/* Same contract as .arq: the art absorbs whatever height the labels leave, so a
   single tall cell can never spill into the row below it. */
.matriz .cell.big { min-height: 0; padding: 0.35em 0.4em 0.45em; gap: 0.1em; overflow: hidden; }

.matriz .cell.big img {
  width: auto;
  max-width: 94%;
  /* height:0 + grow makes the art size purely from what the flex row leaves,
     never from its intrinsic pixels — a percentage flex-basis here resolves
     against the image's own aspect and overflows the cell. */
  height: 0;
  min-height: 0;
  flex: 1 1 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}

.matriz .cell.tiger { padding: 0.2em; overflow: visible; position: relative; }
.matriz .cell .img-ph { min-height: 100%; margin-top: 0; flex: 1; border-color: var(--danger); }

/* Fortune Tiger: transborda a célula de propósito — a piada é o exagero.
   Absoluto para não esticar a linha do grid (as 3 linhas ficam iguais). */
.matriz .cell .tiger-img {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 128%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(-6deg);
  transform-origin: center;
  filter: drop-shadow(0 10px 28px color-mix(in srgb, var(--danger) 55%, transparent));
  animation: tiger-in 420ms cubic-bezier(.2, 1.3, .4, 1) both;
  pointer-events: none;
  z-index: 2;
}
.matriz .cell .tiger-mini { width: 76%; max-width: none; margin-bottom: 0.15em; }

@keyframes tiger-in {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(0.55); }
  to   { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .matriz .cell .tiger-img { animation: none; }
}

.matriz-cap {
  text-align: center;
  margin: var(--space-3) 0 0;
  color: var(--text);
  font-size: var(--fs-body);
  position: relative;
  z-index: 3;
}

/* MAP3 / flow — boxes joined by arrows */
.map3 {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.map3 .box {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
}

.map3 .box .t { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-body-lg); line-height: var(--lh-tight); }
.map3 .box .d { color: var(--text-muted); font-size: var(--fs-body-sm); }
.map3 .arrow { align-self: center; color: var(--accent); font-size: var(--fs-h2); flex: none; }

/* QR — central placeholder box */
.qr-box {
  width: 396px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: var(--space-3) auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-2);
}

.qr-box .ph-label { font-family: var(--font-mono); font-size: var(--fs-caption-sm); }
.qr-box .ph-hint { font-size: var(--fs-caption-sm); opacity: 0.7; max-width: 28ch; }
/* QR de verdade: fundo branco, sem moldura tracejada. O leitor do celular
   depende do contraste claro/escuro e da margem quieta em volta do código —
   por isso o QR ganha o box inteiro, e não o tratamento de placeholder. */
.qr-box.live {
  background: #fff;
  border: none;
  padding: var(--space-1);
  gap: 0;
}
.qr-box.live img { width: 100%; height: 100%; display: block; }
.qr-box.small { width: 260px; margin: var(--space-2) auto 0; }

/* STEP — checkpoint block */
/* STEP slides: prompt beside checkpoint+fallback so nothing essential falls below
   the fold on a projector. Single column below 1100px (laptops scroll naturally). */
.step-grid { display: grid; gap: var(--space-3); margin-top: var(--space-3); }

@container (min-width: 1100px) {
  .step-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; }
  .step-grid .prompt-block { margin-top: 0; }
  .step-grid .checkpoint,
  .step-grid .downloads { margin-top: 0; }
  .step-side { display: flex; flex-direction: column; gap: var(--space-2); }
  /* The prompt is copied, not read off the screen — capping it keeps the title,
     the copy button and the checkpoint above the fold. It scrolls internally. */
  .step-grid .prompt-block pre { max-height: 342px; }
  /* Tighter intro on step slides: they carry a placeholder bar the others lack. */
  .slide[data-kind="step"] h2 { margin-bottom: var(--space-2); }
  .slide[data-kind="step"] > p { margin-bottom: 0; }
  /* The briefing slide has 7 fields and wraps to two rows; a denser bar keeps the
     checkpoint on screen without shrinking the tap targets below usable size. */
  .placeholders { gap: var(--space-1) var(--space-2); padding: var(--space-2) var(--space-2); }
  .placeholders label { gap: 0.2rem; }
  .placeholders input { padding: 0.4em 0.7em; min-width: 10ch; }
}

.checkpoint {
  margin-top: var(--space-3);
  border-left: 4px solid var(--success);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.checkpoint .cp-label {
  display: block;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-display);
  font-size: var(--fs-caption-sm);
  font-weight: 700;
  margin-bottom: 0.3em;
}

.checkpoint p { margin: 0; font-size: var(--fs-body-sm); }

/* Error build trail (previous errors, muted) */
.err-trail {
  list-style: none;
  padding: 0;
  margin-top: var(--space-4);
  color: var(--text-muted);
  opacity: 0.6;
}

.err-trail li { font-size: var(--fs-body-sm); margin-bottom: 0.4em; }

/* Seeding thumbnails (real images) */
.thumbs {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.thumbs figure { flex: 1 1 280px; margin: 0; max-width: 480px; }

.thumbs img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.thumbs figcaption {
  margin-top: var(--space-1);
  font-size: var(--fs-caption-sm);
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */

/* Aqui existiam refluxos de celular: coluna única, mapa na vertical, eixo da
   matriz escondido. Com o palco fixo em 1600x900 eles nunca mais valem — o
   slide não reflui, ele encolhe inteiro. Mantê-los como container query só
   deixaria código morto que um dia alguém tentaria "consertar". Removidos.
   A HUD, que É responsiva, ficou no @media acima.
   `.presenter-notes` também é HUD e segue no bloco de cima se precisar. */
