/*
 * YAYA — Sitio independiente (rediseño v2)
 *
 * Identidad: morado #4A2D87, rojo #DD0024 y blanco, tomados del logo.
 * Tipografías alojadas en el propio sitio (assets/fonts): Baloo 2 para títulos
 * (redonda y amable, como el logo) y Figtree para texto.
 * Idea visual: las promociones son "tickets" con perforación, igual que el ticket
 * que se canjea en la Zona HAM.
 *
 * created & helped by gpt, jb & a friend
 */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/baloo-2-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/baloo-2-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
}

:root {
  --purple: #4A2D87;
  --red: #DD0024;

  --bg: #ffffff;
  --bg-alt: #f6f2fb;
  --card: #ffffff;
  --text: #28232d;
  --muted: #5f5766;
  --line: rgba(74, 45, 135, .16);
  --heading: #3a2370;
  --link: #4A2D87;
  --red-text: #c40021;
  --btn: #4A2D87;
  --btn-hover: #3b216f;
  --nav-bg: rgba(255, 255, 255, .92);
  --focus: #6d4bc4;

  --font-head: "Baloo 2", "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shell: 1180px;
}

:root[data-theme="dark"] {
  --bg: #15131b;
  --bg-alt: #1d1a26;
  --card: #252230;
  --text: #f4eff7;
  --muted: #bcb4c6;
  --line: rgba(203, 188, 255, .18);
  --heading: #d9ceff;
  --link: #cfc2ff;
  --red-text: #ff6b82;
  --btn: #6d4bc4;
  --btn-hover: #7d5ad8;
  --nav-bg: rgba(21, 19, 27, .92);
  --focus: #cfc2ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body.yaya-site {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.05; margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.shell { max-width: var(--shell); margin: 0 auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #fff; color: var(--purple); font-weight: 800;
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: 14px;
  font: 800 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-wa { background: #12904b; color: #fff; }
.btn-wa:hover { background: #0e7a40; }
.btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .75); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-outline { border-color: var(--btn); color: var(--link); background: transparent; }
.btn-outline:hover { background: var(--bg-alt); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(88vh, 780px); display: flex; color: #fff;
}
.hero-bg, .hero-bg img, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 60% 45%; }
.hero-shade {
  z-index: -1;
  background:
    linear-gradient(95deg, rgba(34, 17, 70, .95) 0%, rgba(53, 30, 104, .84) 42%, rgba(74, 45, 135, .30) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .28) 100%);
}
:root[data-theme="dark"] .hero-shade {
  background:
    linear-gradient(95deg, rgba(21, 11, 45, .97) 0%, rgba(37, 20, 74, .90) 42%, rgba(52, 31, 96, .50) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35) 100%);
}
.hero-inner {
  width: 100%; max-width: calc(var(--shell) + 48px); margin: 0 auto;
  padding: 24px 24px 72px; display: flex; flex-direction: column;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .34);
  color: #fff; border-radius: 999px; text-decoration: none; cursor: pointer;
  font: 700 .92rem/1 var(--font-body); backdrop-filter: blur(6px);
  transition: background-color .2s ease;
}
.pill:hover { background: rgba(255, 255, 255, .24); }
.pill svg { width: 18px; height: 18px; flex: none; }
.hero :focus-visible { outline-color: #fff; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

.hero-copy { margin-top: auto; padding-top: 56px; max-width: 660px; }
.hero-logo { display: block; width: 96px; height: auto; margin-bottom: 18px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); letter-spacing: -.01em; text-wrap: balance; }
.hero-lead { margin: 18px 0 28px; font-size: 1.2rem; line-height: 1.55; color: #f3edfb; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: #efe8fb; font-weight: 600; }
.hero-facts li { display: flex; align-items: center; gap: 10px; }
.hero-facts svg { width: 22px; height: 22px; flex: none; color: #ff8fa0; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--nav-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: calc(var(--shell) + 48px); margin: 0 auto; padding: 6px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: -12px; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  white-space: nowrap; text-decoration: none; font-weight: 700; font-size: .95rem;
  color: var(--link); padding: 11px 12px; border-radius: 10px;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--red-text); }

/* ---------- Secciones ---------- */
.section { padding: 84px 24px; background: var(--bg); }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(2rem, 4.4vw, 2.9rem); color: var(--heading); margin-bottom: 32px; }

