
@font-face{font-family:"DM Sans";src:url(fonts/dm-sans-latin-wght-normal.woff2) format("woff2");font-weight:100 1000;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"DM Sans";src:url(fonts/dm-sans-latin-ext-wght-normal.woff2) format("woff2");font-weight:100 1000;font-style:normal;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Instrument Serif";src:url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Instrument Serif";src:url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");font-weight:400 700;font-style:normal;font-display:swap}
/* ATLAS.ERP — landing. Tokens seguem src/app/globals.css (redesign).
   Seções "paper" acompanham o tema do visitante; seções "stage" são o palco
   escuro nos dois temas. */

:root {
  color-scheme: light;
  --paper: #f5f6f6;
  --sheet: #ffffff;
  --chrome: #eceeef;
  --ink: #100c08;
  --ink-2: #55595c;
  --ink-3: #62666a;
  --line: #dbe0e1;
  --line-2: #e8ebec;
  --line-strong: #c4cbcd;
  --fire: #ff9408;
  --fire-deep: #a34d00;
  --fire-soft: #fff3e3;
  --shadow-shot: 0 1px 0 rgba(16, 12, 8, 0.04), 0 18px 40px -18px rgba(16, 12, 8, 0.28);

  --stage: #0e0b09;
  --stage-2: #15120f;
  --stage-3: #1c1814;
  --stage-ink: #f3f4f5;
  --stage-mute: #a9adaf;
  --stage-line: #2b2723;
  --stage-line-2: #3d3833;
  --stage-fire: #ffb14d;

  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Rótulos, metadados e selos: a mesma DM Sans do corpo (a mono fica só
     para código, rotas de tela, códigos de registro e a marca-d'água). */
  --label: var(--sans);
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --top: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0e0b09;
    --sheet: #15120f;
    --chrome: #090705;
    --ink: #f3f4f5;
    --ink-2: #a9adaf;
    --ink-3: #8e9396;
    --line: #2b2723;
    --line-2: #221e1a;
    --line-strong: #3d3833;
    --fire-deep: #ffb14d;
    --fire-soft: #2e1e0b;
    --shadow-shot: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --stage: #070504;
    --stage-2: #110e0b;
    --stage-3: #181411;
    --stage-line: #221e1a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e0b09;
  --sheet: #15120f;
  --chrome: #090705;
  --ink: #f3f4f5;
  --ink-2: #a9adaf;
  --ink-3: #8e9396;
  --line: #2b2723;
  --line-2: #221e1a;
  --line-strong: #3d3833;
  --fire-deep: #ffb14d;
  --fire-soft: #2e1e0b;
  --shadow-shot: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --stage: #070504;
  --stage-2: #110e0b;
  --stage-3: #181411;
  --stage-line: #221e1a;
}

/* Contexto de cor por superfície: componentes usam só --c-*. */
body,
.paper {
  --c-bg: var(--paper);
  --c-ink: var(--ink);
  --c-mute: var(--ink-2);
  --c-line: var(--line);
  --c-line-2: var(--line-2);
  --c-accent: var(--fire-deep);
  --c-raised: var(--sheet);
  --c-evo-bg: var(--fire-soft);
}
.sheet {
  --c-bg: var(--sheet);
  background: var(--sheet);
  color: var(--ink);
}
.stage {
  --c-bg: var(--stage);
  --c-ink: var(--stage-ink);
  --c-mute: var(--stage-mute);
  --c-line: var(--stage-line);
  --c-line-2: var(--stage-line);
  --c-accent: var(--stage-fire);
  --c-raised: var(--stage-2);
  --c-evo-bg: rgba(255, 148, 8, 0.14);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--fire);
  color: #100c08;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.paper {
  background: var(--paper);
  color: var(--ink);
}
/* Telas que sangram até a borda não criam rolagem lateral (clip não quebra sticky). */
main > section {
  overflow-x: clip;
}
.stage {
  background: var(--stage);
  color: var(--stage-ink);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--fire);
  color: #100c08;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- marca */
.mark .mark-mod {
  fill: currentColor;
}
.mark .mark-core {
  fill: var(--fire);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 15px;
  color: var(--stage-ink);
}
.brand .mark {
  color: var(--stage-ink);
}
.brand-dim {
  color: var(--stage-mute);
}

/* ---------------------------------------------------------------- tipografia */
.display,
.display-2,
.display-3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
.display {
  font-size: clamp(3rem, 6.3vw, 6.75rem);
  line-height: 0.92;
}
.display-2 {
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: 0.95;
}
.display-3 {
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  line-height: 1;
}
.display em,
.display-2 em {
  font-style: italic;
}

.eyebrow,
.kicker,
.module-index,
.q,
.legend-title {
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-mute);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 5px;
  border-radius: 2px;
  background: var(--fire);
}

.section-head {
  display: grid;
  gap: 20px;
  max-width: 880px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--c-mute);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- botões */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn span {
  transition: transform 0.25s var(--ease);
}
.btn:hover span {
  transform: translate(2px, 0);
}
.btn-fire:hover span:only-of-type {
  transform: translateY(2px);
}
.btn-fire {
  background: var(--fire);
  color: #100c08;
}
.btn-fire:hover {
  background: #ffa634;
}
.btn-ghost {
  border-color: var(--stage-line-2);
  color: var(--stage-ink);
}
.btn-ghost:hover {
  background: var(--stage-3);
}
.paper .btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.paper .btn-ghost:hover {
  background: var(--sheet);
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
}

/* ---------------------------------------------------------------- selos de estado */
/* Selos discretos: um sinal e o nome em cinza. Quem lê a narrativa passa
   por eles; quem procura o detalhe distingue os quatro pelo sinal:
   ● na tela · ○ consulta · ◌ na API · ● (fogo) em evolução. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 20px;
  padding: 0;
  font: 500 11.5px/1 var(--label);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--c-mute);
}
.chip::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-sizing: border-box;
}
.chip-tela::before {
  background: var(--c-ink);
}
.chip-consulta::before {
  border: 1.5px solid var(--c-ink);
}
.chip-api::before {
  border: 1.5px dashed var(--c-mute);
}
.chip-evolucao {
  color: var(--c-accent);
}
.chip-evolucao::before {
  background: var(--fire);
}

/* ---------------------------------------------------------------- telas */
.shot {
  margin: 0;
  display: grid;
  gap: 12px;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  background: var(--chrome);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  min-width: 0;
}
.stage .shot-bar {
  background: var(--stage-3);
  border-color: var(--stage-line-2);
}
.shot-mark {
  display: grid;
  gap: 2px;
  flex: none;
}
.shot-mark i {
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--c-mute);
  opacity: 0.6;
}
.shot-mark i:nth-child(2) {
  width: 9px;
  background: var(--fire);
  opacity: 1;
}
.shot-route {
  font: 500 12px/1 var(--mono);
  color: var(--c-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.shot-frame {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: #f5f6f6;
  box-shadow: var(--shadow-shot);
  margin-top: -12px;
}
.stage .shot-frame {
  border-color: var(--stage-line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot-zoom {
  display: block;
  height: 100%;
  cursor: zoom-in;
  outline-offset: -3px;
}
.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(16, 12, 8, 0.82);
  color: #f3f4f5;
  font: 600 12px/1 var(--sans);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
  pointer-events: none;
}
.shot-zoom:hover .zoom-hint,
.shot-zoom:focus-visible .zoom-hint {
  opacity: 1;
  transform: none;
}
.shot-frame img {
  transition: transform 0.6s var(--ease);
}
.shot-zoom:hover img {
  transform: scale(1.012);
}
.lightbox {
  width: min(1480px, 100vw - 32px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--stage-line-2);
  border-radius: 14px;
  background: var(--stage-2);
  color: var(--stage-ink);
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(7, 5, 4, 0.82);
  backdrop-filter: blur(4px);
}
.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] {
    animation: lbIn 0.35s var(--ease);
  }
}
@keyframes lbIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
}
.lb-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--stage-line-2);
}
.lb-caption {
  margin: 0 auto 0 0;
  font-size: 14px;
  color: var(--stage-mute);
}
.lb-body {
  overflow: auto;
  background: #f5f6f6;
}
.lb-body img {
  width: 100%;
  height: auto;
}
.focus {
  position: absolute;
  z-index: 1;
  border: 2px solid var(--fire);
  border-radius: 8px;
  box-shadow: 0 0 0 5px rgba(255, 148, 8, 0.2);
  pointer-events: none;
}
.stage-item .focus,
.step-shot .focus {
  transition: opacity 0.5s var(--ease) 0.25s, transform 0.6s var(--ease) 0.25s;
}
.js .stage-item:not(.is-active) .focus {
  opacity: 0;
  transform: scale(1.04);
}
.shot figcaption {
  font-size: 14px;
  color: var(--c-mute);
  max-width: 60ch;
}

/* ---------------------------------------------------------------- topo */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--stage) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--stage-line);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--top);
}
.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.topnav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--stage-mute);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.topnav a:hover {
  color: var(--stage-ink);
  background: var(--stage-3);
}
@media (max-width: 760px) {
  .topnav {
    display: none;
  }
  .topbar .btn {
    margin-left: auto;
  }
}

.btn-enter {
  background: var(--stage-ink);
  color: #100c08;
}
.btn-enter:hover {
  background: #fff;
}
.be-short {
  display: none;
}
@media (max-width: 520px) {
  .be-long {
    display: none;
  }
  .be-short {
    display: inline;
  }
}
.topnav {
  position: relative;
}
.topnav a[aria-current="true"] {
  color: var(--stage-ink);
}
.topnav-ink {
  position: absolute;
  left: 0;
  bottom: -11px;
  height: 2px;
  width: var(--w, 0);
  border-radius: 2px;
  background: var(--fire);
  transform: translateX(var(--x, 0));
  opacity: var(--o, 0);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
}

