/* =========================================================
   Quanta Labs — folha de estilo
   Lane: folha de engenharia + telemetria.
   Cor: navy carrega a superfície; turquesa é sinal, nunca área.
   ========================================================= */

:root {
  /* cor — brand kit oficial */
  --navy:       #0f1b2d;
  --navy-mid:   #1e3a5f;
  --navy-deep:  #0a1320;
  --turq:       #00c2cc;
  --ink:        #f8f9fa;
  --ink-2:      #8fa0b3;   /* texto corrido secundário — 6.4:1 sobre navy */
  /* o #6b7a8d do brand kit dá 3.9:1 sobre navy — abaixo de AA para texto
     pequeno; este tom é o mesmo cinza um passo mais claro, a 4.9:1 */
  --muted:      #7c8b9e;   /* etiquetas, cotas e legendas */
  --rule:       rgba(143, 160, 179, .22);
  --rule-soft:  rgba(143, 160, 179, .12);
  --turq-soft:  rgba(0, 194, 204, .16);

  /* tipografia */
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", monospace;

  --t-hero:  clamp(2.9rem, 1.2rem + 6.4vw, 5.4rem);
  --t-h2:    clamp(2rem, 1.1rem + 3.2vw, 3.4rem);
  --t-h3:    clamp(1.15rem, 1rem + .6vw, 1.5rem);
  --t-lead:  clamp(1.05rem, .98rem + .45vw, 1.3rem);
  --t-body:  clamp(1rem, .96rem + .2vw, 1.08rem);
  --t-mono:  clamp(.68rem, .64rem + .12vw, .76rem);

  /* espaço */
  --gut:     clamp(1.25rem, .6rem + 2.6vw, 3rem);
  --band:    clamp(4.5rem, 2.5rem + 7vw, 9rem);
  --wrap:    1240px;

  /* profundidade */
  --z-head: 50;
  --z-menu: 60;
  --z-consent: 70;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Quando o Lenis está ativo (põe a classe `lenis` no <html>), o scroll suave
   nativo tem de sair da frente: dois motores a animar o mesmo scroll cancelam-se
   um ao outro e as âncoras deixam de responder ao primeiro clique. */
html.lenis { scroll-behavior: auto; }

/* Sem Lenis (JS em falta, movimento reduzido), o salto nativo não pode deixar
   o título escondido debaixo do cabeçalho fixo. */
:target, section[id], main[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.62;
  font-variation-settings: "wdth" 100, "wght" 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--turq); color: var(--navy-deep); }

a { color: var(--turq); text-underline-offset: .22em; text-decoration-thickness: 1px; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gut); top: -100px; z-index: 100;
  background: var(--turq); color: var(--navy-deep);
  padding: .6rem 1rem; font-family: var(--mono); font-size: var(--t-mono);
  text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: .75rem; }

.wrap {
  width: min(100% - (var(--gut) * 2), var(--wrap));
  margin-inline: auto;
}

/* ---------------- tipografia base ---------------- */

.h2, .hero__title, .step__t, .row__title {
  font-family: var(--sans);
  font-variation-settings: "wdth" 112, "wght" 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  text-wrap: balance;
  margin: 0;
}

.hero__title {
  font-size: var(--t-hero);
  text-transform: uppercase;
  font-variation-settings: "wdth" 115, "wght" 700;
}
.hero__title em {
  font-style: normal;
  color: var(--turq);
  position: relative;
}

.h2 {
  font-size: var(--t-h2);
  text-transform: uppercase;
  line-height: 1.04;
}

.lead {
  font-size: var(--t-lead);
  color: var(--ink);
  max-width: 46ch;
  line-height: 1.55;
  text-wrap: pretty;
}

.body {
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}
.body--wide { max-width: 62ch; }

.kicker {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: var(--t-mono);
  font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.6rem;
}
.kicker__dot {
  width: 9px; height: 9px; flex: none;
  border: 1.25px solid var(--turq); border-radius: 50%;
}

/* ---------------- botões ---------------- */

