/* ==========================================================================
   El Riso de Bronce — 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-red: #a6221e;
  --color-red-dark: #861a17;
  --color-bronze: #8a6a3c;
  --color-olive: #2f2803;
  --color-ink: #211d1b;
  --color-dark: #1a1413;

  /* Fondos */
  --color-white: #ffffff;
  --color-cream: #f7f3ee;
  --color-sand: #efe8df;

  /* Texto y líneas */
  --color-heading: #211d1b;
  --color-text: #2b2623;
  --color-muted: #6b6560;
  --color-muted-light: #b9b1aa;
  --color-line: #e6dfd6;

  /* Tipografía */
  --font-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-h2-xl: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 4vw, 4.375rem);

  /* Espaciado y layout */
  --container: 1280px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section-y: clamp(4rem, 2.5rem + 5.5vw, 7.5rem);
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  /* Sombras y movimiento */
  --shadow-card: 0 1px 2px rgba(33, 29, 27, .04), 0 12px 30px -16px rgba(33, 29, 27, .2);
  --shadow-card-hover: 0 2px 4px rgba(33, 29, 27, .05), 0 26px 50px -22px rgba(33, 29, 27, .38);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 122px;
}

/* ---------- 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.1; font-weight: 800; letter-spacing: -0.025em; 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-red);
  outline-offset: 3px;
  border-radius: 4px;
}

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