/* ============================================================
   base.css — reset, tipografía base, layout raíz, accesibilidad
   ============================================================ */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }

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

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

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

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

/* ---- Titulares ---- */
.display, .h1, .h2, .h3 {
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 500;
}
.h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  font-weight: 500;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-head);
  letter-spacing: var(--tr-head);
  font-weight: 500;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.24;
  letter-spacing: var(--tr-title);
  font-weight: 600;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: -.012em;
}

.muted { color: var(--muted); }
.small { font-size: var(--fs-small); line-height: 1.55; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tr-micro);
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
  flex: none;
}
.eyebrow--plain::before { display: none; }
.eyebrow--onblue { color: var(--on-blue-soft); }
.eyebrow--onblue::before { background: var(--white); }

/* Resalte azul en titulares */
.mark { color: var(--blue-600); }
.mark-ink { color: var(--ink); }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--pad-section); position: relative; }
.section--sm { padding-block: var(--pad-section-sm); }
.section--ice { background: var(--ice-50); }
.section--ice-100 { background: var(--ice-100); }
.section--tight-top { padding-top: clamp(40px, 5vw, 80px); }

.stack { display: grid; gap: var(--gap); }
.stack-lg { display: grid; gap: var(--gap-lg); }

/* ---- 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;
  left: 16px; top: -60px;
  z-index: 200;
  background: var(--blue-700);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { top: 16px; }

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-blue :focus-visible,
.panel-blue :focus-visible { outline-color: var(--white); }

::selection { background: var(--blue-200); color: var(--ink); }

/* Evita saltos de layout: toda imagen dentro de un marco declarado */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ice-100);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--op, 50% 50%);
  filter: saturate(.96) contrast(1.02);
}
.media--4x5 { aspect-ratio: 4 / 5; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--16x10 { aspect-ratio: 16 / 10; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--2x1 { aspect-ratio: 2 / 1; }