.btn {
  --btn-c: var(--turq);
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--btn-c);
  color: var(--btn-c);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: color .28s var(--ease), background-color .28s var(--ease),
              border-color .28s var(--ease), transform .28s var(--ease);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--turq); color: var(--navy-deep);
}
.btn--ghost { --btn-c: var(--ink-2); color: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { --btn-c: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .6rem 1.1rem; font-size: .72rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }

/* ---------------- cabeçalho ---------------- */

.site-head {
  position: sticky; top: 0; z-index: var(--z-head);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: .85rem var(--gut);
  background: color-mix(in srgb, var(--navy) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}

.mark {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase;
  margin-right: auto;
}
.mark__glyph { width: 20px; height: 20px; color: var(--turq); }
.mark:hover .mark__word { color: var(--turq); }
.mark__word { transition: color .25s var(--ease); }

.site-nav { display: flex; gap: clamp(1rem, 2.2vw, 2rem); }
.site-nav a {
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.site-nav a:hover, .site-nav a:focus-visible,
.site-nav a[aria-current="true"] { color: var(--ink); border-color: var(--turq); }

.nav-toggle {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--rule); background: transparent; cursor: pointer;
  padding: 0; place-items: center;
}
.nav-toggle__bars,
.nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 1.25px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s linear;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- hero ---------------- */

.hero { padding-top: clamp(3rem, 1rem + 6vw, 6.5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5.6fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}

.hero__copy { min-width: 0; }

/* moldura de canto — assinatura de "folha de engenharia" */
.scope__frame {
  position: relative;
  border: 1px solid var(--rule-soft);
  background: linear-gradient(180deg, rgba(30,58,95,.28), rgba(10,19,32,.15));
  aspect-ratio: 4 / 3;
}
.scope__frame::before, .scope__frame::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--turq); pointer-events: none;
}
.scope__frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.scope__frame::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.hero__scope { margin: 0; min-width: 0; }
#telemetria { width: 100%; height: 100%; }

.scope__tag {
  position: absolute; bottom: .7rem;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.scope__tag--l { left: .85rem; }
.scope__tag--r { right: .85rem; color: var(--turq); }

.scope__cap {
  font-family: var(--mono); font-size: var(--t-mono);
  color: var(--muted); margin-top: .8rem; letter-spacing: .04em;
}

/* régua de etapas */
.ruler {
  display: grid; grid-template-columns: repeat(4, 1fr);
  list-style: none; margin: clamp(3rem, 6vw, 5.5rem) auto 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.ruler li {
  position: relative;
  padding: 1rem .5rem 0 0;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.ruler li::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 1px; height: 14px; background: var(--turq);
}
.ruler li + li::before { background: var(--rule); }

/* ---------------- faixas ---------------- */

.band { padding: var(--band) 0; }

.band--panel {
  background: var(--navy-deep);
  border-block: 1px solid var(--rule-soft);
}

.band__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.band__head .body { margin-top: 1.1rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.split--rev .split__lead { order: 2; }
.split__lead .body { margin-top: 1.2rem; }

/* ---------------- instrumento (checklist / calculadora / form) -------- */

.instrument {
  position: relative;
  border: 1px solid var(--rule);
  background: rgba(30, 58, 95, .16);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.instrument::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--rule-soft) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none; opacity: .5;
}
.instrument > * { position: relative; }
.instrument fieldset { border: 0; margin: 0; padding: 0; }

.tick {
  display: grid; grid-template-columns: 22px 1fr; gap: .85rem;
  align-items: start;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  color: var(--ink-2);
  transition: color .25s var(--ease);
}
.tick:last-of-type { border-bottom: 0; }
.tick:hover { color: var(--ink); }

.tick input {
  appearance: none;
  width: 18px; height: 18px; margin: .2rem 0 0;
  border: 1px solid var(--muted);
  background: transparent;
  display: grid; place-content: center;
  cursor: pointer;
  transition: border-color .25s var(--ease);
}
.tick input::after {
  content: ""; width: 8px; height: 8px; background: var(--turq);
  transform: scale(0); transition: transform .2s var(--ease);
}
.tick input:checked { border-color: var(--turq); }
.tick input:checked::after { transform: scale(1); }
.tick:has(input:checked) { color: var(--ink); }

.readout {
  display: block;
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--turq-soft);
}
.readout__count {
  display: block;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1; color: var(--turq);
  font-variant-numeric: tabular-nums;
}
.readout__of { color: var(--muted); font-size: .42em; letter-spacing: .1em; }
.readout__text { margin: .8rem 0 0; color: var(--ink); max-width: 44ch; }

/* calculadora */
.instrument--calc .field + .field { margin-top: 1.4rem; }
.field label {
  display: block;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .6rem;
}
.field__row { display: flex; align-items: center; gap: 1.2rem; }
.field__val {
  font-family: var(--mono); font-size: 1.05rem; color: var(--ink);
  min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums;
}

input[type="range"] {
  appearance: none; flex: 1; height: 26px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 1px; background: var(--rule);
}
input[type="range"]::-moz-range-track { height: 1px; background: var(--rule); }
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; margin-top: -6.5px;
  background: var(--turq); border: 0;
  transition: box-shadow .2s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; background: var(--turq); border: 0; border-radius: 0;
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--turq-soft);
}

