/* ==========================================================================
   CanalDenuncie — Apresentação executiva
   Tokens, shell de layout e componentes reutilizáveis.
   ========================================================================== */

:root {
  /* Cores institucionais */
  --navy-900: #0b223d;
  --navy-800: #10243d;
  --navy-700: #16304f;
  --blue-700: #0b376b;
  --blue-600: #0e4d92;
  --blue-500: #2a6fb5;
  --blue-050: #eaf3fc;
  --teal-500: #14b8a6;

  --surface: #ffffff;
  --soft: #f4f7fa;
  --border: #d9e3ed;
  --border-strong: #c3d3e2;
  --text: #2d3c4f;
  --muted: #66768a;

  /* Sobre fundo escuro */
  --on-dark: #ffffff;
  --on-dark-soft: rgba(255, 255, 255, 0.74);
  --on-dark-faint: rgba(255, 255, 255, 0.46);
  --on-dark-line: rgba(255, 255, 255, 0.12);

  /* Tipografia */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-hero: clamp(30px, 3.45vw, 58px);
  --fs-h1: clamp(23px, 2.35vw, 40px);
  --fs-h2: clamp(16px, 1.22vw, 21px);
  --fs-sub: clamp(15px, 1.2vw, 21px);
  --fs-body: clamp(14px, 0.98vw, 17px);
  --fs-sm: clamp(13px, 0.88vw, 15.5px);
  --fs-xs: clamp(12px, 0.78vw, 14px);
  --fs-eyebrow: clamp(10px, 0.7vw, 12.5px);

  /* Medidas de linha. 85ch é o ponto em que as quatro subheadlines do material
     caem em exatamente duas linhas: cada uma quebra em 2 linhas entre 82ch e
     89ch, e 85ch fica no centro dessa faixa comum. Ao editar um texto de
     subheadline, reconfira esse valor. */
  --measure-headline: 46ch;
  --measure-sub: 85ch;

  /* Espaçamentos */
  --pad-x: clamp(24px, 3.2vw, 56px);
  --pad-y: clamp(20px, 2.6vh, 40px);
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: clamp(12px, 1.2vw, 20px);
  --gap-lg: clamp(16px, 1.8vw, 28px);
  /* Respiro entre o cabeçalho e o corpo da seção */
  --gap-head: clamp(14px, 1.7vh, 26px);

  /* Estrutura */
  --nav-w: 244px;
  --nav-w-collapsed: 68px;

  /* Bordas, sombras, transições */
  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(13, 43, 77, 0.05);
  --shadow-lift: 0 6px 20px rgba(13, 43, 77, 0.09);
  --shadow-modal: 0 24px 70px rgba(6, 20, 38, 0.45);
  --t-fast: 140ms ease;
  --t-base: 240ms ease;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* a rolagem acontece dentro da seção, nunca na página */
}

