/* =============================================================
   RESET — Normalize + base styles
   ============================================================= */

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

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

/* Quitar scroll suave cuando el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--f-body);
  font-size: var(--text-base);
  color: var(--c-text);
  background-color: var(--c-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Bloquear scroll cuando menú mobile está abierto */
body.no-scroll {
  overflow: hidden;
}

/* ── Tipografía ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-heading);
  font-weight: normal;
  line-height: 1.1;
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

/* ── Elementos multimedia ─────────────────────────────────────── */
img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Listas ──────────────────────────────────────────────────── */
ul, ol {
  list-style: none;
}

/* ── Formularios ─────────────────────────────────────────────── */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  line-height: inherit;
}

input:not([type="checkbox"]):not([type="radio"]), textarea {
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  resize: vertical;
}

/* ── Tablas ──────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Varios ──────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--c-border);
}

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

blockquote, q {
  quotes: none;
}

address {
  font-style: normal;
}

/* ── Accesibilidad: focus visible ─────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Quitar outline en elementos que no son interactivos */
:focus:not(:focus-visible) {
  outline: none;
}

/* Garantizar que el atributo HTML `hidden` siempre oculte el elemento,
   aunque el CSS defina display:flex/grid en esa misma clase. */
[hidden] {
  display: none !important;
}
