/* ============================================================
   sta_ai — AI: sua copilota no trabalho e na vida (SP2B 2026)
   Deck 24/abr/2026 — 3h — Kelly
   Palette: graphite black + mustard yellow
   ============================================================ */

:root {
  /* Brand palette */
  --bg: #1a1d20;                 /* deep graphite */
  --bg-elev: #24282d;            /* elevated surface */
  --bg-card: #2a2f35;             /* card bg */
  --bg-light: #f5f5f0;           /* warm off-white (contrast slides) */
  --accent: #F4B72E;             /* STAai mustard */
  --accent-dim: rgba(244, 183, 46, 0.18);
  --accent-hover: #e5a91e;
  --text: #f0ede6;               /* warm off-white on dark */
  --text-muted: #a8afb5;
  --text-faint: #6b7176;
  --text-dark: #1a1d20;          /* for light backgrounds */
  --border: #3a3f45;
  --border-light: #4a4f55;

  /* Tokens criados para o tema claro (tecla T). A distinção importante:
     --accent é a cor de PREENCHIMENTO (mostarda, igual nos dois temas) e
     --accent-ink é a cor de TEXTO em destaque, que precisa escurecer no tema
     claro para continuar legível. --on-accent é o texto que fica POR CIMA da
     mostarda, e por isso é escuro nos dois temas. */
  --bg-card-2: #31363c;          /* superfície de card mais clara (diagramas) */
  --accent-ink: #F4B72E;         /* mostarda como texto */
  --on-accent: #1a1d20;          /* texto sobre fundo mostarda */
  --diagram-core: #1a1d20;       /* miolo escuro do diagrama do agente */
  color-scheme: dark;

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

/* ============================================================
   Tema claro — alternado com a tecla T (ver nav.js).
   Existe para o caso de o projetor da sala lavar as cores e o
   fundo grafite virar um cinza sujo. A mostarda continua sendo a
   cor de marca; o que muda é o fundo, o texto e a versão do logo.
   ============================================================ */

:root[data-theme="light"] {
  --bg: #f5f5f0;
  --bg-elev: #eceadf;
  --bg-card: #ffffff;
  --bg-card-2: #e7e4d7;
  --accent: #F4B72E;
  --accent-dim: rgba(244, 183, 46, 0.30);
  --accent-hover: #e5a91e;
  --accent-ink: #8a6200;
  --on-accent: #1a1d20;
  --diagram-core: #1a1d20;
  --text: #1a1d20;
  --text-muted: #4d545a;
  --text-faint: #82898f;
  --text-dark: #1a1d20;
  --border: #dcd9cd;
  --border-light: #c6c2b4;
  color-scheme: light;
}

/* Troca do logo conforme o tema: os arquivos "-dark" têm letra clara (para
   fundo escuro) e os "-light" têm letra escura (para fundo claro). */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: inline-block; }

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  font-feature-settings: "ss01", "cv01", "cv11";
}

/* ============================================================
   Slide container
   ============================================================ */

.deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 64px 96px 96px;
  display: none;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 320ms ease-out;
}

.slide.active {
  display: flex;
  opacity: 1;
}

.slide-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 800;
  margin-bottom: 32px;
}

h1 .accent {
  color: var(--accent-ink);
}

h1 .underline-accent {
  background: linear-gradient(transparent 78%, var(--accent) 78%, var(--accent) 94%, transparent 94%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 0 2px;
}

h2 {
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 700;
  margin-bottom: 24px;
}

h3 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-ink);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-ink);
  margin-bottom: 20px;
}

.eyebrow-white {
  color: var(--text-muted);
}

p {
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 920px;
}

p strong, strong {
  color: var(--text);
  font-weight: 700;
}

em {
  font-style: italic;
  color: var(--text);
}

.lead {
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}

ul, ol {
  list-style: none;
  padding: 0;
}

ul li, ol li {
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: 28px;
  position: relative;
  margin-bottom: 14px;
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 12px;
  height: 3px;
  background: var(--accent);
}

ol {
  counter-reset: item;
}

ol li {
  counter-increment: item;
}

ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-ink);
  font-weight: 700;
}

/* ============================================================
   Header bar (persistent on all slides)
   ============================================================ */

.deck-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: none;
}

.deck-logos {
  display: flex;
  align-items: center;
  gap: 18px;
}