body {
  background: var(--soft);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

svg {
  display: block;
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* ==========================================================================
   Shell
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  height: 100vh;
  height: 100dvh;
  transition: grid-template-columns var(--t-base);
}

.app.is-collapsed {
  grid-template-columns: var(--nav-w-collapsed) 1fr;
}

/* --------------------------------------------------------------------------
   Menu lateral
   -------------------------------------------------------------------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--navy-900);
  color: var(--on-dark);
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 18px 14px 16px 18px;
  border-bottom: 1px solid var(--on-dark-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-fallback {
  display: block;
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r-sm);
  color: var(--on-dark-soft);
  transition: background var(--t-fast), color var(--t-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-dark);
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--on-dark-soft);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-dark);
}

.nav-num {
  flex: none;
  min-width: 20px;
  color: var(--on-dark-faint);
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  transition: color var(--t-fast);
}

.nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--teal-500);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.nav-item[aria-current="true"] {
  background: rgba(255, 255, 255, 0.11);
  color: var(--on-dark);
  font-weight: 600;
}

.nav-item[aria-current="true"] .nav-num {
  color: var(--teal-500);
}

.nav-item[aria-current="true"] .nav-dot {
  opacity: 1;
}

.sidebar-foot {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--on-dark-line);
}

.progress {
  height: 2px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 10%;
  border-radius: inherit;
  background: var(--teal-500);
  transition: width var(--t-base);
}

.sidebar-foot-label {
  display: block;
  margin-top: 9px;
  color: var(--on-dark-faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

/* Estado colapsado (desktop) */
.app.is-collapsed .brand,
.app.is-collapsed .nav-label,
.app.is-collapsed .nav-dot,
.app.is-collapsed .sidebar-foot-label {
  display: none;
}

.app.is-collapsed .sidebar-top {
  justify-content: center;
  padding-inline: 10px;
}

.app.is-collapsed .nav-item {
  justify-content: center;
  padding-inline: 4px;
}

.app.is-collapsed .nav-num {
  min-width: 0;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Palco
   -------------------------------------------------------------------------- */

/* min-height: 0 é obrigatório aqui. Sem ele o .stage assume min-height: auto,
   se recusa a encolher abaixo do conteúdo e vaza para fora do #app — como o
   body tem overflow: hidden, o excesso ficaria cortado e inacessível. Com o
   zero, o .stage respeita a altura da tela e a rolagem acontece dentro da
   seção, que é onde o .slide já declara overflow-y: auto. */
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--soft);
}

.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--navy-900);
  color: var(--on-dark);
}

.topbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.slides {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   Seções
   -------------------------------------------------------------------------- */

.slide {
  display: none;
  height: 100%;
  min-height: 0;
  overflow-y: auto; /* rede de segurança em telas muito baixas */
  overscroll-behavior: contain;
  padding: var(--pad-y) var(--pad-x);
}

/* O cabeçalho e o corpo formam um bloco único, opticamente centrado na altura.
   "safe" evita cortar o topo do conteúdo em telas muito baixas. */
.slide.is-active {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: var(--gap-head);
  animation: slide-in var(--t-base) both;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.slide-head {
  flex: none;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-600);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.headline {
  max-width: var(--measure-headline);
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* A medida é calibrada para que a subheadline caia sempre em duas linhas,
   e o balance distribui o texto igualmente entre elas. */
.subheadline {
  margin-top: 10px;
  max-width: var(--measure-sub);
  color: var(--muted);
  font-size: var(--fs-sub);
  line-height: 1.45;
  text-wrap: balance;
}

/* O corpo ocupa apenas a altura do seu conteúdo e fica colado ao cabeçalho:
   esticá-lo abria uma lacuna grande entre o título e o conteúdo. */
.slide-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--gap-lg);
  flex: 0 1 auto;
  min-height: 0;
}

/* Seções com print da plataforma: aí sim o corpo se estica para a imagem
   aproveitar toda a altura livre da seção. */
.slide-body--fill {
  flex: 1 1 auto;
}

/* ==========================================================================
   Componentes
   ========================================================================== */

/* Grades ------------------------------------------------------------------ */

.grid {
  display: grid;
  gap: var(--gap-md);
  align-items: stretch;
}

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

/* Print amplo + coluna de apoio (seções 8 e 9) */
.grid--shot {
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

/* Trilha + capacidade de demonstração (seção 7) */
.grid--trail {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  min-height: 0;
}

/* Cards ------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  padding: clamp(14px, 1.35vw, 22px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 7px;
  background: var(--blue-600);
  color: var(--surface);
}

.card-title {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.28;
}

.card-text {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.card-num {
  color: var(--blue-500);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.6px;
}

/* Premissas do canal (seção 3) -------------------------------------------- */

.premises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(15px, 1.6vw, 26px);
}

.premise {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(11px, 1.2vh, 16px);
  padding: clamp(18px, 1.9vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Halo no canto: dá profundidade ao cartão sem competir com o texto */
.premise::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -46px;
  z-index: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blue-050) 0%, transparent 70%);
  pointer-events: none;
}

/* Mantém o conteúdo acima do halo, que é um pseudoelemento posicionado */
.premise > * {
  position: relative;
  z-index: 1;
}