.calc__out {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--turq-soft);
}
.calc__line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin: 0 0 .6rem;
}
.calc__label {
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.calc__value {
  font-family: var(--mono); font-size: 1.35rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calc__line--big .calc__value {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
  color: var(--turq); line-height: 1.1;
}
.calc__note {
  margin: 1.1rem 0 0; font-size: .82rem; color: var(--muted); max-width: 46ch;
}

/* ---------------- grafo de sistemas ---------------- */

.band--graph { padding-block: var(--band); }
.graph {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.graph__copy .body { margin-top: 1.2rem; }

.netgraph { width: 100%; height: auto; color: var(--turq); }
.netgraph__links path {
  stroke: var(--turq);
  opacity: .55;
}
.netgraph__nodes circle, .netgraph__hub circle { fill: var(--turq); }
.netgraph__hub circle:first-child { fill: none; stroke: var(--turq); opacity: .5; }
.netgraph__labels text {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  fill: var(--ink-2);
}
.netgraph__hublabel { fill: var(--muted) !important; }

/* ---------------- folha de serviços ---------------- */

.sheet { border-top: 1px solid var(--rule); }

.row { border-bottom: 1px solid var(--rule); }
.row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 24px;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding: clamp(1.35rem, 2.5vw, 2rem) 0;
  cursor: pointer;
  list-style: none;
  transition: color .3s var(--ease);
}
.row summary::-webkit-details-marker { display: none; }
.row__title { font-size: var(--t-h3); }
.row__note { color: var(--ink-2); font-size: .98rem; }

.row__sign {
  position: relative; width: 14px; height: 14px;
  align-self: center; justify-self: end;
}
.row__sign::before, .row__sign::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  background: var(--turq);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.row__sign::before { width: 14px; height: 1.25px; }
.row__sign::after  { width: 1.25px; height: 14px; }
.row[open] .row__sign::after { transform: rotate(90deg); opacity: 0; }

.row:hover .row__title, .row[open] .row__title { color: var(--turq); }
.row__body {
  padding: 0 0 clamp(1.4rem, 2.5vw, 2rem);
  max-width: 62ch;
  color: var(--ink-2);
}
.row__body p { margin: 0 0 .9rem; }
.row__body p:last-child { margin-bottom: 0; }

/* ---------------- processo ---------------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  background: var(--rule);
  border: 1px solid var(--rule);
}
.step {
  background: var(--navy);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  position: relative;
}
.step__n {
  display: block;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .18em;
  color: var(--turq); margin-bottom: 1.6rem;
}
.step__t { font-size: var(--t-h3); text-transform: uppercase; margin-bottom: .8rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .98rem; }
/* preenchimento por transform (não por width) para não forçar layout */
.step::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px; background: var(--turq);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .6s var(--ease);
}
.step.is-on::after { transform: scaleX(1); }

/* ---------------- princípios ---------------- */

.band--rules { padding-block: clamp(3rem, 6vw, 5.5rem); }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rules li {
  padding: clamp(1.4rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.15rem, 1rem + 1vw, 1.7rem);
  font-variation-settings: "wdth" 104, "wght" 400;
  line-height: 1.34;
  max-width: 34ch;
  text-wrap: pretty;
}
.rules li:nth-child(even) { margin-left: auto; text-align: right; }

/* ---------------- contacto ---------------- */

.band--contact { background: var(--navy-deep); border-top: 1px solid var(--rule-soft); }

.next {
  list-style: none; margin: 2rem 0 0; padding: 0;
}
.next li {
  position: relative; padding-left: 1.4rem; margin-bottom: .55rem;
  color: var(--ink-2); font-size: .96rem;
}
.next li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 1px; background: var(--turq);
}
.direct {
  margin-top: 2rem; font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .08em; color: var(--muted);
}