/* ---------------------------------------------------------------- abertura */
/* Cena de produto: o pedido real no centro, marcadores nos botões que geram
   trabalho em outra área, linhas até a tela de cada área e a convergência em
   Gestão. Posições em % de um quadro de 1320 × 530 (definidas no build). */
.hero {
  position: relative;
  padding-block: clamp(28px, 3.2vw, 48px) clamp(56px, 7vw, 104px);
  overflow: clip;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0 max(var(--gutter), calc((100vw - var(--max)) / 2));
  z-index: -1;
  pointer-events: none;
}
.hero-bg .gl {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--i) / 12 * 100%);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--stage-line) 18%, var(--stage-line) 82%, transparent);
  transform-origin: 50% 0;
}
.hero-glow {
  position: absolute;
  right: -10%;
  bottom: -20%;
  width: 70%;
  aspect-ratio: 1.6;
  background: radial-gradient(closest-side, rgba(255, 148, 8, 0.07), transparent 70%);
}
.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(44px, 4vw, 60px);
}
.hero-title-col {
  display: grid;
  gap: 22px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--stage-mute);
}
.eyebrow-bar {
  width: 22px;
  height: 5px;
  border-radius: 2px;
  background: var(--fire);
}
.hero .display {
  font-size: clamp(2.9rem, 6vw, 6.6rem);
  line-height: 0.94;
}
.display .ln {
  display: block;
  overflow: hidden;
  padding: 0 0.12em 0.1em 0;
  margin-bottom: -0.1em;
}
.display .ln > span {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}
.display .ln-last em {
  font-style: italic;
}
.fire-bar {
  position: absolute;
  left: 0.02em;
  right: 0.06em;
  bottom: 0.04em;
  height: 0.07em;
  border-radius: 0.03em;
  background: var(--fire);
  transform-origin: left;
}
.hero-side {
  display: grid;
  gap: 24px;
  padding-bottom: 0.4em;
}
.hero .lead {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--stage-mute);
  text-wrap: pretty;
}

.hs {
  position: relative;
}
.hs-box {
  position: relative;
  aspect-ratio: 1320 / 515;
  width: 100%;
}
.hs-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 1;
}
.hs-path {
  fill: none;
  stroke: #8a837b;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}
.hs-api .hs-path {
  stroke-dasharray: 5 6;
}
.hs-draw {
  fill: none;
  stroke: #fff;
  stroke-width: 10;
}
.hs-sig {
  fill: var(--fire);
  opacity: 0;
}
.hs-api .hs-sig {
  fill: var(--stage-fire);
}
.is-live .hs-sig {
  opacity: 1;
}
.hs-api.hs-link .hs-sig {
  opacity: 0;
}
.is-live .hs-api.hs-link .hs-sig {
  opacity: 0.7;
}
.hs-frag {
  position: absolute;
  z-index: 2;
  margin: 0;
  will-change: transform;
}
.hs-media {
  position: relative;
  border-radius: 8px;
  background: #f5f6f6;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px -24px rgba(0, 0, 0, 0.9);
}
.hs-img {
  display: block;
  border-radius: inherit;
  overflow: hidden;
  cursor: zoom-in;
}
.hs-img img {
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease);
}
.hs-img:hover img {
  transform: scale(1.015);
}
.hs-order .hs-media {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 40px 90px -30px rgba(0, 0, 0, 0.95);
}
.hs-gestao .hs-media::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 2px;
  border-radius: 8px 8px 0 0;
  background: var(--fire);
  z-index: 1;
}
.hs-tag {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stage-mute);
}
.hs-tag b {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--fire);
  color: #100c08;
  font-size: 10px;
  letter-spacing: 0;
}
.hs-api .hs-tag b {
  background: transparent;
  color: var(--stage-fire);
  box-shadow: inset 0 0 0 1.4px var(--stage-fire);
}
.hs-tag code {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--stage-ink);
}
.hs-apichip {
  font-style: normal;
  padding: 2px 5px;
  border: 1px dashed var(--stage-mute);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.04em;
}
.hs-cap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hs-hot {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--fire);
  color: #100c08;
  font: 700 11px/1 var(--mono);
  box-shadow: 0 0 0 3px rgba(16, 12, 8, 0.55);
  pointer-events: none;
}
.hs-hot-api {
  background: #100c08;
  color: var(--stage-fire);
  box-shadow:
    inset 0 0 0 1.5px var(--stage-fire),
    0 0 0 3px rgba(16, 12, 8, 0.4);
}
.hs-hot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--fire);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .is-live .hs-hot::after {
    animation: hotRing 2.8s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
    animation-delay: calc(var(--k, 0) * 0.35s);
  }
}
@keyframes hotRing {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  60%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}
.hs-signals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.hs-signal {
  position: absolute;
  padding: 4px 8px;
  border: 1px solid var(--stage-line-2);
  border-radius: 6px;
  background: rgba(21, 18, 15, 0.8);
  font: 500 12px/1 var(--mono);
  color: var(--stage-ink);
  white-space: nowrap;
  opacity: 0;
}
.hs-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: clamp(28px, 4vw, 44px) 0 0;
  font-size: 13px;
  color: var(--stage-mute);
}
.lg-solid,
.lg-dash {
  display: inline-block;
  width: 24px;
  border-top: 1.6px solid #8a837b;
}
.lg-dash {
  border-top-style: dashed;
  margin-left: 12px;
}
.hs-legend-note {
  margin-left: auto;
  color: var(--stage-mute);
  opacity: 0.8;
}

/* estado inicial da sequência (só com JS e movimento; ver INTRO_GUARD) */
.intro [data-intro],
.intro .hs-frag,
.intro .hs-lines,
.intro .hero .ln > span,
.intro .hero-bg .gl {
  opacity: 0;
}

@media (max-width: 1099px) {
  .hero-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .hs-tag {
    font-size: 10px;
    gap: 6px;
  }
  .hs-tag code {
    font-size: 10px;
  }
  .hs-apichip {
    display: none;
  }
  .hs-box {
    margin-top: 28px;
  }
}
/* Tablet e celular: sem a coreografia de linhas. No tablet, o pedido em
   largura total e as áreas em duas colunas; no celular, uma espinha vertical
   na ordem em que o trabalho acontece. */
@media (max-width: 1099px) {
  .hs-box {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
    align-items: start;
    margin-top: 12px;
  }
  .hs-lines,
  .hs-signals {
    display: none;
  }
  .hs-frag {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    display: grid;
    gap: 10px;
  }
  .hs-order {
    grid-column: 1 / -1;
  }
  .hs-gestao {
    grid-column: 1 / -1;
    max-width: 520px;
  }
  .hs-tag {
    position: static;
    margin: 0;
    flex-wrap: wrap;
  }
  .hs-cap {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
    font-size: 14px;
    color: var(--stage-mute);
  }
  .hs-sat[data-sat="0"] .hs-media {
    max-width: 320px;
  }
}
@media (max-width: 699px) {
  .hs-box {
    display: flex;
    flex-direction: column;
    gap: 34px;
  }
  .hs-sat,
  .hs-gestao {
    padding-left: 30px;
  }
  .hs-sat::before,
  .hs-gestao::before {
    content: "";
    position: absolute;
    left: 8px;
    top: -34px;
    bottom: 0;
    border-left: 1.6px solid #8a837b;
    transform: scaleY(var(--grow, 1));
    transform-origin: top;
  }
  .hs-sat.hs-api::before {
    border-left-style: dashed;
  }
  .hs-sat::after,
  .hs-gestao::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fire);
    transform: scale(var(--grow, 1));
  }
  .hs-sat[data-sat="0"] .hs-media {
    max-width: 280px;
  }
  .hs-gestao .hs-media {
    max-width: 320px;
  }
  .hs-legend-note {
    margin-left: 0;
    flex-basis: 100%;
  }
}

