/* ==========================================================================
   Base: reset, tipografía y utilidades
   ========================================================================== */

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--c-heading);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.25;
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-m);
}

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

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

a:hover {
  text-decoration-thickness: 2px;
}

address {
  font-style: normal;
}

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

::selection {
  background: var(--jpc-azul-claro);
  color: var(--jpc-azul-950);
}

/* --- Utilidades --------------------------------------------------------- */

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

.sr-only {
  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;
  top: var(--space-s);
  left: var(--space-s);
  z-index: 100;
  padding: var(--space-s) var(--space-m);
  background: var(--jpc-azul-900);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-s);
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

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

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--s {
  width: 1.125rem;
  height: 1.125rem;
}

/* --- Secciones ---------------------------------------------------------- */

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

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

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-2xl);
}

.section-head > p:not(.eyebrow) {
  margin-top: var(--space-m);
  font-size: var(--step-1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-s);
  color: var(--jpc-azul-oscuro);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--jpc-verde), var(--jpc-azul-claro));
}
