/* =========================================================================
   Bazar Colibrí — hoja de estilos principal
   1. Tokens   2. Base   3. Fondo vivo   4. Navegación   5. Botones
   6. Secciones  7. Inicio (hero)  8. Tarjetas  9. Productos
   10. Calendario  11. Carrusel  12. Visor de flyers  13. Sedes
   14. Formularios  15. Contacto  16. Páginas internas  17. Pie
   18. Utilidades  19. Responsivo y rendimiento  20. Movimiento reducido
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Paleta de marca (cliente) */
  --magenta: #ff1ed2;
  --blue: #1e1edb;
  --white: #ffffff;
  --violet: #ba20d9;
  /* Acentos del logo */
  --cyan: #19e6ff;
  --yellow: #ffe14d;
  --lime: #39ff88;
  --ember: #ff5a36;
  /* Noche de tormenta */
  --night: #07021a;
  --night-2: #0e0530;
  --ink: #f4f0ff;
  --ink-soft: #c9bfea;
  --ink-mute: #9d93c4;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-line: rgba(255, 255, 255, 0.14);

  --grad-hot: linear-gradient(100deg, var(--magenta), var(--violet) 45%, var(--blue));
  --grad-wing: linear-gradient(100deg, var(--lime), var(--yellow) 30%, var(--magenta) 70%, var(--violet));
  --grad-cool: linear-gradient(100deg, var(--cyan), var(--blue));

  /* Colores por sede (calendario y leyendas) */
  --venue-paseo-morelos: var(--magenta);
  --venue-factory-shops: var(--cyan);
  --venue-via-alta: #a86bff;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  --nav-h: 72px;
  --scroll: 0;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw + 10px, 18px);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--night);
  border-radius: 10px;
}
.skip:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 8px;
}

.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;
}

