/* ==========================================================================
   Lynch — Base: reset, tipografía y primitivas de maquetación
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--pp-bg);
  color: var(--pp-text);
  font-family: var(--pp-font-sans);
  font-size: var(--pp-fs-md);
  line-height: var(--pp-lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Ningún bloque debe poder generar desplazamiento horizontal. Las tablas
   anchas van dentro de su propio contenedor con scroll (.cmp-scroll). */
table {
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 640;
  line-height: var(--pp-lh-head);
  letter-spacing: -0.018em;
  color: var(--pp-ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--pp-fs-3xl);
  line-height: var(--pp-lh-tight);
  letter-spacing: -0.03em;
  font-weight: 660;
}

h2 {
  font-size: var(--pp-fs-2xl);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--pp-fs-lg);
  letter-spacing: -0.012em;
  font-weight: 620;
}

p {
  margin: 0 0 var(--pp-4);
  max-width: 68ch;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--pp-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--pp-brand-strong);
}

strong {
  font-weight: 640;
}

:focus-visible {
  outline: none;
  box-shadow: var(--pp-focus);
  border-radius: var(--pp-r-sm);
}

/* --- Párrafo de entrada en serif: aporta calidez y jerarquía ------------- */
.lead {
  font-family: var(--pp-font-serif);
  font-size: var(--pp-fs-lg);
  line-height: var(--pp-lh-serif);
  color: #2c4048;
  max-width: 58ch;
}

.muted {
  color: var(--pp-muted);
}

.small {
  font-size: var(--pp-fs-sm);
}

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

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

.section {
  padding-block: var(--pp-section-y);
}

.section--alt {
  background: var(--pp-bg-alt);
}

.section--warm {
  background: var(--pp-bg-warm);
}

.section--ink {
  background: var(--pp-ink);
  color: #d5e2e7;
}

.section--ink h2,
.section--ink h3 {
  color: var(--pp-white);
}

.section--ink .lead {
  color: #bcd0d8;
}

/* Encabezado de sección: título + entrada, alineado a la izquierda.
   Sin eyebrow en mayúsculas: la jerarquía la da el tamaño y el aire. */
.sec-head {
  max-width: 60ch;
  margin-bottom: var(--pp-7);
}

.sec-head > h2 + .lead {
  margin-top: var(--pp-4);
}

.sec-head--split {
  max-width: none;
  display: grid;
  gap: var(--pp-5);
  align-items: end;
}

@media (min-width: 900px) {
  .sec-head--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--pp-8);
  }
  .sec-head--split .lead {
    padding-bottom: 0.35rem;
  }
}

/* --- Accesibilidad ------------------------------------------------------ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--pp-4);
  top: -100px;
  z-index: 200;
  background: var(--pp-ink);
  color: var(--pp-white);
  padding: 0.7rem 1.1rem;
  border-radius: var(--pp-r-md);
  font-size: var(--pp-fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--pp-dur) var(--pp-ease);
}

.skip-link:focus {
  top: var(--pp-4);
  color: var(--pp-white);
}

@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;
    scroll-behavior: auto !important;
  }
}