.premise-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.premise-icon {
  display: grid;
  place-items: center;
  width: clamp(38px, 2.9vw, 46px);
  height: clamp(38px, 2.9vw, 46px);
  flex: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-800));
  color: var(--surface);
  box-shadow: 0 5px 14px rgba(14, 77, 146, 0.28);
}

.premise-title {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: 1.25;
  text-wrap: balance;
}

.premise-text {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  text-wrap: pretty;
}

/* Fecho da seção: ocupa as duas células restantes da última linha */
.premise-note {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.4vw, 20px);
  padding: clamp(18px, 1.9vw, 32px);
  background: linear-gradient(135deg, var(--navy-900), var(--blue-700));
  border-radius: var(--r-md);
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: clamp(14px, 1.12vw, 19px);
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

.premise-note svg {
  flex: none;
  color: var(--teal-500);
}

/* Fluxo de etapas --------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-md);
}

.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  padding: clamp(16px, 1.6vw, 26px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

/* Conector entre as etapas */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--gap-md) * -1);
  width: var(--gap-md);
  height: 1px;
  background: var(--border-strong);
}

.flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Transição obrigação → estratégia (seção 4) ------------------------------- */

.shift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-lg);
  padding: clamp(14px, 1.4vw, 20px) clamp(16px, 1.6vw, 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.shift-value {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 600;
}

.shift-item.is-target .shift-value {
  color: var(--navy-800);
}

.shift-arrow {
  flex: none;
  color: var(--blue-500);
}

.shift-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--blue-500));
}

/* Bloco de entrega (seção 6) ---------------------------------------------- */

.deliverable {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding: clamp(16px, 1.7vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
}

.deliverable-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--border);
}

.deliverable-title {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: clamp(16px, 1.35vw, 23px);
  font-weight: 700;
}

.deliverable-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 0.9vh, 13px) var(--gap-lg);
}

.deliverable-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.deliverable-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--teal-500);
}

/* Trilha / linha do tempo (seção 7) --------------------------------------- */

.panel {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  min-height: 0;
  padding: clamp(14px, 1.4vw, 22px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
}

.trail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 0.55vh, 9px) var(--gap-lg);
}

.trail li {
  position: relative;
  padding-left: 19px;
  color: var(--text);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.trail li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--blue-500);
}

/* Fio vertical ligando os marcadores de cada coluna */
.trail li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: calc(0.5em + 8px);
  bottom: -5px;
  width: 1px;
  background: var(--border-strong);
}

.check-list {
  display: grid;
  gap: clamp(5px, 0.6vh, 9px);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.check-list li svg {
  margin-top: 0.15em;
  color: var(--teal-500);
}

/* Destaques e notas ------------------------------------------------------- */

.callout {
  padding: clamp(13px, 1.3vw, 20px) clamp(16px, 1.7vw, 26px);
  background: var(--navy-900);
  border-radius: var(--r-md);
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: clamp(14px, 1.12vw, 19px);
  font-weight: 600;
  line-height: 1.38;
  text-wrap: pretty;
}

.callout--soft {
  background: var(--blue-050);
  border-left: 3px solid var(--blue-600);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--navy-800);
}