/* ---------------------------------------------------------------- legenda */
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 18px 0;
  margin-bottom: 28px;
  border-block: 1px solid var(--line);
}
.legend-title {
  margin: 0;
  font: 500 12px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.legend-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- siga um pedido */
.journey {
  padding-block: clamp(88px, 11vw, 150px) clamp(56px, 7vw, 96px);
}
.journey-head {
  margin-bottom: clamp(32px, 4vw, 56px);
}
.thesis {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: var(--fire-deep);
}

/* Raia: as seis áreas e o marcador do pedido (a barra laranja da marca). */
.lane {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.lane li[data-lane] {
  display: grid;
  gap: 4px;
  padding: 14px 8px 16px 0;
  color: var(--ink-3);
  min-width: 0;
  transition: color 0.35s;
}
.lane li.is-active,
.lane li.is-done {
  color: var(--ink);
}
.lane-n {
  font: 500 11px/1 var(--label);
}
.lane-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-status {
  font: 500 11px/1.3 var(--label);
  color: var(--ink-3);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}
.lane li.is-active .lane-status {
  opacity: 1;
  transform: none;
  color: var(--fire-deep);
}
.lane-track {
  overflow-x: clip;
  overflow-y: visible;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
}
.lane-fire {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--fire);
  border-radius: 2px;
  transform-origin: left;
  transform: scaleX(calc((var(--p, 0) + 0.5) / 6));
  transition: transform 0.6s var(--ease);
}
.lane-token {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateX(calc((var(--p, 0) + 0.5) / 6 * 100%));
  transition: transform 0.6s var(--ease);
}
.lane-token i {
  position: absolute;
  top: -6px;
  left: -14px;
  width: 28px;
  height: 12px;
  border-radius: 4px;
  background: var(--fire);
  box-shadow: 0 0 0 3px var(--paper), 0 0 18px rgba(255, 148, 8, 0.45);
}

/* Lista (base: leitura, celular, sem JS ou com movimento reduzido). */
.jc-grid {
  display: block;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.step:first-child {
  border-top: 0;
  padding-top: 8px;
}
.step-copy {
  display: grid;
  gap: 14px;
}
.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-n {
  font: 500 12px/1 var(--label);
  color: var(--fire-deep);
}
.step-area {
  font: 500 12px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-right: auto;
}
.step-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.step-text {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.step-meta {
  margin: 8px 0 0;
  display: grid;
  border-top: 1px solid var(--line-2);
}
.step-meta div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.step-meta dt {
  color: var(--ink-3);
}
.step-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.step-meta code {
  color: var(--fire-deep);
}
.step-shot {
  margin: 0;
}
.jc-stage,
.jc-note {
  display: none;
}
.journey .jc-note {
  display: block;
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* Câmera: .cam é o quadro inteiro; o JS escala e desloca até a região. */
.cam-frame {
  position: relative;
  overflow: hidden;
}
.cam {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}
.cam img {
  width: 100%;
  height: auto;
}
.cam-focus {
  position: absolute;
  border: 2px solid var(--fire);
  border-radius: 7px;
  /* V4: o foco é anel e luz, nunca um véu sobre a tela. */
  box-shadow: 0 0 0 5px rgba(255, 148, 8, 0.2), 0 12px 40px -8px rgba(255, 148, 8, 0.35);
  pointer-events: none;
}
.cam-cursor {
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cam-cursor svg {
  position: absolute;
  left: -4px;
  top: -3px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.cam-cursor em {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #100c08;
  color: #f3f4f5;
  font: 600 11px/1.2 var(--sans);
  font-style: normal;
  white-space: nowrap;
}
.cam-ripple {
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--fire);
  opacity: 0;
}
.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
}
.result-tag span {
  color: var(--fire);
}
/* Camada técnica: presente e legível, mas um nível abaixo da narrativa —
   sem fundo nem sombra, só uma régua à esquerda. */
.api-card {
  margin-top: 16px;
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--c-line);
  color: var(--c-mute);
}
.api-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--c-mute);
}
/* O selo já diz "Na API"; a frase ao lado é a explicação. */
.api-head .chip {
  font-size: 0;
  gap: 0;
}
.api-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.api-card code {
  font-size: 12px;
  color: var(--c-ink);
  opacity: 0.82;
  overflow-wrap: anywhere;
}
.api-card code b {
  color: var(--c-accent);
  font-weight: 500;
  margin-right: 4px;
}
.api-foot {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--c-mute);
}

/* Cena fixa (desktop com movimento): o JS fixa .jc e troca as etapas. */
.journey.is-cinema .jc {
  height: 100vh;
  height: 100svh;
}
.journey.is-cinema .jc-in {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding-top: calc(var(--top) + 14px);
  padding-bottom: 20px;
}
.journey.is-cinema .lane {
  margin-bottom: 24px;
}
.journey.is-cinema .jc-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  min-height: 0;
}
.journey.is-cinema .steps {
  position: relative;
  height: 100%;
}
.journey.is-cinema .step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
}
.journey.is-cinema .step-shot {
  display: none;
}
.journey.is-cinema .jc-stage {
  display: block;
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: calc((100svh - var(--top) - 190px) * 1.5);
}
.journey.is-cinema .jc-note {
  margin-top: 12px;
}
.jc-frame {
  gap: 0;
}
.jc-frame .shot-bar {
  position: relative;
}
.jc-frame .shot-route {
  position: absolute;
  left: 44px;
  opacity: 0;
}
.jc-frame .shot-route.is-on {
  opacity: 1;
}
.jc-view {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: #f5f6f6;
  box-shadow: var(--shadow-shot);
}
.jc-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.jc-layer:first-child {
  opacity: 1;
}
.jc-over {
  position: absolute;
  right: 28px;
  bottom: -22px;
  z-index: 3;
  max-width: min(460px, 70%);
  opacity: 0;
}
.jc-over .api-card,
.jc-over .result-tag {
  margin: 0;
}

@media (max-width: 1099px) {
  .step {
    grid-template-columns: minmax(0, 1fr);
  }
  .step-shot {
    margin-right: calc(-1 * var(--gutter));
  }
  .step-shot .shot-bar {
    border-right: 0;
    border-radius: 10px 0 0 0;
  }
  .step-shot .shot-frame {
    border-right: 0;
    border-radius: 0 0 0 10px;
  }
  .step-shot .result-tag,
  .step-shot .api-card {
    margin-right: var(--gutter);
  }
}
@media (max-width: 760px) {
  .lane {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + var(--top));
    z-index: 10;
    background: var(--paper);
  }
  .lane li[data-lane] {
    padding: 12px 4px 12px 0;
  }
  .lane-name {
    font-size: 12px;
  }
  .lane-status {
    display: none;
  }
}
@media (max-width: 420px) {
  .lane-name {
    font-size: 11px;
  }
}

/* ---------------------------------------------------------------- módulos */
.areas {
  padding-block: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
}
.module {
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.module-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.module-intro {
  display: grid;
  gap: 22px;
  align-content: start;
}
.module-index {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.module-index span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
}
.ps {
  display: grid;
  border-top: 1px solid var(--line);
}
.ps-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.ps-row p {
  margin: 0;
  text-wrap: pretty;
}
.ps-row .q {
  padding-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
}
.ps-problem p:not(.q) {
  color: var(--ink-2);
}
.ps-solution .q {
  color: var(--fire-deep);
}
.who {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}
.who span {
  display: block;
  font: 500 11px/1.6 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.state-sum {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.state-sum li {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 13px/1 var(--label);
}

.module-screens {
  margin-right: calc(-1 * var(--gutter));
  min-width: 0;
}
.viewer {
  display: grid;
  gap: 16px;
}
.viewer-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  margin-right: var(--gutter);
}
.viewer-tabs::-webkit-scrollbar {
  display: none;
}
.viewer-tabs button {
  position: relative;
  flex: none;
  appearance: none;
  border: 0;
  background: none;
  padding: 10px 12px 12px;
  font: 500 14px/1 var(--sans);
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s;
}
.viewer-tabs button:hover {
  color: var(--ink);
}
.viewer-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.viewer-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.viewer-panels {
  display: grid;
}
.viewer-panels > [role="tabpanel"] {
  grid-area: 1 / 1;
  align-self: start;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.viewer-panels > [role="tabpanel"].is-on {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s var(--ease);
}
.viewer-panels .shot-bar {
  border-radius: 10px 0 0 0;
  border-right: 0;
}
.viewer-panels .shot-frame {
  border-radius: 0 0 0 10px;
  border-right: 0;
}
.viewer-panels figcaption {
  margin-right: var(--gutter);
}
@media (prefers-reduced-motion: no-preference) {
  .viewer-panels [role="tabpanel"].is-on .shot-frame img {
    animation: viewIn 0.6s var(--ease) both;
  }
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
}

.module-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 80px);
}
.mb-col {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
}
.mb-part {
  display: grid;
  gap: 0;
}
.q-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.01em;
}
.q-title span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font: 500 10px/1 var(--label);
  color: var(--ink-2);
}
.does,
.controls,
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.does li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 15px;
  line-height: 1.4;
}
.does li .chip {
  margin-top: -1px;
}
.does-evolucao > span:first-child {
  color: var(--ink-2);
}
.flow {
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  position: relative;
  display: grid;
}
.flow::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line-strong);
}
.flow::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 14px;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--fire);
}
@media (prefers-reduced-motion: no-preference) {
  .flow::after {
    animation: flowRun 5s var(--ease) infinite;
  }
}
@keyframes flowRun {
  0% {
    top: 8px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 30px);
    opacity: 0;
  }
}
.flow li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 0 7px 26px;
  font-size: 15px;
}
.flow li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink-3);
}
.flow li:last-child::before {
  background: var(--ink);
  border-color: var(--ink);
}
.controls li {
  padding: 11px 0 11px 18px;
  position: relative;
  border-bottom: 1px solid var(--line-2);
  font-size: 15px;
}
.controls li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 8px;
  height: 2px;
  background: var(--ink-3);
}
.links a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
  transition: padding 0.25s var(--ease);
}
.links-to {
  font-weight: 600;
  font-size: 15px;
}
.links-to::before {
  content: "→ ";
  color: var(--fire-deep);
}
.links-what {
  color: var(--ink-2);
  font-size: 14px;
}
.links a:hover {
  padding-left: 6px;
}
.links a:hover .links-to {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1099px) {
  .module-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .module-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .module-body .mb-col:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .module-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .ps-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

/* ---------------------------------------------------------------- módulos (v2) */
.module {
  display: grid;
  gap: clamp(28px, 3.5vw, 48px);
}
.m-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px clamp(32px, 5vw, 80px);
  align-items: end;
}
.m-index {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 500 12px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.m-index span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0;
}
.m-head .display-3 {
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 0.98;
}
.m-state {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
}
.m-state .sbar {
  margin: 0;
  height: 8px;
}
.m-label {
  margin: 0;
  font: 500 11px/1.4 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.m-ps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-block: 1px solid var(--line);
}
.m-ps > div {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 22px 0;
}
.m-ps > div + div {
  padding-left: clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--line);
}
.m-ps > div:first-child {
  padding-right: clamp(24px, 4vw, 56px);
}
.m-ps p:not(.m-label) {
  margin: 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.45;
  text-wrap: pretty;
}
.m-problem p:not(.m-label) {
  font-family: var(--serif);
  font-size: clamp(21px, 1.9vw, 27px);
  line-height: 1.25;
  color: var(--ink-2);
}
.m-solution .m-label {
  color: var(--fire-deep);
}
.m-solution .who {
  font-size: 14px;
  color: var(--ink-3);
}

