/* Deck "Da inovação à resiliência" — tokens do DESIGN.md (dope.security: midnight terminal, violet beacons).
   Palco fixo 1920×1080 escalado pro viewport. Fontes: substitutos livres (Inter / Instrument Serif / JetBrains Mono)
   com fallback local (Segoe UI / Georgia / Consolas) se não houver internet no evento. */

:root {
  --near-black: #090909;
  --almost-white: #f7f9fa;
  --soft-white: #f0f0f0;
  --steel: #828384;
  --graphite: #474747;
  --iron: #423738;
  --ash: #6b6b6b;
  --violet: #af50ff;
  --lavender: #e1bdff;
  --hair: rgba(247, 249, 250, 0.14);
  --hair-strong: rgba(247, 249, 250, 0.28);
  --wash: rgba(237, 195, 196, 0.05);

  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', Consolas, 'Cascadia Mono', ui-monospace, monospace;

  --radius-card: 19.2px;
  --radius-pill: 1584px;
  --radius-btn: 8px;
  --radius-sm: 6px;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--near-black);
  color: var(--almost-white);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- palco ---------- */
#stage {
  position: absolute;
  width: 1920px; height: 1080px;
  left: 50%; top: 50%;
  transform-origin: center center;
}

.slide {
  position: absolute; inset: 0;
  padding: 120px 160px 110px;
  opacity: 0; visibility: hidden;
  transition: opacity 320ms ease, visibility 0s linear 320ms;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.slide.active { opacity: 1; visibility: visible; transition: opacity 320ms ease; }
.slide .notes { display: none; }

/* cabeçalho de seção fixo de cada slide */
.kicker {
  position: absolute; top: 56px; left: 160px;
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--steel);
}
#counter {
  position: absolute; top: 56px; right: 160px; z-index: 50;
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.2em; color: var(--steel);
}
#progress {
  position: absolute; left: 0; bottom: 0; height: 1px; z-index: 50;
  background: var(--almost-white); opacity: 0.5;
  transition: width 320ms ease;
}

/* ---------- tipografia ---------- */
.display {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: -0.03em; line-height: 0.88;
}
.h-xl { font-weight: 300; font-size: 112px; letter-spacing: -0.04em; line-height: 1.0; }
.h-lg { font-weight: 300; font-size: 80px; letter-spacing: -0.04em; line-height: 1.05; }
.h-md { font-weight: 300; font-size: 56px; letter-spacing: -0.03em; line-height: 1.12; }
.h-sm { font-weight: 400; font-size: 36px; letter-spacing: -0.01em; line-height: 1.2; }
.body { font-weight: 300; font-size: 30px; line-height: 1.45; color: rgba(247, 249, 250, 0.82); }
.body-sm { font-weight: 300; font-size: 24px; line-height: 1.5; color: rgba(247, 249, 250, 0.72); }
.muted { color: var(--steel); }
.lav { color: var(--lavender); }
/* nome com link do LinkedIn: mesma cor do texto, sublinhado lavanda discreto */
a.lk { color: inherit; text-decoration: underline; text-decoration-color: var(--lavender); text-decoration-thickness: 2px; text-underline-offset: 6px; }
a.lk:hover { color: var(--lavender); }
em.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.label {
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--soft-white);
}
.label.dim { color: var(--steel); }

/* carimbo de seção (Stamped Section Heading) */
.stamp {
  font-family: var(--mono); font-weight: 400; font-size: 74px;
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 0.9;
  color: var(--soft-white); white-space: nowrap;
}

.hair { height: 1px; background: var(--hair); width: 100%; }

/* ---------- componentes ---------- */
.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--hair);
  background: var(--wash);
  padding: 40px;
}
.card.bare { background: transparent; }

