/* AUTONOMY — site institucional
   Tokens ADR-020. Território Arquitetura em Operação.
   Campo, estrutura, unidade, fluxo, controle. */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --carbon: #080b0e;
  --carbon-2: #0d1115;
  --unit-active-dark: #121b21;
  --mineral: #eeece6;
  --mineral-2: #dfddd6;
  --paper: #f7f5ef;
  --unit-active-light: #dce3e6;
  --ink: #101418;
  --text-dark-field: #f6f3ec;
  --body-dark-field: #b6c0ca;
  --body-light-field: #2a3238;
  --steel: #89959f;
  --steel-dark: #4d5962;
  --steel-mid: #5b6772;
  --line-dark: #2c353d;
  --line-light: #c6c7c2;
  --signal: #7792a4;
  --signal-dark: #36586f;
  --focus: #a8bbc7;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --gutter: clamp(1.25rem, 3.5vw, 3.5rem);
  --max: 92rem;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

html { background: var(--carbon); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--carbon);
  color: var(--text-dark-field);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }

h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p, li { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }

a { color: var(--signal); text-underline-offset: 0.22em; }
a:hover { color: var(--text-dark-field); text-decoration-thickness: 2px; }
.field-light a, .field-mineral-2 a { color: var(--signal-dark); }
.field-light a:hover, .field-mineral-2 a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  padding: 0.85rem 1.15rem; background: var(--mineral); color: var(--ink);
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

.wrap { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- Campos ---- */
.field-dark { background: var(--carbon); }
.field-light { background: var(--mineral); }
.field-mineral-2 { background: var(--mineral-2); border-top: 1px solid var(--line-light); }

/* ---- Cabeçalho ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 12, 16, 0.96);
  border-bottom: 1px solid var(--line-dark);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: 4.75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text-dark-field); font-size: 0.8125rem; font-weight: 800;
  letter-spacing: 0.16em; text-decoration: none;
}
.brand:hover { color: #fff; }
.brand svg { width: 21px; height: 21px; flex: none; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.25rem); }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: #aeb9c4; font-size: 0.875rem; text-decoration: none;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--signal); }
.nav .nav-cta {
  padding-inline: 1rem; border: 1px solid #657386; color: #fff; font-weight: 600;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
}
.nav .nav-cta:hover { border-color: var(--signal); background: var(--unit-active-dark); }
.nav .nav-cta[aria-current="page"] { box-shadow: none; border-color: var(--signal); background: var(--unit-active-dark); }

.nav-toggle {
  display: none; align-items: center; gap: 0.6rem;
  min-height: 2.75rem; padding-inline: 0.85rem;
  border: 1px solid #657386; background: transparent; color: #fff;
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--signal); background: var(--unit-active-dark); }
.nav-toggle .bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle .bars span { display: block; height: 1.5px; background: currentColor; transition: transform 140ms var(--ease), opacity 140ms var(--ease); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--carbon); border-bottom: 1px solid var(--line-dark);
    padding: 0.5rem var(--gutter) 1.5rem;
  }
  .nav[data-open] { display: flex; }
  .nav a {
    min-height: 3.25rem; font-size: 1.0625rem;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--signal); }
  .nav .nav-cta {
    justify-content: space-between; margin-top: 1.25rem; border-bottom: 1px solid #657386;
  }
}

/* ---- Ritmo de seção ---- */
.section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.section--continue { padding-block: 0 clamp(4.5rem, 8vw, 8rem); }
.section--hero { padding: clamp(4rem, 9vw, 8.5rem) 0 0; }
.section--page-hero {
  padding-block: clamp(4rem, 8vw, 7rem) clamp(3.5rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line-dark);
}
.section--cta { padding-block: clamp(5rem, 9vw, 9rem); }

/* ---- Régua de sistema ---- */
.rule { position: relative; height: 1px; background: var(--line-dark); margin-bottom: clamp(2.5rem, 4vw, 3.5rem); }
.rule::after { content: ""; position: absolute; left: 0; top: -1px; width: clamp(3rem, 7vw, 6rem); height: 3px; background: var(--signal); }
.field-light .rule, .field-mineral-2 .rule { background: var(--line-light); }
.field-light .rule::after, .field-mineral-2 .rule::after { background: var(--signal-dark); }

/* ---- Coluna de índice ---- */
.cols { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 4.5rem); }
.cols > .rail { flex: 0 0 auto; width: clamp(5rem, 13%, 11rem); }
.cols > .body { flex: 1 1 34rem; min-width: 0; }
.cols > .body--narrow { flex: 1 1 30rem; max-width: 48rem; }

