/* ==========================================================================
   Ausencia en Errores — 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-gold: #9b812a;
  --color-gold-dark: #7c6720;
  --color-gold-text: #7a6418;   /* dorado con contraste suficiente sobre fondos claros */
  --color-gold-light: #d4bd78;  /* dorado para fondos oscuros */
  --color-dark: #1d1d1b;
  --color-night: #221e22;

  /* Fondos */
  --color-white: #ffffff;
  --color-paper: #f8f7f3;
  --color-stone: #f1efe9;
  --color-sand: #ede5cf;

  /* Texto y líneas */
  --color-heading: #1d1d1b;
  --color-text: #262522;
  --color-muted: #5c5a55;
  --color-line: #c9b98a;
  --color-line-dark: rgba(255, 255, 255, .18);

  /* Tipografía */
  --font-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1rem, .95rem + .3vw, 1.1875rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 1.8vw, 2.625rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 3.2vw, 3.875rem);

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

  /* Movimiento */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 86px;
}

/* ---------- 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-paper);
  -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-gold-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-gold-dark); 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-gold-dark);
  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;
  }
}

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