/* ==========================================================
   BASE — reset, tipografía y utilidades generales
   ========================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-800); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }

p { margin: 0 0 var(--space-2); max-width: 68ch; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--color-primary); text-underline-offset: 3px; }
a:hover { color: var(--color-primary-dark); }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-6); }

.section-head { margin-bottom: var(--space-4); max-width: 46rem; }
.section-head p { color: var(--color-ink-soft); font-size: var(--fs-500); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--color-ink);
  color: var(--color-white);
  border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-1); }

.icon {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

@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;
  }
}
