*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: var(--weight-book);
  line-height: var(--leading-relaxed);
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

button { font: inherit; color: inherit; }

h1, h2, h3, p { text-wrap: balance; }
p, li { text-wrap: pretty; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-extrabold);
  margin: 0;
}

p { margin: 0; }

::selection { background: var(--c-green); color: var(--c-black); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.deck {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.topbar, .bottombar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 22px;
  background: #000;
  z-index: 5;
}

.topbar { border-bottom: 1px solid var(--border-subtle); min-height: 52px; }
.bottombar { border-top: 1px solid var(--border-subtle); min-height: 52px; }

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { width: 118px; height: auto; }

.chapter {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-green);
}

.top-spacer { margin-left: auto; }

.timebar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 8;
  pointer-events: none;
}

.timebar::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: var(--c-green);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-hover); }
.btn:active { background: var(--accent-press); }

.btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover { background: var(--bg-surface); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

.btn-icon { width: 36px; padding: 0; font-size: 18px; }

#toggle-notes[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--c-green);
}

body.is-sala #toggle-notes { display: none; }

.counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 7ch;
  text-align: center;
}

.stage { position: relative; min-height: 0; }

.slide {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 36px 56px 28px;
  background: var(--bg-canvas);
}

.slide.is-cover {
  display: flex;
  align-items: center;
  background-image: url("../assets/grafismo.svg");
  background-size: 120px 120px;
}

.js .slide.is-cover { display: none; }
.js .slide.is-cover.is-on { display: flex; }

.slide.is-cover .slide-inner { width: min(980px, 100%); }

.js .slide { display: none; }
.js .slide.is-on { display: block; }

html.no-js,
html.no-js body { height: auto; overflow: auto; }
html.no-js .deck { display: block; height: auto; }

.no-js .slide {
  position: relative;
  display: block;
  min-height: 100vh;
  border-bottom: 1px solid var(--border-subtle);
}

.slide-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-green);
}

.slide h1 {
  max-width: 16em;
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  letter-spacing: var(--tracking-tightest);
  font-weight: var(--weight-black);
}

.slide h2 {
  max-width: 18em;
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  letter-spacing: var(--tracking-tightest);
}

.lede {
  max-width: 34em;
  margin-top: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: #f2f2f2;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: var(--tracking-tight);
}

.slide.is-cover .lede {
  border-bottom: 0;
  padding-bottom: 0;
  max-width: 22em;
}

.lockup {
  max-width: 760px;
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--c-green);
  color: #000;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

.hint {
  margin-top: 22px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.stack { display: grid; gap: 14px; margin-top: 22px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.split > *,
.trio > *,
.stack > * { min-width: 0; }

.card, .curiosity, .bubble {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.card h3, .curiosity h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.card p, .curiosity p, .bubble p { color: var(--c-gray-300); font-size: 0.98rem; }
.card p + p, .curiosity p + p { margin-top: 8px; }
.card strong, .curiosity strong { color: var(--text-primary); font-weight: 650; font-weight: 600; }

.kicker {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-green);
  font-weight: 500;
}

.curiosity {
  background: var(--accent-soft);
  border: 1px solid var(--c-green);
}

.curiosity h3 { font-size: 0.95rem; }

.bubble-bad {
  background: var(--bg-surface-sunken);
  border: 1px solid var(--border-default);
}

.bubble-good {
  background: var(--accent-soft);
  border: 1px solid var(--c-green);
}

.bubble .kicker { margin-bottom: 8px; }
.bubble-bad .kicker { color: var(--text-tertiary); }

.ask {
  margin-top: 18px;
  padding: 12px 0 12px 14px;
  border-left: 3px solid var(--c-green);
  font-family: var(--font-display);
  font-weight: 650;
  font-weight: 600;
  font-size: 1.05rem;
}

.pyramid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  width: min(720px, 100%);
}

.pyramid div {
  width: var(--w);
  margin-inline: auto;
  min-height: 52px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-weight: 650;
  font-weight: 600;
}

.pyramid small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend {
  margin-top: 16px;
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.map { display: grid; gap: 8px; margin-top: 18px; }

.map-row {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.map-row strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills li {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-surface-sunken);
  font-size: 12.5px;
  font-weight: 600;
}

.pills li.hot {
  background: var(--c-green);
  color: #000;
  border-color: var(--c-green);
}

.shifts { display: grid; gap: 0; margin-top: 8px; }

.shift {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.shift b {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-green);
  font-weight: 500;
}

.slide .note { display: none !important; }

.note-drawer {
  max-height: 26vh;
  overflow: auto;
  background: #000;
  border-top: 3px solid var(--c-green);
  padding: 12px 22px 14px;
  color: var(--c-gray-300);
  font-size: 14.5px;
}

.note-drawer h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--c-green);
  font-weight: 700;
  margin-bottom: 6px;
}

.note-drawer ul { margin: 0; padding-left: 1.1rem; }
.note-drawer li + li { margin-top: 4px; }

.overview {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.86);
  overflow: auto;
  padding: 28px;
}

.overview-grid {
  width: min(1000px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.overview button {
  text-align: left;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.overview button small {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-green);
  letter-spacing: 0.08em;
}

.overview button.is-on { border-color: var(--c-green); background: var(--accent-soft); }
.overview button:hover { border-color: var(--border-strong); }

@media (max-width: 980px) {
  .split, .trio, .overview-grid { grid-template-columns: 1fr; }
  .map-row, .shift { grid-template-columns: 1fr; gap: 6px; }
  .slide { padding: 18px 16px 12px; }
  .brand-kicker, .chapter { display: none; }
}

@media (max-height: 760px) {
  .slide { padding: 18px 36px 14px; }
  .slide h1 { font-size: clamp(2rem, 4vw, 3rem); }
  .slide h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
  .lede { margin-top: 10px; padding-bottom: 12px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); }
  .card, .curiosity, .bubble { padding: 12px 14px; }
  .trio, .split, .stack { margin-top: 12px; gap: 8px; }
  .lockup { margin-top: 16px; padding: 12px 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .slide.is-on { animation: rise 200ms var(--ease-out); }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body { overflow: auto; background: #fff; color: #111; }
  .topbar, .bottombar, .timebar, .note-drawer, .overview { display: none !important; }
  .deck { display: block; height: auto; }
  .js .slide, .slide { display: block !important; position: relative; min-height: 100vh; page-break-after: always; color: #111; background: #fff; }
  .card, .curiosity, .bubble, .map-row { border-color: #ccc; background: #fff; }
  .lede, .card p, .curiosity p { color: #222; }
  .lockup { background: #44D62C; color: #000; }
}
