/* =========================================================================
   Rubén Blades en vivo · Guayaquil — evento privado
   Paleta oscura con acento ámbar; tipografía display condensada.
   ========================================================================= */

:root {
  --bg: #08060c;
  --bg-2: #0d0a14;
  --ink: #f4f1ea;
  --muted: #9a94a6;
  --line: rgba(244, 241, 234, 0.14);

  --gold: #e8b04b;
  --gold-hi: #ffd27a;
  --crimson: #b02a3a;

  --wa: #25d366;

  --shell: min(1180px, calc(100% - 40px));
  --r: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; }

::selection { background: var(--gold); color: #14100a; }

.wrap { width: var(--shell); margin: 0 auto; }
.wrap--narrow { width: min(760px, calc(100% - 40px)); }

/* ---------- Grano global: textura fina sobre todo el documento ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter>\
<rect width='160' height='160' filter='url(%23n)' opacity='0.55'/></svg>");
  animation: grain 700ms steps(3) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2%, 1%); }
  66%  { transform: translate(1%, -2%); }
  100% { transform: translate(0, 0); }
}

/* =============================== HERO =============================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0 0 clamp(2.5rem, 7vh, 5rem);
}

.hero__media { position: absolute; inset: 0; z-index: 0; background: #05040a; }

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Grade de color: sube el contraste y enfría los negros del escenario. */
  filter: saturate(0.82) contrast(1.12) brightness(0.62);
  transform: scale(1.04);
}

/* Filtro del banner: tres capas superpuestas al video. */
.hero__filter {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* viñeta */
    radial-gradient(120% 90% at 50% 40%, transparent 35%, rgba(5, 4, 10, 0.85) 100%),
    /* base para el texto */
    linear-gradient(to top, rgba(5, 4, 10, 0.96) 6%, rgba(5, 4, 10, 0.6) 42%, rgba(5, 4, 10, 0.35) 100%),
    /* tinte cálido */
    linear-gradient(200deg, rgba(176, 42, 58, 0.24), transparent 45%, rgba(232, 176, 75, 0.14));
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: var(--shell);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.9rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 234, 0.06);
  backdrop-filter: blur(10px);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ded8cc;
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(232, 176, 75, 0.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(232, 176, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 176, 75, 0); }
}

.hero__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.hero__title .line { display: block; font-size: clamp(3.2rem, 12.5vw, 10.5rem); }

.line--accent {
  background: linear-gradient(96deg, var(--gold-hi), var(--gold) 40%, var(--crimson));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tagline {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.05rem, 2.6vw, 1.7rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #efe7d6;
  margin-bottom: 1rem;
}

.hero__lead {
  max-width: 46ch;
  color: #cdc7d3;
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  margin-bottom: 2rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  list-style: none;
  margin-bottom: 2.1rem;
}
.hero__meta li {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 8, 16, 0.55);
  backdrop-filter: blur(12px);
}
.hero__meta strong {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.22rem;
  letter-spacing: 0.06em;
  line-height: 1.15;
}
.hero__meta span { font-size: 0.76rem; color: var(--muted); }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.2rem; }
.hero__cta-note { font-size: 0.84rem; color: var(--muted); }

