/* ==========================================================================
   BASE — Tokens de marca, tipografía, reset y utilidades
   --------------------------------------------------------------------------
   Paleta tomada del logo y del Catálogo Navidad 2021:
   café profundo del logo, arena/crema del catálogo y dorado de la etiqueta.

   Tipografía del catálogo: Agatho (títulos/texto), Daytonia (script) y
   Bodoni 72 (precios). Agatho y Daytonia no están en Google Fonts: si
   tienes sus archivos con licencia web, colócalos en assets/fonts/ con
   los nombres indicados abajo y se usarán automáticamente. Mientras tanto
   se usan equivalentes libres muy cercanos: Rufina, Pinyon Script y
   Bodoni Moda.
   ========================================================================== */

/* ---------- Fuentes de marca (opcionales, locales) ----------------------
   Para activarlas: copia los .woff2 en assets/fonts/ y borra las dos
   líneas marcadas con [BORRAR] (esta de abajo y la del final del bloque).
   ------------------------------------------------------------------------ */
/* [BORRAR]
@font-face {
  font-family: 'Agatho';
  src: url('../fonts/Agatho-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Agatho';
  src: url('../fonts/Agatho-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Daytonia';
  src: url('../fonts/Daytonia.woff2') format('woff2');
  font-display: swap;
}
[BORRAR] */

/* Dígitos alineados a la línea base: Rufina usa números de texto antiguo
   (suben y bajan). Este face toma solo los dígitos de Lora. */
@font-face {
  font-family: 'RP Digits';
  src: url('https://fonts.gstatic.com/s/lora/v37/0QI6MX1D_JOuGQbT0gvTJPa787weuyJG.ttf') format('truetype');
  font-weight: 400;
  unicode-range: U+0030-0039;
  font-display: swap;
}
@font-face {
  font-family: 'RP Digits';
  src: url('https://fonts.gstatic.com/s/lora/v37/0QI6MX1D_JOuGQbT0gvTJPa787wsuyJG.ttf') format('truetype');
  font-weight: 500 700;
  unicode-range: U+0030-0039;
  font-display: swap;
}

/* ---------- Tokens -------------------------------------------------------- */
:root {
  /* Colores de marca */
  --rp-brown-950: #2a140f;
  --rp-brown-900: #361b16; /* fondo exacto del logo */
  --rp-brown-800: #4a2820;
  --rp-brown-700: #6b4535;
  --rp-gold: #d4b287; /* trazo del logo */
  --rp-gold-light: #e8d3b0;
  --rp-sand: #c6ae95; /* fondo del catálogo */
  --rp-sand-100: #f3ebdf; /* papel claro */
  --rp-sand-200: #e6d8c4;
  --rp-sand-300: #d8c4a9;
  --rp-band: #a88a6e; /* franja de advertencia del catálogo */

  /* Acentos por variedad (color del cuello de cada botella) */
  --rp-acholado: #c0692b;
  --rp-quebranta: #7a2432;
  --rp-italia: #5e6b35;
  --rp-uvina: #b8914f;

  /* Funcionales */
  --rp-whatsapp: #128c4b;
  --rp-whatsapp-hover: #0e7440;
  --rp-error: #9b2c1f;
  --rp-success: #2f6b3a;

  /* Semánticos */
  --color-bg: var(--rp-sand-100);
  --color-surface: #fbf7f0;
  --color-text: var(--rp-brown-900);
  --color-text-muted: #6b5144;
  --color-border: rgba(54, 27, 22, 0.16);

  /* Tipografía */
  --font-display: 'RP Digits', 'Agatho', 'Rufina', Georgia, serif;
  --font-body: 'Agatho', 'Lora', Georgia, serif;
  --font-script: 'Daytonia', 'Pinyon Script', cursive;
  --font-price: 'Bodoni Moda', 'Bodoni 72', Didot, serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-3xl: clamp(2.25rem, 1.5rem + 2.6vw, 3.6rem);

  --tracking-wide: 0.14em;

  /* Espaciado y forma */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-arch: 999px 999px 18px 18px;

  --shadow-sm: 0 1px 2px rgba(42, 20, 15, 0.12);
  --shadow-md: 0 10px 30px -12px rgba(42, 20, 15, 0.35);
  --shadow-lg: 0 30px 60px -25px rgba(42, 20, 15, 0.55);

  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Textura de arpillera (como las fotos del catálogo), generada en SVG */
  --texture-burlap: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .21 0 0 0 0 .11 0 0 0 0 .09 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--rp-acholado);
  outline-offset: 3px;
}

/* Bloquea el scroll cuando hay un modal abierto */
body.is-locked {
  overflow: hidden;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--rp-brown-900);
  color: var(--rp-gold-light);
}
.skip-link:focus {
  top: var(--space-4);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

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

/* Animación de entrada al hacer scroll (ver modules/reveal.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
