/* ============================================================
   tokens.css — Revire Brasas Bravas
   Dirección estética: SALA OSCURA
   Paleta y tipografía tomadas del manual de marca (REV_Redes.ai,
   "REVIRE BRANDING 2023"). Los hex son los oficiales, no aproximados.
   Se importa después de fuentes.css y antes de main.css.
   ============================================================ */

/* ------------------------------------------------------------
   1. COLORES DE MARCA — literales del manual, no tocar
   ------------------------------------------------------------ */
:root {
  --negro:  #1E1C1C;   /* Pantone 179-16C */
  --blanco: #FFFFFF;   /* Pantone 179-1C  */
  --cobre:  #B07E56;   /* Pantone 729C    */
  --vino:   #471220;   /* Pantone 7421C   */
  --azul:   #121D28;   /* Pantone 7547C   */
}

/* ------------------------------------------------------------
   2. POR PROYECTO
   ------------------------------------------------------------ */
:root {
  --h: 17;          /* hue del negro de marca — gobierna los neutros */
  --h-cobre: 59;    /* hue del cobre — sólo el acento */

  --f-display: 'Hotel de Paris', 'Arial Black', Impact, sans-serif;
  --f-texto:   'Erode', Georgia, serif;
  --f-ui:      'Saa Series F', system-ui, sans-serif;
  --f-mono:    'Saa Series D', ui-monospace, Consolas, monospace;
  /* voz de marca (manifiesto y hero): antes era la caligrafía Mrs Saint
     Delafield; se cambió a Boska por legibilidad. El nombre --f-script
     se conserva por las clases que ya la referencian. */
  --f-script:  'Boska', 'Erode', Georgia, serif;

  --radio: 0px;
  --grano: 0.04;
}

/* ------------------------------------------------------------
   3. SUPERFICIES Y TEXTO
   Los neutros se derivan del negro de marca, así ninguno es gris puro.
   ------------------------------------------------------------ */
:root {
  --acento:       var(--cobre);
  --acento-claro: oklch(74% 0.075 var(--h-cobre));   /* cobre aclarado para hover */
  --acento-hondo: oklch(48% 0.085 var(--h-cobre));   /* cobre oscurecido, para sobre hueso */

  --fondo:      oklch(16% 0.006 var(--h));  /* más hondo que el negro de marca, para dar capas */
  --fondo-alt:  var(--negro);               /* el negro del manual, para secciones alternas */
  --fondo-vino: var(--vino);
  --fondo-azul: var(--azul);

  --texto:       oklch(94% 0.008 var(--h-cobre));
  --texto-suave: oklch(94% 0.008 var(--h-cobre) / 0.62);
  --texto-tenue: oklch(94% 0.008 var(--h-cobre) / 0.38);

  --linea:        oklch(94% 0.008 var(--h-cobre) / 0.14);
  --linea-fuerte: oklch(94% 0.008 var(--h-cobre) / 0.30);

  --hueso: oklch(95% 0.008 var(--h-cobre));  /* blanco de marca apenas templado */
}

/* Inversión de paleta — el signature move.
   Cualquier sección con data-claro se da vuelta a hueso sobre tinta vino. */
[data-claro] {
  --fondo:       var(--hueso);
  --fondo-alt:   oklch(91% 0.014 var(--h-cobre));
  --texto:       oklch(24% 0.055 8);          /* tinta vino */
  --texto-suave: oklch(24% 0.055 8 / 0.68);
  --texto-tenue: oklch(24% 0.055 8 / 0.44);
  --acento:       var(--acento-hondo);         /* cobre oscurecido: AA sobre hueso */
  --acento-claro: oklch(38% 0.080 var(--h-cobre));
  --linea:        oklch(24% 0.055 8 / 0.16);
  --linea-fuerte: oklch(24% 0.055 8 / 0.32);
}

/* ------------------------------------------------------------
   4. TIPOGRAFÍA
   Hotel de Paris es caja alta y en su versión libre NO trae dígitos:
   todo número va en Saa Series D (.cifra / .etiqueta).
   ------------------------------------------------------------ */
:root {
  --t-display: clamp(2.75rem, 8.5vw, 7.5rem);
  --t-h1:      clamp(2rem, 5vw, 4rem);
  --t-h2:      clamp(1.6rem, 3.2vw, 2.5rem);
  --t-h3:      1.25rem;
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-label:   0.6875rem;

  --tr-display: 0.005em;   /* Hotel de Paris ya viene apretada: no la aprieto más */
  --tr-titulo:  0.01em;
  --tr-label:   0.18em;
}

/* ------------------------------------------------------------
   5. ESPACIO
   ------------------------------------------------------------ */
:root {
  --s-seccion:  clamp(6rem, 13vw, 13rem);
  --s-borde:    clamp(1.25rem, 5vw, 4.5rem);

  --ancho-angosto: 44rem;
  --ancho-normal:  64rem;
  --ancho-amplio:  92rem;
}

/* ------------------------------------------------------------
   6. MOVIMIENTO
   ------------------------------------------------------------ */
:root {
  --ease-suave:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-entrada: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-rapida: 200ms;
  --dur-media:  520ms;
  --dur-lenta:  900ms;
}

/* ------------------------------------------------------------
   7. BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: oklch(16% 0.006 17);
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: var(--tr-titulo);
  text-transform: uppercase;   /* Hotel de Paris es caja alta */
  text-wrap: balance;
  margin: 0;
}

p {
  max-width: 62ch;
  text-wrap: pretty;
  margin: 0 0 1.2em;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

img, video, svg { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }

::selection { background: var(--acento); color: var(--negro); }

/* ------------------------------------------------------------
   8. PATRONES
   ------------------------------------------------------------ */
.display {
  font-family: var(--f-display);
  font-size: var(--t-display);
  line-height: 0.94;
  letter-spacing: var(--tr-display);
  text-transform: uppercase;
  text-wrap: balance;
}

/* Frases de la voz de marca: "Un aplauso… es poco."
   Boska (serif de alto contraste). Al tener altura-x normal se lee mucho
   mejor que la caligrafía anterior y pide un cuerpo más contenido. */
.script {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--acento);
}

/* Etiquetas y metadata */
.etiqueta {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--texto-suave);
}

/* Cualquier número: Hotel de Paris no tiene dígitos en la versión libre */
.cifra { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.seccion { padding: var(--s-seccion) var(--s-borde); position: relative; }

.contenedor          { max-width: var(--ancho-normal);  margin-inline: auto; }
.contenedor--angosto { max-width: var(--ancho-angosto); margin-inline: auto; }
.contenedor--amplio  { max-width: var(--ancho-amplio);  margin-inline: auto; }

.linea     { border: 1px solid var(--linea); }
.linea-top { border-top: 1px solid var(--linea); }

.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-borde); }

.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition:
    opacity   var(--dur-media) var(--ease-suave) calc(var(--i, 0) * 70ms),
    transform var(--dur-media) var(--ease-suave) calc(var(--i, 0) * 70ms);
}
.reveal.visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   9. GRANO
   ------------------------------------------------------------ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grano);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   10. ACCESIBILIDAD
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