.bloom {
  border-radius: var(--radius-card);
  padding: 48px;
  background:
    radial-gradient(120% 140% at 0% 100%, rgba(175, 80, 255, 0.95) 0%, rgba(175, 80, 255, 0.55) 45%, rgba(60, 20, 90, 0.4) 100%),
    var(--near-black);
  color: var(--almost-white);
}

.pill {
  display: inline-flex; align-items: center; gap: 12px;
  border-radius: var(--radius-pill);
  background: var(--wash);
  padding: 14px 28px;
  font-size: 22px; font-weight: 400; color: var(--almost-white);
  border: 1px solid transparent;
}

/* fundo crepuscular: horizonte violeta (substitui a foto de céu do guia) */
.twilight::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 55% at 70% 118%, rgba(175, 80, 255, 0.55) 0%, rgba(175, 80, 255, 0.18) 38%, rgba(9, 9, 9, 0) 70%),
    radial-gradient(60% 40% at 15% 110%, rgba(225, 189, 255, 0.16) 0%, rgba(9, 9, 9, 0) 70%);
}
.glow-corner::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 60% at 100% 0%, rgba(175, 80, 255, 0.22) 0%, rgba(9, 9, 9, 0) 70%);
}
.slide { isolation: isolate; }

/* ---------- hero / boarding pass ---------- */
.hero { justify-content: center; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 80px; align-items: center; }
.hero .l1 { font-size: 160px; }
.hero .l2 { font-weight: 400; font-size: 84px; letter-spacing: -0.04em; line-height: 1.0; margin: 18px 0 22px; }
.hero .l3 { font-size: 64px; line-height: 1.0; color: var(--lavender); }

.boarding { padding: 40px 44px; display: flex; flex-direction: column; gap: 26px; }
.boarding .route { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.boarding .code { font-family: var(--mono); font-size: 54px; letter-spacing: 0.12em; }
.boarding .arrow { flex: 1; height: 1px; background: var(--hair-strong); position: relative; margin-bottom: 26px; }
.boarding .arrow::after {
  content: ''; position: absolute; right: -2px; top: -5px; width: 10px; height: 10px;
  border-top: 1px solid var(--almost-white); border-right: 1px solid var(--almost-white); transform: rotate(45deg);
}
.boarding .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.boarding .k { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; color: var(--steel); text-transform: uppercase; margin-bottom: 6px; }
.boarding .v { font-size: 22px; font-weight: 400; }
.barcode { height: 56px; background: repeating-linear-gradient(90deg, var(--almost-white) 0 2px, transparent 2px 5px, var(--almost-white) 5px 6px, transparent 6px 11px, var(--almost-white) 11px 14px, transparent 14px 16px); opacity: 0.85; border-radius: 2px; }

.coord-footer {
  position: absolute; left: 160px; right: 160px; bottom: 52px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 18px; color: rgba(247, 249, 250, 0.7);
}
.coord-footer .plus { font-family: var(--mono); margin-right: 14px; }

/* ---------- carimbo de seção (slides de abertura de ato) ---------- */
.section { justify-content: center; }
.section .stamp { font-size: 96px; }
.section .sub { margin-top: 48px; max-width: 1200px; }

/* ---------- rota (Comparison Card com linha de voo) ---------- */
.routeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 64px; }
.routeline::before {
  content: ''; position: absolute; left: 0; right: 0; top: 18px; height: 1px; background: var(--hair-strong);
}
.stop { position: relative; padding-top: 64px; }
.stop::before {
  content: ''; position: absolute; top: 9px; left: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--near-black); border: 1px solid var(--almost-white);
}
.stop.hot::before { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 28px 6px rgba(175, 80, 255, 0.55); }
.stop .num { font-family: var(--mono); font-size: 150px; line-height: 0.8; color: rgba(247, 249, 250, 0.045); position: absolute; top: 150px; right: 0; }
.stop .t { font-size: 38px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 14px; position: relative; }
.stop .d { font-size: 25px; font-weight: 300; line-height: 1.45; color: rgba(247, 249, 250, 0.7); position: relative; }
.stop .tag { margin-top: 18px; position: relative; }