.deck-logos img {
  height: 22px;
  opacity: 0.9;
}

.deck-logos .sep {
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 300;
}

.deck-logos .marca-secundaria {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
}

.deck-meta {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* ============================================================
   Footer bar (progress + keys hint)
   ============================================================ */

.deck-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: none;
}

.progress {
  flex: 1;
  max-width: 360px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 300ms ease-out;
}

.slide-counter {
  font-size: 12px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.keys-hint {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  gap: 16px;
  pointer-events: auto;
}

.keys-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-right: 4px;
}

/* ============================================================
   Slide variants
   ============================================================ */

/* Hero slide (opening) */
.slide--hero {
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, var(--accent-dim), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(244, 183, 46, 0.08), transparent 70%),
    var(--bg);
}

.slide--hero .slide-inner {
  text-align: left;
}

.slide--hero .eyebrow {
  font-size: 14px;
  letter-spacing: 0.2em;
}

.slide--hero h1 {
  font-size: clamp(56px, 7.5vw, 120px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 28px;
}

.slide--hero .lead {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.4;
}

.slide--hero .meta-row {
  margin-top: 48px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.slide--hero .meta-row div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slide--hero .meta-row .label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.slide--hero .meta-row .value {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}

/* Section divider (between blocks) */
.slide--section {
  background: var(--bg);
}

.slide--section .section-number {
  font-size: clamp(100px, 12vw, 180px);
  font-weight: 900;
  color: var(--accent-ink);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  opacity: 0.25;
}

.slide--section h1 {
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 800;
  margin-bottom: 32px;
}

.slide--section .section-lead {
  font-size: clamp(20px, 1.7vw, 26px);
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.5;
}

/* Standard content slide */
.slide--content .content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.slide--content .content-grid--2col {
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.slide--content .content-grid--illustration-left {
  grid-template-columns: minmax(380px, 40%) 1fr;
  gap: 64px;
  align-items: center;
}

/* Cards grid */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all 200ms ease-out;
}

.card--accent {
  border-color: var(--accent-ink);
  background: linear-gradient(135deg, var(--bg-card), rgba(244, 183, 46, 0.06));
}

.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}

.card .card-eyebrow {
  font-size: 11px;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  color: var(--text-muted);
}

/* Quote callout (for X posts) */
.quote-card {
  background: #000;
  border: 1px solid #2a2f35;
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 720px;
  margin: 24px auto;
}

.quote-card .qc-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.quote-card .qc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-ink);
  font-size: 16px;
  flex-shrink: 0;
}

.quote-card .qc-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.quote-card .qc-handle {
  color: #6e767d;
  font-size: 14px;
  margin-top: 2px;
}

.quote-card .qc-body {
  color: #e7e9ea;
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
}

.quote-card .qc-body strong {
  color: #fff;
}

.quote-card .qc-body em {
  color: var(--accent-ink);
  font-style: normal;
  font-weight: 600;
}

.quote-card .qc-meta {
  color: #6e767d;
  font-size: 13px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #1a1a1a;
}

.quote-card .qc-meta strong {
  color: #e7e9ea;
}

/* Two-column split slide */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Timeline flow (amarração visual) */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 40px;      /* generous breathing room when items wrap into new row */
  column-gap: 0;
  margin-top: 40px;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  flex: 1 1 160px;    /* each step can grow, min 160px */
  min-width: 140px;
  max-width: 220px;
}