.index {
  margin: 0; font-family: var(--mono); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel);
}
.index span { color: var(--steel); }
.field-light .index, .field-mineral-2 .index { color: var(--steel-mid); }
.field-light .index span, .field-mineral-2 .index span { color: var(--steel-mid); }
.eyebrow {
  margin: 0; font-family: var(--mono); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal);
}

/* ---- Tipografia ---- */
.h1-hero {
  max-width: 22ch; margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  font-size: clamp(2.6rem, 7vw, 5.75rem); font-weight: 500;
  line-height: 0.98; letter-spacing: -0.045em; color: var(--text-dark-field);
}
.h1-page {
  max-width: 26ch; margin: 0 0 1.5rem;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem); font-weight: 500;
  line-height: 1.04; letter-spacing: -0.035em; color: var(--text-dark-field);
}
.h1-page--tight { max-width: 22ch; font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: 1.02; letter-spacing: -0.038em; }
.h1-page--doc { max-width: 24ch; font-size: clamp(2rem, 3.9vw, 3.2rem); line-height: 1.05; letter-spacing: -0.034em; margin-bottom: 1.25rem; }
.h2 {
  margin: 0 0 1.75rem; font-size: clamp(1.8rem, 3.1vw, 2.85rem); font-weight: 500;
  line-height: 1.06; letter-spacing: -0.03em; color: var(--text-dark-field);
}
.field-light .h2, .field-mineral-2 .h2 { color: var(--ink); }
.h2-cta {
  flex: 1 1 24rem; max-width: 20ch; margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem); font-weight: 500;
  line-height: 1.04; letter-spacing: -0.032em; color: var(--text-dark-field);
}
.field-light .h2-cta { color: var(--ink); }
.h3-doc { margin: 0 0 0.9rem; font-size: 1.375rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.h3-doc + p { margin-top: 0; }

.lead {
  max-width: 34ch; margin: 0;
  font-size: clamp(1.08rem, 1.4vw, 1.3rem); line-height: 1.5;
  font-weight: 500; color: var(--text-dark-field);
}
.lead--page { max-width: 46ch; color: var(--body-dark-field); font-weight: 400; }
.prose { max-width: 62ch; margin: 0 0 1.2rem; font-size: 1.0625rem; line-height: 1.72; color: var(--body-dark-field); }
.field-light .prose, .field-mineral-2 .prose { color: var(--body-light-field); }
.prose:last-child { margin-bottom: 0; }
.prose--wide { max-width: 68ch; }
.statement {
  max-width: 62ch; margin: 0; padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  font-size: 1.125rem; line-height: 1.6; font-weight: 600; color: var(--text-dark-field);
}
.field-light .statement, .field-mineral-2 .statement { border-top: 2px solid var(--ink); color: var(--ink); font-size: 1.1875rem; line-height: 1.55; }
.emph { color: var(--text-dark-field); }
.field-light .emph, .field-mineral-2 .emph { color: var(--ink); }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding-inline: 1.15rem;
  font-family: inherit; font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.btn--primary { background: var(--mineral); border-color: var(--mineral); color: var(--ink); }
.btn--primary:hover { background: #fff; border-color: #fff; color: var(--ink); }
.field-light .btn--primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.field-light .btn--primary:hover { background: #252d34; border-color: #252d34; color: var(--paper); }
.btn--wa {
  justify-content: space-between; gap: 2rem;
  min-width: min(100%, 20rem); min-height: 3.25rem;
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.btn--wa:hover { background: #252d34; border-color: #252d34; color: var(--paper); }
.btn--wa .mark { font-family: var(--mono); }

/* ---- Campos de unidades ---- */
/* Hairlines desenhadas por célula, não pelo gap: uma célula vazia na última
   linha mostra o campo, nunca um bloco na cor da linha. */
.units {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0; background: transparent;
  border: 0 solid var(--line-dark); border-top-width: 1px; border-left-width: 1px;
}
.units > * { border: 0 solid var(--line-dark); border-right-width: 1px; border-bottom-width: 1px; }
.units--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.units--chips { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.units--strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  border-left-width: 0; border-bottom-width: 1px;
}
.units--strip > * { border-bottom-width: 0; }
.units--strip > *:last-child { border-right-width: 0; }
.units--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.field-light .units, .field-mineral-2 .units,
.field-light .units > *, .field-mineral-2 .units > * { border-color: var(--line-light); }

.unit { padding: 1.5rem 1.4rem 1.75rem; background: var(--carbon-2); }
.unit.is-active { background: var(--unit-active-dark); box-shadow: inset 0 2px 0 var(--signal); }
.units--strip .unit { background: var(--carbon); padding: 1.1rem 1.2rem 1.4rem; }
.units--strip .unit.is-active { background: var(--unit-active-dark); }
.field-light .unit { background: var(--paper); }
.field-light .unit.is-active, .field-mineral-2 .unit.is-active { background: var(--unit-active-light); box-shadow: inset 0 2px 0 var(--signal-dark); }
.field-mineral-2 .unit { background: var(--mineral); }
.unit--soft { background: var(--mineral-2) !important; }
.unit--soft.is-active { background: var(--unit-active-light) !important; }

.unit-no {
  display: block; margin-bottom: 2.25rem;
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; color: var(--signal);
}
.field-light .unit-no, .field-mineral-2 .unit-no { color: var(--signal-dark); }
.unit-no--short { margin-bottom: 1.4rem; }
.unit-no--tall { margin-bottom: 3rem; }
.unit-label {
  display: block; margin-bottom: 1.2rem;
  font-family: var(--mono); font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel);
}
.field-light .unit-label, .field-mineral-2 .unit-label { color: var(--steel-mid); }
.unit h3, .unit strong {
  display: block; margin: 0 0 0.5rem;
  font-size: 1.125rem; font-weight: 600; line-height: 1.25; color: var(--text-dark-field);
}
.field-light .unit h3, .field-light .unit strong,
.field-mineral-2 .unit h3, .field-mineral-2 .unit strong { color: var(--ink); }
.unit p, .unit small {
  display: block; margin: 0;
  font-size: 0.9375rem; line-height: 1.55; color: var(--body-dark-field);
}
.field-light .unit p, .field-light .unit small,
.field-mineral-2 .unit p, .field-mineral-2 .unit small { color: var(--steel-dark); }
.unit strong + small { margin-top: 0.4rem; }

.chip { display: flex; align-items: center; gap: 0.85rem; padding: 1.15rem 1.25rem; background: var(--carbon-2); }
.chip .dot { width: 0.5rem; height: 0.5rem; flex: none; background: var(--signal); }
.chip span:last-child { font-size: 1rem; font-weight: 600; color: var(--text-dark-field); }
.chip--open { background: var(--carbon); }
.chip--open span {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel);
}

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line-light); }
.faq details { border-bottom: 1px solid var(--line-light); }
.faq summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding-block: 1.35rem; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1rem; color: var(--signal-dark); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--signal-dark); }
.faq p { max-width: 62ch; margin: 0 0 1.35rem; font-size: 1rem; line-height: 1.68; color: var(--body-light-field); }