/* ---------- Promociones (tickets) ---------- */
.tickets {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.ticket {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 168px 1fr; min-height: 176px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: 168px; width: 22px; height: 22px; margin-left: -11px;
  border-radius: 50%; background: var(--bg); border: 1px solid var(--line); z-index: 2;
}
.ticket::before { top: -11px; }
.ticket::after { bottom: -11px; }
.ticket-stub {
  position: relative; display: grid; place-items: center; padding: 0; border: 0;
  background: linear-gradient(145deg, #4A2D87, #6a49ae); color: #fff; font: inherit;
}
.ticket-stub svg { width: 56px; height: 56px; opacity: .92; }
button.ticket-stub { cursor: zoom-in; }
.ticket-stub img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ticket-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 22px 26px 22px 30px; border-left: 2px dashed var(--line);
}
.ticket-body h3 { font-size: clamp(1.45rem, 3vw, 1.75rem); color: var(--red-text); }
.ticket-body p { margin: 0; color: var(--muted); }
.vigencia {
  margin-top: auto; padding: 4px 14px; border-radius: 999px;
  background: var(--bg-alt); color: var(--text); font-size: .88rem; font-weight: 700;
}
.estado {
  grid-column: 1 / -1; margin: 0; padding: 28px; border: 2px dashed var(--line); border-radius: 20px;
  color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
}

/* ---------- Zona HAM ---------- */
.ham {
  display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.6fr);
  background: linear-gradient(135deg, #3f2478, #5e3da3); color: #fff;
  border-radius: 28px; overflow: hidden; box-shadow: 0 18px 44px rgba(42, 24, 80, .25);
}
:root[data-theme="dark"] .ham { background: linear-gradient(135deg, #2d1a5a, #4a2d87); box-shadow: none; border: 1px solid var(--line); }
.ham-brand { display: grid; place-items: center; padding: 40px; background: rgba(0, 0, 0, .16); }
.ham-brand img { width: min(100%, 260px); height: auto; border-radius: 16px; background: #fff; padding: 12px; }
.ham-body { padding: 44px 48px; }
.section .ham-body h2 { color: #fff; margin-bottom: 12px; }
.ham-condicion { margin: 0 0 22px; font-size: 1.25rem; color: #f6efff; }
.ham-condicion strong { font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; line-height: 1; color: #fff; }
.ham-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ham-list li { position: relative; padding-left: 42px; color: #f6efff; }
.ham-list li::before {
  content: "\2713"; position: absolute; left: 0; top: 1px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: #fff; font-weight: 900; font-size: .95rem;
}
.ham-nota {
  display: flex; align-items: center; gap: 14px; margin: 26px 0 0; padding: 14px 18px;
  border: 2px dashed rgba(255, 255, 255, .45); border-radius: 14px; background: rgba(255, 255, 255, .1); font-weight: 700;
}
.ham-nota svg { width: 28px; height: 28px; flex: none; }

/* ---------- Galería ---------- */
.galeria { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.foto {
  display: block; padding: 0; border: 0; height: 420px; cursor: zoom-in;
  border-radius: 22px; overflow: hidden; background: var(--bg-alt);
}
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Ubicación ---------- */
.ubicacion { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 44px; align-items: center; }
.direccion { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.8rem; line-height: 1.15; color: var(--heading); }
.direccion-linea { margin: 8px 0 28px; font-size: 1.1rem; color: var(--muted); }
.mapa { height: 380px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.mapa iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Redes ---------- */
.redes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.red {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  color: var(--text); text-decoration: none; transition: border-color .2s ease;
}
.red:hover { border-color: var(--btn); }
.red-icono { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #1877f2; color: #fff; }
.red-icono svg { width: 30px; height: 30px; }
.red-texto strong { display: block; font-size: 1.12rem; color: var(--heading); line-height: 1.25; }
.red-texto span { color: var(--muted); font-size: .96rem; }
.red-cta { padding: 8px 18px; border: 2px solid var(--btn); border-radius: 999px; color: var(--link); font-weight: 800; white-space: nowrap; }

/* ---------- Pie ---------- */
.footer { background: #2a1850; color: #fff; padding: 38px 24px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-marca { display: flex; align-items: center; gap: 14px; }
.footer-marca img { width: 48px; height: 48px; }
.footer-marca strong { display: block; }
.footer-marca span { display: block; font-size: .92rem; color: #d9cff0; }
.footer-links { display: flex; gap: 22px; margin: 0; font-weight: 700; }
.footer-links a { color: #fff; }

/* ---------- WhatsApp flotante (solo celular) ---------- */
.wa-float { display: none; }

/* ---------- Visor de imágenes ---------- */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; padding: 24px; border: 0; background: transparent; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 8, 16, .88); }
.lightbox img { max-width: min(1200px, 94vw); max-height: 88vh; object-fit: contain; border-radius: 12px; }
.lightbox-close {
  position: fixed; top: 16px; right: 18px; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }
.lightbox :focus-visible { outline-color: #fff; }

/* ---------- Adaptación a pantallas ---------- */
@media (max-width: 900px) {
  .ham { grid-template-columns: 1fr; }
  .ham-brand { padding: 28px; }
  .ham-body { padding: 32px 26px; }
  .galeria, .ubicacion, .redes { grid-template-columns: 1fr; }
  .ubicacion { gap: 28px; }
  .foto { height: 300px; }
}
@media (max-width: 720px) {
  .nav-inner > .btn { display: none; }
  .nav-links { margin-left: -12px; }
  .section { padding: 60px 18px; }
  .hero-inner { padding: 18px 18px 52px; }
  .hero-copy { padding-top: 40px; }
  .hero-shade {
    background: linear-gradient(180deg, rgba(34, 17, 70, .80) 0%, rgba(34, 17, 70, .90) 100%);
  }
  :root[data-theme="dark"] .hero-shade { background: linear-gradient(180deg, rgba(21, 11, 45, .88) 0%, rgba(21, 11, 45, .94) 100%); }
  .hero-actions .btn { flex: 1 1 100%; }
  .wa-float {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 40;
    right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding: 12px 18px; border-radius: 999px; background: #12904b; color: #fff;
    font-weight: 800; text-decoration: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  }
  .wa-float svg { width: 24px; height: 24px; }
  .footer { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .ticket { grid-template-columns: 1fr; grid-template-rows: 150px auto; }
  .ticket::before, .ticket::after { top: 150px; bottom: auto; margin-left: 0; margin-top: -11px; }
  .ticket::before { left: -11px; }
  .ticket::after { left: auto; right: -11px; }
  .ticket-body { border-left: 0; border-top: 2px dashed var(--line); padding: 22px 22px 22px; }
  .red { grid-template-columns: auto 1fr; }
  .red-cta { grid-column: 1 / -1; text-align: center; }
  .direccion { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
