/* ==========================================================================
   Base: reset, tipografia, layout, foco, movimento
   ========================================================================== */

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

* { margin: 0; }

[hidden] { display: none !important; }

fieldset { border: 0; padding: 0; min-width: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: dark;
}

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

/* Transição entre páginas: fade simples onde suportado */
@view-transition { navigation: auto; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.05;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

a { color: var(--link); text-decoration: none; }

::selection { background: var(--brand); color: var(--white); }

/* Foco visível em tudo que é interativo */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 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: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

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

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

/* Tipografia utilitária */
.display {
  font-size: var(--fs-display);
  font-weight: 700;
  letter-spacing: var(--tr-display);
  line-height: 0.98;
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: var(--tr-h2);
  line-height: 1.02;
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: var(--tr-h3);
  line-height: 1.1;
}

.lead {
  font-size: var(--fs-lead);
  letter-spacing: var(--tr-lead);
  line-height: 1.5;
  color: var(--text-muted);
}

.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}

.muted { color: var(--text-muted); }

/* Marcação de conteúdo pendente — visível de propósito */
.pendente {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.02em;
  color: var(--text);
  background: rgba(47, 107, 255, 0.08);
  border: 1px dashed var(--field-line);
  border-radius: 6px;
  padding: 0.1em 0.45em;
  white-space: normal;
}

/* Entradas na rolagem (só com JS ativo; sem JS tudo fica visível) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