.field--text + .field--text { margin-top: 1.2rem; }
.field--text input, .field--text textarea {
  width: 100%; padding: .8rem .9rem;
  background: var(--navy);
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: border-color .25s var(--ease);
  resize: vertical;
}
.field--text input:hover, .field--text textarea:hover { border-color: var(--muted); }
.field--text input:focus, .field--text textarea:focus {
  border-color: var(--turq); outline: none;
}
.field--text input[aria-invalid="true"], .field--text textarea[aria-invalid="true"] {
  border-color: #ff7a6b;
}

.field__opt { color: var(--muted); text-transform: none; letter-spacing: .04em; }

.field__erro {
  margin: .45rem 0 0;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  color: #ff9f94;           /* 7.4:1 sobre navy-deep */
  min-height: 0; display: none;
}
.field__erro:not(:empty) { display: block; }

/* armadilha de spam: invisível, mas não `display:none` — há bots que ignoram isso */
.honey {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}

.tick--consent {
  margin: 1.6rem 0 0; padding: 0;
  border: 0; font-size: .88rem;
}
.form .field:has(.tick--consent) { margin-bottom: 1.8rem; }
.form button[type="submit"] { width: 100%; }
.form__status {
  margin: 1rem 0 0; font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .06em; color: var(--turq); min-height: 1.2em;
}
.form__status[data-state="erro"] { color: #ff7a6b; }

/* ---------------- consentimento de cookies ---------------- */

.consent {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-consent);
  padding: var(--gut);
  transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.consent--on { transform: none; }

.consent__box {
  width: min(100% , var(--wrap)); margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.2rem clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.2rem, 3vw, 2rem);
  background: var(--navy-deep);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px rgba(4, 8, 14, .55);
  position: relative;
}
/* moldura de canto: a mesma assinatura do resto do site */
.consent__box::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 14px; height: 14px;
  border: 1px solid var(--turq); border-width: 1px 0 0 1px;
}

.consent__texto { flex: 1 1 min(100%, 34rem); }
.consent__titulo {
  margin: 0 0 .35rem;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--turq);
}
.consent__desc {
  margin: 0; font-size: .93rem; line-height: 1.55;
  color: var(--ink-2); max-width: 68ch; text-wrap: pretty;
}
.consent__desc strong { color: var(--ink); font-weight: 600; }

/* mesmo peso visual nos dois botões: recusar não pode ser mais difícil */
.consent__botoes { display: flex; gap: .6rem; flex: 0 0 auto; }
.consent__botoes .btn { padding: .7rem 1.4rem; }

@media (max-width: 560px) {
  .consent__botoes { width: 100%; }
  .consent__botoes .btn { flex: 1 1 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .consent { transform: none; }
}

/* ---------------- páginas legais ---------------- */

.doc { padding: clamp(3rem, 6vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }

.doc__head {
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.doc__title {
  font-variation-settings: "wdth" 112, "wght" 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: -.03em; line-height: 1.04;
  margin: 0; text-wrap: balance;
}
.doc__meta {
  margin: 1.1rem 0 0;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-family: var(--sans);
  font-variation-settings: "wdth" 106, "wght" 600;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
  letter-spacing: -.01em;
  margin: clamp(2.4rem, 4vw, 3.2rem) 0 .9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule-soft);
}
.doc__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc__body h3 {
  font-size: 1rem; margin: 1.8rem 0 .6rem;
  font-variation-settings: "wdth" 100, "wght" 600;
}
.doc__body p, .doc__body li { color: var(--ink-2); text-wrap: pretty; }
.doc__body p { margin: 0 0 1rem; }
.doc__body ul { margin: 0 0 1.2rem; padding: 0; list-style: none; }
.doc__body li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; }
.doc__body li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 8px; height: 1px; background: var(--turq);
}
.doc__body strong { color: var(--ink); font-weight: 600; }

