/* Unexly · direção "Sinal", tema claro: prancha técnica sobre papel, estética de broadcast. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-normal.woff2") format("woff2");
  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: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-normal.woff2") format("woff2");
  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;
}

@property --tc-s {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}

@property --tc-f {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}

/*
 * Paleta clara da Unexly ("Sinal claro"). Fonte única de verdade para a página
 * inicial e para /como-funciona: as duas usam este bloco :root sem mudar os
 * valores. Pode acrescentar tokens novos, nunca alterar estes.
 *
 * Linguagem: prancha técnica sobre papel. O que no escuro era brilho vira traço
 * preciso, hachura e preenchimento chapado. Nada de glow, sombra difusa ou
 * degradê genérico.
 *
 * Contraste medido (WCAG) sobre --bg #f4f1e9 / --panel #fbfaf6:
 *   --text #15243a 13.8 / 15.0   --text-2 #39445a 8.7 / 9.4   --muted #5d6a7f 4.9 / 5.3
 *   --info #06737a 5.0 / 5.4     --state #b4441c 4.9 / 5.3    --accent #5a3fd1 6.1 / 6.6
 *   Preenchimentos (--cyan, --coral, --violet) NÃO servem para texto pequeno sobre
 *   o papel (1.8 a 3.0). Texto sobre --cyan usa --text (7.6); sobre --coral usa
 *   --text (5.0); branco sobre --info dá 5.6.
 */
:root {
  /* superfícies */
  --bg: #f4f1e9; /* papel da marca (o mesmo da página Como funciona do portal) */
  --bg-2: #efebe1; /* faixas alternadas */
  --panel: #fbfaf6; /* monitor, quadros, cartões */
  --panel-2: #ffffff;

  /* traço e grade (tinta com transparência) */
  --line: rgb(21 36 58 / 12%);
  --line-2: rgb(21 36 58 / 22%);
  --line-3: rgb(21 36 58 / 40%);
  --grid: rgb(21 36 58 / 5%);
  --grid-2: rgb(21 36 58 / 9%);
  --hatch: rgb(21 36 58 / 7%);

  /* texto */
  --text: #15243a; /* tinta */
  --text-2: #39445a;
  --muted: #5d6a7f;

  /* sinal: informação (consulta, mensagem, resposta) */
  --info: #06737a; /* texto e traço fino */
  --cyan: #22c7d6; /* preenchimento, pulsos, trilhas grossas */
  --cyan-soft: #d3f1f3; /* fundo de destaque */
  --teal: #0d9aa3; /* teal de marca, traço médio */

  /* sinal: mudança de estado (ação autorizada, evento) */
  --state: #b4441c; /* texto */
  --coral: #e76e44; /* preenchimento e traço */
  --coral-soft: #fbe2d8;

  /* acento do logo (núcleo, decisão) */
  --accent: #5a3fd1; /* texto */
  --violet: #6d4fe0; /* preenchimento e traço */
  --violet-soft: #e6e0fb;

  /* nomes antigos da versão escura, para facilitar a conversão */
  --cyan-hi: var(--info);
  --coral-hi: var(--state);
  --paper: var(--bg);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* Acréscimos desta página (a paleta acima fica intacta). */
:root {
  /* traço do esquema: tinta com transparência, do mais leve ao mais firme */
  --wire: rgb(21 36 58 / 28%); /* trilhas em repouso */
  --wire-2: rgb(21 36 58 / 50%); /* contorno de zona, nós, guias */
  --ink: var(--text); /* marcas de corte, junções */
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text-2);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  color: var(--text);
  background: var(--cyan);
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
}

/* Ícones de linha */

.portal svg,
.btn svg,
.more svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Barra ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}

.bar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--info);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.bar-in {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  height: 60px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav {
  display: none;
}

.nav a {
  padding-block: 8px;
  color: var(--muted);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--text);
}

.portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font: 500 13px/1 var(--mono);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.portal:hover {
  border-color: var(--info);
  color: var(--info);
}

/* ---------- Topo ---------- */

.hero {
  position: relative;
  padding: 18px var(--gutter) 34px;
  border-bottom: 1px solid var(--line-2);
  scroll-margin-top: 60px;
}

.hero-in {
  display: grid;
  gap: 32px;
  max-width: var(--maxw);
  margin-inline: auto;
}

.copy {
  display: grid;
  gap: 24px;
  align-content: start;
}

.kicker {
  display: inline-block;
  padding: 7px 10px 6px;
  color: var(--text);
  background: var(--cyan);
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.12em;
}

h1 {
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(42px, 12.4vw, 64px);
  font-weight: 620;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.ln {
  display: block;
  clip-path: inset(-0.1em -0.15em -0.24em -0.06em);
  text-wrap: balance;
}

.ln > span {
  display: inline-block;
}

.lead {
  max-width: 46ch;
  color: var(--text-2);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s,
    background-color 0.15s;
}

.btn svg {
  transition: transform 0.2s var(--e-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-sig {
  color: var(--text);
  background: var(--cyan);
}

.btn-sig:hover {
  color: var(--panel-2);
  background: var(--info);
}

.btn-ln {
  border-color: var(--line-3);
  color: var(--text);
}

.btn-ln:hover {
  border-color: var(--info);
  color: var(--info);
}

.mail {
  margin-top: 16px;
  color: var(--muted);
  font: 400 13px/1.4 var(--mono);
}

.mail span {
  color: var(--text-2);
}

/* Monitor */

.monitor {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-3);
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--grid-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-2) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size:
    120px 120px,
    120px 120px,
    24px 24px,
    24px 24px;
}

.monitor::before,
.end-frame::before {
  position: absolute;
  inset: -7px;
  background:
    linear-gradient(var(--ink), var(--ink)) top left / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) top left / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) top right / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) top right / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom right / 1px 14px no-repeat;
  content: "";
  pointer-events: none;
}