/* O processo desenhado como trilho: nós, linha e um pulso que percorre. */
.m-rail {
  position: relative;
  display: grid;
  gap: 14px;
}
.m-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  position: relative;
}
.m-rail ol::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 5px;
  height: 1px;
  background: var(--line-strong);
}
.m-rail li {
  position: relative;
  padding: 22px 12px 0 0;
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
}
.m-rail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-3);
  transition: background-color 0.3s, border-color 0.3s;
}
.sheet .m-rail li::before {
  background: var(--sheet);
}
.m-rail li:last-child::before {
  background: var(--ink);
  border-color: var(--ink);
}
.m-run {
  position: absolute;
  left: 5px;
  right: 5px;
  top: calc(1.4em + 14px + 2px);
  height: 3px;
  pointer-events: none;
  overflow: hidden;
}
.m-run i {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
}
.m-run i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--fire));
}
@media (prefers-reduced-motion: no-preference) {
  .m-rail.in-view .m-run i {
    animation: railRun 3.6s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  }
}
@keyframes railRun {
  0% {
    transform: translateX(-100%);
  }
  80%,
  100% {
    transform: translateX(0%);
  }
}

.m-main {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.m-screens {
  min-width: 0;
  margin-left: calc(-1 * var(--gutter));
}
.m-screens .viewer-tabs {
  margin: 0 0 0 var(--gutter);
}
.m-screens .viewer-panels .shot-bar {
  border-radius: 0 10px 0 0;
  border-left: 0;
  border-right: 1px solid var(--line);
}
.m-screens .viewer-panels .shot-frame {
  border-radius: 0 0 10px 0;
  border-left: 0;
  border-right: 1px solid var(--line);
}
.m-screens .viewer-panels figcaption {
  margin: 0 0 0 var(--gutter);
}
.m-flip .m-main {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.m-flip .m-screens {
  order: 2;
  margin: 0 calc(-1 * var(--gutter)) 0 0;
}
.m-flip .m-screens .viewer-tabs {
  margin: 0 var(--gutter) 0 0;
}
.m-flip .m-screens .viewer-panels .shot-bar {
  border-radius: 10px 0 0 0;
  border-left: 1px solid var(--line);
  border-right: 0;
}
.m-flip .m-screens .viewer-panels .shot-frame {
  border-radius: 0 0 0 10px;
  border-left: 1px solid var(--line);
  border-right: 0;
}
.m-flip .m-screens .viewer-panels figcaption {
  margin: 0 var(--gutter) 0 0;
}
.m-aside {
  display: grid;
  gap: 28px;
  min-width: 0;
}
.m-part {
  display: grid;
  gap: 10px;
  align-content: start;
}
.viewer-panels {
  perspective: 1800px;
}

/* aba: sublinhado que desliza até a aba escolhida */
.viewer-tabs {
  position: relative;
}
.viewer-tabs button[aria-selected="true"]::after {
  display: none;
}
.tab-ink {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: var(--w, 0);
  background: var(--ink);
  transform: translateX(var(--x, 0));
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.no-ink .viewer-tabs button[aria-selected="true"]::after,
html:not(.js) .viewer-tabs button[aria-selected="true"]::after {
  display: block;
}

@media (max-width: 1099px) {
  .m-head,
  .m-main,
  .m-flip .m-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .m-screens,
  .m-flip .m-screens {
    order: 0;
    margin: 0 calc(-1 * var(--gutter)) 0 0;
  }
  .m-screens .viewer-tabs,
  .m-flip .m-screens .viewer-tabs {
    margin: 0 var(--gutter) 0 0;
  }
  .m-screens .viewer-panels .shot-bar,
  .m-flip .m-screens .viewer-panels .shot-bar {
    border-radius: 10px 0 0 0;
    border-left: 1px solid var(--line);
    border-right: 0;
  }
  .m-screens .viewer-panels .shot-frame,
  .m-flip .m-screens .viewer-panels .shot-frame {
    border-radius: 0 0 0 10px;
    border-left: 1px solid var(--line);
    border-right: 0;
  }
  .m-screens .viewer-panels figcaption,
  .m-flip .m-screens .viewer-panels figcaption {
    margin: 0 var(--gutter) 0 0;
  }
  .m-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .m-aside .m-part:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .m-ps {
    grid-template-columns: minmax(0, 1fr);
  }
  .m-ps > div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .m-ps > div:first-child {
    padding-right: 0;
  }
  .m-rail ol {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 12px;
  }
  .m-rail ol::before {
    left: 5px;
    right: auto;
    top: 6px;
    bottom: 6px;
    width: 1px;
    height: auto;
  }
  .m-rail li {
    padding: 0 0 0 26px;
  }
  .m-run {
    display: none;
  }
  .m-aside {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- conexões */
.network {
  padding-block: clamp(88px, 11vw, 150px);
}
.net-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.net-canvas {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--top) + 24px);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--stage-line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 1px 1px, var(--stage-line-2) 1px, transparent 1.2px) 0 0 / 24px 24px,
    var(--stage-2);
}
.net-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.net-m {
  display: none;
}
.edge-line {
  fill: none;
  stroke: #8a837b;
  stroke-width: 1.6;
  transition: opacity 0.5s, stroke 0.5s;
}
.edge-api .edge-line {
  stroke-dasharray: 5 6;
}
.edge-sig {
  fill: var(--fire);
  opacity: 0;
}
.edge-api .edge-sig {
  fill: var(--stage-fire);
}
.network.has-chapter .edge:not(.is-on) .edge-line {
  opacity: 0.14;
}
.network.has-chapter .edge.is-on .edge-line {
  stroke: #d8d2ca;
}
.node {
  cursor: pointer;
  outline: none;
  transition: opacity 0.4s;
}
.node rect:first-child {
  fill: var(--stage-3);
  stroke: var(--stage-line-2);
  stroke-width: 1;
  transition: fill 0.25s, stroke 0.25s;
}
.node .node-bar {
  fill: var(--fire);
  transform-box: fill-box;
  transform-origin: left center;
}
.node text {
  fill: var(--stage-ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.node:hover rect:first-child,
.node:focus-visible rect:first-child,
.node.is-on rect:first-child,
.node.is-peer rect:first-child {
  stroke: var(--fire);
}
.node:focus-visible rect:first-child {
  stroke-width: 2;
}
.network.has-chapter .node:not(.is-on):not(.is-peer) {
  opacity: 0.4;
}
/* Origem → destino: a origem ganha o traço; o destino responde quando o sinal chega. */
.node.is-src rect:first-child {
  stroke: var(--fire);
}
.node.is-arrive rect:first-child {
  animation: nodeArrive 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.node.is-arrive .node-bar {
  animation: nodeBar 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes nodeArrive {
  0% {
    stroke: var(--fire);
    stroke-width: 3.5;
  }
  100% {
    stroke-width: 1;
  }
}
@keyframes nodeBar {
  0% {
    transform: scaleX(2.2);
  }
  100% {
    transform: scaleX(1);
  }
}
.net-sum {
  margin: 0;
  font-size: 13px;
  color: var(--stage-mute);
}
.net-sum b {
  font: 600 16px/1 var(--label);
  color: var(--stage-ink);
  margin-right: 2px;
}
.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.chapter {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 72vh;
  padding-block: 32px;
  border-top: 1px solid var(--stage-line);
  transition: opacity 0.5s;
}
.chapter:first-child {
  border-top: 0;
}
.chapter {
  position: relative;
}
.chapter::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  border-radius: 2px;
  background: var(--fire);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.6s var(--ease);
}
.chapter.is-active::before {
  transform: scaleY(1);
}
.js .network .chapter:not(.is-active) .ch-title {
  color: var(--stage-mute);
}
.ch-n {
  margin: 0;
  font: 500 12px/1 var(--label);
  color: var(--stage-fire);
}
.ch-n span {
  color: var(--stage-mute);
}
.ch-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ch-text {
  margin: 0;
  max-width: 44ch;
  font-size: 16px;
  color: var(--stage-mute);
  text-wrap: pretty;
}
.net-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--stage-line-2);
}
.net-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stage-line);
  font-size: 14px;
}
.nl-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.nl-path span {
  color: var(--stage-fire);
}
.nl-what {
  grid-column: 1;
  color: var(--stage-mute);
}
.net-list .chip {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
@media (max-width: 1099px) {
  .net-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .net-canvas {
    top: calc(env(safe-area-inset-top, 0px) + var(--top) + 8px);
    z-index: 5;
    padding: 10px;
  }
  .net-d {
    max-height: 44vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
  }
  .chapter {
    min-height: 0;
    padding-block: 36px;
  }
}
@media (max-width: 699px) {
  .net-d {
    display: none;
  }
  .net-m {
    display: block;
    max-height: 46vh;
    margin-inline: auto;
  }
  .net-sum {
    text-align: center;
  }
}

/* ---------------------------------------------------------------- cenário */
.scenario {
  padding-block: clamp(80px, 10vw, 140px);
}
.scenario-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.scenario-head {
  position: sticky;
  top: calc(var(--top) + 48px);
  margin-bottom: 0;
}
.ledger {
  margin: 0;
  display: grid;
  gap: 16px;
}
.ledger ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.ledger li {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.ledger li::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--fire);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.ledger li:hover::before {
  transform: scaleX(1);
}
.lg-area {
  font: 500 11px/1.4 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.lg-record {
  font-size: 16px;
}
.lg-code {
  font: 500 clamp(15px, 1.4vw, 18px) / 1.2 var(--mono);
  letter-spacing: -0.01em;
  text-align: right;
  overflow-wrap: anywhere;
}
.ledger {
  position: relative;
  --silo: 0;
}
.ledger li::after {
  content: "";
  position: absolute;
  inset: 4px -10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--sheet) 70%, transparent);
  opacity: var(--silo);
  z-index: -1;
  pointer-events: none;
}
.ledger ol {
  position: relative;
  z-index: 0;
}
.ledger-thread {
  position: absolute;
  left: -18px;
  top: 0;
  bottom: 38px;
  width: 3px;
  border-radius: 2px;
  background: var(--fire);
  transform-origin: 50% 0;
}
@media (max-width: 760px) {
  .ledger-thread {
    left: -10px;
  }
}
.ledger figcaption {
  font-size: 13px;
  color: var(--ink-3);
}
@media (max-width: 1099px) {
  .scenario-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .scenario-head {
    position: static;
  }
}
@media (max-width: 560px) {
  .ledger li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .lg-area {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- plataforma */
.platform {
  padding-block: clamp(80px, 10vw, 140px);
}
.platform-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.platform-head .section-head {
  margin-bottom: 0;
}
.numbers {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--stage-line-2);
}
.numbers div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid var(--stage-line);
}
.numbers div:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--stage-line);
}
.numbers dt {
  order: 2;
  font-size: 15px;
  color: var(--stage-ink);
}
.numbers dd {
  margin: 0;
}
.numbers .num {
  order: 1;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 5.4vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.numbers div:first-child .num {
  color: var(--fire);
}
.numbers .num-note {
  order: 3;
  font-size: 13px;
  color: var(--stage-mute);
}
.envs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 36px);
}
.env {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--stage-line-2);
}
.env-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}
.env-n {
  margin: 0;
  font: 500 12px/1 var(--label);
  color: var(--stage-fire);
}
.env-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.env-who {
  margin: 0;
  font: 500 12px/1.4 var(--label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stage-mute);
}
.env-what {
  margin: 0;
  font-size: 15px;
  color: var(--stage-mute);
  max-width: 42ch;
}
.env-shot {
  align-self: end;
  will-change: transform;
}
@media (max-width: 1099px) {
  .platform-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .envs {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .env {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: none;
    gap: 32px;
  }
}
@media (max-width: 700px) {
  .env {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- mapa das áreas */
.area-index {
  margin-bottom: clamp(24px, 4vw, 48px);
}
.area-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.area-index li {
  display: grid;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tile {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  padding: 20px 20px 18px;
  text-decoration: none;
  background: var(--paper);
  transition: background-color 0.25s;
}
.tile:hover {
  background: var(--sheet);
}
.tile::after {
  content: "→";
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--ink-3);
  transition: transform 0.25s var(--ease), color 0.25s;
}
.tile:hover::after {
  transform: translateX(3px);
  color: var(--fire-deep);
}
.tile-n {
  font: 500 11px/1 var(--label);
  color: var(--ink-3);
}
.tile-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding-right: 20px;
}
.tile-tag {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
}
.sbar {
  display: flex;
  gap: 2px;
  height: 4px;
  margin-top: 12px;
}
.sbar i,
.ai-key i {
  display: block;
  border-radius: 1.5px;
}
.sb-tela {
  background: var(--ink);
}
.sb-consulta {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink);
}
.sb-api {
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 3px, transparent 3px 5px);
}
.sb-evolucao {
  background: var(--fire);
}
.area-index-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}
.ai-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-key i {
  width: 18px;
  height: 6px;
}
@media (max-width: 1099px) {
  .area-index ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .area-index ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-tag {
    display: none;
  }
}
@media (max-width: 420px) {
  .tile {
    padding: 16px 14px 14px;
  }
  .tile-name {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------- base e evolução */
.base {
  padding-block: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
}
.lead-p {
  margin: 0;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}
.base .module-intro .does {
  margin-top: 8px;
}
.evolving {
  margin-top: clamp(80px, 10vw, 140px);
  padding-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.evo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.evo {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 24px;
  border: 1px dashed color-mix(in srgb, var(--fire) 60%, var(--line));
  border-radius: 14px;
  background: var(--paper);
}
.evo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.evo h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.evo dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.evo dt {
  font: 500 11px/1.4 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.evo dd {
  margin: 4px 0 0;
  font-size: 15px;
}
.evo div:last-child dd {
  color: var(--ink-2);
}
@media (max-width: 1099px) {
  .evo-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------------------------------------------------------- acesso */
.access {
  padding-block: clamp(80px, 10vw, 140px);
}
.chain {
  list-style: none;
  margin: 0 0 clamp(56px, 7vw, 88px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.chain li {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 22px 28px 22px 0;
  border-top: 2px solid var(--ink);
}
.chain li + li {
  padding-left: 28px;
}
.chain li + li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.chain li:last-child {
  border-top-color: var(--fire);
}
.ch-label {
  font: 500 11px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ch-value {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 2.8vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.ch-note {
  font-size: 14px;
  color: var(--ink-2);
}
.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.access-copy {
  display: grid;
  gap: 8px;
}
.note {
  margin: 16px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--fire);
  font-size: 15px;
  color: var(--ink-2);
}
@media (max-width: 1099px) {
  .access-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }
  .chain li:nth-child(3) {
    padding-left: 0;
  }
  .chain li:nth-child(3)::before {
    display: none;
  }
}

/* ---------------------------------------------------------------- central */
.central {
  padding-block: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- chamada */
.closing {
  padding-block: clamp(104px, 13vw, 190px) clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--stage-line);
  position: relative;
  overflow: clip;
}
.closing-in {
  display: grid;
  justify-items: start;
  gap: 32px;
}
.closing-q {
  max-width: 15ch;
  font-size: clamp(2.8rem, 6.6vw, 6.4rem);
}
.closing-a {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.closing-mark {
  display: inline-flex;
}
.mark-xl {
  width: 0.9em;
  height: 0.9em;
  color: var(--stage-ink);
}
.btn-lg {
  min-height: 56px;
  padding: 0 26px;
  font-size: 16px;
}
.btn-meta {
  font: 500 11px/1 var(--label);
  color: var(--stage-mute);
  margin-left: -2px;
}
.btn.is-static {
  cursor: default;
}
/* Ponto discreto de entrada no fim do Ato 05: link de texto, não botão. */
.levels-cta {
  margin: clamp(72px, 9vw, 128px) 0 0;
}
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-accent);
  font-size: 16px;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
}
.link-cta span {
  color: var(--c-accent);
  transition: transform 0.2s var(--ease);
}
.link-cta:hover span,
.link-cta:focus-visible span {
  transform: translateX(4px);
}
.closing-note {
  margin: 0;
  font-size: 14px;
  color: var(--stage-mute);
}

/* ---------------------------------------------------------------- rodapé */
.footer {
  border-top: 1px solid var(--stage-line);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
}
.footer-note {
  margin: 0;
  font-size: 13px;
  color: var(--stage-mute);
  max-width: 70ch;
}
.footer-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Autoria do produto: discreta, como a ficha técnica de um software. */
.footer-credit {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--stage-mute);
}

/* ================================================================ v3 — direção de arte */

/* ---- abertura: estrutura do sistema (portas, molduras, varredura) */
.hs-port {
  fill: var(--stage);
  stroke: #8a837b;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}
.hs-link.is-hot ~ .hs-ports .hs-port,
.hs-port.is-hot {
  stroke: var(--fire);
}
.hs-ghost {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px dashed var(--stage-line-2);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
}
.hs-ghost i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #8a837b;
  border-style: solid;
  border-width: 0;
}
.hs-ghost i:nth-child(1) {
  left: -1px;
  top: -1px;
  border-left-width: 1.5px;
  border-top-width: 1.5px;
}
.hs-ghost i:nth-child(2) {
  right: -1px;
  top: -1px;
  border-right-width: 1.5px;
  border-top-width: 1.5px;
}
.hs-ghost i:nth-child(3) {
  left: -1px;
  bottom: -1px;
  border-left-width: 1.5px;
  border-bottom-width: 1.5px;
}
.hs-ghost i:nth-child(4) {
  right: -1px;
  bottom: -1px;
  border-right-width: 1.5px;
  border-bottom-width: 1.5px;
}
.hs-scan {
  position: absolute;
  left: -2%;
  right: -2%;
  top: 0;
  height: 2px;
  z-index: 4;
  background: linear-gradient(90deg, transparent, var(--fire) 18%, #ffd08a 50%, var(--fire) 82%, transparent);
  box-shadow: 0 0 14px 1px rgba(255, 148, 8, 0.45);
  opacity: 0;
  pointer-events: none;
}
/* foco: ao passar sobre uma área, a cadeia dela acende e o resto recua */
.hero.is-live .hs-link,
.hero.is-live .hs-frag {
  transition: opacity 0.35s var(--ease);
}
.hs-box[data-focus] .hs-link {
  opacity: 0.22;
}
.hs-box[data-focus] .hs-link.is-hot {
  opacity: 1;
}
.hs-link.is-hot .hs-path {
  stroke: var(--stage-fire);
}
.hs-box[data-focus] .hs-frag:not(.is-hot):not(.hs-order) {
  opacity: 0.45;
}
.hs-hot.is-hot {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(16, 12, 8, 0.55), 0 0 0 7px rgba(255, 148, 8, 0.28);
}
.hs-hot {
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.hs-frag.is-hot .hs-media {
  box-shadow:
    0 0 0 1px var(--fire),
    0 30px 70px -24px rgba(0, 0, 0, 0.95);
}

/* ---- plataforma: a escala do sistema em unidades reais */
.numbers {
  margin: 0 0 clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--stage-line-2);
}
.numbers .nb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px 26px 0;
  border-bottom: 0;
  border-left: 0;
}
.numbers .nb + .nb {
  padding-left: 24px;
  border-left: 1px solid var(--stage-line);
}
.numbers .nb:nth-child(even) {
  padding-left: 24px;
  border-left: 1px solid var(--stage-line);
}
.units {
  order: 0;
  margin: 0 0 18px;
  height: 64px;
  display: flex;
  flex-wrap: wrap-reverse;
  align-content: flex-start;
  gap: 3px;
}
.units i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--stage-line-2);
}
.nb:last-child .units i {
  background: color-mix(in srgb, var(--fire) 70%, var(--stage-2));
}
.nb-dense .units {
  gap: 2px;
}
.nb-dense .units i {
  width: 4px;
  height: 4px;
  border-radius: 1px;
}
.numbers .num {
  font-size: clamp(3.6rem, 6.4vw, 6.6rem);
  color: var(--stage-ink);
}
.numbers .nb:last-child .num {
  color: var(--fire);
}
.numbers div:first-child .num {
  color: var(--stage-ink);
}
.numbers .nb:last-child .num {
  color: var(--fire);
}
.platform-head {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(40px, 5vw, 64px);
}
@media (max-width: 1099px) {
  .numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .numbers .nb:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .numbers .nb:nth-child(n + 3) {
    border-top: 1px solid var(--stage-line);
  }
}

/* ---- módulos como cenas */
.module {
  position: relative;
  isolation: isolate;
}
.m-ghost {
  position: absolute;
  right: -0.04em;
  top: clamp(20px, 3vw, 40px);
  z-index: -1;
  font-family: var(--serif);
  font-size: clamp(9rem, 20vw, 17rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.m-rail li[data-cap]::after {
  content: attr(data-cap);
  display: block;
  margin-top: 6px;
  font: 500 10px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fire-deep);
}
.conn a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
}
.conn a:hover {
  padding-left: 0;
}
.lk-path {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
}
.lk-node {
  white-space: nowrap;
  color: var(--ink-2);
}
.lk-node.is-self {
  color: var(--ink);
}
.lk-line {
  position: relative;
  flex: 1 1 auto;
  min-width: 28px;
  max-width: 120px;
  height: 1.5px;
  background: var(--line-strong);
}
.lk-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3.5px;
  border: 4px solid transparent;
  border-left: 6px solid var(--line-strong);
  border-right: 0;
}
[data-conn="api"] .lk-line {
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 5px, transparent 5px 9px);
}
[data-conn="rel"] .lk-line {
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 2px, transparent 2px 5px);
}
[data-conn="rel"] .lk-line::after {
  display: none;
}
.lk-line i {
  position: absolute;
  top: -2.5px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire);
  opacity: 0;
}
.conn .lk-what {
  grid-column: 1;
  font-size: 13px;
  color: var(--ink-2);
}
.conn .chip {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
@media (prefers-reduced-motion: no-preference) {
  .conn a:hover .lk-line i,
  .conn a:focus-visible .lk-line i {
    animation: lkRun 1.1s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  }
}
@keyframes lkRun {
  0% {
    left: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 6px);
    opacity: 0;
  }
}
.conn a:hover .lk-node:not(.is-self) {
  color: var(--fire-deep);
}
.conn a:hover .lk-line {
  background-color: var(--fire-deep);
}

