/* ==========================================================================
   Base — reset, tipografía, elementos HTML nativos
   ========================================================================== */

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

* {
  margin: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

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

img {
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  text-wrap: balance;
  color: var(--color-ink);
}

p {
  text-wrap: pretty;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

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

svg {
  fill: currentColor;
}

/* ---- Foco accesible ---- */
:focus-visible {
  outline: 2px solid var(--color-magenta);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---- Utilidad visualmente oculta (accesibilidad) ---- */
.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;
  top: -100%;
  left: var(--space-sm);
  z-index: 9999;
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ==========================================================================
   Tipografía editorial
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-magenta);
}

.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 1px;
  background: currentColor;
}

.eyebrow--alt {
  color: var(--color-blue);
}

.eyebrow--on-dark {
  color: var(--color-magenta-bright);
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 700; }

.display {
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--color-muted);
  max-width: 42ch;
}

.body-lg {
  font-size: 1.125rem;
  line-height: var(--lh-relaxed);
}

.text-muted { color: var(--color-muted); }
.text-on-dark { color: var(--color-white); }
.text-accent { color: var(--color-magenta); }

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

.numeral {
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-numeric: oldstyle-nums;
}