/* =============================== BOTONES =============================== */
.btn {
  --btn-bg: var(--gold);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: #150f06;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--primary {
  background: linear-gradient(100deg, var(--gold-hi), var(--gold) 55%, #d59433);
  box-shadow: 0 12px 34px -12px rgba(232, 176, 75, 0.75);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(232, 176, 75, 0.9); }
.btn:active { transform: translateY(0); }
.btn__ico { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.btn--xl { padding: 1.15rem 2.4rem; font-size: 1.08rem; }
.btn--sm { padding: 0.7rem 1.3rem; font-size: 0.92rem; }

/* Barrido de luz al pasar el cursor */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }

/* ============================ INDICADOR SCROLL ============================ */
.scroll-hint {
  position: absolute;
  z-index: 2;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* =============================== SECCIONES =============================== */
.section { padding: clamp(4rem, 11vh, 8rem) 0; position: relative; }
.section--tight { padding: clamp(3rem, 7vh, 4.5rem) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.h2--xl { font-size: clamp(2.4rem, 7vw, 5rem); }
.h2 em { font-style: normal; color: var(--gold); }

.prose { color: #c6c0cf; max-width: 62ch; }
.prose p + p { margin-top: 1rem; }
.prose strong { color: var(--ink); }

/* ============================ CUENTA REGRESIVA ============================ */
.count { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 0.9rem; }
.count__box {
  flex: 1 1 92px;
  padding: 1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244, 241, 234, 0.05), transparent);
  text-align: center;
}
.count__box b {
  display: block;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.count__box span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.count__note { font-size: 0.86rem; color: var(--muted); }

/* =============================== MARQUEE =============================== */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(176, 42, 58, 0.14), rgba(232, 176, 75, 0.12));
  padding: 0.85rem 0;
}
.marquee__track { display: flex; width: max-content; animation: slide 32s linear infinite; }
.marquee__track span {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6dfd2;
  padding-right: 2.5rem;
  white-space: nowrap;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* =============================== TARJETAS =============================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.card {
  position: relative;
  padding: 1.7rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(244, 241, 234, 0.03);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: rgba(232, 176, 75, 0.45); transform: translateY(-4px); }
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card__num {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.card h3 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0.35rem 0 0.6rem;
}
.card p { color: #beb8c8; font-size: 0.95rem; }

/* =============================== CTA FINAL =============================== */
.cta-final {
  text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(232, 176, 75, 0.16), transparent 60%),
    var(--bg);
}
.cta-final .prose { margin: 0 auto 2rem; }
.cta-final__phone { margin-top: 1.2rem; font-size: 0.9rem; color: var(--muted); }
.cta-final__phone a { color: var(--gold); font-weight: 600; text-decoration: none; }
.cta-final__phone a:hover { text-decoration: underline; }

/* =============================== PIE =============================== */
.foot { border-top: 1px solid var(--line); padding: 2.2rem 0 6rem; }
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============================ BARRA FIJA MÓVIL ============================ */
.dock {
  position: fixed;
  z-index: 65;
  left: 0; right: 0; bottom: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(8, 6, 12, 0.9);
  backdrop-filter: blur(16px);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.dock.is-on { transform: translateY(0); }
.dock__txt { display: flex; flex-direction: column; line-height: 1.25; }
.dock__txt b { font-size: 0.9rem; }
.dock__txt span { font-size: 0.76rem; color: var(--muted); }

/* ============================ ANIMACIÓN DE ENTRADA ============================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =============================== RESPONSIVE =============================== */
@media (max-width: 860px) {
  :root { --shell: calc(100% - 32px); }
  .hero { align-items: flex-end; padding-bottom: 6.5rem; }
  .hero__meta li { flex: 1 1 calc(50% - 0.35rem); }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__cta-note { text-align: center; }
  .dock { display: flex; }
  .scroll-hint { display: none; }
  .foot { padding-bottom: 7rem; }
}

@media (max-width: 420px) {
}

/* Respeta a quien pidió menos movimiento en su sistema. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .marquee__track { animation: none; }
  .scroll-hint span { animation: none; }
  .dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn::after { display: none; }
}

/* =========================================================================
   PUENTE AL SITIO PRINCIPAL
   Cierra la landing. Va después del CTA de confirmación: primero se pide la
   acción del evento y solo entonces se ofrece conocer a la empresa.
   ========================================================================= */
.bridge {
  padding: clamp(3rem, 8vh, 5rem) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(80% 130% at 50% 100%, rgba(232, 176, 75, 0.10), transparent 62%),
    var(--bg-2);
  text-align: center;
}

.bridge__logo {
  height: 46px;
  width: auto;
  margin: 0 auto 1.3rem;
  opacity: 0.92;
}

.bridge__text {
  max-width: 52ch;
  margin: 0 auto 1.8rem;
  color: #c6c0cf;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
}

/* Contorneado en vez de sólido: el botón lleno es el de WhatsApp y no deben
   competir entre sí. Este es la salida secundaria. */
.btn--ghost {
  background: transparent;
  border: 1px solid rgba(232, 176, 75, 0.55);
  color: var(--gold-hi);
  box-shadow: none;
}
.btn--ghost:hover {
  background: rgba(232, 176, 75, 0.10);
  border-color: var(--gold);
  box-shadow: 0 12px 30px -14px rgba(232, 176, 75, 0.6);
}
.btn--ghost .btn__ico { fill: currentColor; }

@media (max-width: 860px) {
  .bridge { padding-bottom: clamp(4rem, 10vh, 6rem); }
}

/* =========================================================================
   AVISO DE VISTA PREVIA
   Solo lo ve quien tiene sesión de admin abierta y la landing sin publicar.
   ========================================================================= */
.preview-bar {
  position: fixed;
  z-index: 80;
  top: 0; left: 0; right: 0;
  padding: 0.55rem 1rem;
  background: #b02a3a;
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.4;
}
.preview-bar strong { letter-spacing: 0.08em; text-transform: uppercase; }
.preview-bar a { color: #ffd27a; font-weight: 700; text-decoration: underline; }

/* El aviso es fijo y taparía el arranque del banner. */
body:has(.preview-bar) .hero { padding-top: 2.4rem; }

/* =========================================================================
   AFINADO DE RENDIMIENTO
   ========================================================================= */

/* El grano es una capa fija a pantalla completa que se desplaza tres veces por
   segundo: eso obliga a repintar todo el viewport, para siempre. En escritorio
   pasa desapercibido; en un móvil de gama baja se lleva batería y provoca
   tirones al hacer scroll. Se deja la textura, quieta. */
@media (max-width: 860px) {
  .grain { animation: none; opacity: 0.12; }
}

/* La cinta deslizante solo se anima mientras está a la vista.
   La clase la pone y la quita assets/js/landing.js. */
.marquee__track.is-parada { animation-play-state: paused; }

/* Secciones que el navegador no pinta hasta que se acercan.
   No se aplica al hero ni a la cinta: el hero se ve de entrada y la cinta
   necesita medir su ancho para el bucle. */
.section--diferida {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* El desenfoque de fondo obliga a recomponer todo lo que queda detrás en cada
   fotograma. En móvil se cambia por un fondo casi opaco: se ve igual y no
   cuesta nada. */
@media (max-width: 860px) {
  .eyebrow,
  .hero__meta li,
  .dock {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .eyebrow { background: rgba(28, 24, 38, 0.9); }
  .hero__meta li { background: rgba(10, 8, 16, 0.88); }
  .dock { background: rgba(8, 6, 12, 0.97); }
}

/* =========================================================================
   CONTROL DE SONIDO
   La música va en su propio archivo, no dentro del video. Este botón es el
   único mando: refleja el estado real de la pista y permite apagarla.
   ========================================================================= */
.sound {
  position: fixed;
  z-index: 70;
  top: 1.1rem; right: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 8, 16, 0.62);
  backdrop-filter: blur(14px);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.sound:hover { border-color: rgba(232, 176, 75, 0.6); }
.sound:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sound__bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound__bars i {
  width: 3px;
  height: 4px;
  border-radius: 1px;
  background: var(--muted);
  transition: background 0.25s;
}

/* Las barras solo se mueven cuando la música suena de verdad. */
.sound[aria-pressed="true"] .sound__bars i {
  background: var(--gold);
  animation: eq 900ms ease-in-out infinite alternate;
}
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: 140ms; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: 280ms; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: 420ms; }
@keyframes eq { from { height: 4px; } to { height: 14px; } }

/* Latido discreto para avisar de que hay música esperando un toque. */
.sound.is-waiting { animation: nudge 2.6s var(--ease) infinite; }
@keyframes nudge {
  0%, 88%, 100% { transform: scale(1); }
  92%           { transform: scale(1.06); }
}

/* Con el aviso de vista previa ocupando la franja superior, el botón baja. */
body:has(.preview-bar) .sound { top: 3.1rem; }

@media (max-width: 860px) {
  /* Arriba y no abajo: abajo se montaba sobre la nota del CTA y sobre la
     barra fija de acción. */
  .sound {
    top: 0.9rem; right: 0.9rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 8, 16, 0.92);
  }
  body:has(.preview-bar) .sound { top: 3.4rem; }
}

@media (max-width: 420px) {
  .sound__label { display: none; }
  .sound { padding: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sound.is-waiting { animation: none; }
  .sound[aria-pressed="true"] .sound__bars i { animation: none; height: 10px; }
}

/* =========================================================================
   AFICHE DEL EVENTO
   Es lo primero que se ve al abrir la landing, antes incluso del hero.
   El margen lateral es un porcentaje del ancho del bloque (10%, y 2% en
   teléfonos pequeños) y no un ancho fijo, para que se vea proporcional en
   cualquier pantalla.
   ========================================================================= */
.afiche {
  /* Relleno igual arriba y abajo: el afiche queda centrado dentro de su bloque.
     Con relleno solo arriba se veia pegado al borde inferior. */
  padding: clamp(3rem, 9vh, 5.5rem) 0;
  background: var(--bg);
}

.afiche__marco {
  display: block;
  width: 80%;
  margin: 0 auto;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  /* El halo cálido lo despega del fondo negro sin necesidad de un marco duro. */
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(232, 176, 75, 0.12),
    0 18px 60px -35px rgba(232, 176, 75, 0.45);
}

.afiche__img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 480px) {
  /* Teléfonos pequeños: casi todo el ancho, solo 2% de margen a cada lado. */
  .afiche__marco { width: 96%; }
}