/* ---- módulos: a tela é a protagonista (maior e fixa enquanto se lê o lado) */
@media (min-width: 1100px) {
  .m-main {
    align-items: stretch;
  }
  .m-screens {
    position: sticky;
    top: calc(var(--top) + 28px);
    align-self: start;
  }
}
@media (min-width: 1280px) {
  .m-main {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  }
  .m-flip .m-main {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

/* ---- microinterações: acabamento antes do efeito */
.btn-fire {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 0 rgba(0, 0, 0, 0.25);
}
.btn-fire:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 28px -12px rgba(255, 148, 8, 0.75);
}
.btn-enter {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
:focus-visible {
  transition: outline-offset 0.15s var(--ease);
}
.viewer-tabs button:focus-visible {
  outline-offset: -2px;
}
@media (prefers-reduced-motion: no-preference) {
  .btn:active {
    transform: translateY(1px) scale(0.985);
    transition-duration: 0.06s;
  }
  .viewer-tabs button:active {
    transform: translateY(1px);
  }
  .shot-zoom img {
    transition: transform 0.6s var(--ease);
  }
  .shot-zoom:hover img {
    transform: scale(1.012);
  }
}

/* ---- siga um pedido: origem e legenda em foco */
.lane {
  grid-template-columns: minmax(0, 0.7fr) repeat(6, minmax(0, 1fr));
}
.lane-origin {
  display: grid;
  gap: 4px;
  padding: 14px 8px 16px 0;
  color: var(--ink-3);
}
.lane-origin .lane-name {
  font-style: italic;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
}
.lane-fire {
  transform: scaleX(calc((var(--p, 0) + 1.2) / 6.7));
}
.lane-token {
  transform: translateX(calc((var(--p, 0) + 1.2) / 6.7 * 100%));
}
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink);
}
.callout span {
  font: 600 10px/1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fire-deep);
}
.jc-callout {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 3;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(16, 12, 8, 0.86);
  color: #f3f4f5;
  backdrop-filter: blur(6px);
  opacity: 0;
}
.jc-callout span {
  color: var(--fire);
}
@media (max-width: 760px) {
  .lane {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .lane-origin {
    display: none;
  }
  /* Raia fixa no topo: o fundo se estende sob o marcador, que fica menor. */
  .lane {
    box-shadow: 0 8px 0 var(--paper);
  }
  .lane-token i {
    top: -4px;
    left: -9px;
    width: 18px;
    height: 8px;
    border-radius: 3px;
    box-shadow: 0 0 0 2px var(--paper);
  }
  .lane-fire {
    transform: scaleX(calc((var(--p, 0) + 0.5) / 6));
  }
  .lane-token {
    transform: translateX(calc((var(--p, 0) + 0.5) / 6 * 100%));
  }
}

/* ---- final: as áreas convergem para uma marca */
.converge {
  width: 100%;
  margin-block: 8px 4px;
}
.cv {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.cv-m {
  display: none;
  max-width: 420px;
  margin-inline: auto;
}
.cv-path {
  fill: none;
  stroke: #6f6861;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.cv-sig {
  fill: var(--fire);
  opacity: 0;
}
.converge.is-live .cv-sig {
  opacity: 1;
}
.cv-silo rect {
  fill: var(--stage-3);
  stroke: var(--stage-line-2);
  stroke-width: 1;
}
.cv-silo text {
  fill: var(--stage-ink);
  font: 500 13px var(--mono);
  letter-spacing: 0.06em;
}
.cv-mark-bg {
  fill: var(--stage-ink);
}
.cv-mark-mod {
  fill: var(--stage);
}
.cv-mark-core {
  fill: var(--fire);
}
.cv-word {
  fill: var(--stage-ink);
  font-family: var(--serif);
  font-size: 44px;
  letter-spacing: -0.02em;
}
.cv-word-dim {
  fill: var(--stage-mute);
}
@media (max-width: 760px) {
  .cv-d {
    display: none;
  }
  .cv-m {
    display: block;
  }
  .cv-word {
    font-size: 34px;
  }
}

/* ================================================================ V4 — abertura: o pedido como objeto */
/* O pedido PV-001013 em perspectiva sutil; as partes que geram trabalho em
   outra área se destacam dele (vista explodida) e ligam-se às telas reais
   dessas áreas, que convergem em Gestão. Mundo de 1440 × 840 unidades
   (--u = 1/1440 da largura): a cena inteira escala com a tela. Abaixo de
   1100 px, a abertura usa a composição vertical (.hs). */
.hx,
.hx-legend {
  display: none;
}
@media (min-width: 1100px) {
  .hero {
    padding-block: 0 clamp(36px, 3vw, 56px);
  }
  .hero .hs {
    display: none;
  }
  .hero > .wrap {
    position: static;
  }
  .hx {
    display: block;
    position: relative;
    container-type: inline-size;
    width: 100%;
    aspect-ratio: 1440 / 840;
    max-height: calc(100svh - var(--top) + 40px);
    min-height: 640px;
  }
  .hx-world,
  .hx-lines,
  .hx-legend {
    --u: calc(100cqw / 1440);
  }
  .hx-world {
    position: absolute;
    inset: 0;
    perspective: calc(var(--u) * 1700);
    perspective-origin: calc(var(--u) * 980) calc(var(--u) * 420);
  }
  .hx-cam {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
  }
  .hx-order {
    position: absolute;
    transform-style: preserve-3d;
    transform-origin: 0 50%;
    transform: rotateY(var(--ry)) rotateX(var(--rx));
  }
  .hx-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: calc(var(--u) * 10);
    background: #f5f6f6;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.07),
      0 calc(var(--u) * 50) calc(var(--u) * 110) calc(var(--u) * -30) rgba(0, 0, 0, 0.9);
  }
  .hx-base {
    display: block;
    width: 100%;
    height: 100%;
  }
  /* Onde a parte levantada "encaixa": a base escurece de leve sob ela. */
  .hx-socket {
    position: absolute;
    border-radius: calc(var(--u) * 5);
    background: rgba(16, 12, 8, 0.12);
    box-shadow: inset 0 0 0 1px rgba(16, 12, 8, 0.08);
  }
  /* Luz que atravessa o pedido quando ele acende (só com movimento). */
  .hx-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%);
    opacity: 0;
    pointer-events: none;
  }
  .hx-part,
  .hx-dest {
    position: absolute;
    transform-style: preserve-3d;
  }
  .hx-part {
    transform: translate3d(calc(var(--u) * var(--dx, 0)), calc(var(--u) * var(--dy, 0)), calc(var(--u) * var(--z, 0)));
  }
  .hx-dest {
    transform: translateZ(calc(var(--u) * var(--z, 0)));
  }
  .hx-part img,
  .hx-dest img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--u) * 6);
    background: #fff;
  }
  .hx-part img {
    box-shadow:
      0 0 0 1px rgba(16, 12, 8, 0.1),
      0 calc(var(--u) * 16) calc(var(--u) * 34) calc(var(--u) * -12) rgba(16, 12, 8, 0.6);
  }
  .hx-feeds img,
  .hx-dest img {
    box-shadow:
      0 0 0 1px rgba(255, 148, 8, 0.75),
      0 calc(var(--u) * 24) calc(var(--u) * 48) calc(var(--u) * -14) rgba(0, 0, 0, 0.8);
  }
  .hx-api img {
    box-shadow:
      0 0 0 1px rgba(255, 177, 77, 0.45),
      0 calc(var(--u) * 24) calc(var(--u) * 48) calc(var(--u) * -14) rgba(0, 0, 0, 0.8);
  }
  .hx-tag {
    position: absolute;
    left: 0;
    bottom: calc(100% + var(--u) * 9);
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 7);
    margin: 0;
    white-space: nowrap;
    padding: calc(var(--u) * 5) calc(var(--u) * 8);
    border-radius: calc(var(--u) * 6);
    background: rgba(14, 11, 9, 0.9);
    box-shadow: 0 0 0 1px var(--stage-line-2);
    font: 500 calc(var(--u) * 11.5) / 1 var(--mono);
    letter-spacing: 0.04em;
    color: var(--stage-mute);
    text-transform: uppercase;
  }
  .hx-tag b {
    display: inline-grid;
    place-items: center;
    width: calc(var(--u) * 17);
    height: calc(var(--u) * 17);
    border-radius: 50%;
    background: var(--fire);
    color: #100c08;
    font-size: calc(var(--u) * 10);
  }
  .hx-tag code {
    color: var(--stage-ink);
    text-transform: none;
    font-size: calc(var(--u) * 12);
  }
  .hx-tag .hs-apichip {
    font-size: calc(var(--u) * 9);
  }
  .hx-a {
    position: absolute;
    width: 0;
    height: 0;
  }
  .hx-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--u) * 840);
    overflow: visible;
    pointer-events: none;
    z-index: 2;
  }
  .hx-path {
    fill: none;
    stroke: #8a837b;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    transition: stroke 0.35s, opacity 0.35s;
  }
  .hx-api .hx-path {
    stroke-dasharray: 5 6;
  }
  .hx-end {
    fill: var(--stage);
    stroke: #8a837b;
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
  }
  .hx-sig {
    fill: var(--fire);
    opacity: 0;
  }
  .hx-api .hx-sig {
    fill: var(--stage-fire);
  }
  .hero.is-live .hx-sig {
    opacity: 1;
  }
  .hx-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    position: absolute;
    left: max(var(--gutter), calc((100vw - var(--max)) / 2));
    bottom: calc(var(--u) * 26);
    margin: 0;
    font-size: 12.5px;
    color: var(--stage-mute);
    z-index: 3;
  }
  /* Texto da abertura sobre o espaço livre à esquerda da cena. */
  .hero-head {
    position: absolute;
    z-index: 3;
    top: calc(100vw * 92 / 1440);
    left: max(var(--gutter), calc((100vw - var(--max)) / 2));
    width: min(38vw, 560px);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 30px;
    margin: 0;
  }
  .hero .display {
    font-size: clamp(3.2rem, 4.7vw, 6rem);
  }
  .hero .lead {
    font-size: clamp(16px, 1.22vw, 19px);
  }
  /* Foco: passar sobre uma parte acende a ligação dela; o resto recua. */
  .hx[data-focus] .hx-link {
    opacity: 0.18;
  }
  .hx[data-focus] .hx-link.is-hot {
    opacity: 1;
  }
  .hx-link.is-hot .hx-path {
    stroke: var(--stage-fire);
  }
  .hx[data-focus] .hx-feeds:not(.is-hot) img,
  .hx[data-focus] .hx-dest:not(.is-hot) img {
    opacity: 0.55;
  }
  .hx-feeds img,
  .hx-dest img {
    transition: opacity 0.35s var(--ease);
  }
}