/* ---------- 3. Fondo vivo ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 110%, #1a0750 0%, transparent 60%),
    radial-gradient(90% 60% at 50% -10%, #2a0a5e 0%, transparent 60%),
    var(--night);
}
.aurora {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora--1 { background: radial-gradient(circle, var(--magenta), transparent 65%); left: -20vmax; top: -15vmax; animation: drift1 22s ease-in-out infinite alternate; }
.aurora--2 { background: radial-gradient(circle, var(--blue), transparent 65%); right: -25vmax; top: 10vmax; animation: drift2 26s ease-in-out infinite alternate; opacity: 0.8; }
.aurora--3 { background: radial-gradient(circle, var(--cyan), transparent 65%); left: 20vmax; bottom: -35vmax; animation: drift3 30s ease-in-out infinite alternate; opacity: 0.3; }
.aurora--4 { background: radial-gradient(circle, var(--violet), transparent 65%); right: 10vmax; bottom: -20vmax; animation: drift1 34s ease-in-out infinite alternate-reverse; opacity: 0.45; }
@keyframes drift1 { to { transform: translate3d(18vmax, 12vmax, 0) scale(1.2); } }
@keyframes drift2 { to { transform: translate3d(-22vmax, 16vmax, 0) scale(0.85); } }
@keyframes drift3 { to { transform: translate3d(-14vmax, -18vmax, 0) scale(1.25); } }

/* Relámpago ocasional */
.storm {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(60% 50% at var(--sx, 50%) 0%, rgba(160, 200, 255, 0.5), rgba(255, 30, 210, 0.14) 45%, transparent 70%);
}
.storm.is-strike { animation: strike 1.1s ease-out; }
@keyframes strike {
  0% { opacity: 0; }
  6% { opacity: 1; }
  12% { opacity: 0.15; }
  18% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Lienzo del colibrí: encima del contenido, sin bloquear clics */
#bird-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

main, .footer { position: relative; z-index: 2; }

/* ---------- 4. Navegación ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav.is-scrolled,
.nav--solid {
  background: rgba(7, 2, 26, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-color: var(--glass-line);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.nav__brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 12px rgba(255, 30, 210, 0.6)); }
.nav__brand em {
  font-family: var(--font-script);
  font-style: normal;
  font-weight: 400;
  font-size: 1.7em;
  letter-spacing: 0;
  background: var(--grad-cool);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__links a:not(.btn) {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.nav__links a:not(.btn)::after {
  content: '';
  position: absolute;
  inset: auto 0 -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-wing);
  transform: scaleX(0);
  transition: transform 0.35s;
}
.nav__links a:not(.btn):hover,
.nav__links a[aria-current] { color: var(--white); }
.nav__links a:not(.btn):hover::after,
.nav__links a[aria-current]::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: var(--glass);
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- 5. Botones ---------- */
.btn {
  --glow: rgba(255, 30, 210, 0.55);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--grad-hot);
  background-size: 200% 100%;
  color: var(--white);
  font: 700 15px/1 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s, box-shadow 0.25s, background-position 0.6s;
}
.btn:hover {
  transform: translateY(-2px) scale(1.03);
  background-position: 100% 0;
  box-shadow: 0 16px 40px -8px var(--glow), 0 0 0 4px rgba(255, 30, 210, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 4px rgba(25, 230, 255, 0.18); }
.btn--whatsapp { background: linear-gradient(135deg, #2bd46a, #11a653); --glow: rgba(43, 212, 106, 0.5); }
.btn--small { min-height: 40px; padding: 10px 18px; font-size: 14px; }
.btn--wide { width: 100%; }

/* ---------- 6. Secciones ---------- */
.section {
  position: relative;
  padding: clamp(80px, 11vw, 150px) 0;
}
.container {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
}
.section__head { max-width: 700px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(25, 230, 255, 0.7);
}
.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.grad {
  background: var(--grad-wing);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 0.8vw + 12px, 19px);
}

/* Aparición 3D al hacer scroll */
.reveal {
  opacity: 0;
  transform: perspective(900px) translate3d(0, 44px, 0) rotateX(16deg);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 7. Inicio (hero) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 110px var(--gutter) 96px;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}
/* Aura luminiscente: independiente del colibrí, no gira */
.hero__aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: calc(1 - var(--scroll) * 0.7);
  -webkit-mask: radial-gradient(75% 65% at 50% 36%, #000 35%, transparent 100%);
  mask: radial-gradient(75% 65% at 50% 36%, #000 35%, transparent 100%);
}
.hero__aura span {
  position: absolute;
  left: 50%;
  top: 34%;
  width: var(--s, 60vmin);
  height: var(--s, 60vmin);
  margin: calc(var(--s, 60vmin) / -2) 0 0 calc(var(--s, 60vmin) / -2);
  border-radius: 50%;
  filter: blur(46px);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
.hero__aura .glow-core { --s: 46vmin; background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 150, 240, 0.55) 35%, rgba(255, 30, 210, 0) 70%); animation: breathe 5.5s ease-in-out infinite; }
.hero__aura .glow-magenta { --s: 62vmin; background: radial-gradient(circle, rgba(255, 30, 210, 0.9), rgba(255, 30, 210, 0) 68%); animation: float-a 13s ease-in-out infinite alternate; }
.hero__aura .glow-cyan { --s: 56vmin; background: radial-gradient(circle, rgba(25, 230, 255, 0.8), rgba(25, 230, 255, 0) 68%); animation: float-b 16s ease-in-out infinite alternate; }
.hero__aura .glow-violet { --s: 70vmin; background: radial-gradient(circle, rgba(120, 40, 255, 0.85), rgba(30, 30, 219, 0) 68%); animation: float-c 11s ease-in-out infinite alternate; }
.hero__aura .glow-yellow { --s: 34vmin; background: radial-gradient(circle, rgba(255, 225, 77, 0.75), rgba(255, 225, 77, 0) 68%); animation: float-d 19s ease-in-out infinite alternate; }
@keyframes breathe { 0%, 100% { transform: scale(0.88); opacity: 0.65; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes float-a { 0% { transform: translate(-22vmin, -6vmin) scale(1); } 100% { transform: translate(-8vmin, 8vmin) scale(1.15); } }
@keyframes float-b { 0% { transform: translate(20vmin, 4vmin) scale(1.1); } 100% { transform: translate(8vmin, -10vmin) scale(0.9); } }
@keyframes float-c { 0% { transform: translate(4vmin, 16vmin) scale(0.95); opacity: 0.7; } 100% { transform: translate(-10vmin, 10vmin) scale(1.12); opacity: 1; } }
@keyframes float-d { 0% { transform: translate(-14vmin, 14vmin); opacity: 0.5; } 100% { transform: translate(16vmin, -14vmin); opacity: 0.9; } }

/* Órbitas 3D alrededor del colibrí */
.hero__rings {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  align-content: start;
  padding-top: 34vh;
  perspective: 900px;
  pointer-events: none;
}
.ring {
  grid-area: 1 / 1;
  translate: 0 -50%;
  width: min(74vmin, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--night), var(--night)) padding-box, var(--grad-wing) border-box;
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  opacity: 0.6;
  transform-style: preserve-3d;
  filter: drop-shadow(0 0 12px rgba(255, 30, 210, 0.8));
}
.ring--1 { animation: orbit1 16s linear infinite; }
.ring--2 { width: min(60vmin, 560px); background: linear-gradient(var(--night), var(--night)) padding-box, var(--grad-cool) border-box; animation: orbit2 13s linear infinite; filter: drop-shadow(0 0 12px rgba(25, 230, 255, 0.8)); }
@keyframes orbit1 { from { transform: rotateX(72deg) rotateZ(0); } to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes orbit2 { from { transform: rotateY(68deg) rotateX(20deg) rotateZ(0); } to { transform: rotateY(68deg) rotateX(20deg) rotateZ(-360deg); } }

/* Logo mientras carga el colibrí 3D (o si no hay WebGL) */
.hero__fallback {
  position: absolute;
  width: min(56vmin, 440px);
  top: 34%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  animation: float 5s ease-in-out infinite;
  transition: opacity 0.8s, visibility 0.8s;
}
.bird-ready:not(.no-webgl) .hero__fallback { opacity: 0; visibility: hidden; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }

.hero__content {
  position: relative;
  z-index: 25; /* el texto queda por encima del colibrí */
  align-self: end;
  max-width: 820px;
}
.hero__title { margin: 0; line-height: 0.85; display: grid; justify-items: center; }
.hero__title .script {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(56px, min(9vw, 12vh), 120px);
  line-height: 1;
  color: var(--white);
  text-shadow: 0 0 20px rgba(255, 30, 210, 0.9), 0 0 60px rgba(30, 30, 219, 0.9);
  margin-bottom: -0.18em;
  transform: rotate(-6deg);
}
.hero__title .display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(46px, min(10vw, 12.5vh), 140px);
  letter-spacing: 0.04em;
  background: var(--grad-wing);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 30px rgba(255, 30, 210, 0.45));
}
@keyframes shimmer { to { background-position: 100% 0; } }
.hero__lead {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(16px, 1.1vw + 10px, 20px);
  text-shadow: 0 2px 20px rgba(7, 2, 26, 0.9);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.next-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(7, 2, 26, 0.55);
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  text-align: left;
  max-width: 100%;
}
.next-pill:empty { display: none; }
.next-pill b { color: var(--white); }
.next-pill .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(57, 255, 136, 0.2); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(57, 255, 136, 0); } }
.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  z-index: 25;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  opacity: calc(1 - var(--scroll) * 3);
}
.scroll-hint span { width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 14px; position: relative; }
.scroll-hint span::after { content: ''; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--magenta); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 8. Tarjetas de cristal con inclinación 3D ---------- */
.card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  border-radius: var(--radius);
  background:
    radial-gradient(400px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.12), transparent 45%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
}
.card.tilt.is-visible {
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, opacity 0.9s;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-wing);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
}
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Pilares "El bazar" */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pillar { padding: 28px 24px; }
.icon-tile {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 18px;
  background: var(--c, var(--grad-hot));
  box-shadow: 0 10px 30px -6px var(--g, rgba(255, 30, 210, 0.6));
  transform: translateZ(40px);
}
.icon-tile svg { width: 28px; height: 28px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- 9. Productos ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product { padding: 22px 20px 24px; overflow: hidden; }
.product .icon-tile { --c: linear-gradient(135deg, var(--c1), var(--c2)); --g: color-mix(in srgb, var(--c1) 60%, transparent); }
.product p { font-size: 14.5px; }

/* ---------- 10. Calendario ---------- */
.next-edition {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  padding: 20px clamp(18px, 3vw, 28px);
  margin-bottom: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 30, 210, 0.45);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 30, 210, 0.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(25, 230, 255, 0.18), transparent 55%),
    rgba(255, 255, 255, 0.04);
}
.next-edition[hidden] { display: none; }
.next-edition__badge {
  display: grid;
  place-content: center;
  min-width: 86px;
  padding: 0 12px;
  height: 86px;
  border-radius: 20px;
  text-align: center;
  background: var(--grad-hot);
  box-shadow: 0 10px 30px -8px rgba(255, 30, 210, 0.8);
  line-height: 1;
}
.next-edition__badge b { font-family: var(--font-display); font-size: 26px; white-space: nowrap; }
.next-edition__badge span { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 4px; }
.next-edition :is(h2, h3) { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(17px, 2vw, 22px); }
.next-edition p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.next-edition .countdown { color: var(--lime); font-weight: 700; }

