@layer base {
  /* ---------- Fontes da marca ---------- */
  @font-face {
    font-family: "Fifties Movies";
    src: url("../assets/fonts/FiftiesMovies.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Garet";
    src: url("../assets/fonts/Garet-Book.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Garet";
    src: url("../assets/fonts/Garet-Heavy.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
  }

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

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  /* Menu e modal declaram display próprio; sem isto o atributo hidden perde. */
  [hidden] {
    display: none !important;
  }

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

  body {
    background: var(--bg);
    color: var(--text-2);
    font-family: var(--ff-text);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* clip, e não hidden: hidden força overflow-y a auto e transforma o
       body em container de rolagem, o que quebra position e observers. */
    overflow-x: clip;
  }

  body.is-locked {
    overflow: hidden;
  }

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

  img,
  video {
    height: auto;
  }

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

  button {
    background: none;
    border: none;
    cursor: pointer;
  }

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

  ul,
  ol {
    list-style: none;
  }

  /* ---------- Tipografia ---------- */
  h1,
  h2,
  h3,
  h4 {
    color: var(--text);
    font-weight: 400;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: none;
  }

  p {
    text-wrap: pretty;
    overflow-wrap: break-word;
  }

  /* Fifties Movies: caixa alta obrigatória, letter-spacing positivo,
     nunca abaixo de 32px. Ver MARCA/LEIA-ME.md. */
  .t-display,
  .t-h1,
  .t-h2,
  .t-stat {
    font-family: var(--ff-display);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--text);
  }

  .t-display {
    font-size: var(--fs-display);
    line-height: 0.9;
    letter-spacing: 0.02em;
  }

  .t-h1 {
    font-size: var(--fs-h1);
    line-height: 0.95;
    letter-spacing: 0.02em;
  }

  .t-h2 {
    font-size: var(--fs-h2);
    line-height: 1;
    letter-spacing: 0.025em;
  }

  .t-stat {
    font-size: var(--fs-stat);
    line-height: 1;
    letter-spacing: 0.01em;
  }

  .t-h3 {
    font-family: var(--ff-text);
    font-weight: 800;
    font-size: var(--fs-h3);
    line-height: 1.25;
    color: var(--text);
    text-wrap: balance;
  }

  .t-lead {
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: var(--text-2);
    max-width: 52ch;
  }

  .t-body {
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--text-2);
    max-width: 68ch;
  }

  .t-sm {
    font-size: var(--fs-sm);
    line-height: 1.65;
    color: var(--text-2);
    max-width: 46ch;
  }

  /* O letter-spacing de 0.2em sobra depois da última letra e desalinha
     o rótulo. O margin-right negativo compensa. */
  .t-label {
    display: inline-block;
    font-family: var(--ff-text);
    font-weight: 800;
    font-size: var(--fs-label);
    line-height: 1.2;
    letter-spacing: 0.2em;
    margin-right: -0.2em;
    text-transform: uppercase;
    color: var(--text-3);
    white-space: nowrap;
  }

  /* ---------- Foco e seleção ---------- */
  :focus {
    outline: none;
  }

  /* Anel de foco em verde-buriti: 8,5:1 sobre o preto, bem acima dos 3:1
     que a WCAG pede para indicador de foco. */
  :focus-visible {
    outline: 2px solid var(--acento);
    outline-offset: 2px;
    border-radius: var(--r-sm);
  }

  ::selection {
    background: var(--text);
    color: var(--bg);
  }

  .skip-link {
    position: absolute;
    left: var(--s-4);
    top: var(--s-4);
    z-index: 999;
    padding: var(--s-3) var(--s-5);
    background: var(--text);
    color: var(--bg);
    font-weight: 800;
    font-size: var(--fs-btn);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--r-pill);
    transform: translateY(-200%);
    transition: transform var(--dur-fast) var(--ease-out);
  }

  .skip-link:focus-visible {
    transform: translateY(0);
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* Marcador de conteúdo pendente. Impossível de esquecer no ar. */
  .todo {
    display: inline-block;
    color: var(--text-3);
    border: 1px dashed var(--text-3);
    padding: 0.1em 0.5em;
    border-radius: var(--r-sm);
    font-family: var(--ff-text);
    font-weight: 400;
    font-size: 0.85em;
    letter-spacing: 0;
    text-transform: none;
  }
}
