/* ============================================================
   MULHERES SEM MEDO — DESIGN SYSTEM
   base.css · Reset moderno + estilos de elementos
   ============================================================ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem; /* compensa header fixo ao navegar por âncoras */
  /* Escuro no <html> evita a "faixa branca" no overscroll do mobile
     (senão o off-white do body é propagado pro fundo da viewport). */
  background-color: var(--c-purple-950);
}

body {
  /* Sticky footer robusto: body em coluna, #conteudo cresce, rodapé sempre por
     último. Evita o bug do iOS (min-height + overflow no body criava espaço
     rolável DEPOIS do rodapé). */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  /* Fundo ESCURO no body (não o off-white): garante que o overscroll do iOS
     — em cima e embaixo — nunca mostre branco. O conteúdo claro fica no #conteudo. */
  background-color: var(--c-purple-950);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Todo o conteúdo rolável vive dentro do <main id="conteudo">. Ele carrega o fundo
   claro do site e CRESCE para empurrar o rodapé para o fim (flex: 1). O clip lateral
   fica aqui (e não no body) para não transformar o body em container de rolagem no iOS. */
#conteudo {
  background-color: var(--color-bg);
  flex: 1 0 auto;
  overflow-x: clip;
}

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

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

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

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

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

/* ---------- Tipografia base ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: var(--lh-tight);
  font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }

p { text-wrap: pretty; }
p + p { margin-top: var(--sp-4); }

strong, b { font-weight: var(--fw-bold); }

small { font-size: var(--fs-sm); }

::selection {
  background: var(--c-magenta-500);
  color: #fff;
}

/* ---------- Acessibilidade: foco visível ---------- */
:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Link "pular para o conteúdo" ---------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100%;
  z-index: var(--z-toast);
  background: var(--c-purple-800);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm);
  font-weight: var(--fw-semibold);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Scrollbar (webkit) ---------- */
@media (min-width: 900px) {
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track { background: var(--c-purple-50); }
  ::-webkit-scrollbar-thumb {
    background: var(--c-purple-300);
    border-radius: 999px;
    border: 3px solid var(--c-purple-50);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--c-purple-400); }
}

/* ---------- Preferência: movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
