/* ==========================================================================
   base.css — reset, tipografia base e utilitários
   ========================================================================== */

/* ---------- Fontes reserva com métricas ajustadas ----------
   Enquanto Plus Jakarta Sans e Inter carregam (display=swap), o texto usa
   Arial redimensionada para ocupar o mesmo espaço: o hero não "pula".
   Valores medidos no navegador comparando as fontes reais com a Arial. */
@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 500 800;
  size-adjust: 101%;
  ascent-override: 103%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400 500;
  size-adjust: 105.5%;
  ascent-override: 92%;
  descent-override: 23%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 700;
  size-adjust: 101.8%;
  ascent-override: 95%;
  descent-override: 23.5%;
  line-gap-override: 0%;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
  /* Com o banner de cookies aberto, main.js define --cookie-banner-altura
     para que nada fique escondido atrás dele (foco e fim da página). */
  scroll-padding-bottom: var(--cookie-banner-altura, 0px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Quem pediu menos movimento no sistema: sem animações nem transições */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

body {
  min-height: 100vh;
  padding-bottom: var(--cookie-banner-altura, 0px);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

/* ---------- Tipografia ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: var(--lh-heading);
  font-weight: var(--weight-bold);
}

h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--fs-h3);
}

a {
  color: var(--teal-600);
  text-underline-offset: 0.15em;
}

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

/* ---------- Utilitários ---------- */
/* Alvos de foco programático (ex.: <main> após fechar o banner) sem contorno */
[tabindex="-1"]:focus {
  outline: none;
}

[hidden] {
  display: none !important; /* vence o display de componentes como .btn */
}

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

.section {
  padding-block: var(--section-padding);
}

.section--light {
  background-color: var(--surface-100);
  color: var(--color-text);
}

.section--navy,
.section--darkest {
  --color-focus: var(--teal-300);
}

.section--navy {
  background-color: var(--navy-800); /* fallback */
  background-image: var(--gradient-navy);
  color: var(--color-text-on-navy);
}

.section--navy h1,
.section--navy h2,
.section--navy h3 {
  color: var(--color-heading-on-navy);
}

.section--navy a:not([class]) {
  color: var(--teal-300);
}

.section--darkest {
  background-color: var(--navy-900);
  color: var(--color-text-on-navy);
}

.section--darkest h2,
.section--darkest h3 {
  color: var(--color-heading-on-navy);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--teal-600);
}

.section--navy .eyebrow,
.section--darkest .eyebrow {
  color: var(--teal-300);
}

.visually-hidden {
  position: absolute !important;
  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;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--white);
  color: var(--navy-900);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}
