/* ============================================================
   Base — reset, fontes, tipografia, utilitários
   ============================================================ */

/* ---- Fonts (self-hosted) ---- */
/* DM Sans — títulos / display */
@font-face { font-family:"DM Sans"; src:url("../fonts/DMSans-Regular.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"DM Sans"; src:url("../fonts/DMSans-Medium.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"DM Sans"; src:url("../fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"DM Sans"; src:url("../fonts/DMSans-Bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:"DM Sans"; src:url("../fonts/DMSans-Black.woff2") format("woff2"); font-weight:800; font-style:normal; font-display:swap; }
/* Inter — corpo / interface */
@font-face { font-family:"Inter"; src:url("../fonts/Inter-Regular.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Inter"; src:url("../fonts/Inter-Medium.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"Inter"; src:url("../fonts/Inter-SemiBold.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"Inter"; src:url("../fonts/Inter-Bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }
/* JetBrains Mono — rótulos / dados / código */
@font-face { font-family:"JetBrains Mono"; src:url("../fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"JetBrains Mono"; src:url("../fonts/JetBrainsMono-Medium.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"JetBrains Mono"; src:url("../fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--green-600); outline-offset: 3px; border-radius: 4px; }

/* ---- Headings (DM Sans) ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: var(--ls-tight);
}
h1 { font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-h2); }
h4 { font-size: var(--fs-h4); font-weight: 600; line-height: var(--lh-h4); }
h5 { font-size: var(--fs-h5); font-weight: 500; line-height: var(--lh-h5); }
h6 { font-size: var(--fs-h6); font-weight: 500; line-height: var(--lh-h5); }
p { text-wrap: pretty; }
strong, b { font-weight: 600; color: var(--ink); }

/* ---- Ritmo vertical (respiro entre eyebrow, títulos e parágrafos) ----
   :where() => especificidade 0, então qualquer regra de componente sobrescreve */
main :where(.eyebrow) { margin-bottom: var(--sp-md); }
main :where(h1, h2, h3, h4, h5, h6) { margin-bottom: var(--sp-lg); }
main :where(.lead) { margin-bottom: var(--sp-xl); }
main :where(p) { margin-bottom: var(--sp-lg); }
main :where(p, .lead, h1, h2, h3, h4, h5, h6):last-child { margin-bottom: 0; }
/* headings que vivem dentro de cabeçalhos flex não devem empurrar o ícone */
.sector-panel__head :where(h1, h2, h3, h4) { margin-bottom: 0; }

/* ---- Layout helpers ---- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section--dark { background: var(--institucional); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--mint { background: var(--grad-mint); }

.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-muted); font-weight: 400; }
.section--dark .lead { color: var(--on-dark-muted); }

/* ---- Eyebrow / rótulo (JetBrains Mono) ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono);
  font-weight: 500; font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--green-600);
}
.eyebrow::before {
  content: ""; width: 26px; height: 14px; background: currentColor;
  -webkit-mask: url("../img/brand/bracket.svg") no-repeat center / contain;
  mask: url("../img/brand/bracket.svg") no-repeat center / contain;
}
.section--dark .eyebrow { color: var(--mint); }

/* ---- Acento de destaque (era 'script' / Pacifico → agora cor de marca) ---- */
.script { color: var(--green-600); font-weight: inherit; }
.section--dark .script { color: var(--mint); }

/* ---- Highlight (trecho destacado) ---- */
.hl { background: linear-gradient(transparent 58%, var(--green-300) 58%); padding: 0 .1em; }

/* ---- Icon system ---- */
.icon { width: 1.5em; height: 1.5em; display: inline-block; color: var(--green-600); fill: none; flex-shrink: 0; }

/* ---- Acessibilidade ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--green-600); color: #fff; padding: .7rem 1.2rem; border-radius: var(--r-sm); z-index: 100; transition: top var(--t-fast); }
.skip-link:focus { top: 1rem; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