.note {
  padding-left: 13px;
  border-left: 2px solid var(--border-strong);
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.note strong {
  color: var(--text);
  font-weight: 650;
}

.final-line {
  color: var(--navy-800);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.45;
}

/* Placeholder de print ---------------------------------------------------- */

.shot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  min-height: 0;
  flex: 1;
  padding: var(--gap-lg);
  background: var(--soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  text-align: center;
}

/* Print real já inserido: substitui o tracejado de placeholder por uma
   moldura sólida com leve elevação, condizente com uma captura de tela. */
.shot--filled {
  padding: clamp(8px, 0.9vw, 14px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
}

/* Ao inserir o print real, ele substitui o conteúdo do placeholder */
.shot-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.shot-icon {
  color: var(--border-strong);
}

.shot-label {
  color: var(--muted);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.shot-screen {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.shot-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--navy-800);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.shot-expand:hover {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-card);
}

/* Marcadores explicativos ao redor do print (seção 9) */
.marker-list {
  display: grid;
  gap: var(--gap-sm);
  align-content: start;
}

.marker {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.marker-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-050);
  color: var(--blue-600);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Botões ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.btn--primary {
  background: var(--blue-600);
  color: var(--on-dark);
}

.btn--primary:hover {
  background: var(--blue-500);
}

.btn--ghost-light {
  border: 1px solid var(--on-dark-line);
  color: var(--on-dark-soft);
}

.btn--ghost-light:hover {
  border-color: var(--on-dark-faint);
  color: var(--on-dark);
}

/* --------------------------------------------------------------------------
   Seção de abertura
   -------------------------------------------------------------------------- */

.slide--cover {
  position: relative;
  overflow-x: hidden;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(48px, 8vh, 96px);
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--blue-700) 100%);
  color: var(--on-dark);
}

/* "safe" evita que o topo do conteúdo fique inacessível se a tela for muito baixa */
.slide--cover.is-active {
  justify-content: safe center;
}

/* Contêiner que recorta os elementos gráficos: preso a inset:0, ele nunca
   aumenta a área rolável da seção, mesmo com os círculos sangrando para fora. */
.cover-graphic {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--on-dark-line);
  pointer-events: none;
  z-index: 0;
}

.cover-graphic-ring,
.cover-graphic-shield {
  position: absolute;
  left: clamp(-170px, -10vw, -80px);
  bottom: clamp(-130px, -9vh, -50px);
}

.cover-graphic-ring {
  width: clamp(300px, 34vw, 480px);
  height: clamp(300px, 34vw, 480px);
}

/* Centralizado sobre os círculos: metade do lado do anel, menos metade do ícone */
.cover-graphic-shield {
  margin: 0 0 calc(clamp(300px, 34vw, 480px) / 2 - 60px) calc(clamp(300px, 34vw, 480px) / 2 - 60px);
  color: var(--on-dark-faint);
  opacity: 0.5;
}

