/**
 * Reset + tipografia base + utilitários de layout.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-body);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  color: var(--c-navy-900);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
h5, h6 { font-size: var(--fs-body); font-weight: var(--fw-semibold); }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--c-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--c-primary-800); }

strong, b { font-weight: var(--fw-semibold); color: var(--c-navy-900); }

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }

blockquote {
  margin: var(--sp-8) 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 4px solid var(--c-accent);
  background: var(--c-primary-050);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-lead);
  color: var(--c-navy-800);
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--sp-10) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-sm);
}
th, td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-line);
  text-align: left;
}
th {
  background: var(--c-surface);
  color: var(--c-navy-900);
  font-weight: var(--fw-semibold);
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--c-accent);
  color: #fff;
}

/* --------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.container--wide { max-width: calc(var(--container-wide) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--sm { padding-block: var(--section-y-sm); }
.section--tint { background: var(--c-surface); }
.section--tint-2 { background: var(--c-surface-2); }
.section--navy { background: var(--c-navy-900); color: rgba(255, 255, 255, 0.82); }
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: #fff; }

.grid { display: grid; gap: var(--sp-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }

/* ---------------------------------------------------------- utilitários */

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: var(--z-top);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-navy-900);
  color: #fff;
  border-radius: var(--r-md);
  font-weight: var(--fw-semibold);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 68ch; }
.measure-narrow { max-width: 54ch; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--c-body);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-link);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--c-accent);
  border-radius: var(--r-pill);
}
.section--navy .eyebrow { color: var(--c-sky-300); }

/* cabeçalho de seção reutilizável */
.section-head { margin-bottom: var(--sp-10); }
.section-head--center { text-align: center; }
.section-head--center .measure { margin-inline: auto; }
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
}
.section-head p { color: var(--c-muted); }
.section--navy .section-head p { color: rgba(255, 255, 255, 0.75); }

/* razão de aspecto para mídias */
.ratio { position: relative; overflow: hidden; background: var(--c-surface-2); }
.ratio > img,
.ratio > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ratio--16x9 { aspect-ratio: 16 / 9; }
.ratio--4x3 { aspect-ratio: 4 / 3; }
.ratio--3x4 { aspect-ratio: 3 / 4; }
.ratio--1x1 { aspect-ratio: 1 / 1; }

/* aparece ao entrar na viewport (progressivo — sem JS o conteúdo fica visível) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