/* dados que faltam ao Gustavo preencher — visíveis de propósito */
.todo {
  font-family: var(--mono); font-size: .82em;
  color: var(--turq); border-bottom: 1px dashed var(--turq);
  padding-bottom: 1px;
}

.doc__nota {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--turq-soft);
  background: rgba(0, 194, 204, .05);
}
.doc__nota p { margin: 0; color: var(--ink); font-size: .95rem; }

.doc__voltar {
  display: inline-block; margin-top: 2.5rem;
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
}

.legal-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }

/* ---------------- rodapé ---------------- */

.site-foot {
  border-top: 1px solid var(--rule-soft);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}
/* colunas fluidas: funciona com 3 colunas (páginas legais) ou 4 (início) */
.foot {
  display: flex; flex-wrap: wrap; gap: 2rem clamp(1.5rem, 4vw, 4rem);
  align-items: start; justify-content: space-between;
}
.foot > * { flex: 0 1 auto; }
.foot__brand { flex: 1 1 220px; }
.foot__meta { flex: 0 1 auto; margin-left: auto; }
.foot__brand { display: flex; gap: .8rem; align-items: flex-start; }
.foot__brand .mark__glyph { width: 22px; height: 22px; color: var(--turq); }
.foot__brand p {
  margin: 0; font-family: var(--mono); font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.8;
}
.foot__brand span { color: var(--muted); letter-spacing: .1em; }
.foot__nav { display: flex; flex-direction: column; }
.foot__nav a, .foot__meta a {
  display: inline-block;
  padding-block: .55rem;           /* alvo de toque utilizável no telemóvel */
  font-family: var(--mono); font-size: var(--t-mono);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.foot__nav a:hover, .foot__meta a:hover { color: var(--turq); }
.foot__meta {
  margin: 0; font-family: var(--mono); font-size: var(--t-mono);
  line-height: 2.1; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: right;
}

/* ---------------- responsivo ---------------- */

@media (max-width: 960px) {
  .hero__grid, .split, .graph { grid-template-columns: 1fr; }
  .split--rev .split__lead { order: 0; }
  .hero__scope { order: 2; }
  .foot__brand { flex-basis: 100%; }
  .foot__meta { margin-left: 0; text-align: left; }
  .row summary { grid-template-columns: minmax(0, 1fr) 24px; }
  .row__note { grid-column: 1 / -1; margin-top: .4rem; }
  .rules li:nth-child(even) { margin-left: 0; text-align: left; }
  .rules li { max-width: 46ch; }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed; inset: 57px 0 auto 0; z-index: var(--z-menu);
    flex-direction: column; gap: 0;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--rule);
    padding: .5rem var(--gut) 1.5rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .site-nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--rule-soft); }
  /* as páginas legais não têm botão de menu: a navegação fica sempre à vista */
  .site-nav.legal-nav {
    position: static; transform: none; opacity: 1; pointer-events: auto;
    flex-direction: row; background: transparent; border: 0; padding: 0;
    gap: .25rem 1.1rem;
  }
  .site-nav.legal-nav a { padding: .35rem 0; border-bottom: 1px solid transparent; }
  .nav-toggle { display: grid; }
  .head-cta { display: none; }
  .ruler { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
  .ruler li { padding-bottom: .5rem; }
  .scope__frame { aspect-ratio: 3 / 2; }
  /* «DIAGNÓSTICO» é a palavra mais larga do site: em ecrã estreito
     a largura variável recolhe para 100 para não transbordar. */
  .hero__title {
    font-variation-settings: "wdth" 100, "wght" 700;
    font-size: clamp(2.35rem, 11.4vw, 3.2rem);
  }
}

/* ---------------- movimento reduzido ---------------- */

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