/* ---- Passos numerados ---- */
.steps { margin: 0 0 1.75rem; padding: 0; list-style: none; }
.steps li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem;
  padding-block: 1.05rem; border-bottom: 1px solid var(--line-light);
  font-size: 0.9375rem; line-height: 1.55; color: var(--steel-dark);
}
.steps span:first-child { font-family: var(--mono); font-size: 0.6875rem; color: var(--signal-dark); }

/* ---- Contato ---- */
.contact-card {
  border: 1px solid var(--line-light); border-top: 2px solid var(--ink);
  background: var(--paper); padding: clamp(1.75rem, 3.5vw, 2.75rem);
}
.contact-card h2 { max-width: 22ch; margin: 0 0 1.1rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.028em; color: var(--ink); }
.contact-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0; border: 0 solid var(--line-light); border-top-width: 1px; border-left-width: 1px; margin-top: 2.25rem; }
.contact-meta > div { padding: 1rem 1.1rem; background: var(--mineral); border: 0 solid var(--line-light); border-right-width: 1px; border-bottom-width: 1px; }
.contact-meta span {
  display: block; margin-bottom: 0.5rem;
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--steel-mid);
}
.contact-meta strong, .contact-meta a { font-size: 0.9375rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.contact-meta a { color: var(--signal-dark); }
.aside { flex: 1 1 20rem; min-width: 0; align-self: start; padding-top: 1.25rem; border-top: 2px solid var(--signal-dark); }
.aside h2 { margin: 0 0 1.5rem; font-size: 1.375rem; font-weight: 600; line-height: 1.25; color: var(--ink); }

/* ---- CTA ---- */
.cta-row {
  display: flex; flex-wrap: wrap; gap: clamp(2rem, 5vw, 6rem);
  padding-top: 1.5rem; border-top: 2px solid var(--text-dark-field);
}
.field-light .cta-row { border-top-color: var(--ink); }
.cta-row .cta-body { flex: 1 1 22rem; min-width: 0; align-self: end; }
.cta-row .cta-body p { max-width: 46ch; margin: 0 0 2rem; font-size: 1.0625rem; line-height: 1.72; color: var(--body-dark-field); }
.field-light .cta-row .cta-body p { color: var(--body-light-field); }

/* ---- Manifesto ---- */
.manifesto-close {
  max-width: 40ch; margin: 0; padding-top: 1.5rem; border-top: 2px solid var(--signal);
  font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.35; font-weight: 500; color: var(--text-dark-field);
}
.muted { max-width: 60ch; margin: 0 0 2rem; font-size: 0.9375rem; line-height: 1.65; color: var(--steel); }

/* ---- Documento legal ---- */
.doc-section { margin: 0 0 0.9rem; padding-top: 1.5rem; border-top: 1px solid var(--line-light); font-size: 1.375rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.doc-meta { margin: 0; font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-mid); }

/* ---- Rodapé ---- */
.site-footer { background: var(--carbon); border-top: 1px solid var(--line-dark); }
.footer-grid { display: flex; flex-wrap: wrap; gap: clamp(2rem, 4vw, 3rem); padding-block: clamp(3rem, 5vw, 4rem) 2rem; }
.footer-grid > div { flex: 1 1 10rem; min-width: 0; }
.footer-grid > div:first-child { flex: 1 1 18rem; }
.footer-grid .brand svg { width: 25px; height: 25px; }
.footer-tag { max-width: 30ch; margin: 1.5rem 0 0; font-size: 1rem; line-height: 1.6; color: #aeb9c4; }
.footer-grid h2 { margin: 0 0 1.25rem; font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #768595; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; align-items: start; }
.footer-links a, .footer-grid > div > a { color: #bec7cf; font-size: 0.9375rem; text-decoration: none; }
.footer-links a:hover, .footer-grid > div > a:hover { color: #fff; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-block: 1.25rem; border-top: 1px solid var(--line-dark);
}
.footer-base span { font-size: 0.875rem; color: #7e8b98; }
.footer-base .meta { font-family: var(--mono); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---- Movimento ---- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-rule] { transform: scaleX(0); transform-origin: 0 50%; transition: transform 900ms var(--ease); }
[data-rule].is-visible { transform: scaleX(1); }
[data-seq] > * { opacity: 0; transform: translateY(14px); transition: opacity 550ms var(--ease), transform 550ms var(--ease); }
[data-seq].is-visible > * { opacity: 1; transform: none; }
[data-seq] > *:nth-child(1) { transition-delay: 50ms; }
[data-seq] > *:nth-child(2) { transition-delay: 110ms; }
[data-seq] > *:nth-child(3) { transition-delay: 170ms; }
[data-seq] > *:nth-child(4) { transition-delay: 230ms; }
[data-seq] > *:nth-child(5) { transition-delay: 290ms; }
[data-seq] > *:nth-child(6) { transition-delay: 350ms; }
[data-seq] > *:nth-child(7) { transition-delay: 410ms; }
[data-seq] > *:nth-child(8) { transition-delay: 470ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-rule], [data-seq] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (forced-colors: active) {
  .unit, .units, .chip, .contact-card { border: 1px solid CanvasText; }
  .unit.is-active { outline: 2px solid Highlight; }
}