/* ---------- listas ---------- */
.rows { display: flex; flex-direction: column; }
.rows .r { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--hair); align-items: baseline; }
.rows .r:last-child { border-bottom: 1px solid var(--hair); }
.rows .n { font-family: var(--mono); font-size: 18px; letter-spacing: 0.18em; color: var(--steel); }
.rows .x { font-size: 32px; font-weight: 300; line-height: 1.35; }
.rows .x small { display: block; font-size: 22px; color: var(--steel); margin-top: 6px; }
/* duas colunas de 3 itens com as linhas de separação alinhadas: todas as linhas com a altura da mais alta */
.rows.pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); grid-auto-flow: column; column-gap: 64px; }
.rows.pair .r:nth-child(3n) { border-bottom: 1px solid var(--hair); }

.tagm {
  display: inline-block; font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--hair-strong); color: var(--soft-white);
  vertical-align: middle; margin-left: 12px;
}
.tagm.dim { color: var(--steel); border-color: var(--hair); }

/* ---------- layout utilitário ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.grid-6-4 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.fill { flex: 1; min-height: 0; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mt48 { margin-top: 48px; } .mt64 { margin-top: 64px; } .mt96 { margin-top: 96px; }
.center-v { justify-content: center; }
.right { text-align: right; }

/* ---------- demos ---------- */
.demo { display: grid; grid-template-columns: 1fr 420px; gap: 48px; margin-top: 40px; flex: 1; min-height: 0; }
.demo.wide { grid-template-columns: 1fr 380px; }
.canvas-wrap {
  position: relative; border-radius: var(--radius-card); border: 1px solid var(--hair); overflow: hidden;
  background: #0c0c0d;
}
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.canvas-wrap .cap {
  position: absolute; left: 22px; bottom: 18px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--steel); pointer-events: none;
}
.panel { display: flex; flex-direction: column; gap: 22px; }
.panel .group { display: flex; flex-direction: column; gap: 10px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg .btn { font-size: 18px; padding: 10px 14px; }
.btn {
  font-family: var(--sans); font-size: 20px; font-weight: 400; color: var(--almost-white);
  background: rgba(247, 249, 250, 0.04); border: 1px solid var(--hair-strong);
  border-radius: var(--radius-btn); padding: 12px 18px; cursor: pointer;
}
.btn:hover { background: rgba(247, 249, 250, 0.1); }
.btn.on { border-color: var(--almost-white); background: var(--almost-white); color: var(--near-black); }
.btn.go { background: var(--violet); border-color: var(--violet); }
.btn.go:hover { background: #bd6dff; }

.slider, .panel .group.slider { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 16px; }
.slider .name { font-family: var(--mono); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); }
.slider .val { font-family: var(--mono); font-size: 22px; color: var(--almost-white); text-align: right; }
.slider input { grid-column: 1 / -1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--hair-strong); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -11px;
  background: var(--near-black); border: 1px solid var(--almost-white);
}
input[type=range]::-moz-range-track { height: 1px; background: var(--hair-strong); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--near-black); border: 1px solid var(--almost-white); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.stats > div { background: var(--near-black); padding: 16px 18px; }
.stats .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel); }
.stats .v { font-size: 40px; font-weight: 300; letter-spacing: -0.02em; margin-top: 4px; }

.legend { display: flex; flex-direction: column; gap: 10px; font-size: 19px; color: rgba(247, 249, 250, 0.8); }
.legend .i { display: flex; align-items: center; gap: 12px; }
.legend .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }

.tbl { width: 100%; border-collapse: collapse; font-size: 21px; }
.tbl td { padding: 12px 0; border-top: 1px solid var(--hair); }
.tbl td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 16px; }
.tbl tr:last-child td { border-bottom: 1px solid var(--hair); }

