/* ==========================================================================
   base.css — reset moderno, elementos base e utilitários de acessibilidade
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

/* elementos que entram pela lateral (translateX do reveal) não podem gerar rolagem horizontal;
   "clip" corta sem criar um contêiner de rolagem */
main {
  overflow-x: clip;
}

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

img {
  height: auto;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--c-violet-300);
  text-decoration: none;
  transition: color var(--dur-fast);
}

a:hover {
  color: #ede9fe;
}

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

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

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

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

[hidden] {
  display: none !important;
}

/* Acessibilidade */
.sr-only {
  position: absolute;
  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;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-weight: 700;
  transition: top var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
  color: var(--c-on-accent);
}
