/* ==========================================================================
   SISTEMA DE DISEÑO GLOBAL - Cine House Costa Rica  (se carga en TODAS las páginas)
   Animaciones ligeras: solo transform / opacity / clip-path (nada de blur ni filtros).
   Sin JS (o con prefers-reduced-motion) todo el contenido queda visible.
   Motor de animación: static/js/site.js
   ========================================================================== */

html.ab-js { scroll-behavior: smooth; }
:root { --ab-gold: #fbbf24; --ab-gold-soft: #fcd34d; --ab-line: #27272a; }

/* ---------- Reveal genérico ---------- */
.ab-js .reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.ab-js .reveal--left  { transform: translate3d(-48px, 0, 0); }
.ab-js .reveal--right { transform: translate3d(48px, 0, 0); }
.ab-js .reveal--scale { transform: scale(.94); }
.ab-js .reveal.is-in  { opacity: 1; transform: none; }

/* Titulares palabra por palabra */
.ab-js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; }
.ab-js [data-split] .w > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 70ms + var(--d, 0s));
}
.ab-js [data-split].is-in .w > span { transform: none; }

/* Imagen que se "abre" con clip-path */
.ab-js .ab-clip { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1); }
.ab-js .ab-clip.is-in { clip-path: inset(0 0 0 0); }
.ab-js .ab-clip > img { transform: scale(1.25); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.ab-js .ab-clip.is-in > img { transform: scale(1); }

.ab-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ab-gold); font-size: 11px; font-weight: 800;
  letter-spacing: .35em; text-transform: uppercase;
}
.ab-eyebrow::before, .ab-eyebrow::after { content: ""; width: 32px; height: 1px; background: rgba(251, 191, 36, .6); }
.ab-eyebrow--left::after { display: none; }

.ab-outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(251, 191, 36, .35);
  font-weight: 900; line-height: .85; letter-spacing: -.02em;
  user-select: none;
}

.ab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 2px; text-decoration: none;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ab-btn--gold { background: var(--ab-gold); color: #18181b; }
.ab-btn--gold:hover { background: var(--ab-gold-soft); }
.ab-btn--line { border: 1px solid #3f3f46; color: #fff; }
.ab-btn--line:hover { border-color: var(--ab-gold); color: var(--ab-gold); }

/* ---------- Hero (compartido) ---------- */
.ab-hero { position: relative; overflow: hidden; background: #09090b; display: flex; align-items: center; justify-content: center; text-align: center; }
.ab-hero__bg { position: absolute; inset: -12% 0; transform: translate3d(0, var(--py, 0px), 0); }
.ab-hero__bg > div {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: ab-kenburns 24s ease-in-out infinite alternate;
}
.ab-hero__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.35) 40%, #09090b 100%); }
.ab-hero__inner { position: relative; z-index: 2; padding: 0 24px; max-width: 64rem; }
@keyframes ab-kenburns { from { transform: scale(1.04); } to { transform: scale(1.16); } }

.ab-cue { position: absolute; left: 50%; bottom: 28px; z-index: 3; width: 22px; height: 38px; margin-left: -11px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; }
.ab-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ab-gold); animation: ab-cue 1.8s ease-in-out infinite; }
@keyframes ab-cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }


/* CTA final */
.ab-cta { max-width: 56rem; margin: 0 auto; padding: 7rem 24px 8rem; text-align: center; }
.ab-cta h2 { margin: 1rem 0 0; font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.ab-cta p { margin: 1rem auto 0; max-width: 34rem; font-size: 14px; line-height: 1.7; font-weight: 300; color: #a1a1aa; }
.ab-cta__row { margin-top: 2.2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- Titulares de portada ---------- */
.ab-h1 {
  margin: 1.5rem 0 0; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
  line-height: .98; color: #fff; font-size: clamp(2.2rem, 7vw, 5.5rem);
  text-shadow: 0 6px 30px rgba(0, 0, 0, .5);
}
.ab-hero--sm { min-height: 44vh; }
.ab-hero--sm .ab-h1 { font-size: clamp(2rem, 5.5vw, 4rem); }
.ab-hero--sm .ab-hero__inner { padding-top: 56px; padding-bottom: 56px; }
.ab-hero__sub { margin: 1.4rem auto 0; max-width: 36rem; font-size: 15px; font-weight: 300; line-height: 1.7; color: #d4d4d8; }

/* ---------- Encabezado de sección ---------- */
.ab-head { text-align: center; max-width: 44rem; margin: 0 auto 3.5rem; }
.ab-head h2 { margin: 1.1rem 0 0; font-size: clamp(1.8rem, 4.6vw, 3.2rem); font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: #fff; line-height: 1.05; }
.ab-head p { margin: 1rem auto 0; max-width: 34rem; font-size: 14px; line-height: 1.7; font-weight: 300; color: #a1a1aa; }
.ab-wrap { max-width: 80rem; margin: 0 auto; padding: 6rem 24px; }
.ab-wrap--tight { padding-top: 3.5rem; padding-bottom: 5rem; }

/* ---------- Entrada CSS (para contenido que Alpine inserta dinámicamente) ---------- */
@keyframes ab-rise { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
.rise { animation: ab-rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(min(var(--i, 0), 8) * 70ms); }

/* ---------- Tarjetas, filtros y fichas ---------- */
.ab-card { background: #0c0c0e; border: 1px solid var(--ab-line); transition: border-color .25s ease, translate .25s ease; }
.ab-card:hover { border-color: rgba(251, 191, 36, .6); translate: 0 -4px; }   /* 'translate' no choca con el 'transform' del reveal */
.ab-js .ab-card.reveal {
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1), border-color .25s ease, translate .25s ease;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s;
}

.ab-pill {
  padding: 9px 18px; border: 1px solid var(--ab-line); border-radius: 999px; background: #0c0c0e; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a1a1aa;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.ab-pill:hover { color: #fff; border-color: #52525b; }
.ab-pill.is-on { background: var(--ab-gold); border-color: var(--ab-gold); color: #18181b; }

.ab-tile { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--ab-line); background: #111113; color: #fff; text-decoration: none; }
.ab-tile__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.ab-tile:hover .ab-tile__bg { transform: scale(1.08); }
.ab-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .15) 60%); }
.ab-tile__num { position: absolute; top: 14px; left: 18px; z-index: 2; font-size: 3.2rem; }
.ab-tile__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ab-tile__title { font-size: 1.05rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; transition: color .2s ease; }
.ab-tile:hover .ab-tile__title { color: var(--ab-gold); }
.ab-tile__go { flex: none; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background-color .25s ease, color .25s ease, transform .25s ease; }
.ab-tile:hover .ab-tile__go { background: var(--ab-gold); color: #18181b; border-color: var(--ab-gold); transform: translateX(4px); }
.ab-tile__go svg { width: 16px; height: 16px; }

/* ---------- Modales (sin blur: animar backdrop-filter es muy costoso) ---------- */
.ab-modal-bg { background: rgba(0, 0, 0, .88); }

/* ---------- Formularios ---------- */
.ab-field { display: block; width: 100%; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1px solid #3f3f46; padding: 14px 4px; color: #fff; font: inherit; font-size: 14px; border-radius: 0; transition: border-color .2s ease; }
.ab-field:focus { outline: none; border-color: var(--ab-gold); }
.ab-field::placeholder { color: #71717a; }
.ab-formdark input:not([type="checkbox"]):not([type="file"]), .ab-formdark select, .ab-formdark textarea {
  width: 100%; box-sizing: border-box; background: #0c0c0e; border: 1px solid var(--ab-line); color: #fff; padding: 12px 14px; font: inherit; font-size: 14px; border-radius: 2px;
}
.ab-formdark input:focus, .ab-formdark select:focus, .ab-formdark textarea:focus { outline: none; border-color: var(--ab-gold); }
.ab-formdark .errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: #f87171; font-size: 12px; }
.ab-formdark input[type="file"] { color: #a1a1aa; font-size: 12px; }

/* ---------- Éxito animado (check dibujado) ---------- */
.ab-check { width: 88px; height: 88px; display: block; margin: 0 auto; }
.ab-check circle { fill: none; stroke: var(--ab-gold); stroke-width: 3; stroke-dasharray: 190; stroke-dashoffset: 190; animation: ab-draw .8s ease-out .1s forwards; }
.ab-check path { fill: none; stroke: var(--ab-gold); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: ab-draw .5s ease-out .7s forwards; }
@keyframes ab-draw { to { stroke-dashoffset: 0; } }
.ab-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ab-line); border: 1px solid var(--ab-line); margin-top: 2.5rem; text-align: left; }
.ab-steps > div { background: #0c0c0e; padding: 20px; }
.ab-steps b { display: block; font-size: 2rem; }
.ab-steps span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.6; color: #a1a1aa; }

/* ---------- Pie de página ---------- */
.ft-link { position: relative; display: inline-block; color: #a1a1aa; text-decoration: none; font-size: 13px; padding: 3px 0; transition: color .2s ease; }
.ft-link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--ab-gold); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.ft-link:hover { color: var(--ab-gold); }
.ft-link:hover::after { transform: scaleX(1); }
.ft-title { margin: 0 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: var(--ab-gold); }

@media (max-width: 640px) { .ab-steps { grid-template-columns: 1fr; } }


/* Cifras */
.jr-stats { border-top: 1px solid var(--ab-line); border-bottom: 1px solid var(--ab-line); background: linear-gradient(180deg, rgba(24,24,27,.4), rgba(24,24,27,.9)); }
.jr-stats__grid { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); }
.jr-stat { padding: 3.5rem 12px; text-align: center; border-left: 1px solid var(--ab-line); }
.jr-stat:first-child { border-left: 0; }
.jr-stat b { display: block; font-size: clamp(2.2rem, 7vw, 4.5rem); font-weight: 900; line-height: 1; background: linear-gradient(180deg, #fde68a, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.jr-stat span { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #a1a1aa; }


/* Teaser de locations */
.jr-places { max-width: 80rem; margin: 0 auto; padding: 7rem 24px 2rem; }
.jr-places__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 3rem; }
.jr-place { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--ab-line); text-decoration: none; color: #fff; }
.jr-place img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.jr-place:hover img { transform: scale(1.08); }
.jr-place::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.1) 60%); }
.jr-place__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px; }
.jr-place__body small { display: block; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ab-gold); }
.jr-place__body strong { display: block; margin-top: 4px; font-size: 1.4rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.jr-place__body span { display: inline-block; margin-top: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #d4d4d8; transition: color .2s ease, transform .2s ease; }
.jr-place:hover .jr-place__body span { color: var(--ab-gold); transform: translateX(4px); }


@keyframes ab-marquee { to { transform: translate3d(-50%, 0, 0); }
@keyframes ab-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ab-hero { min-height: 62vh; }
.ab-hero.ab-hero--sm { min-height: 44vh; }
@media (max-width: 768px) {
  .jr-places__grid { grid-template-columns: 1fr; }
  .jr-place { aspect-ratio: 16 / 10; }
  .jr-stat { padding: 2.2rem 4px; }
  .ab-js .reveal--left, .ab-js .reveal--right { transform: translate3d(0, 32px, 0); }
}

/* ---------- Movimiento reducido (parte global) ---------- */
@media (prefers-reduced-motion: reduce) {
  html.ab-js { scroll-behavior: auto; }
  .ab-js .reveal, .ab-js [data-split] .w > span, .ab-js .ab-clip, .ab-js .ab-clip > img { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .rise { animation: none !important; }
  .ab-hero__bg > div, .ab-cue::after { animation: none !important; }
  .ab-check circle, .ab-check path { animation: none !important; stroke-dashoffset: 0 !important; }
}