.note-line { font-size: 19px; line-height: 1.5; color: var(--steel); }
.note-line b { color: var(--almost-white); font-weight: 400; }

/* calculadora de escala */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 48px; }
.big-num { font-weight: 300; font-size: 104px; letter-spacing: -0.04em; line-height: 1; }
.big-num.v { color: var(--lavender); }
.bar-track { position: relative; height: 18px; border-radius: 9px; background: rgba(247, 249, 250, 0.06); overflow: visible; margin-top: 18px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: var(--almost-white); transition: width 200ms; }
.bar-fill.v { background: var(--violet); box-shadow: 0 0 24px rgba(175, 80, 255, 0.6); }
.bar-ram { position: absolute; top: -10px; bottom: -10px; width: 1px; background: var(--lavender); }
.bar-ram span { position: absolute; top: -26px; left: 6px; white-space: nowrap; font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; color: var(--lavender); }

/* código */
pre.code {
  font-family: var(--mono); font-size: 22px; line-height: 1.55; color: rgba(247, 249, 250, 0.9);
  background: rgba(247, 249, 250, 0.03); border: 1px solid var(--hair); border-radius: var(--radius-card);
  padding: 32px 36px; white-space: pre; overflow: hidden;
}
pre.code .c { color: var(--steel); }
pre.code .k { color: var(--lavender); }
pre.code .s { color: #cfcfcf; }

/* frase de fechamento */
.quote { font-family: var(--serif); font-style: italic; font-size: 104px; line-height: 1.0; letter-spacing: -0.03em; }

/* ---------- impressão / PDF: um slide por página ---------- */
@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { overflow: visible; height: auto; background: var(--near-black); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #stage { position: relative; left: 0; top: 0; transform: none !important; height: auto; }
  .slide { position: relative; opacity: 1; visibility: visible; width: 1920px; height: 1080px; page-break-after: always; break-after: page; }
  #counter, #progress, #help, #touch-nav { display: none !important; }
}

#help {
  position: fixed; right: 18px; bottom: 14px; z-index: 60; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--graphite); text-transform: uppercase; pointer-events: none; transition: opacity 600ms;
}

/* ---------- tema claro (sala iluminada): botão ☀/☾ ou tecla L ----------
   Inverte o palco inteiro (texto, SVG e o canvas das demos) e gira o matiz de volta: o roxo continua roxo. */
html.claro, html.claro body { background: #f6f6f6; }
html.claro #stage { filter: invert(1) hue-rotate(180deg); }
#tema {
  position: fixed; left: 14px; bottom: 10px; z-index: 95; width: 36px; height: 36px; border-radius: 18px;
  border: 1px solid var(--hair-strong); background: transparent; color: var(--steel); font-size: 18px; line-height: 1;
  cursor: pointer; opacity: 0.6;
}
#tema:hover { opacity: 1; }
html.claro #tema { color: #474747; border-color: rgba(9, 9, 9, 0.25); }
@media print { #tema { display: none !important; } }

/* ---------- celular / tablet (só tela de toque: no navegador com mouse nada disto se aplica) ---------- */
#touch-nav { display: none; }
@media (hover: none) and (pointer: coarse) {
  /* página presa à tela: arrastar o dedo não rola nem reposiciona o palco; pinça não dá zoom */
  html, body { position: fixed; inset: 0; overscroll-behavior: none; touch-action: none; }
  #help { display: none; }
  #touch-nav {
    display: flex; gap: 10px; position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%); z-index: 90;
  }
  #touch-nav button {
    width: 48px; height: 48px; border-radius: 24px; border: 1px solid var(--hair-strong);
    background: rgba(9, 9, 9, 0.72); color: var(--almost-white); font: 22px/1 var(--sans);
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; opacity: 0.8;
  }
  #touch-nav button:active { background: rgba(175, 80, 255, 0.35); }
  #touch-nav button[hidden] { display: none; }
}