.mon-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  min-height: 36px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  background: var(--bg);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mon-id {
  display: none;
  color: var(--info);
}

.mon-route {
  display: none;
  text-transform: none;
  letter-spacing: 0.06em;
}

.mon-route b {
  color: var(--muted);
  font-weight: 400;
}

/* A rota do letreiro acende onde o sinal está, no mesmo laço de 9 s do diagrama: no papel, o
   trecho aceso vira tarja chapada (ciano = consulta e resposta, coral = ação autorizada). */
.rt {
  margin-inline: -3px;
  padding: 1px 3px;
  animation: 9s linear infinite both;
}
.rt1 {
  animation-name: rt1;
}
.rt2 {
  animation-name: rt2;
}
.rt3 {
  animation-name: rt3;
}
.rt4 {
  animation-name: rt4;
}

@keyframes rt1 {
  0%,
  0.6%,
  9%,
  36.6%,
  41%,
  42.6%,
  48.4%,
  66.4%,
  70.8%,
  100% {
    color: var(--muted);
    background-color: transparent;
  }
  1%,
  8.5%,
  37%,
  40.6%,
  43%,
  48%,
  66.8%,
  70.4% {
    color: var(--text);
    background-color: var(--cyan);
  }
}

@keyframes rt2 {
  0%,
  7.8%,
  13.4%,
  33.4%,
  38.2%,
  47.4%,
  51.8%,
  62.4%,
  67.4%,
  100% {
    color: var(--muted);
    background-color: transparent;
  }
  8.2%,
  13%,
  33.8%,
  37.8%,
  47.8%,
  51.4%,
  62.8%,
  67% {
    color: var(--text);
    background-color: var(--cyan);
  }
}

@keyframes rt3 {
  0%,
  13.4%,
  32.4%,
  51.8%,
  61.4%,
  100% {
    color: var(--muted);
    background-color: transparent;
  }
  13.8%,
  32%,
  52.2%,
  61% {
    color: var(--text);
    background-color: var(--cyan);
  }
}

@keyframes rt4 {
  0%,
  16.8%,
  29.4%,
  53.6%,
  67.4%,
  100% {
    color: var(--muted);
    background-color: transparent;
  }
  17.2%,
  29% {
    color: var(--text);
    background-color: var(--cyan);
  }
  54%,
  67% {
    color: var(--text);
    background-color: var(--coral);
  }
}

.mon-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}

.tally {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  animation: tally 1.2s step-end infinite;
}

.mon-tc {
  margin-left: auto;
  color: var(--text-2);
  counter-reset: s var(--tc-s) f var(--tc-f);
  font-variant-numeric: tabular-nums;
  animation:
    tc-s 9s steps(9, end) infinite,
    tc-f 1s steps(25, end) infinite;
}

.mon-tc::before {
  content: "TC 00:00:0" counter(s) ":" counter(f, decimal-leading-zero);
}

/* Diagrama */

.dg {
  display: block;
  width: 100%;
  height: auto;
}

.dg-h {
  display: none;
}

.dg-v {
  max-width: 440px;
  margin-inline: auto;
  padding: 18px 12px 14px;
}

.dg text {
  font-family: var(--mono);
}

.mid {
  text-anchor: middle;
}

.end {
  text-anchor: end;
}

.erp-fill {
  fill: var(--panel);
}

