/* ============================================================
   AlphaNetworks · base.css
   Reset, normalización, tipografía base y accesibilidad.
   Depende de: variables.css
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 108px; /* compensa el header sticky (96px) + margen al navegar por anclas */
}

body {
  font-family: var(--font-body);
  font-feature-settings: 'cv11','ss01','ss03';
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--grad-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografía ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: var(--lh-tight);
  letter-spacing: -.025em;
  text-wrap: balance;
}
h1 { font-weight: var(--fw-extra);    font-size: var(--fs-h1); letter-spacing: -.03em; }
h2 { font-weight: var(--fw-bold);     font-size: var(--fs-h2); line-height: 1.25; }
h3 { font-weight: var(--fw-bold);     font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -.02em; }
h4 { font-weight: var(--fw-bold);     font-size: 1.05rem;      letter-spacing: -.015em; }
h5 { font-weight: var(--fw-semibold); font-size: .78rem; }

p { line-height: var(--lh-base); text-wrap: pretty; }
strong, b { font-weight: var(--fw-semibold); color: var(--text); }
small { font-weight: var(--fw-medium); font-size: .82em; }

a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }

ul, ol { list-style: none; }

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

/* Heredar tipografía en controles de formulario */
input, button, select, textarea { font: inherit; color: inherit; }

/* ── Accesibilidad ──────────────────────────────────────── */
/* Estado focus visible y consistente para teclado (no remover sin reemplazo) */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Texto solo para lectores de pantalla */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Enlace "saltar al contenido" (primer elemento del <body>) */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: var(--z-toast);
  background: var(--cyan); color: #071426;
  padding: 10px 18px; border-radius: 0 0 var(--radius) 0;
  font-weight: var(--fw-bold);
}
.skip-link:focus { left: 0; }

::selection { background: var(--cyan); color: #071426; }

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