/* ============================================================
   "Construção de softwares com IA"
   ============================================================ */

:root {
  /* design system — Grafite + Lima */
  --blue: #18181b;        /* grafite — primária */
  --green: #a3e635;       /* lima — acento */
  --navy: #3f3f46;        /* cinza — muted/secundário */
  --black: #09090b;       /* near-black */
  --white: #ffffff;
  --clean-white: #fafafa; /* fundo */
  --gray: #e4e4e7;

  --bg: var(--clean-white);
  --ink: var(--black);
  --muted: rgba(63, 63, 70, .72);
  --line: rgba(63, 63, 70, .14);

  --font-head: 'Funnel Display', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --radius-card: 32px;
  --radius-pill: 100px;
  --shadow-card: 0 12px 32px -16px rgba(0, 9, 50, .14), 0 18px 60px rgba(0, 0, 60, .08);

  --active-color: var(--blue);
  --maxw: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, .hero-title, .slide-title, .mega { font-family: var(--font-head); }

/* ───────────────────────── DECK / SLIDES ───────────────────────── */

.deck { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

/* durante o zoom, a Web Animations API controla tudo — sem transições CSS conflitando */
.deck.is-zooming .slide { transition: none !important; }
.slide { will-change: transform, opacity; backface-visibility: hidden; }

/* clone "match-cut": a estação que voa do nó para o detalhe (e vice-versa) */
.fly-clone { transform-origin: center center; will-change: transform, opacity, filter; }
.fly-clone svg { width: 100%; height: 100%; display: block; max-width: none; max-height: none; }

.slide {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 4.4vh, 56px) clamp(40px, 6vw, 104px);
  background:
    radial-gradient(120% 90% at 86% -12%, rgba(163, 230, 53, .28), transparent 55%),
    radial-gradient(100% 80% at -6% 112%, rgba(24, 24, 27, .08), transparent 55%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), visibility 0s linear .55s;
  pointer-events: none;
}
.slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: auto;
}

