/* ==========================================================================
   Editorial Potencial Humano — base.css
   Variables de diseño, fuente, reset y utilidades generales.
   ========================================================================== */

/* ---------- Fuente (autohospedada: sin dependencias externas) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables de diseño ---------- */
:root {
  /* Colores de marca */
  --color-navy: #162737;
  --color-navy-dark: #0f1c28;
  --color-ink: #191919;
  --color-silver: #b9c3cc;
  --color-accent: #7fa6d8;

  /* Fondos */
  --color-white: #ffffff;
  --color-paper: #f9f9fb;

  /* Texto y líneas */
  --color-heading: #191919;
  --color-text: #22262b;
  --color-muted: #666868;
  --color-line: #e4e2dd;
  --color-line-dark: rgba(255, 255, 255, .22);

  /* Tipografía */
  --font-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-h2: clamp(1.875rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 3vw, 3.75rem);

  /* Espaciado y layout */
  --container: 1200px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 5vw, 7rem);
  --radius-sm: 4px;
  --radius: 8px;

  /* Sombras y movimiento */
  --shadow-card: 0 1px 2px rgba(22, 39, 55, .04), 0 14px 34px -20px rgba(22, 39, 55, .25);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 136px;
}

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

* { margin: 0; }

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

body {
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.65;
  letter-spacing: .005em;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

img { height: auto; }

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

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

h1, h2, h3 { color: var(--color-heading); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }

p { text-wrap: pretty; }

address { font-style: normal; }

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

figure { margin: 0; }

/* Foco visible y accesible */
:focus-visible {
  outline: 3px solid var(--color-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-navy); color: var(--color-white); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: .75rem 1.25rem;
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
