/* La Taquillera — sistema de marca compartido (sitio, app, kiosko, cocina, panel)
   Concepto: la taquilla de cine. Fachada negra, trompo rojo en neón, cinta de película,
   luz cálida de los focos de marquesina y el pasto verde de su fachada. */
:root {
  --fachada: #0f0f10;      /* negro de la fachada */
  --fachada-2: #17171a;
  --fachada-3: #222226;
  --linea: #2e2e33;
  --trompo: #e3262f;       /* rojo del logo */
  --trompo-hondo: #9e1219;
  --brasa: #ff5a2a;
  --foco: #ffc56a;         /* foco de marquesina */
  --foco-suave: #ffe2a8;
  --pasto: #3c9a5f;        /* pasto de la fachada: "abierto", éxito */
  --boleto: #f6efe3;       /* papel de boleto */
  --tinta: #1b1612;
  --txt: #f4f1ec;
  --txt-2: #b9b3aa;
  --txt-3: #7f7a73;
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --sombra: 0 24px 60px -20px rgba(0,0,0,.8);
  --brillo-rojo: 0 0 0 1px rgba(227,38,47,.35), 0 10px 40px -8px rgba(227,38,47,.55);
  --f-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --f-texto: 'Figtree', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --resorte: cubic-bezier(.34,1.56,.64,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fachada); color: var(--txt); font-family: var(--f-texto); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.display { font-family: var(--f-display); font-weight: 900; letter-spacing: .01em; line-height: .9; text-transform: uppercase; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo: trompo dentro del aro de cinta de película */
.logo-aro { width: 44px; height: 44px; flex: none; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 0; border-radius: 999px; padding: .85rem 1.4rem; font-weight: 700; background: var(--fachada-3); color: var(--txt); transition: transform .2s var(--resorte), background .2s, box-shadow .25s; text-decoration: none; white-space: nowrap; }
.boton:active { transform: scale(.96); }
.boton.rojo { background: var(--trompo); color: #fff; box-shadow: var(--brillo-rojo); }
.boton.rojo:hover { background: #f03a42; }
.boton.foco { background: var(--foco); color: var(--tinta); }
.boton.contorno { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linea); }
.boton.contorno:hover { box-shadow: inset 0 0 0 1.5px var(--txt-3); }
.boton.grande { padding: 1.05rem 1.6rem; font-size: 1.05rem; }
.boton:disabled { opacity: .45; pointer-events: none; }

/* Focos de marquesina: borde de puntos encendidos que recorren */
.marquesina { position: relative; }
.marquesina::before { content: ''; position: absolute; inset: -10px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle, var(--foco) 0 2.2px, transparent 3px) 0 0 / 18px 18px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 6px;
  filter: drop-shadow(0 0 4px rgba(255,197,106,.9)); animation: focos 1.6s steps(2) infinite; }
@keyframes focos { 50% { background-position: 9px 0; } }

/* Perforación de boleto */
.boleto { background: var(--boleto); color: var(--tinta); border-radius: var(--r-l); position: relative; }
.boleto .corte { position: absolute; left: -1px; right: -1px; height: 0; border-top: 2px dashed rgba(27,22,18,.2); }
.boleto .corte::before, .boleto .corte::after { content: ''; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--fachada); }
.boleto .corte::before { left: -13px; } .boleto .corte::after { right: -13px; }

/* Cinta de película (decorativa) */
.cinta { height: 22px; background: #050505; position: relative; overflow: hidden; }
.cinta::before { content: ''; position: absolute; inset: 5px 0; background: repeating-linear-gradient(90deg, transparent 0 8px, #2b2b2f 8px 20px); border-radius: 2px; animation: rueda 14s linear infinite; }
@keyframes rueda { to { transform: translateX(-200px); } }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--txt); color: var(--tinta); padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; box-shadow: var(--sombra); display: flex; gap: .5rem; align-items: center; animation: toast 3.2s var(--ease) forwards; max-width: calc(100vw - 32px); }
.toast.error { background: var(--trompo); color: #fff; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.96); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ===== Tema claro: papel de boleto, tinta café y el mismo rojo del trompo ===== */
html[data-tema="claro"] {
  --fachada: #faf6ef; --fachada-2: #ffffff; --fachada-3: #f2ebe0; --linea: #e5ddcf;
  --txt: #1d1813; --txt-2: #5c534a; --txt-3: #8b8278; --tinta: #1d1813;
  --foco: #b8730f; --foco-suave: #8a5408;
  --sombra: 0 18px 44px -22px rgba(60,40,20,.35);
  --brillo-rojo: 0 0 0 1px rgba(227,38,47,.25), 0 10px 30px -10px rgba(227,38,47,.45);
  color-scheme: light;
}
html[data-tema="oscuro"] { color-scheme: dark; }
html.tema-transicion, html.tema-transicion * { transition: background-color .4s, color .4s, border-color .4s !important; }
.btn-tema { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linea); background: var(--fachada-2); color: var(--txt); display: grid; place-items: center; transition: transform .25s var(--resorte), background .2s; }
.btn-tema:hover { transform: rotate(-18deg) scale(1.06); }
.btn-tema.flotante { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; box-shadow: var(--sombra); }
/* Ajustes puntuales del tema claro (las fotos conservan texto blanco) */
html[data-tema="claro"] .cabeza, html[data-tema="claro"] .categorias { background: rgba(250,246,239,.9); }
html[data-tema="claro"] .cabeza { background: linear-gradient(var(--fachada) 55%, rgba(250,246,239,0)); }
html[data-tema="claro"] .tabs { background: rgba(255,255,255,.9); border-top: 1px solid var(--linea); }
html[data-tema="claro"] .nav.solida { background: rgba(250,246,239,.9); }
html[data-tema="claro"] .hero-fondo::after { background: linear-gradient(90deg, rgba(250,246,239,.96) 0%, rgba(250,246,239,.7) 45%, rgba(250,246,239,.1) 75%), linear-gradient(0deg, var(--fachada) 0%, transparent 30%); }
html[data-tema="claro"] .hero-titulo .letra { color: rgba(29,24,19,.1); }
html[data-tema="claro"] .hero-titulo .letra.encendida { color: var(--txt); text-shadow: 0 0 22px rgba(227,38,47,.25); }
html[data-tema="claro"] .aviso-ahorro .barra, html[data-tema="claro"] .semanas i { background: rgba(29,24,19,.08); }
html[data-tema="claro"] .velo { background: rgba(40,28,18,.45); }
html[data-tema="claro"] .mas { background: var(--tinta); color: #fff; }
html[data-tema="claro"] .boton-icono { background: var(--fachada-3); }
html[data-tema="claro"] .leaflet-tile-pane { filter: none !important; }
[hidden] { display: none !important; }
html[data-tema="claro"] .cat.activa, html[data-tema="claro"] .segmento button.activo, html[data-tema="claro"] .toast:not(.error) { color: #fff; }
body.sin-red::after { content: "Sin conexión · seguimos con lo último y reintentamos solos"; position: fixed; top: 0; left: 0; right: 0; z-index: 200; text-align: center; padding: 6px 10px; background: #d48a0f; color: #1b1612; font: 800 .8rem var(--f-texto, system-ui); }
.fac-v4 .btn-tema.flotante { top: 16px; right: 16px; left: auto; bottom: auto; }
.toast { border-radius: 18px !important; max-width: min(360px, calc(100vw - 32px)) !important; line-height: 1.35; }