.flow-step .fs-num {
  font-size: 11px;
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.flow-step .fs-label {
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}

.flow-arrow {
  color: var(--accent-ink);
  font-size: 18px;
  padding: 0 4px;
  font-weight: 600;
}

/* Code / prompt box */
.prompt-box {
  background: #000;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: #d4f4d4;
  margin: 24px 0;
}

.prompt-box .label {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Big stat display */
.stat-row {
  display: flex;
  gap: 64px;
  margin: 32px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat .stat-num {
  font-size: clamp(40px, 4vw, 64px);
  font-weight: 900;
  color: var(--accent-ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* SVG image placement */
.hero-image {
  width: 100%;
  max-height: 420px;
  display: block;
  margin: 24px auto;
  border-radius: 10px;
}

.hero-image--sm {
  max-height: 280px;
}

.hero-image--md {
  max-height: 360px;
}

.hero-image--lg {
  max-height: 480px;
}

/* Utility */
.text-center { text-align: center; }
.accent-text { color: var(--accent-ink); }
.muted-text { color: var(--text-muted); }

/* ============================================================
   Responsive (projector friendly)
   ============================================================ */

/* Escopado em `screen`: sem isso o viewport estreito da impressão dispara este
   breakpoint e o PDF sai com as colunas empilhadas, diferente do que a plateia
   vê projetado. O comportamento responsivo em tela continua igual. */
@media screen and (max-width: 1100px) {
  .slide {
    padding: 48px 56px 80px;
  }
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .split-2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ============================================================
   Mobile (<=768px) — o deck vira um documento scrollável.
   No desktop a apresentação é um slide-deck (slides position:absolute,
   height 100vh, overflow hidden, um por vez via JS). No celular esse
   modelo deixava os títulos gigantes estourarem a altura fixa e, sem
   scroll, o conteúdo ficava cortado/invisível ("não abre"). Aqui
   empilhamos todos os slides na vertical, com scroll, ignorando o
   controle de visibilidade do JS.
   ============================================================ */
@media screen and (max-width: 768px) {
  html, body {
    height: auto;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    position: static;
  }
  .deck {
    position: static;
    inset: auto;
    height: auto;
    overflow: visible;
  }
  /* Todos os slides visiveis e empilhados (vence o display:none do JS) */
  .slide,
  .slide:not(.active) {
    display: flex !important;
    opacity: 1 !important;
    position: relative !important;
    inset: auto !important;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 80px 24px 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .slide-inner { max-width: 100%; }

  /* Encolhe os titulos gigantes para caber no portrait estreito */
  h1 { font-size: clamp(32px, 8.5vw, 46px); }
  h2 { font-size: clamp(26px, 6.5vw, 38px); }
  .slide--hero h1 { font-size: clamp(38px, 11vw, 54px); }
  .slide--hero .lead { font-size: 17px; }
  .slide--section .section-number { font-size: clamp(64px, 22vw, 96px); }
  .slide--section h1 { font-size: clamp(34px, 9vw, 48px); }

  /* Grids viram coluna unica */
  .content-grid,
  .content-grid--2col,
  .content-grid--illustration-left,
  .card-grid--4,
  .split-2 {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .hero-image { max-width: 100%; height: auto; }

  /* Header rola junto; rodape de navegacao por teclado nao se aplica */
  .deck-header {
    position: static;
    padding: 16px 20px;
  }
  .deck-footer { display: none; }
}

/* ============================================================
   Print / PDF — Chrome headless --print-to-pdf
   Every slide becomes a full-page landscape page, no UI chrome.
   Each slide is constrained to its page to avoid ugly cutoffs.
   ============================================================ */

@media print {
  @page {
    size: 1920px 1080px;   /* widescreen 16:9, matches slide proportions */
    margin: 0;
  }

  html, body {
    width: 1920px;
    height: auto;
    overflow: visible;
    background: var(--bg);
    color: var(--text);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    height: auto !important;
    overflow: visible !important;
  }

  .deck {
    position: static !important;
    inset: auto !important;
    overflow: visible;
    height: auto;
  }

  /* Every slide renders as a page, visible, stacked */
  .slide,
  .slide:not(.active) {
    display: flex !important;
    opacity: 1 !important;
    position: relative !important;
    inset: auto !important;
    width: 1920px !important;
    height: 1080px !important;
    box-sizing: border-box;
    padding: 80px 120px 110px;
    page-break-after: always;
    page-break-inside: avoid;
    break-after: page;
    break-inside: avoid;
    overflow: hidden;
  }

  .slide:last-of-type {
    page-break-after: auto;
    break-after: auto;
  }

  /* Hide persistent UI chrome (header branding stays light, footer gone) */
  .deck-header {
    position: absolute !important;
    top: 40px !important;
    left: 40px !important;
    right: 40px !important;
    padding: 0 !important;
  }

  .deck-footer {
    display: none !important;
  }

  /* Prevent SVG animations (blinking cursor etc.) during print */
  .slide svg animate {
    animation-play-state: paused !important;
  }

  /* Keep cards from being split across pages */
  .card,
  .quote-card,
  .flow-step,
  .prompt-box {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Pretty — no hover effects on print */
  .card:hover,
  .flow-step:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}
