/* ==========================================================================
   Elements Ink — Base
   Normalización ligera, tipografía, enlaces, foco y utilidades de accesibilidad.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Bloqueo de desplazamiento cuando hay un modal o el menú móvil abierto */
html.is-locked,
html.is-locked body {
  overflow: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

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

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: var(--lh-tight);
  text-wrap: balance;
}

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

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

h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--c-olive-deep);
}

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

button {
  cursor: pointer;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--c-sand);
  color: var(--c-ink);
}

hr {
  border: 0;
  border-top: var(--rule);
  margin: 0;
}

address {
  font-style: normal;
}

/* Enlace de salto al contenido */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--c-ink);
  color: var(--c-on-ink);
  border-radius: var(--radius-s);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--c-on-ink);
}

/* Solo para lectores de pantalla */
.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;
}

[hidden]:not([hidden="until-found"]) {
  display: none !important;
}
