/* ============================================================
   LUMA Pub&Beer · styles.css
   Tokens de diseño, reset, tipografía base y utilidades.
   Metodología mobile first: los estilos base son para móvil;
   las ampliaciones viven en responsive.css.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Paleta de marca */
  --onyx: #0A0A0A;
  --champagne: #E5D3B3;
  --bronze: #C2A676;
  --gold-dark: #8C7146;
  --ivory: #F4F1EA;

  /* Profundidades de fondo (derivadas del negro ónix) */
  --bg-0: #0A0A0A;
  --bg-1: #0F0E0C;
  --bg-2: #15130F;
  --bg-3: #1C1914;

  /* Texto */
  --text: var(--ivory);
  --text-soft: rgba(244, 241, 234, 0.74);
  --text-mute: rgba(244, 241, 234, 0.52);

  /* Líneas y transparencias */
  --line: rgba(194, 166, 118, 0.22);
  --line-soft: rgba(194, 166, 118, 0.12);
  --line-strong: rgba(194, 166, 118, 0.45);
  --glass: rgba(10, 10, 10, 0.72);

  /* Degradados dorados (uso sutil) */
  --gold-gradient: linear-gradient(120deg, #8C7146 0%, #C2A676 38%, #E5D3B3 60%, #C2A676 100%);
  --glow: radial-gradient(closest-side, rgba(194, 166, 118, 0.18), transparent);

  /* Tipografía */
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --fs-xl: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  --fs-2xl: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);
  --fs-hero: clamp(2.7rem, 1.4rem + 5.6vw, 6.4rem);

  --tracking-wide: 0.28em;
  --tracking: 0.14em;

  /* Espaciado */
  --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: 4rem;
  --space-9: 6rem;
  --section-y: clamp(5rem, 3rem + 8vw, 10rem);
  --gutter: 1.25rem;
  --container: 78rem;

  /* Formas y movimiento */
  --radius: 2px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.5s;
  --dur-slow: 1.1s;

  --header-h: 4.5rem;
  --z-header: 50;
  --z-float: 40;

  color-scheme: dark;
}

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  background-color: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

em {
  font-style: italic;
  color: var(--champagne);
}

::selection { background: var(--bronze); color: var(--onyx); }

/* ---------- 3. Accesibilidad ---------- */
:focus-visible {
  outline: 1px solid var(--champagne);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.sr-only {
  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: fixed;
  top: var(--space-3); left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--champagne);
  color: var(--onyx);
  font-size: var(--fs-sm);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em; height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 4. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* ---------- 5. Tipografía de sección ---------- */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--bronze);
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--bronze);
}
.section-label span {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--champagne);
}
.section-label::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-size: var(--fs-xl);
  max-width: 16ch;
}
.section-title--xl { font-size: var(--fs-2xl); }

/* Textura de grano sutil para dar profundidad a los fondos */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 6. Animaciones de entrada ---------- */
/* Solo se ocultan si JS está activo (clase .js en <html>) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 0.12s; }
.js [data-reveal-delay="2"] { transition-delay: 0.24s; }
.js [data-reveal-delay="3"] { transition-delay: 0.36s; }

/* Títulos que aparecen palabra por palabra (js/motion.js) */
.js [data-split].is-split .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.js [data-split].is-split .word__inner {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--w, 0) * 55ms);
}
.js [data-split].is-visible .word__inner { transform: none; }

/* Fotografías que se descubren con una cortina */
.js .reveal-img[data-reveal] {
  opacity: 1;
  transform: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease-out);
}
.js .reveal-img[data-reveal].is-visible { clip-path: inset(0 0 0 0); }
.js .reveal-img[data-reveal-delay="2"] { transition-delay: 0.25s; }

/* ---------- 7. Movimiento reducido ---------- */
@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;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .reveal-img[data-reveal] { clip-path: none; }
  .js [data-split].is-split .word__inner { transform: none; }
}