/* ================================================================ V4 — atos */
/* Cada ato abre com um marcador; o nó fica na margem, onde passa o fio. */
.act {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 clamp(28px, 3vw, 44px);
  font: 500 12px/1 var(--label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-mute);
}
.act-n {
  color: var(--c-accent);
}
.act-name {
  letter-spacing: 0.06em;
  color: var(--c-ink);
}
.act-node {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--thread-gap, 30px));
  width: 11px;
  height: 11px;
  margin: -6px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1.5px solid var(--fire);
}
@media (max-width: 1099px) {
  .act-node {
    display: none;
  }
}
/* Costuras: a passagem entre um ato escuro e um claro é um degradê curto,
   no espaço vazio antes do marcador (sem texto sobre ele). */
.act-dark + .act-light,
.hero + .act-light {
  background-image: linear-gradient(to bottom, var(--stage), var(--paper) 96px);
}
.act-light + .act-dark {
  background-image: linear-gradient(to bottom, var(--paper), var(--stage) 96px);
}
main > section.act-light,
main > section.act-dark {
  padding-top: max(128px, var(--pad-top, 0px));
}

/* Ato 02 curto: título e uma frase. */
.scenario-short {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.15;
  color: var(--c-ink);
  max-width: 24ch;
}

/* Ato 03 escuro: os mesmos componentes, com os tokens do palco. */
.journey.stage {
  --paper: var(--stage);
  --sheet: var(--stage-2);
  --ink: var(--stage-ink);
  --ink-2: var(--stage-mute);
  --ink-3: #8e9396;
  --line: var(--stage-line-2);
  --line-2: var(--stage-line);
  --line-strong: var(--stage-line-2);
  --fire-deep: var(--stage-fire);
  --fire-soft: rgba(255, 148, 8, 0.12);
  background-color: var(--stage);
  color: var(--stage-ink);
}
.journey.stage .shot-frame,
.journey.stage .jc-view {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

/* ---- Ato 05: uma base, três níveis */
.lv-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
.lv-stack {
  position: sticky;
  top: calc(var(--top) + 40px);
  height: min(640px, calc(100svh - var(--top) - 80px));
  perspective: 1600px;
}
.lv-planes {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translateX(-6%) scale(0.8) rotateX(52deg) rotateZ(-34deg) translateY(-4%);
}
.lv-plane {
  position: absolute;
  left: 8%;
  width: 84%;
  top: 22%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(16, 12, 8, 0.12),
    0 40px 60px -20px rgba(16, 12, 8, 0.45);
  transform: translateZ(calc(var(--lv) * 120px));
  opacity: 0.5;
  transition: transform 0.8s var(--ease), opacity 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.lv-plane[data-lv="0"] {
  --lv: 0;
}
.lv-plane[data-lv="1"] {
  --lv: 1;
}
.lv-plane[data-lv="2"] {
  --lv: 2;
}
.lv-plane img {
  display: block;
  width: 100%;
  height: auto;
}
.lv-plane.is-on {
  opacity: 1;
  transform: translateZ(calc(var(--lv) * 120px + 40px));
  box-shadow:
    0 0 0 2px var(--fire),
    0 60px 80px -24px rgba(16, 12, 8, 0.55);
}
.lv-plane-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  background: #100c08;
  color: #f3f4f5;
  font: 500 12px/1 var(--label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lv-plane-tag b {
  color: var(--fire);
}
.lv-plane-tag i {
  font-style: normal;
  color: #a9adaf;
}
.lv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(96px, 12vw, 180px);
}
.lv {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.lv .ch-value {
  font-size: clamp(1.5rem, 2.1vw, 2rem);
}
.lv > .m-label {
  margin-top: 18px;
}
.lv-n {
  display: flex;
  gap: 10px;
  margin: 0;
  font: 500 13px/1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-mute);
}
.lv-n b {
  color: var(--c-accent);
}
.lv-claim {
  margin: 0;
  max-width: 18ch;
}
.lv-env,
.lv-what,
.lv-text {
  margin: 0;
  max-width: 58ch;
  color: var(--c-mute);
}
.lv-env b {
  color: var(--c-ink);
}
.lv .numbers {
  margin: 8px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(170px, 280px));
  border-top-color: var(--c-line);
}
.lv .numbers .nb + .nb {
  border-left-color: var(--c-line);
}
.lv .units i {
  background: var(--line-strong);
}
.lv .nb:last-child .units i {
  background: var(--fire);
}
.lv .numbers dt,
.lv .numbers .num {
  color: var(--c-ink);
}
.lv .numbers .nb:last-child .num {
  color: var(--c-accent);
}
.lv .numbers .num-note {
  color: var(--c-mute);
}
.lv-shot {
  display: none;
}
.lv .chain {
  margin: 6px 0 0;
}
@media (max-width: 1099px) {
  .lv-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lv-stack {
    display: none;
  }
  .lv-shot {
    display: block;
  }
  .lv-list {
    gap: 88px;
  }
}

/* ================================================================ V4 — Ato 04: protagonistas */
/* Cada protagonista é uma cena: a tela fica fixa e a câmera anda entre as
   capturas reais de cada etapa enquanto o texto rola ao lado. Sem JS e
   abaixo de 1100 px, a cena vira lista: cada etapa com o seu enquadramento. */
.pros {
  display: grid;
  gap: clamp(120px, 14vw, 220px);
  margin-top: clamp(96px, 10vw, 160px);
}
.pro {
  position: relative;
}
.pro-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: end;
  padding-bottom: clamp(36px, 4vw, 60px);
  border-bottom: 1px solid var(--c-line);
}
/* Assinatura: um dado real da área, grande e vazado, ao fundo. */
.pro-sig {
  position: absolute;
  left: -0.04em;
  top: -0.3em;
  z-index: 0;
  font: 500 clamp(4rem, 9.5vw, 10rem) / 1 var(--mono);
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--c-line) 75%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 52%);
  mask-image: linear-gradient(90deg, #000 30%, transparent 52%);
  pointer-events: none;
  user-select: none;
}
.pro-title-col,
.pro-intro {
  position: relative;
  z-index: 1;
}
.pro-kicker,
.chap-n {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  font: 500 13px/1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-mute);
}
.pro-kicker b,
.chap-n b {
  color: var(--c-accent);
}
.pro-mood {
  margin: 0;
  font-size: clamp(3rem, 6.4vw, 6.6rem);
  line-height: 0.95;
}
.pro-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 24px 0 0;
  font: 500 13px/1.2 var(--label);
  letter-spacing: 0.02em;
  color: var(--c-ink);
}
.pro-chain i {
  font-style: normal;
  color: var(--fire);
}
.pro-intro {
  display: grid;
  gap: 8px;
  max-width: 62ch;
}
.pro-intro .m-label {
  margin: 0;
}
.pro-problem {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.25;
  color: var(--c-ink);
}
.pro-serves {
  margin: 0;
  color: var(--c-ink);
}
.pro-intro .who {
  margin: 0;
}
/* Resumo de estados: a honestidade em uma linha, o detalhe fica na ficha. */
.ssum {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--c-mute);
}
.ssum b {
  margin-right: 2px;
  font: 600 14px/1 var(--label);
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}
.ssum i {
  font-style: normal;
  color: var(--line-strong);
}
.ss-evolucao b {
  color: var(--c-accent);
}