.slide-top, .slide-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; letter-spacing: .01em; color: var(--muted); flex: 0 0 auto;
}
.brand-logo { display: flex; align-items: center; color: var(--black); }
.brand-logo svg { height: clamp(22px, 2.4vh, 28px); width: auto; display: block; }
.section-no { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.slide-foot { border-top: 1px solid var(--line); padding-top: 16px; }
.foot-meta { font-size: 12px; opacity: .8; }

.slide-main {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  justify-content: center; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 14px 0;
}
.slide-main--center { align-items: flex-start; }
.slide-main--cover  { justify-content: center; }
.slide-main--stage  { max-width: 1300px; justify-content: flex-start; gap: 18px; }
.slide-main--overview { gap: 14px; }

/* entrada animada */
.slide.is-active [data-reveal] { animation: revealUp .7s var(--ease) both; }
.slide.is-active [data-reveal]:nth-child(2) { animation-delay: .06s; }
.slide.is-active [data-reveal]:nth-child(3) { animation-delay: .12s; }
.slide.is-active [data-reveal]:nth-child(4) { animation-delay: .18s; }
.slide.is-active [data-reveal]:nth-child(5) { animation-delay: .24s; }
@keyframes revealUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ───────────────────────── TIPOGRAFIA ───────────────────────── */

.kicker {
  font-size: 14px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(56px, 8.4vw, 132px); line-height: .94;
  letter-spacing: -.03em; font-weight: 600;
}
.hero-sub {
  margin-top: 28px; max-width: 720px;
  font-size: clamp(18px, 1.5vw, 24px); line-height: 1.5; color: var(--muted);
}
.slide-title {
  font-size: clamp(38px, 4.6vw, 76px); line-height: 1.02;
  letter-spacing: -.02em; font-weight: 600; max-width: 18ch;
}
.impact {
  max-width: 760px; font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.5; color: var(--muted); margin-top: 6px;
}
.impact--big { font-size: clamp(22px, 2.4vw, 38px); color: var(--ink); font-weight: 500; }

.mega {
  font-size: clamp(44px, 6.4vw, 104px); line-height: 1;
  letter-spacing: -.03em; font-weight: 700;
}
.mega--accent { color: var(--blue); }
.statement .impact { margin-top: 28px; }

/* destaque estilo "marcador" — fundo lima, texto grafite (alto contraste) */
.hl {
  background: var(--green);
  color: var(--ink);
  padding: 0 .14em;
  border-radius: .1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ───────────────────────── CAPA ───────────────────────── */

.cover { display: flex; flex-direction: column; }
/* barra de acento lima abaixo do subtítulo da capa */
.cover-rule {
  margin-top: 32px; width: clamp(72px, 9vw, 132px); height: 6px;
  border-radius: 100px; background: var(--green);
}

/* ───────────────────────── MENTALIDADE ───────────────────────── */

.mindset { display: flex; flex-direction: column; gap: 22px; }
.old-way { font-size: clamp(22px, 2.6vw, 38px); color: #b4b4b4; font-weight: 500; }
.old-way s { text-decoration-thickness: 3px; }
.chain {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.chain span {
  padding: 12px 20px; border-radius: 14px; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(0, 0, 0, .05);
  font-weight: 600; font-size: clamp(14px, 1.3vw, 19px);
}
.chain i { color: var(--orange); display: grid; place-items: center; }

/* ───────────────────────── PIPELINE: overview SVG ───────────────────────── */

.pipeline-host { width: 100%; }
.flowchart {
  display: block; width: 100%; height: auto; max-height: 50vh; margin: 0 auto; overflow: visible;
}
.flowchart.is-ghost { opacity: .22; }
.flowchart .fc-dotted { animation: fcFlow 2.6s linear infinite; }
@keyframes fcFlow { to { stroke-dashoffset: -38; } }
.overview--closing .flowchart { max-height: 42vh; }

/* estações clicáveis no mapa */
.fc-station { cursor: pointer; transition: transform .25s var(--ease), filter .25s var(--ease); }
.fc-station:hover,
.fc-station:focus-visible {
  outline: none;
  transform: translateY(-7px);
  filter: drop-shadow(0 10px 18px rgba(24, 24, 27, .38));
}

.map-hint {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 14px; font-weight: 600; color: var(--blue);
}
.map-hint svg { animation: hintNudge 1.6s var(--ease) infinite; }
@keyframes hintNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ───────────────────────── PIPELINE: barra compacta ───────────────────────── */

.pipeline--compact {
  display: flex; align-items: stretch; gap: 5px; width: 100%;
  max-height: 15vh; margin-bottom: 4px;
}
.pipeline-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 9px 4px; border-radius: 12px; text-align: center; cursor: pointer;
  background: var(--white); border: 1px solid var(--line);
  transition: all .4s var(--ease);
}
.pipeline--compact .pipeline-step:hover {
  border-color: var(--navy); transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(63, 63, 70, .18); outline: none;
}
.pipeline--compact .pipeline-step.active:hover { transform: scale(1.12) translateY(-3px); }
.pipeline-step .step-badge {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--gray); color: #9a9a9a;
}
.pipeline-step .step-label {
  font-size: 8.6px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; line-height: 1.1; color: #b0b0b0;
}

.pipeline-step.future { opacity: .45; }
.pipeline-step.completed {
  opacity: 1; border-color: rgba(63, 63, 70, .25); background: rgba(63, 63, 70, .08);
}
.pipeline-step.completed .step-badge { background: var(--navy); color: #fff; }
.pipeline-step.completed .step-label { color: var(--navy); }
.pipeline-step.active {
  opacity: 1; transform: scale(1.12); z-index: 2;
  border-color: var(--navy); background: var(--white);
  box-shadow: 0 12px 36px rgba(63, 63, 70, .26);
}
.pipeline-step.active .step-badge { background: var(--navy); color: #fff; }
.pipeline-step.active .step-label { color: var(--navy); }

.pipeline-connector {
  align-self: center; flex: 0 0 10px; height: 2px;
  background-image: linear-gradient(to right, #b9c0d8 55%, transparent 0);
  background-size: 7px 2px; opacity: .7;
}
.pipeline-connector.done { background-image: linear-gradient(to right, var(--navy) 55%, transparent 0); opacity: .5; }

/* ───────────────────────── SLIDE DE ETAPA ───────────────────────── */

.stage-detail { display: flex; flex-direction: column; gap: clamp(12px, 2vh, 22px); }
.stage-toolbar { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.to-map {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--navy);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s var(--ease);
}
.to-map:hover { border-color: var(--blue); color: var(--blue); box-shadow: 0 8px 20px rgba(24, 24, 27, .16); }
.stage-head { margin-top: 4px; }
.stage-detail .slide-title { font-size: clamp(32px, 3.8vw, 60px); max-width: 22ch; }
.stage-quote {
  font-size: clamp(20px, 2vw, 30px); font-weight: 600; color: var(--active-color);
  letter-spacing: -.02em;
}

/* StageFlow: Entrada ··→ ESTAÇÃO ··→ Saída (mesma linguagem do mapa) */
.stage-flow {
  display: grid;
  grid-template-columns: 1fr 70px 1.45fr 70px 1fr;
  align-items: center;
  gap: 0;
}
.doc-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 18px 24px; box-shadow: var(--shadow-card);
}
.doc-card--out { border: 2px solid var(--active-color); }
.doc-tag {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--muted);
}
.doc-card--out .doc-tag { color: var(--active-color); }
.doc-name { font-size: clamp(15px, 1.3vw, 21px); font-weight: 600; line-height: 1.25; }

/* conector pontilhado animado (eco dos conectores do fluxograma) */
.flow-link { position: relative; height: 100%; min-height: 56px; display: flex; align-items: center; justify-content: flex-end; color: var(--active-color); }
.flow-link::before {
  content: ''; position: absolute; left: 4px; right: 16px; top: 50%; height: 2px; transform: translateY(-50%);
  background-image: linear-gradient(to right, currentColor 42%, transparent 0);
  background-size: 9px 2px; opacity: .6; animation: flowMove 1.8s linear infinite;
}
.flow-link svg { position: relative; }
@keyframes flowMove { to { background-position-x: 18px; } }

/* estação ampliada */
.stage-emblem { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.emblem-svg { width: 100%; max-width: 360px; height: auto; max-height: 22vh; display: block; }
.stage-phrase {
  text-align: center; max-width: 32ch; margin-top: 2px;
  font-size: clamp(15px, 1.4vw, 20px); font-weight: 500; line-height: 1.3; color: var(--navy);
}

/* HumanAiCards */
.ha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ha-grid--big { gap: 26px; margin: 20px 0; }
.ha-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: clamp(20px, 2vw, 30px); box-shadow: var(--shadow-card);
}
.ha-card--human { border-top: 4px solid var(--green); }
.ha-card--ai { border-top: 4px solid var(--green); }
.ha-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: clamp(16px, 1.4vw, 20px); font-weight: 700; letter-spacing: -.01em;
}
.ha-card--human .ha-head svg { color: var(--green); }
.ha-card--ai .ha-head svg { color: var(--green); }
.ha-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ha-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: clamp(14px, 1.1vw, 18px); line-height: 1.35;
}
.ha-card--human .ha-list svg { color: var(--green); margin-top: 2px; flex: 0 0 auto; }
.ha-card--ai .ha-list svg { color: var(--green); margin-top: 2px; flex: 0 0 auto; }

/* chips (arquitetura) + branch (validação) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: 12.5px; font-weight: 500; color: var(--navy);
  padding: 7px 16px; border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--line);
}
.branch { display: flex; gap: 14px; flex-wrap: wrap; }
.branch span {
  font-size: clamp(13px, 1.1vw, 16px); font-weight: 600; padding: 10px 20px; border-radius: var(--radius-pill);
  background: var(--white); border: 1px solid var(--line);
}
.branch span:first-child { border-left: 4px solid var(--navy); }
.branch span:last-child { border-left: 4px solid var(--navy); }

/* ───────────────────────── PAPÉIS / LIÇÕES / PERGUNTAS ───────────────────────── */

.roles, .lessons, .questions { display: flex; flex-direction: column; gap: 18px; width: 100%; }

.lesson-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.lesson-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  border-top: 4px solid var(--green);
  padding: 28px 24px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 14px; min-height: 220px;
}
.lesson-no { font-size: 14px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.lesson-ic { color: var(--blue); }
.lesson-card p { font-size: clamp(16px, 1.3vw, 21px); font-weight: 600; line-height: 1.25; margin-top: auto; }

.questions { align-items: center; text-align: center; }
.hero-title--q { font-size: clamp(48px, 6.5vw, 96px); }
.q-icons { display: flex; align-items: center; gap: 16px; color: var(--navy); }
.q-icons b { font-size: 30px; color: var(--muted); }
.q-accent { color: var(--blue); }

/* ───────────────────────── NAVEGAÇÃO ───────────────────────── */

.nav-btn {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 30;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .7); backdrop-filter: blur(8px);
  color: var(--ink); cursor: pointer; opacity: .35;
  transition: opacity .25s var(--ease), background .25s, transform .25s var(--ease);
}
.nav-btn:hover { opacity: 1; background: var(--white); }
.nav-btn:active { transform: translateY(-50%) scale(.92); }
.nav-btn--prev { left: 22px; } .nav-btn--next { right: 22px; }
.nav-btn[disabled] { opacity: .1; cursor: default; pointer-events: none; }

.progress {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; gap: 7px; max-width: 80vw; flex-wrap: wrap; justify-content: center;
}
.progress button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: all .3s var(--ease);
}
.progress button.is-active { width: 24px; border-radius: 999px; background: var(--ink); }

/* ───────────────────────── RESPONSIVO ───────────────────────── */

@media (max-width: 980px) {
  .ha-grid, .lesson-grid { grid-template-columns: 1fr 1fr; }
  .stage-flow { grid-template-columns: 1fr; gap: 12px; justify-items: stretch; }
  .flow-link { min-height: 34px; justify-content: center; }
  .flow-link::before { left: 50%; right: auto; top: 4px; bottom: 16px; width: 2px; height: auto; transform: translateX(-50%);
    background-image: linear-gradient(to bottom, currentColor 42%, transparent 0); background-size: 2px 9px; }
  .flow-link svg { transform: rotate(90deg); }
  .emblem-svg { max-height: 26vh; }
  .flowchart { max-height: 60vh; }
  .pipeline-step .step-label { font-size: 7.4px; }
}
@media (max-width: 600px) {
  .ha-grid, .lesson-grid { grid-template-columns: 1fr; }
  .slide { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
}
