/* ==========================================================================
   base.css — Reset moderno + tipografía + layout container
   ========================================================================== */

/* ---------- Reset ---------- */

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

* {
  margin: 0;
  padding: 0;
}

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

@media (min-width: 1024px) {
  html {
    scroll-padding-top: var(--header-h-desktop);
  }
}

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

/* ---------- Tipografía ---------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-strong);
  line-height: var(--lh-snug);
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: var(--font-h1);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--font-h2);
}

h3 {
  font-size: var(--font-h3);
  font-weight: 600;
}

h4 {
  font-size: var(--font-h4);
  font-weight: 600;
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-4);
}

strong {
  font-weight: 600;
  color: var(--color-text-strong);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Imágenes & media ---------- */

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

/* ---------- Listas (sin estilos por defecto donde aplique) ---------- */

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

/* ---------- Botones (reset) ---------- */

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Contenedor ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ---------- Section spacing ---------- */

.section {
  padding-block: clamp(3.5rem, 7vw, 7.5rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

.section--alt {
  background: var(--color-bg-subtle);
}

/* ---------- Focus visible global ---------- */

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ---------- Reduce motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