.pro-theatre {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 72px);
  margin-top: clamp(24px, 3vw, 48px);
}
.pro-beats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pro-beat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 58vh;
  padding-block: 24px;
}
/* A etapa fora de foco recua pela cor (contraste AA), não pela transparência. */
html.js .pro-beat:not(.is-on) .pro-beat-text,
html.js .pro-beat:not(.is-on) .pro-beat-n {
  color: var(--c-mute);
}
html.js .pro-beat:not(.is-on) .chip,
html.js .pro-beat:not(.is-on) .api-card {
  opacity: 0.7;
}
.pro-beat-text,
.pro-beat-n {
  transition: color 0.45s var(--ease);
}
/* Protagonistas escuros (Estoque, Fiscal e Logística): palco que sangra até
   as bordas, com os mesmos componentes e os tokens do palco. */
.pro-dark {
  --paper: var(--stage);
  --sheet: var(--stage-2);
  --ink: var(--stage-ink);
  --ink-2: var(--stage-mute);
  --ink-3: #8e9396;
  --line: var(--stage-line-2);
  --line-2: var(--stage-line);
  --line-strong: var(--stage-line-2);
  --fire-deep: var(--stage-fire);
  --c-bg: var(--stage);
  --c-ink: var(--stage-ink);
  --c-mute: var(--stage-mute);
  --c-line: var(--stage-line-2);
  --c-line-2: var(--stage-line);
  --c-accent: var(--stage-fire);
  --c-raised: var(--stage-2);
  color: var(--stage-ink);
  color-scheme: dark;
  isolation: isolate;
  padding-block: clamp(96px, 10vw, 150px);
}
.pro-dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background: var(--stage);
}
.pro-dark .pro-view {
  border-color: var(--stage-line-2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 60px 110px -40px rgba(0, 0, 0, 0.95);
}
.pro-beat-n {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 13px/1 var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.pro-beat-n b {
  color: var(--c-accent);
}
.pro-beat-text {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.45;
  color: var(--c-ink);
  text-wrap: pretty;
}
.pro-beat-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--c-mute);
  opacity: 0.85;
}
.pro-beat .api-card {
  margin: 4px 0 0;
}
.pro-beat-shot {
  display: none;
}
.pro-stage {
  position: sticky;
  top: calc(var(--top) + 32px);
  align-self: start;
  margin-top: 8vh;
}
.pro-stage .shot-route {
  display: none;
}
.pro-stage .shot-route.is-on {
  display: inline;
}
.pro-view {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #f5f6f6;
  box-shadow: 0 50px 90px -40px rgba(16, 12, 8, 0.45);
}
.pro-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.pro-layer.is-on {
  opacity: 1;
}
/* Câmera: cada etapa entra no quadro inteiro e aproxima a região explicada. */
.pro-layer .cam {
  transform: none;
  transition: transform 1.25s cubic-bezier(0.65, 0, 0.25, 1) 0.15s;
}
.pro-layer.is-on .cam {
  transform: translate(calc(var(--tx) * 1%), calc(var(--ty) * 1%)) scale(var(--s));
}
.pro-layer .cam-focus,
.pro-layer .cam-cursor {
  opacity: 0;
  transition: opacity 0.4s var(--ease) 1s;
}
.pro-layer.is-on .cam-focus,
.pro-layer.is-on .cam-cursor {
  opacity: 1;
}
.pro-layer .cam-cursor,
.pro-beat-shot .cam-cursor {
  transform: scale(calc(1 / var(--s, 1)));
}
.pro-dots {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  font: 500 11px/1.2 var(--label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-mute);
}
.pro-dots li {
  flex: 1;
  padding-top: 10px;
  border-top: 2px solid var(--c-line);
  transition: border-color 0.4s, color 0.4s;
}
.pro-dots li.is-done {
  border-top-color: color-mix(in srgb, var(--fire) 45%, var(--c-line));
}
.pro-dots li.is-on {
  border-top-color: var(--fire);
  color: var(--c-ink);
}
.pro-sheet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px clamp(24px, 3vw, 48px);
  margin-top: clamp(56px, 7vw, 104px);
  padding-top: 32px;
  border-top: 1px solid var(--c-line);
}
.pro-flow {
  list-style: none;
  counter-reset: f;
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  font-size: 14px;
}
.pro-flow li {
  display: flex;
  gap: 10px;
  counter-increment: f;
}
.pro-flow li::before {
  content: counter(f, decimal-leading-zero);
  font: 500 11px/1.7 var(--label);
  color: var(--c-accent);
}
/* Lista (celular e sem JS): cada etapa com a tela já enquadrada. */
html:not(.js) .pro-theatre {
  grid-template-columns: minmax(0, 1fr);
}
html:not(.js) .pro-stage {
  display: none;
}
html:not(.js) .pro-beat {
  opacity: 1;
  min-height: 0;
}
html:not(.js) .pro-beat-shot {
  display: block;
  margin-top: 8px;
}
.pro-beat-shot .cam {
  transform: translate(calc(var(--tx) * 1%), calc(var(--ty) * 1%)) scale(var(--s));
}
@media (max-width: 1099px) {
  .pro-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .pro-theatre {
    grid-template-columns: minmax(0, 1fr);
  }
  .pro-stage {
    display: none;
  }
  .pro-beat {
    opacity: 1;
    min-height: 0;
    padding-block: 28px;
  }
  .pro-beat-shot {
    display: block;
    margin-top: 8px;
  }
  .pro-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .pro-sheet {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- capítulos compactos */
.chaps {
  display: grid;
  gap: clamp(72px, 8vw, 120px);
  margin-top: clamp(140px, 16vw, 240px);
}
.chaps-head {
  max-width: 34ch;
}
.chaps-head .display-3 {
  margin: 10px 0 0;
}
.chap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px clamp(32px, 5vw, 80px);
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--c-line);
}
.chap-body {
  display: contents;
}
.chap-cols {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px clamp(24px, 3vw, 48px);
}
.chap-title {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 2.9vw, 2.9rem);
}
.chap-problem {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.45vw, 1.4rem);
  line-height: 1.22;
  color: var(--c-ink);
}
.chap-serves {
  margin: 0;
  color: var(--c-mute);
}
.chap-flow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.chap-flow li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--label);
  color: var(--c-ink);
}
.chap-flow li:not(:last-child)::after {
  content: "→";
  color: var(--fire);
}
.chap-more {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
}
.chap-more a {
  display: grid;
  gap: 6px;
  width: 112px;
  text-decoration: none;
  font: 500 11px/1 var(--label);
  color: var(--c-mute);
}
.chap-more img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  object-position: 0 0;
  border-radius: 6px;
  border: 1px solid var(--c-line);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.chap-more a:hover img,
