/* FEAT-001 · Base: reset, tipografía, contenedor, foco, skip link */

/* ADR-005 · Fuentes alojadas en el sitio (subconjunto latino, variables). Licencia OFL en assets/fonts/ */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
}

/* Respaldos del sistema calibrados al ancho de las fuentes web: evitan saltos de línea al cargar (CLS).
   size-adjust medido en Chrome el 2026-09-28 con una frase de muestra. */
@font-face {
  font-family: 'Cormorant respaldo';
  src: local('Georgia');
  size-adjust: 88.9%;
}

@font-face {
  font-family: 'Instrument respaldo';
  src: local('Arial');
  size-adjust: 101.7%;
}

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background: var(--c-hueso);
  color: var(--c-tinta);
  font: 400 var(--fs-body) / var(--lh-body) var(--f-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-abierto {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

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

ul[role='list'],
.lista-limpia {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--f-serif);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--c-pino);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-hero);
}

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

h3 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

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

.visualmente-oculto {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Foco visible (Constitución P5) */
:focus-visible {
  outline: 2px solid var(--c-laton);
  outline-offset: 3px;
  border-radius: 2px;
}

/* AC-001-08 · Saltar al contenido */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-pino);
  color: var(--c-hueso);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