.cal {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}
.cal__panel { padding: clamp(16px, 2.5vw, 26px); }
.cal__months { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--ink-soft);
  font: 600 14px/1 var(--font-body);
  cursor: pointer;
  transition: all 0.25s;
}
.chip:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
  color: var(--white);
  background: var(--grad-hot);
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(255, 30, 210, 0.8);
}
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; text-transform: capitalize; }
.cal__nav { display: flex; gap: 6px; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dow { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.cal__day {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-mute);
  font-weight: 600;
  font-size: clamp(13px, 1.4vw, 16px);
}
.cal__day--empty { background: none; }
.cal__day--today { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
button.cal__day {
  cursor: pointer;
  color: var(--white);
  background: color-mix(in srgb, var(--vc) 22%, transparent);
  border-color: color-mix(in srgb, var(--vc) 65%, transparent);
  box-shadow: 0 0 18px -6px var(--vc);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
button.cal__day:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 26px -4px var(--vc); background: color-mix(in srgb, var(--vc) 38%, transparent); }
button.cal__day.is-past { opacity: 0.45; box-shadow: none; }
button.cal__day.is-selected { outline: 2px solid var(--white); outline-offset: 2px; }
.cal__day--split { background: linear-gradient(135deg, color-mix(in srgb, var(--vc) 32%, transparent) 50%, color-mix(in srgb, var(--vc2) 32%, transparent) 50%); }
.cal__day .has-flyer {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--vc); box-shadow: 0 0 10px var(--vc); }
.legend .flyer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }

.cal__detail h3 { margin: 0 0 14px; font-family: var(--font-display); font-size: 18px; }
.editions { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.edition {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-line);
  border-left: 4px solid var(--vc);
  background: rgba(255, 255, 255, 0.04);
}
.edition.is-past { opacity: 0.55; }
.edition__date { min-width: 64px; font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.15; }
.edition__date small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--ink-mute); text-transform: capitalize; }
.edition__info b { display: block; font-size: 15px; }
.edition__info span { font-size: 13.5px; color: var(--ink-soft); }
.edition__thumb { width: 52px; border-radius: 8px; border: 1px solid var(--glass-line); cursor: zoom-in; overflow: hidden; padding: 0; background: none; transition: transform 0.2s; }
.edition__thumb:hover { transform: scale(1.06); }
.edition__thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--lime);
}
.tag--past { background: rgba(255, 255, 255, 0.25); color: var(--white); }
.tag--live { background: var(--yellow); }
.agenda-link { display: inline-flex; margin-top: 18px; font-size: 14px; color: var(--cyan); }

/* ---------- 11. Carrusel de ediciones ---------- */
.carousel { position: relative; }
.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding: 24px 0 30px;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track { display: flex; gap: clamp(14px, 2vw, 22px); width: max-content; padding-inline: 6vw; }
.flyer-card {
  flex: none;
  width: clamp(200px, 22vw, 270px);
  scroll-snap-align: center;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
  perspective: 800px;
}
.flyer-card__img {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8), 0 0 0 0 rgba(255, 30, 210, 0);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s;
}
.flyer-card__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--night-2); }
.flyer-card:hover .flyer-card__img,
.flyer-card:focus-visible .flyer-card__img {
  transform: translateY(-10px) rotateY(-8deg) rotateX(4deg) scale(1.04);
  box-shadow: 0 34px 60px -20px rgba(0, 0, 0, 0.8), 0 0 40px -6px rgba(255, 30, 210, 0.7);
}
.flyer-card__cap { display: grid; gap: 2px; margin-top: 12px; padding-inline: 4px; }
.flyer-card__cap b { font-size: 15px; }
.flyer-card__cap span { font-size: 13.5px; color: var(--ink-soft); }
.flyer-card .tag { position: absolute; left: 10px; top: 10px; }
.carousel__controls { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.carousel__controls .icon-btn { width: 48px; height: 48px; border-radius: 50%; }

/* ---------- 12. Visor de flyers (dialog) ---------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 1, 16, 0.92);
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(4, 1, 16, 0.6); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  height: 100%;
  padding: 14px var(--gutter) 18px;
}
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox__bar p { margin: 0; font-weight: 600; }
.lightbox__bar small { display: block; color: var(--ink-soft); font-weight: 400; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; }
.lightbox__stage img {
  max-width: 100%;
  /* alto disponible: pantalla menos barra superior y botones inferiores */
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(255, 30, 210, 0.5);
  animation: pop 0.35s var(--ease-out);
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; border-radius: 50%; background: rgba(7, 2, 26, 0.7); }
.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }
.lightbox__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- 13. Sedes ---------- */
.venues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.venue { display: grid; align-content: start; gap: 12px; padding: 26px 24px; border-top: 4px solid var(--vc); }
.venue h3 { font-size: 20px; }
.venue address { font-style: normal; color: var(--ink-soft); font-size: 15px; }
.venue__meta { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--ink-soft); }
.venue__meta b { color: var(--white); }
.venue__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.venue__dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.venue__dates li { padding: 5px 10px; border-radius: 999px; font-size: 13px; background: color-mix(in srgb, var(--vc) 20%, transparent); border: 1px solid color-mix(in srgb, var(--vc) 50%, transparent); }
.venue__dates li.is-past { opacity: 0.45; }