.chap-more a:focus-visible img {
  transform: translateY(-2px);
  border-color: var(--fire);
}
@media (max-width: 1099px) {
  .chap {
    grid-template-columns: minmax(0, 1fr);
  }
  .chap-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ================================================================ V4 — o fio */
/* A assinatura: uma linha na margem que atravessa a página (a mesma
   operação), passando pelos nós de cada ato até a convergência. */
main {
  position: relative;
}
.thread {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
}
.thread-base {
  fill: none;
  stroke: rgba(140, 134, 128, 0.3);
  stroke-width: 1.2;
}
.thread-lit {
  fill: none;
  stroke: var(--fire);
  stroke-width: 1.8;
}
.thread-knot {
  fill: var(--stage);
  stroke: rgba(140, 134, 128, 0.6);
  stroke-width: 1.4;
  transition: fill 0.4s, stroke 0.4s;
}
.thread-knot.is-lit {
  fill: var(--fire);
  stroke: var(--fire);
}
.thread-head {
  fill: var(--fire);
  stroke: rgba(255, 148, 8, 0.28);
  stroke-width: 8;
  paint-order: stroke;
}
/* Os nós do HTML são só âncoras: o desenho fica no SVG do fio. */
.act-node {
  visibility: hidden;
}
.eyebrow {
  position: relative;
}
.thread-start {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--thread-gap, 30px));
}
.converge {
  position: relative;
}
.thread-end {
  position: absolute;
  left: -4px;
  top: 50%;
  width: 1px;
  height: 1px;
}
@media (max-width: 1099px) {
  :root {
    --thread-gap: calc(var(--gutter) - 7px);
  }
  .act-node {
    display: block;
  }
  .thread-knot {
    r: 3.5;
  }
}

/* ---------------------------------------------------------------- entrada por rolagem */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head,
    .m-head,
    .m-ps,
    .m-aside,
    .legend,
    .area-index,
    .evo,
    .module-top {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes rise {
  from {
    opacity: 0.3;
    transform: translateY(28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