.dg-h .erp-hatch {
  fill: url(#hh-h);
}

.dg-v .erp-hatch {
  fill: url(#hh-v);
}

/* O território do ERP é um corte hachurado; as letras recortam a hachura (ver .z, .pd, .ro). */
.hatch {
  stroke: var(--line);
  stroke-width: 1;
}

.erp-line {
  fill: none;
  stroke: var(--wire-2);
  stroke-width: 1.2;
  stroke-dasharray: 100 100;
  animation: draw-once 1.2s var(--e-out) both;
}

.z {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.zn {
  fill: var(--info);
}

.note {
  fill: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.tr path,
.tap {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.5;
}

.slot {
  fill: none;
  stroke: var(--wire-2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.jn {
  fill: var(--ink);
}

.port rect {
  fill: var(--panel-2);
  stroke: var(--text-2);
  stroke-width: 1;
}

.dr path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 0;
  opacity: 0;
}

.dr .co {
  stroke: var(--coral);
}

.pk {
  opacity: 0;
  offset-rotate: 0deg;
}

.po {
  fill: var(--cyan-soft);
  stroke: var(--teal);
  stroke-width: 1.5;
}

.pi {
  fill: var(--info);
}

.pk.co .po {
  fill: var(--coral-soft);
  stroke: var(--coral);
}

.pk.co .pi {
  fill: var(--state);
}

.node-box {
  fill: var(--panel-2);
  stroke: var(--wire-2);
  stroke-width: 1;
}

.nd {
  fill: var(--text-2);
  font-family: var(--sans);
  font-size: 13.5px;
}

.dg text.nd {
  font-family: var(--sans);
}

.lb {
  fill: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.core-ticks {
  fill: none;
  stroke: var(--line-3);
  stroke-width: 7;
  stroke-dasharray: 0.1 0.9;
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 90s linear infinite;
}

/* No papel o pulso não brilha: é uma onda chapada que cresce atrás do núcleo e apaga. */
.core-pulse {
  fill: var(--cyan-soft);
  stroke: var(--teal);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.core-disc {
  fill: var(--panel-2);
  stroke-width: 2;
}

.dg-h .core-disc {
  stroke: url(#rg-h) var(--violet);
}

.dg-v .core-disc {
  stroke: url(#rg-v) var(--violet);
}

.stop-c {
  stop-color: var(--teal);
}

.stop-v {
  stop-color: var(--violet);
}

.core-sweep {
  fill: none;
  stroke: var(--violet);
  stroke-width: 2;
  stroke-dasharray: 16 84;
  stroke-linecap: round;
  opacity: 0.3;
  transform-box: fill-box;
  transform-origin: center;
  animation:
    sweep-rot 2.4s linear infinite,
    sweep-op 9s linear infinite both;
}

.core-name {
  fill: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.core-sub {
  fill: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.leader {
  fill: none;
  stroke: var(--wire-2);
  stroke-width: 1;
}

.dg text.co-t {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
}

.pad {
  fill: var(--cyan);
  stroke: var(--text-2);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
}

.pad3 {
  fill: var(--coral);
}

.sw-c {
  fill: var(--panel-2);
  stroke: var(--text-2);
  stroke-width: 1.5;
}

.sw-lever {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.dg-h .sw-lever {
  transform-origin: 984px 336px;
}

.dg-v .sw-lever {
  transform-origin: 30px 662px;
}

.pd {
  fill: var(--text-2);
  font-size: 13px;
}

.ro {
  fill: var(--info);
  font-size: 11.5px;
}

.ro3 {
  fill: var(--state);
}

.ev-box {
  fill: var(--panel-2);
  stroke: var(--coral);
  stroke-width: 1.5;
}

.ev-k {
  fill: var(--state);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.ev-n {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.ev-d {
  fill: var(--text-2);
  font-size: 11.5px;
}

.bub-in {
  fill: var(--panel-2);
  stroke: var(--line-3);
  stroke-width: 1;
}

.bub-out {
  fill: var(--cyan);
}

.dg text.bt {
  fill: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 450;
}

.dg text.bt-o {
  fill: var(--text);
  font-weight: 520;
}

/* Letras do esquema recortam a grade e a hachura, como na prancha: contorno na cor da folha. */
.z,
.note,
.lb,
.dg text.co-t,
.pd,
.ro {
  stroke: var(--panel);
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.dg-v .core-name {
  font-size: 12px;
  letter-spacing: 0.14em;
}

.dg-v .core-sub {
  font-size: 10px;
}

.dg-v .ev-n {
  font-size: 11.5px;
}

/* ---------- Coreografia do topo (laço de 9 s) ---------- */

.b1,
.b2,
.b3,
.b4,
.tap,
.dg .pk,
.dr path,
.node-box,
.core-pulse,
.core-disc,
.pad,
.ro,
.sw-lever,
.ev,
.ev-box {
  animation-duration: 9s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

/* Cada ramal do canal acende com o seu balão (só opacidade, para não descolar do barramento). */
.tp1 {
  animation-name: tp1;
}
.tp2 {
  animation-name: tp2;
}
.tp3 {
  animation-name: tp3;
}
.tp4 {
  animation-name: tp4;
}

@keyframes tp1 {
  0%,
  0.6% {
    opacity: 0;
  }
  5%,
  92.8% {
    opacity: 1;
  }
  97.2%,
  100% {
    opacity: 0;
  }
}

@keyframes tp2 {
  0%,
  37% {
    opacity: 0;
  }
  40.4%,
  92.8% {
    opacity: 1;
  }
  97.2%,
  100% {
    opacity: 0;
  }
}

@keyframes tp3 {
  0%,
  42.8% {
    opacity: 0;
  }
  45.6%,
  92.8% {
    opacity: 1;
  }
  97.2%,
  100% {
    opacity: 0;
  }
}

@keyframes tp4 {
  0%,
  66.7% {
    opacity: 0;
  }
  70%,
  92.8% {
    opacity: 1;
  }
  97.2%,
  100% {
    opacity: 0;
  }
}

.b1 {
  animation-name: b1;
}
.b2 {
  animation-name: b2;
}
.b3 {
  animation-name: b3;
}
.b4 {
  animation-name: b4;
}
.pk-a {
  animation-name: pk-a;
}
.pk-b {
  animation-name: pk-b;
}
.pk-c {
  animation-name: pk-cc;
}
.pk-d {
  animation-name: pk-d;
}
.pk-e {
  animation-name: pk-e;
}
.pk-er {
  animation-name: pk-er;
}
.pk-f {
  animation-name: pk-f;
}
.pk-fr {
  animation-name: pk-fr;
}
.pk-gg {
  animation-name: pk-gg;
}
.pk-h {
  animation-name: pk-h;
}
.dr-a {
  animation-name: dr-a;
}
.dr-b {
  animation-name: dr-b;
}
.dr-c {
  animation-name: dr-c;
}
.dr-d {
  animation-name: dr-d;
}
.dr-e {
  animation-name: dr-e;
}
.dr-f {
  animation-name: dr-f;
}
.dr-g {
  animation-name: dr-g;
}
.dr-h {
  animation-name: dr-h;
}
.node-box {
  animation-name: node;
}
.core-pulse {
  animation-name: core-pulse;
}
.core-disc {
  animation-name: core-disc;
}
.pad1 {
  animation-name: pad1;
}
.pad2 {
  animation-name: pad2;
}
.pad3 {
  animation-name: pad3;
}
.ro1 {
  animation-name: ro1;
}
.ro2 {
  animation-name: ro2;
}
.ro3 {
  animation-name: ro3;
}
.sw-lever {
  animation-name: lever;
}
.ev {
  animation-name: ev;
}
.ev-box {
  animation-name: ev-box;
}

/* Trilhas: a mesma geometria do SVG, para o pacote andar em cima do traço. */

.dg-h .pk-a {
  offset-path: path("M230 82H310Q322 82 322 94V158Q322 170 334 170H734");
}
.dg-h .pk-b {
  offset-path: path("M734 170H300");
}
.dg-h .pk-c {
  offset-path: path("M86 234H310Q322 234 322 222V182Q322 170 334 170H734");
}
.dg-h .pk-d {
  offset-path: path("M734 170H334Q322 170 322 182V286Q322 298 310 298H300");
}
.dg-h .pk-e,
.dg-h .pk-er {
  offset-path: path("M780 236V284Q780 296 768 296H636Q624 296 624 308V346");
}
.dg-h .pk-f,
.dg-h .pk-fr {
  offset-path: path("M804 240V346");
}
.dg-h .pk-gg {
  offset-path: path("M828 236V284Q828 296 840 296H972Q984 296 984 308V346");
}
.dg-h .pk-h {
  offset-path: path("M874 170H1088");
}

.dg-v .pk-a {
  offset-path: path("M24 60H22Q10 60 10 72V342Q10 354 22 354H118Q130 354 130 366V412");
}
.dg-v .pk-b {
  offset-path: path("M130 412V366Q130 354 118 354H22Q10 354 10 342V144Q10 132 22 132H120");
}
.dg-v .pk-c {
  offset-path: path("M24 192H22Q10 192 10 204V342Q10 354 22 354H118Q130 354 130 366V412");
}
.dg-v .pk-d {
  offset-path: path("M130 412V366Q130 354 118 354H22Q10 354 10 342V264Q10 252 22 252H120");
}
.dg-v .pk-e,
.dg-v .pk-er {
  offset-path: path("M114 489V500Q114 512 102 512H42Q30 512 30 524V590H40");
}
.dg-v .pk-f,
.dg-v .pk-fr {
  offset-path: path("M114 489V500Q114 512 102 512H42Q30 512 30 524V626H40");
}
.dg-v .pk-gg {
  offset-path: path("M114 489V500Q114 512 102 512H42Q30 512 30 524V676H40");
}
.dg-v .pk-h {
  offset-path: path("M170 452H206");
}

/* Balões: entram na hora em que o pacote chega; saem juntos no fim do laço. */

@keyframes b1 {
  0%,
  0.6% {
    opacity: 0;
    transform: translateX(-24px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  5%,
  92.8% {
    opacity: 1;
    transform: translateX(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes b2 {
  0%,
  37% {
    opacity: 0;
    transform: translateX(24px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  40.4%,
  92.8% {
    opacity: 1;
    transform: translateX(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes b3 {
  0%,
  42.8% {
    opacity: 0;
    transform: translateX(-24px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  45.6%,
  92.8% {
    opacity: 1;
    transform: translateX(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes b4 {
  0%,
  66.7% {
    opacity: 0;
    transform: translateX(24px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  70%,
  92.8% {
    opacity: 1;
    transform: translateX(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

/* Pacotes */

@keyframes pk-a {
  0%,
  4.4% {
    offset-distance: 0%;
    opacity: 0;
  }
  5% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  14.4% {
    offset-distance: 100%;
    opacity: 1;
  }
  15.6%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-b {
  0%,
  30.6% {
    offset-distance: 0%;
    opacity: 0;
  }
  31.1% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  37.8% {
    offset-distance: 100%;
    opacity: 1;
  }
  38.8%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-cc {
  0%,
  44.5% {
    offset-distance: 0%;
    opacity: 0;
  }
  45% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  52.2% {
    offset-distance: 100%;
    opacity: 1;
  }
  53.3%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-d {
  0%,
  60.7% {
    offset-distance: 0%;
    opacity: 0;
  }
  61.1% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  67.5% {
    offset-distance: 100%;
    opacity: 1;
  }
  68.4%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-e {
  0%,
  16.8% {
    offset-distance: 0%;
    opacity: 0;
  }
  17.2% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  21.7% {
    offset-distance: 100%;
    opacity: 1;
  }
  22.6%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-er {
  0%,
  22.4% {
    offset-distance: 100%;
    opacity: 0;
  }
  22.8% {
    offset-distance: 100%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  27.2% {
    offset-distance: 0%;
    opacity: 1;
  }
  28.1%,
  100% {
    offset-distance: 0%;
    opacity: 0;
  }
}

@keyframes pk-f {
  0%,
  18.5% {
    offset-distance: 0%;
    opacity: 0;
  }
  18.9% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  22.8% {
    offset-distance: 100%;
    opacity: 1;
  }
  23.7%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-fr {
  0%,
  23.5% {
    offset-distance: 100%;
    opacity: 0;
  }
  23.9% {
    offset-distance: 100%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  28.3% {
    offset-distance: 0%;
    opacity: 1;
  }
  29.2%,
  100% {
    offset-distance: 0%;
    opacity: 0;
  }
}

/* A ação para na chave até o ERP fechar o contato; depois segue até a ferramenta. */
@keyframes pk-gg {
  0%,
  53.5% {
    offset-distance: 0%;
    opacity: 0;
  }
  53.9% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  57.8% {
    offset-distance: 85.2%;
    opacity: 1;
  }
  59% {
    offset-distance: 85.2%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0);
  }
  60% {
    offset-distance: 100%;
    opacity: 1;
  }
  60.8%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes pk-h {
  0%,
  60.4% {
    offset-distance: 0%;
    opacity: 0;
  }
  60.8% {
    offset-distance: 0%;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  65.6% {
    offset-distance: 100%;
    opacity: 1;
  }
  66.4%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

/* Linhas que se desenham atrás do pacote e se apagam depois */

@keyframes dr-a {
  0%,
  5% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  14.4%,
  17.8% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  24.4%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-b {
  0%,
  31.1% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  37.8%,
  40% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  45.6%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-c {
  0%,
  45% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  52.2%,
  55.6% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  60%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-d {
  0%,
  61.1% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  67.5%,
  70% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  76%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-e {
  0%,
  17.2% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  21.7%,
  28.9% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  33.3%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-f {
  0%,
  18.9% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  22.8%,
  28.9% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  33.3%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-g {
  0%,
  53.9% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  57.8%,
  66.7% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  76%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes dr-h {
  0%,
  60.8% {
    stroke-dashoffset: 100;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  65.6%,
  70% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  76%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

/* O nó do ERP acende quando cada pacote passa por ele */

@keyframes node {
  0%,
  7.6%,
  12.8%,
  33.6%,
  38.2%,
  47.2%,
  51.6%,
  62.6%,
  67%,
  100% {
    fill: var(--panel-2);
    stroke: var(--wire-2);
  }
  9%,
  11.4%,
  35%,
  37%,
  48.4%,
  50.4%,
  63.8%,
  65.8% {
    fill: var(--cyan-soft);
    stroke: var(--info);
  }
}

/* Núcleo: pulso ao receber, ao decidir e ao receber de novo */

@keyframes core-pulse {
  0%,
  14.4% {
    transform: scale(1);
    opacity: 0;
  }
  14.5% {
    transform: scale(1);
    opacity: 0.9;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  21% {
    transform: scale(1.5);
    opacity: 0;
  }
  28.3% {
    transform: scale(1);
    opacity: 0;
  }
  28.4% {
    transform: scale(1);
    opacity: 0.9;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  35% {
    transform: scale(1.5);
    opacity: 0;
  }
  52.2% {
    transform: scale(1);
    opacity: 0;
  }
  52.3% {
    transform: scale(1);
    opacity: 0.9;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  59% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes core-disc {
  0%,
  14.3%,
  19%,
  28.2%,
  32.5%,
  52.1%,
  56.5%,
  60.6%,
  64.5%,
  100% {
    fill: var(--panel-2);
  }
  14.6%,
  28.5%,
  52.4%,
  60.9% {
    fill: var(--violet-soft);
  }
}

@keyframes sweep-rot {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sweep-op {
  0%,
  13% {
    opacity: 0.3;
  }
  15%,
  31% {
    opacity: 1;
  }
  34%,
  50.5% {
    opacity: 0.3;
  }
  52.5%,
  61% {
    opacity: 1;
  }
  64%,
  100% {
    opacity: 0.3;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ferramentas do Tool Gateway */

@keyframes pad1 {
  0%,
  21.6% {
    fill: var(--panel-2);
    transform: scale(1);
  }
  21.7% {
    fill: var(--info);
    transform: scale(1.5);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  26%,
  92.8% {
    fill: var(--cyan);
    transform: scale(1);
  }
  97.2%,
  100% {
    fill: var(--panel-2);
    transform: scale(1);
  }
}

@keyframes pad2 {
  0%,
  22.7% {
    fill: var(--panel-2);
    transform: scale(1);
  }
  22.8% {
    fill: var(--info);
    transform: scale(1.5);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  27%,
  92.8% {
    fill: var(--cyan);
    transform: scale(1);
  }
  97.2%,
  100% {
    fill: var(--panel-2);
    transform: scale(1);
  }
}

@keyframes pad3 {
  0%,
  59.9% {
    fill: var(--panel-2);
    transform: scale(1);
  }
  60% {
    fill: var(--state);
    transform: scale(1.5);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  64%,
  92.8% {
    fill: var(--coral);
    transform: scale(1);
  }
  97.2%,
  100% {
    fill: var(--panel-2);
    transform: scale(1);
  }
}

@keyframes ro1 {
  0%,
  22% {
    opacity: 0;
    transform: translateY(5px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  25%,
  92.8% {
    opacity: 1;
    transform: translateY(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

@keyframes ro2 {
  0%,
  23.1% {
    opacity: 0;
    transform: translateY(5px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  26.1%,
  92.8% {
    opacity: 1;
    transform: translateY(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

@keyframes ro3 {
  0%,
  60% {
    opacity: 0;
    transform: translateY(5px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  63%,
  92.8% {
    opacity: 1;
    transform: translateY(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

/* Chave de autorização: aberta até o ERP liberar */

@keyframes lever {
  0%,
  57.8% {
    transform: rotate(-32deg);
    stroke: var(--muted);
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
  }
  59%,
  93.3% {
    transform: rotate(0deg);
    stroke: var(--coral);
  }
  96.7%,
  100% {
    transform: rotate(-32deg);
    stroke: var(--muted);
  }
}

/* Evento que sai pela direita */

@keyframes ev {
  0%,
  64.4% {
    opacity: 0;
    transform: translateX(-14px);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  67.2%,
  92.8% {
    opacity: 1;
    transform: translateX(0);
  }
  97.2%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes ev-box {
  0%,
  66% {
    fill: var(--coral-soft);
  }
  74%,
  100% {
    fill: var(--panel-2);
  }
}

@keyframes draw-once {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes tc-s {
  from {
    --tc-s: 0;
  }
  to {
    --tc-s: 9;
  }
}

@keyframes tc-f {
  from {
    --tc-f: 0;
  }
  to {
    --tc-f: 25;
  }
}

@keyframes tally {
  0% {
    opacity: 1;
  }
  60% {
    opacity: 0.2;
  }
}

/* Entrada do texto do topo, uma vez: tarja, título em duas linhas, apoio. */

.kicker {
  animation: wipe 0.7s var(--e-out) 0.05s both;
}

.ln > span {
  animation: rise 0.95s var(--e-out) 0.15s both;
}

.ln + .ln > span {
  animation-delay: 0.27s;
}

.copy-side {
  animation: fade-up 0.9s var(--e-out) 0.45s both;
}

@keyframes wipe {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes rise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.sec {
  position: relative;
  padding: clamp(80px, 9vw, 136px) var(--gutter);
  border-top: 1px solid var(--line);
  scroll-margin-top: 60px;
}

.sec-grid {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-position: center -1px;
  background-size: 48px 48px;
}

.slate {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.slate b {
  color: var(--info);
  font-weight: 600;
}

.slate span {
  color: var(--text-2);
}

.slate i {
  flex: 1;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--line-3) 0 1px, transparent 1px 8px) left bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--line-3) 0 1px, transparent 1px 80px) left bottom / 100% 10px no-repeat;
  transform-origin: left;
}

.sec-head {
  display: grid;
  gap: 22px 72px;
  margin-top: 32px;
}

h2 {
  max-width: 18ch;
  color: var(--text);
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.sec-lead {
  max-width: 52ch;
  color: var(--text-2);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
}

/* Fluxo */

.chain-box {
  position: relative;
  margin-top: clamp(52px, 6vw, 88px);
  view-timeline: --chain block;
}

.chain {
  position: relative;
  display: grid;
  gap: 44px;
  margin: 0;
  padding: 0 0 0 40px;
  list-style: none;
  overflow: clip;
  overflow-clip-margin: 8px;
}

.chain::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: var(--line-3);
  content: "";
  transform-origin: top;
}

.chain::after {
  position: absolute;
  top: 4px;
  bottom: 0;
  left: 4px;
  width: 7px;
  background: linear-gradient(var(--coral), var(--coral)) top / 7px 7px no-repeat;
  content: "";
  animation: chain-y 7s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.st {
  position: relative;
}

.st::before {
  position: absolute;
  top: 2px;
  left: -40px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--info);
  background: var(--bg);
  content: "";
}

.st-k {
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.st-k b {
  margin-right: 8px;
  color: var(--info);
  font-weight: 600;
}

.st h3 {
  margin-top: 14px;
  color: var(--text);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.st > p:not([class]) {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.55;
}

.st-io {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 9px;
  border: 1px solid var(--teal);
  color: var(--info);
  background: var(--panel-2);
  box-shadow: inset 3px 0 0 var(--cyan);
  font: 500 12.5px/1.35 var(--mono);
}

.st-io-co {
  border-color: var(--coral);
  color: var(--state);
  box-shadow: inset 3px 0 0 var(--coral);
}

.more {
  margin-top: 52px;
}

.more a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--cyan);
  color: var(--info);
  font: 500 14px/1.4 var(--mono);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.more a:hover {
  border-color: var(--text);
  color: var(--text);
}

@keyframes chain-y {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  4%,
  10% {
    transform: translateY(0);
    opacity: 1;
  }
  90% {
    transform: translateY(100%);
    opacity: 1;
  }
  96%,
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes chain-x {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  4%,
  10% {
    transform: translateX(0);
    opacity: 1;
  }
  27%,
  35% {
    transform: translateX(calc(25% + 9px));
    opacity: 1;
  }
  52%,
  60% {
    transform: translateX(calc(50% + 18px));
    opacity: 1;
  }
  77%,
  88% {
    transform: translateX(calc(75% + 27px));
    opacity: 1;
  }
  95%,
  100% {
    transform: translateX(calc(75% + 27px));
    opacity: 0;
  }
}

/* Regras */

.rules {
  margin-top: clamp(52px, 6vw, 88px);
  border-top: 1px solid var(--line-3);
}

.rule {
  display: grid;
  gap: 18px 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line-2);
}

.rule-id {
  color: var(--info);
  font: 300 clamp(44px, 5vw, 72px)/0.9 var(--mono);
  letter-spacing: -0.06em;
}

.rule h3 {
  color: var(--text);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.rule-txt p {
  max-width: 42ch;
  margin-top: 12px;
  color: var(--text-2);
}

.fig {
  position: relative;
  min-width: 0;
}

.ff-line {
  margin-bottom: 78px;
  color: var(--text);
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.ff {
  position: relative;
  white-space: nowrap;
}

.ff::before {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  height: 8px;
  border: 1px solid var(--info);
  border-top: 0;
  content: "";
}

.ff::after {
  position: absolute;
  top: calc(100% + 11px);
  left: 0;
  padding: 18px 0 0 8px;
  border-left: 1px solid var(--info);
  color: var(--info);
  content: attr(data-src);
  font: 500 12.5px/1 var(--mono);
  letter-spacing: 0;
  white-space: nowrap;
}

.ff-b::after {
  right: 0;
  left: auto;
  padding: 40px 8px 0 0;
  border-right: 1px solid var(--info);
  border-left: 0;
}

.ff-null {
  color: var(--muted);
  font: 500 12.5px/1.5 var(--mono);
}

.ff-null span {
  color: var(--state);
}

.fig-sw svg {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  overflow: visible;
  view-timeline: --sw block;
}

.fs-m {
  fill: var(--text-2);
  font-family: var(--mono);
  font-size: 13px;
}

.fs-t {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.fs-w {
  fill: none;
  stroke: var(--wire-2);
  stroke-width: 2;
}

.fs-out {
  stroke: var(--coral);
}

.fs-c {
  fill: var(--bg);
  stroke: var(--text-2);
  stroke-width: 1.5;
}

.fs-lever {
  fill: none;
  stroke: var(--coral);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 122px 62px;
}

.fs-tick {
  stroke: var(--muted);
  stroke-width: 1;
}

.fig-lanes {
  border-top: 1px solid var(--line-2);
}

.lane {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  height: 48px;
  border-bottom: 3px double var(--line-3);
}

.lane span {
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
}

.lane i {
  position: relative;
  height: 12px;
  overflow: hidden;
  background: linear-gradient(var(--line-3), var(--line-3)) center / 100% 1px no-repeat;
}

.lane i::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 6px 50%, var(--info) 0 3.5px, transparent 4px) no-repeat;
  content: "";
  animation: lane 3.4s linear infinite;
}

.lane:nth-child(2) i::after {
  animation-duration: 4.6s;
  animation-delay: -1.3s;
}

.lane:nth-child(3) i::after {
  animation-duration: 2.8s;
  animation-delay: -2.1s;
}

@keyframes lane {
  from {
    transform: translateX(-12px);
  }
  to {
    transform: translateX(100%);
  }
}

.ledger-box {
  display: grid;
  gap: 28px 72px;
  margin-top: clamp(64px, 7vw, 104px);
}

.ledger-head h3 {
  color: var(--text);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ledger-head p {
  max-width: 40ch;
  margin-top: 12px;
  color: var(--text-2);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}

.ledger caption {
  padding-bottom: 14px;
  color: var(--muted);
  font: 500 11.5px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.ledger th {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line-3);
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.ledger td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2);
  vertical-align: top;
}

.ledger td:first-child {
  color: var(--text);
}

.ledger code {
  display: inline-block;
  color: var(--info);
  font: 500 12.5px/1.6 var(--mono);
}

.ledger code.co {
  color: var(--state);
}

/* Plataforma */

.rundown {
  margin: clamp(52px, 6vw, 88px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line-3);
  list-style: none;
}

.rd {
  position: relative;
  display: grid;
  gap: 12px 40px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line-2);
  view-timeline: --rd block;
}

.rd::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.rd-n {
  color: var(--muted);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.1em;
}

.rd h3 {
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.rd-h p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 16px;
}

.rd-tags {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--text-2);
  font: 500 13px/1.9 var(--mono);
  list-style: none;
}

.rd-tags li {
  white-space: nowrap;
}

.rd-tags li:not(:last-child)::after {
  margin-inline: 0.55em;
  color: var(--state);
  content: "/" / "";
}

/* Integração */

.int {
  display: grid;
  gap: 52px 80px;
}

.int h2 {
  max-width: 14ch;
  margin-top: 32px;
}

.int .sec-lead {
  margin-top: 22px;
}

.env {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  max-width: 520px;
  margin-top: 44px;
}

.env-box {
  padding: 12px 14px;
  border: 1px solid var(--line-3);
  color: var(--text-2);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.env-prod {
  border-color: var(--cyan);
  color: var(--text);
  background: var(--cyan);
}

.env-cap {
  grid-row: 2;
  grid-column: 1;
  margin-top: 10px;
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.env-cap-r {
  grid-column: 3;
  justify-self: end;
}

.env-line {
  position: relative;
  height: 12px;
  overflow: hidden;
  background: linear-gradient(var(--line-3), var(--line-3)) center / 100% 1px no-repeat;
}

.env-line i {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 8px 50%, var(--coral) 0 4px, transparent 4.5px) no-repeat;
}

.spec {
  margin: 0;
  border-top: 1px solid var(--line-3);
  counter-reset: p;
}

.spec > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 4px 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-2);
  counter-increment: p;
}

.spec > div::before {
  grid-row: span 2;
  color: var(--muted);
  content: "P" counter(p);
  font: 500 12px/1.6 var(--mono);
  letter-spacing: 0.08em;
}

.spec dt {
  color: var(--info);
  font: 600 15px/1.4 var(--mono);
}

.spec dd {
  margin: 0;
  color: var(--text-2);
}

/* Contato */

.fim {
  padding-bottom: clamp(56px, 6vw, 96px);
  background: var(--bg-2);
}

.end-frame {
  position: relative;
  padding: clamp(24px, 5vw, 72px);
  border: 1px solid var(--line-3);
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.fim h2 {
  max-width: 20ch;
  margin-top: 32px;
}

.end-mail-row {
  margin-top: clamp(32px, 4vw, 52px);
}

.end-mail {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--coral);
  color: var(--text);
  font: 400 clamp(26px, 6vw, 88px)/1.05 var(--mono);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.end-mail:hover {
  border-color: var(--info);
  color: var(--info);
}

.fim .cta-row {
  margin-top: 36px;
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  height: 8px;
  margin-top: clamp(44px, 6vw, 80px);
}

.bars i:nth-child(1) {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.bars i:nth-child(2) {
  background: var(--cyan);
}
.bars i:nth-child(3) {
  background: var(--teal);
}
.bars i:nth-child(4) {
  background: var(--violet);
}
.bars i:nth-child(5) {
  background: var(--coral);
}
.bars i:nth-child(6) {
  background: var(--info);
}
.bars i:nth-child(7) {
  background: var(--text);
}

/* Rodapé */

.foot {
  padding: 52px var(--gutter) 44px;
  border-top: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 14px;
}

.foot-in {
  display: grid;
  gap: 28px 48px;
}

.foot-name {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.foot-brand p + p {
  margin-top: 6px;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 28px;
}

.foot-nav a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}

.foot-nav a:hover {
  color: var(--info);
}

.legal {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 400 12px/1.7 var(--mono);
  letter-spacing: 0.02em;
}

/* ---------- Larguras ---------- */

@media (max-width: 519px) {
  .cta-row .btn {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}

@media (min-width: 520px) {
  .mon-id {
    display: inline;
  }
}

@media (min-width: 760px) {
  .ledger-box .ledger {
    min-width: 0;
  }

  .spec > div {
    grid-template-columns: 48px minmax(0, 190px) minmax(0, 1fr);
  }

  .spec > div::before {
    grid-row: auto;
  }
}

@media (min-width: 760px) and (max-width: 1099px) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    align-items: start;
    gap: 40px;
  }

  h1 {
    font-size: clamp(42px, 6.4vw, 64px);
  }

  .dg-v {
    padding-inline: 10px;
  }

  .mon-id {
    display: none;
  }
}

@media (min-width: 900px) {
  .chain {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px;
    padding: 46px 0 0;
  }

  .chain::before {
    top: 7px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
    transform-origin: left;
  }

  .chain::after {
    top: 4px;
    right: 0;
    bottom: auto;
    left: 4px;
    width: auto;
    height: 7px;
    background-position: left top;
    animation-name: chain-x;
  }

  .st::before {
    top: -46px;
    left: 0;
  }

  .foot-in {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 980px) {
  .nav {
    display: flex;
    gap: 26px;
    margin-left: auto;
  }

  .portal {
    margin-left: 8px;
  }
}

@media (min-width: 1000px) {
  .sec-head {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: end;
  }

  .rule {
    grid-template-columns: 110px minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    padding: 52px 0;
  }

  .ledger-box {
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.6fr);
    align-items: start;
  }

  .rd {
    grid-template-columns: 84px minmax(0, 0.95fr) minmax(0, 1.25fr);
    align-items: center;
  }

  .int {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .spec {
    margin-top: 76px;
  }
}

@media (min-width: 1100px) {
  .hero {
    padding-top: 20px;
  }

  .hero-in {
    grid-template-areas:
      "mon"
      "copy";
    gap: 30px;
  }

  .monitor {
    grid-area: mon;
  }

  .copy {
    grid-area: copy;
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
    align-items: end;
    gap: 64px;
  }

  h1 {
    font-size: clamp(56px, 5.5vw, 88px);
  }

  .mon-route {
    display: inline;
  }

  .mon-tag {
    margin-left: auto;
  }

  .mon-tc {
    margin-left: 0;
  }

  .dg-h {
    display: block;
    width: min(100%, max(960px, (100svh - 392px) * 2.909));
    margin-inline: auto;
  }

  .dg-v {
    display: none;
  }
}

@media (max-width: 759px) {
  .ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ledger,
  .ledger tbody,
  .ledger tr,
  .ledger td {
    display: block;
  }

  .ledger tr {
    padding: 10px 0;
    border-top: 1px solid var(--line-3);
  }

  .ledger td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border: 0;
  }

  .ledger td::before {
    color: var(--muted);
    content: attr(data-k);
    font: 500 11px/1.9 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
}

/* ---------- Movimento ligado à rolagem (só onde existe) ---------- */

@supports (animation-timeline: view()) {
  .bar::after {
    animation: grow-x linear both;
    animation-timeline: scroll(root block);
  }

  /* Tudo que carrega conteúdo usa "forwards" e começa em "entry 0%": fora da tela vale o
     estado base (visível), então uma captura da página inteira ou um robô sem rolagem vê tudo. */
  .slate i {
    animation: wipe-x linear forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }

  .sec h2 {
    animation: title-wipe linear forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 34%;
  }

  .chain::before {
    animation: grow-line linear forwards;
    animation-timeline: --chain;
    animation-range: cover 0% cover 34%;
  }

  .st {
    view-timeline: --st block;
  }

  .st::before {
    animation: node-on linear both;
    animation-timeline: --st;
  }

  .st:nth-child(1)::before {
    animation-range: cover 10% cover 18%;
  }
  .st:nth-child(2)::before {
    animation-range: cover 15% cover 23%;
  }
  .st:nth-child(3)::before {
    animation-range: cover 20% cover 28%;
  }
  .st:nth-child(4)::before {
    animation-range: cover 25% cover 33%;
  }

  .fs-lever {
    animation: sw-close linear forwards;
    animation-timeline: --sw;
    animation-range: entry 0% cover 58%;
  }

  .fs-out {
    animation: sw-out linear forwards;
    animation-timeline: --sw;
    animation-range: entry 0% cover 58%;
  }

  .ff::before {
    animation: wipe-x linear forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }

  .rd::before {
    animation: rd-bar linear both;
    animation-timeline: --rd;
  }

  .rd-n {
    animation: rd-num linear both;
    animation-timeline: --rd;
  }

  .env-line i {
    animation: env-move linear both;
    animation-timeline: view();
    animation-range: entry 30% cover 60%;
  }
}

@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes wipe-x {
  from {
    clip-path: inset(-2px 100% -2px 0);
  }
  to {
    clip-path: inset(-2px 0 -2px 0);
  }
}

@keyframes grow-line {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes title-wipe {
  0%,
  25% {
    clip-path: inset(-0.3em 100% -0.3em -0.1em);
  }
  100% {
    clip-path: inset(-0.3em -0.1em -0.3em -0.1em);
  }
}

@keyframes node-on {
  from {
    background: var(--bg);
    box-shadow:
      0 0 0 0 var(--bg),
      0 0 0 0 transparent;
  }
  to {
    background: var(--cyan);
    box-shadow:
      0 0 0 3px var(--bg),
      0 0 0 4px var(--info);
  }
}

@keyframes sw-close {
  0%,
  52% {
    transform: rotate(-30deg);
    stroke: var(--muted);
  }
  84%,
  100% {
    transform: rotate(0deg);
    stroke: var(--coral);
  }
}

@keyframes sw-out {
  0%,
  84% {
    stroke: var(--wire-2);
  }
  92%,
  100% {
    stroke: var(--coral);
  }
}

@keyframes rd-bar {
  0%,
  36% {
    transform: scaleX(0);
    opacity: 1;
  }
  50%,
  58% {
    transform: scaleX(1);
    opacity: 1;
  }
  72%,
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes rd-num {
  0%,
  38% {
    color: var(--muted);
  }
  46%,
  60% {
    color: var(--state);
  }
  70%,
  100% {
    color: var(--muted);
  }
}

@keyframes env-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(100% - 16px));
  }
}

/* ---------- Movimento reduzido: tudo parado no estado final ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .mon-tc {
    display: none;
  }
}