/* ---------- 14. Formularios ---------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px -30px rgba(186, 32, 217, 0.6);
}
.field { display: grid; gap: 6px; }
.field--full, .form > .btn, .form__note, .form__legal { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.field label .opt { font-weight: 400; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 2, 26, 0.55);
  color: var(--white);
  font: 400 16px/1.4 var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--night-2); }
.field input::placeholder, .field textarea::placeholder { color: rgba(201, 191, 234, 0.5); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(255, 30, 210, 0.2); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--ember); box-shadow: 0 0 0 4px rgba(255, 90, 54, 0.2); }
.field__error { min-height: 1em; font-size: 13px; color: #ff9a82; }
.form__note { margin: 0; min-height: 1.4em; color: var(--yellow); font-size: 14px; text-align: center; }
.form__legal { margin: 0; font-size: 13px; color: var(--ink-mute); text-align: center; }
.form__legal a { color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 15. Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.channels { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.channel { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-decoration: none; }
.channel .icon-tile { width: 50px; height: 50px; margin: 0; border-radius: 15px; flex: none; }
.channel .icon-tile svg { fill: var(--white); stroke: none; width: 24px; height: 24px; }
.channel b { display: block; font-size: 16px; }
.channel span { font-size: 14px; color: var(--ink-soft); }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(57, 255, 136, 0.22), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(255, 30, 210, 0.3), transparent 50%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-line);
}
.cta-band h2, .cta-band h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 28px); }
.cta-band p { margin: 0; color: var(--ink-soft); max-width: 560px; }

/* ---------- 16. Páginas internas ---------- */
.page-hero { padding: calc(var(--nav-h) + clamp(40px, 7vw, 90px)) 0 clamp(20px, 4vw, 40px); }
.breadcrumbs { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ink-mute); }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; }
.breadcrumbs a { color: var(--ink-soft); }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-display); font-size: 22px; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { color: var(--cyan); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks li::before {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 30, 210, 0.6);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat, var(--grad-wing);
}
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.steps { counter-reset: step; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad-hot); font-family: var(--font-display); font-weight: 700; }
.steps b { display: block; }
.steps span { color: var(--ink-soft); font-size: 15px; }