.cover-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(24px, 3.4vh, 44px);
  max-width: 20ch;
  max-width: min(90%, 1000px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-pill);
  color: var(--on-dark-soft);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cover-headline {
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.cover-sub {
  max-width: 78ch;
  color: var(--on-dark-soft);
  font-size: var(--fs-sub);
  line-height: 1.5;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  flex: none;
  padding: 10px var(--pad-x);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-brand {
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.footer-spacer {
  flex: 1;
}

.counter {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.counter b {
  color: var(--navy-800);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
}

.ctrl {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--navy-800);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.ctrl:hover:not(:disabled) {
  background: var(--blue-050);
  border-color: var(--blue-500);
  color: var(--blue-600);
}

.ctrl:disabled {
  color: var(--border-strong);
  cursor: default;
}

.ctrl--divider {
  margin-left: var(--gap-xs);
  padding-left: calc(var(--gap-xs) + 8px);
  border-left: 1px solid var(--border);
  border-radius: 0;
  width: auto;
}

/* --------------------------------------------------------------------------
   Modal do print ampliado
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.6vw, 20px);
  background: rgba(6, 20, 38, 0.72);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  width: 100%;
  height: 100%;
  max-width: 1720px;
  max-height: 100%;
  padding: clamp(16px, 1.8vw, 26px);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-modal);
}

.modal-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-sm) var(--gap-md);
}

.modal-title {
  flex: 1;
  min-width: 0;
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
}

.modal-body {
  display: flex;
  min-height: 0;
  flex: 1;
}

/* Área de zoom ------------------------------------------------------------- */

.zoom-viewport {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: clamp(220px, 52vh, 620px);
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--soft);
  cursor: default;
  touch-action: none;
}

.zoom-viewport.is-zoomed {
  cursor: grab;
}

.zoom-viewport.is-panning {
  cursor: grabbing;
}

.zoom-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform var(--t-fast);
  will-change: transform;
}

.zoom-content.no-anim {
  transition: none;
}

/* O clone da seção perde a moldura para ocupar toda a área de zoom */
.zoom-content .shot {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.zoom-content .shot-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;   /* Safari/Chrome: não arrastar a imagem */
  pointer-events: none;      /* eventos vão para o .zoom-viewport */
}

.zoom-toolbar {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
}

.zoom-level {
  min-width: 48px;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.modal-hint {
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Backdrop do drawer (mobile)
   -------------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  background: rgba(6, 20, 38, 0.5);
}

.backdrop.is-open {
  display: block;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

/* Notebooks baixos (1366 × 768) — comprime respiros e topos de escala */
@media (max-height: 800px) {
  :root {
    --pad-y: 16px;
    --gap-lg: 15px;
    --gap-md: 12px;
    --fs-hero: clamp(28px, 3vw, 42px);
    --fs-h1: clamp(21px, 1.95vw, 30px);
    --fs-sub: clamp(13px, 0.95vw, 15px);
    --fs-body: clamp(12.5px, 0.85vw, 14px);
    --fs-sm: clamp(11.5px, 0.78vw, 13px);
    --fs-xs: clamp(10.5px, 0.7vw, 11.8px);
  }

  .slide.is-active {
    gap: var(--gap-md);
  }

  .card {
    padding: 13px;
  }
}

/* Tablet — duas colunas */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-step:not(:last-child)::after { display: none; }
}

/* Drawer — tablets estreitos e celulares */
@media (max-width: 900px) {
  .app,
  .app.is-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(84vw, 300px);
    transform: translateX(-100%);
    transition: transform var(--t-base);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  /* No drawer o menu volta ao formato completo, mesmo se colapsado no desktop */
  .app.is-collapsed .brand,
  .app.is-collapsed .nav-label,
  .app.is-collapsed .nav-dot,
  .app.is-collapsed .sidebar-foot-label {
    display: revert;
  }

  .app.is-collapsed .sidebar-top,
  .app.is-collapsed .nav-item {
    justify-content: flex-start;
  }

  .app.is-collapsed .sidebar-top { padding-inline: 18px 14px; }
  .app.is-collapsed .nav-item { padding-inline: 10px; }

  .topbar {
    display: flex;
  }

  .nav-item {
    min-height: 44px;
    font-size: 14px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid--shot,
  .grid--trail,
  .deliverable-list,
  .premises {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Em coluna única não há células sobrando para o fecho ocupar */
  .premise-note {
    grid-column: auto;
  }

  .slide {
    padding: 18px;
  }

  /* No mobile o conteúdo assume a altura natural e a seção rola (a .slide já
     tem overflow-y:auto). Sem isso, o flex-shrink comprimia os painéis da
     seção 7 abaixo da altura do conteúdo e, com overflow visível, um painel
     transbordava sobre o outro. */
  .slide-body,
  .slide-body--fill {
    flex: 0 0 auto;
  }

  .grid--trail,
  .grid--shot {
    flex: none;
    min-height: auto;
  }

  .shot {
    flex: none;
  }

  .shot-img {
    max-height: none;
  }

  /* Sem largura de coluna fixa: no mobile o texto usa toda a faixa disponível */
  .headline,
  .subheadline {
    max-width: none;
  }

  .shift {
    flex-wrap: wrap;
  }

  .shift-rule {
    display: none;
  }

  .ctrl,
  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .footer {
    padding: 8px 14px;
  }

  .footer-brand {
    display: none;
  }
}

@media (max-width: 520px) {
  .modal-panel { padding: 14px; }
}

/* Preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Impressão — evita perder conteúdo caso alguém imprima a apresentação */
@media print {
  html, body { overflow: visible; height: auto; }
  .app { display: block; height: auto; }
  .sidebar, .footer, .topbar, .backdrop, .modal { display: none !important; }
  .slide { display: flex !important; page-break-after: always; min-height: 90vh; }
}
