/* ══════════════════════════════════════════════════════════════════════════
   elchiringuitodepepe.es — Base "Minimal Luz" (issues #580 / #586)
   Tokens, reset, tipografía y marco compartido (header + footer) del tenant
   chiringuito. Lo cargan TODAS las páginas del tenant a través de
   @chiringuito/_layout.html.twig. Las hojas específicas (home.css, legal.css)
   solo consumen estos tokens; nunca redefinen :root.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── FUENTES AUTO-ALOJADAS (issue #587, RGPD) ─────────────────────────────
   Playfair Display + Inter servidas desde el propio dominio (/fonts/*.woff2),
   NO desde los CDNs de Google. Así la IP del visitante nunca sale a Google.
   Ambas familias son SIL Open Font License. Solo se incluyen los pesos/estilos
   que usa el diseño Minimal Luz:
     - Playfair Display: 400, 500 y 400 italic (var(--serif))
     - Inter:            300, 400 y 500          (var(--sans))
   `font-display: swap` evita el bloqueo de render (mismo comportamiento que el
   antiguo &display=swap de Google). */
/* Fuentes variables: un único woff2 por familia/estilo cubre todo el rango de
   pesos usados (font-weight como rango). Evita descargar el mismo fichero varias
   veces (Playfair 400/500 e Inter 300/400/500 eran byte-idénticos). */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/playfair-display.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/playfair-display-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}

/* ─── RESET & BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:    #FAF7F0;
  --cream-d:  #F2EDE0;
  --ink:      #1A1814;
  --ink-60:   #7A756B;
  --ink-30:   #C4BFB5;
  --amber:    #C8820A;
  --amber-l:  #E8A832;
  --amber-ll: #F5C85A;
  --foam:     #FFF8E7;
  --glass:    rgba(255,255,255,0.18);
  --serif:    'Playfair Display', Georgia, serif;
  --sans:     'Inter', system-ui, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT HELPERS ───────────────────────────────────────────────────── */
.wrap {
  width: min(100%, 820px);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 3rem);
}

section {
  padding-block: clamp(4rem, 10vw, 8rem);
}

hr.rule {
  border: none;
  border-top: 1px solid var(--ink-30);
  margin-block: 0;
}

/* ─── TYPOGRAPHY ────────────────────────────────────────────────────────── */
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* ─── HEADER ────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--ink-30);
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(0.875rem, 2.2vw, 1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span {
  color: var(--amber);
}

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--ink);
  transition: background 0.25s, color 0.25s;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--ink);
  color: var(--cream);
  outline: none;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--cream);
  background: var(--ink);
  padding: 0.875rem 2rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--cream);
  transform: translateY(-1px);
  outline: none;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
.site-footer {
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--ink-60);
}

.footer-powered {
  font-size: 0.75rem;
  opacity: 0.7;
}

.footer-powered a {
  color: inherit;
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--ink-60);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
  outline: none;
}

/* ─── UTILITY ───────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── REDUCED MOTION ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
