/* ============================================================
   base.css — reset, tipografía base y utilidades de fondo
   Depende de variables.css (cárgalo antes).
   ============================================================ */

/* -------- Reset moderno y mínimo -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-cuerpo);
  color: var(--color-texto);
  background-color: var(--color-fondo);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* -------- Textura de fondo: degradados radiales en capas + grano sutil --------
   Da profundidad al verde (sección 3). El grano es un SVG noise inline. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(28, 74, 51, 0.55) 0%, transparent 60%),
    radial-gradient(50% 40% at 100% 20%, rgba(201, 162, 75, 0.08) 0%, transparent 55%),
    radial-gradient(70% 60% at 50% 110%, rgba(14, 42, 30, 0.9) 0%, transparent 70%),
    linear-gradient(180deg, var(--verde-850) 0%, var(--verde-900) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -------- Tipografía -------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--lh-titulo);
  letter-spacing: var(--track-titulo);
  color: var(--color-texto);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}

p {
  max-width: var(--ancho-texto);
  color: var(--color-texto-suave);
}

a {
  color: var(--color-acento-brillo);
  text-decoration: none;
  transition: color var(--dur-rapida) var(--ease-suave);
}

a:hover {
  color: var(--color-texto);
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* -------- Foco visible accesible (sección 3: todo clickeable lo tiene) -------- */
:focus-visible {
  outline: 2px solid var(--color-acento-brillo);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: rgba(201, 162, 75, 0.3);
  color: var(--color-texto);
}

/* -------- Utilidades de texto -------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--color-acento);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--color-texto-suave);
  font-weight: 300;
}

.texto-tenue {
  color: var(--color-texto-tenue);
}

.serif {
  font-family: var(--font-serif);
}

/* Acento dorado en palabras dentro de un título */
.realce {
  color: var(--color-acento-brillo);
  font-style: italic;
}

/* 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;
}