/* ---------- 17. Pie ---------- */
.footer {
  padding: 56px var(--gutter) 40px;
  border-top: 1px solid var(--glass-line);
  background: linear-gradient(transparent, rgba(186, 32, 217, 0.14));
  color: var(--ink-soft);
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; width: min(100%, var(--maxw)); margin: 0 auto; }
.footer__brand img { width: 84px; filter: drop-shadow(0 0 20px rgba(255, 30, 210, 0.5)); margin-bottom: 8px; }
.footer__brand p { margin: 0; }
.footer__brand em { font-family: var(--font-script); font-style: normal; font-size: 1.6em; color: var(--white); }
.footer h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer__legal { width: min(100%, var(--maxw)); margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--glass-line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-mute); }

/* ---------- 18. Utilidades ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  translate: -50% calc(100% + 40px);
  visibility: hidden;
  max-width: calc(100% - 32px);
  padding: 14px 22px;
  border-radius: 16px;
  background: rgba(14, 5, 48, 0.95);
  border: 1px solid rgba(255, 30, 210, 0.5);
  box-shadow: 0 10px 40px -10px rgba(255, 30, 210, 0.7);
  font-weight: 600;
  transition: translate 0.45s cubic-bezier(0.3, 1.4, 0.5, 1), visibility 0.45s;
}
.toast.is-on { translate: -50% 0; visibility: visible; }
.mt-lg { margin-top: clamp(28px, 4vw, 44px); }

/* ---------- 19. Responsivo y rendimiento ---------- */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .venues { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    top: calc(var(--nav-h) + 4px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(14, 5, 48, 0.97);
    border: 1px solid var(--glass-line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a:not(.btn) { display: block; padding: 12px 14px; font-size: 17px; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { width: 100%; margin-top: 8px; }
  .contact, .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .next-edition { grid-template-columns: auto 1fr; }
  .next-edition .btn { grid-column: 1 / -1; }
  .edition { grid-template-columns: auto 1fr; }
  .edition__thumb { grid-column: 2; width: 64px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .footer__grid { grid-template-columns: 1fr; }
}
/* Celulares y pantallas táctiles: menos efectos costosos para la GPU */
@media (max-width: 860px), (hover: none) {
  .aurora { mix-blend-mode: normal; filter: blur(50px); }
  .aurora--3, .aurora--4 { display: none; }
  .hero__aura span { filter: blur(30px); mix-blend-mode: normal; }
  .hero__aura .glow-yellow { display: none; }
  .card, .form, .nav.is-scrolled, .nav--solid, .btn--ghost {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .card { background: linear-gradient(160deg, rgba(48, 22, 100, 0.92), rgba(22, 8, 60, 0.92)); }
  .form { background: rgba(22, 8, 60, 0.94); }
  .nav.is-scrolled, .nav--solid { background: rgba(7, 2, 26, 0.95); }
}

/* ---------- 20. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Botón con apariencia de texto (fechas por sede) */
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}
.linkish:hover { text-decoration-color: var(--white); }
.venue__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.25; }

/* Galería de flyers (páginas de sede) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 22px; }
.gallery .flyer-card { width: auto; text-decoration: none; }
a.flyer-card { display: block; color: inherit; }
.venue__dates + .venue__actions, .venue__actions .btn { flex: none; }
