/* ==========================================================================
   BASE — fontes, reset, tipografia e utilitários de layout
   ========================================================================== */

/* Fontes guardadas no próprio site (variáveis: um arquivo cobre todos os pesos) */
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 112px; /* âncoras não ficam escondidas atrás da barra fixa */
  overflow-x: clip;          /* os brilhos do fundo passam da borda sem criar rolagem lateral */
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-18);
  line-height: 1.556;
  color: var(--color-ink);
  background: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: clip; /* os brilhos do fundo podem passar da borda */
}

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

img,
video { height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

ul,
ol { list-style: none; padding: 0; }

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

h1, h2, h3 { text-wrap: balance; }

p { text-wrap: pretty; }

::selection { background: var(--color-lime-500); color: var(--color-ink); }

/* ---------- Foco (anel ink de 2 px, afastado 2 px) ---------- */
:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

/* ---------- Acessibilidade ---------- */
.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: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  background: var(--color-ink);
  color: var(--color-off-white);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus-visible { transform: none; outline-color: var(--color-lime-500); }

/* ---------- Layout ---------- */
.container {
  width: min(var(--content-max), 100% - 2 * var(--page-margin));
  margin-inline: auto;
}

/* ---------- Estilos de texto (nomes do Figma) ---------- */
.t-display {          /* Space Grotesk/80 · Display */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-80);
  line-height: 1.1;
}
.t-h1 {               /* Space Grotesk/64 · H1 */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-64);
  line-height: 1.125;
}
.t-h4 {               /* Space Grotesk/32 · H4 */
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-32);
  line-height: 1.25;
}
.t-24 {               /* Space Grotesk/24 Medium */
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-24);
  line-height: 1.333;
}
.t-body {             /* DM Sans/18 Regular, muted (texto corrido) */
  font-size: var(--text-18);
  line-height: 1.556;
  color: var(--color-muted);
}
.t-label {            /* DM Sans/18 Bold, caixa alta, muted (eyebrows e rótulos) */
  font-size: var(--text-18);
  font-weight: 700;
  line-height: 1.556;
  color: var(--color-muted);
  text-transform: uppercase;
}
.t-legal {            /* DM Sans/14 Regular */
  font-size: var(--text-14);
  line-height: 1.714;
}

.ink { color: var(--color-ink); }
.muted { color: var(--color-muted); }
strong, b { font-weight: 700; }

/* ---------- Grifo lima (sublinhado de 8 px que cresce da esquerda) ---------- */
.grifo {
  background-image: linear-gradient(var(--color-lime-500), var(--color-lime-500));
  background-repeat: no-repeat;
  background-size: var(--grifo-size, 100%) 0.34em;
  background-position: 0 86%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (prefers-reduced-motion: no-preference) {
  .js .grifo { --grifo-size: 0%; transition: background-size 900ms var(--ease-out); }
  .js .grifo.is-visible { --grifo-size: 100%; background-size: 100% 0.34em; }
}
