/* ═══════════════════════════════════════════════════════════
   La Providencia — Cartelería Digital v2
   Pantalla publicitaria premium para TV / monitor
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta La Providencia */
  --bordo: #6B1D2A;
  --bordo-deep: #4A0E1A;
  --bordo-light: #8C2E3D;
  --bordo-brand: #A11B28;
  --crema: #F5E6D3;
  --crema-soft: #EDE0D0;
  --crema-dark: #D4C4A8;
  --gold: #C8A96E;
  --gold-light: #D4BC8A;
  --gold-bright: #E8D5A4;
  --dark: #140E0B;
  --dark-warm: #1E1612;
  --dark-card: #231A15;
  --text-primary: #F5E6D3;
  --text-secondary: rgba(245, 230, 211, 0.65);
  --text-muted: rgba(245, 230, 211, 0.35);

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Animación */
  --transition-slide: 1.4s;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: var(--font-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  user-select: none;
}

/* ── Contenedor Principal ─────────────────────────────────── */
.carteleria {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--dark);
}

/* ── Fondo Ambiental ──────────────────────────────────────── */
.ambient-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.85;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  /* Sin blur ni animación — estático, cero costo de GPU */
}

.ambient-glow--1 {
  width: 70vw;
  height: 70vh;
  top: -20%;
  right: -10%;
  background: radial-gradient(circle, rgba(107, 29, 42, 0.55) 0%, transparent 65%);
  opacity: 0.5;
}

.ambient-glow--2 {
  width: 60vw;
  height: 60vh;
  bottom: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(74, 14, 26, 0.50) 0%, transparent 65%);
  opacity: 0.35;
}

.ambient-glow--3 {
  width: 45vw;
  height: 45vh;
  top: 30%;
  left: 25%;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.18) 0%, transparent 65%);
  opacity: 0.30;
}

/* ── Watermark LP Monograma ───────────────────────────────── */
.watermark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 28%;
  transform: translate(-50%, -50%);
  width: 45vw;
  height: 45vw;
  max-width: 600px;
  max-height: 600px;
  opacity: 0;
  pointer-events: none;
  /* GSAP anima la entrada */
}

.watermark__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.05;
}

/* ── Viñeta Perimetral ────────────────────────────────────── */
.vignette {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: radial-gradient(
    ellipse 68% 72% at 50% 50%,
    transparent 38%,
    rgba(20, 14, 11, 0.65) 100%
  );
}

/* ── Barra de Progreso — top ──────────────────────────────── */
.progress-bar {
  position: absolute;
  top: 3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(245, 230, 211, 0.06);
  z-index: 100;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--bordo-brand), var(--gold), var(--gold-bright));
  box-shadow: 0 0 6px rgba(200, 169, 110, 0.5);
  will-change: transform;
  /* GSAP maneja scaleX */
}

/* ── Slide (pieza) ────────────────────────────────────────── */
.slide {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  /* GSAP maneja opacity y visibility */
}

.slide.active {
  z-index: 3;
}

.slide--back {
  z-index: 1;
}

/* ── Imagen — fullscreen protagonista ────────────────────── */
.slide__image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slide__image {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  opacity: 0;
  /* GSAP maneja transform y opacity */
}

/* Video — fullscreen cover, oculto por defecto */
.slide__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  display: none;
  z-index: 0;
}

/* Tint — fusionada en overlay, esta capa ya no existe */
.slide__image-tint { display: none; }

/* Vignette lateral — fusionada en overlay, esta capa ya no existe */
.slide__image-vignette { display: none; }

/* Viñeta pseudo-element — ya no necesaria */
.slide__image-wrap::before { display: none; }

/* Overlay único — todo fusionado en una sola capa */
.slide__image-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom,  rgba(14, 9, 7, 0.92) 0%, rgba(14, 9, 7, 0.50) 22%, transparent 50%),
    linear-gradient(to top,     rgba(14, 9, 7, 0.88) 0%, rgba(14, 9, 7, 0.35) 22%, transparent 45%),
    linear-gradient(135deg,     rgba(74, 14, 26, 0.18) 0%, transparent 55%);
}

/* ── Contenido — zona superior ────────────────────────────── */
.slide__content {
  position: absolute;
  z-index: 5;
  top: 5vh;
  left: 6vw;
  width: clamp(300px, 74vw, 1200px);
  display: flex;
  flex-direction: column;
  gap: 2.4vh;
  padding: 0;
}

/* Línea decorativa debajo del bloque de contenido */
.slide__content::before {
  content: '';
  position: absolute;
  bottom: -3vh;
  left: 0;
  width: 90px;
  height: 1px;
  background: linear-gradient(to right, var(--gold) 0%, rgba(200, 169, 110, 0.3) 70%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.0s var(--ease-out-expo) 1.0s;
  pointer-events: none;
}

.slide.active .slide__content::before {
  transform: scaleX(1);
}

/* Tag — badge editorial con borde izquierdo */
.slide__tag {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  /* Badge semi-transparente con borde izquierdo gold */
  padding: 8px 16px 8px 0;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
  background: linear-gradient(
    to right,
    rgba(200, 169, 110, 0.08) 0%,
    transparent 100%
  );
  /* GSAP maneja opacity y transform */
}

/* Ocultar el accent line original — el border-left reemplaza su función */
.slide__tag-accent {
  display: none;
}

.slide__tag-text {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.15vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* Línea corta a la derecha del tag */
.slide__tag::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  flex-shrink: 0;
  background: linear-gradient(to right, var(--gold-light), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo) 0.9s;
  opacity: 0.6;
}

.slide.active .slide__tag::after {
  transform: scaleX(1);
}

/* Título — grande y expresivo */
.slide__title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7.5vw, 10rem);
  font-weight: 900;
  line-height: 0.93;
  color: var(--crema);
  letter-spacing: -0.035em;
  text-shadow:
    0 3px 24px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.80);
  /* GSAP anima cada .slide__word individualmente */
}

/* Cada palabra del título — GSAP anima estas */
.slide__word {
  display: inline-block;
  will-change: transform, opacity;
}

/* Descripción */
.slide__desc {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.85vw, 1.65rem);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(245, 230, 211, 0.78);
  max-width: 30ch;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  /* GSAP maneja opacity y transform */
}

/* ── Bloque de precio — bottom right ─────────────────────── */
.slide__price-block {
  position: absolute;
  z-index: 5;
  bottom: calc(72px + 4.5vh);
  right: 5.5vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4vh;
  opacity: 0;
  /* GSAP maneja opacity y transform */
}

/* Etiqueta sobre el precio */
.slide__price-eyebrow {
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.95vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.80;
}

/* Precio */
.slide__price {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 10rem);
  font-weight: 900;
  color: var(--crema);
  letter-spacing: -0.03em;
  text-align: right;
  line-height: 1;
  text-shadow:
    0 0 40px rgba(200, 169, 110, 0.40),
    0 4px 16px rgba(0, 0, 0, 0.95);
}

/* Signo $ — superíndice tipográfico */
.slide__price-currency {
  font-size: 0.38em;
  font-weight: 400;
  vertical-align: 0.70em;
  margin-right: 0.06em;
  color: var(--gold);
  opacity: 0.90;
}

/* Línea gold decorativa bajo el precio */
.slide__price-block::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin-top: 8px;
  margin-left: auto;
  opacity: 0.6;
}

/* ── Marca Persistente — Logo Real ────────────────────────── */
.brand {
  position: absolute;
  top: 3vh;
  right: 3.5vw;
  z-index: 50;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  /* GSAP anima la entrada */
}

/* Línea decorativa gold debajo del logo */
.brand::after {
  content: '';
  display: block;
  width: 70%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200, 169, 110, 0.5), transparent);
  margin-top: 10px;
}

.brand__logo {
  height: clamp(90px, 13vh, 165px);
  width: auto;
  filter:
    drop-shadow(0 6px 32px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 20px rgba(200, 169, 110, 0.12))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  /* GSAP anima el respiro */
}

/* ── Indicadores Verticales ───────────────────────────────── */
.indicators {
  position: absolute;
  right: 2.5vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
  opacity: 0;
  /* GSAP anima la entrada */
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 230, 211, 0.15);
  transition: background 0.6s ease,
              transform 0.6s var(--ease-out-expo),
              height 0.6s var(--ease-out-expo);
}

.indicator.active {
  background: var(--gold);
  border-radius: 3px;
  height: 24px;
  transform: scale(1);
}

/* Noise overlay eliminado — costoso en TV */

/* ── Barra de Delivery + Horarios ────────────────────────── */
.info-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 5vw;
  background: rgba(8, 5, 3, 0.97);
  opacity: 0;
  /* GSAP anima la entrada */
}

.info-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(200, 169, 110, 0.35) 30%,
    rgba(200, 169, 110, 0.35) 70%,
    transparent
  );
}


.info-bar__delivery {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 10px 20px 10px 0;
}

.info-bar__delivery-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-bar__delivery-title {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.3vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold-light);
  line-height: 1;
}

.info-bar__delivery-sub {
  font-family: var(--font-body);
  font-size: clamp(0.60rem, 0.85vw, 0.80rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 230, 211, 0.50);
  line-height: 1;
}

.info-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(200, 169, 110, 0.7);
  animation: dotPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.info-bar__sep {
  width: 1px;
  height: 20px;
  background: rgba(245, 230, 211, 0.15);
  margin: 0 3vw;
  flex-shrink: 0;
}

.info-bar__hours {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-bar__hours-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-bar__hours-title {
  font-family: var(--font-body);
  font-size: clamp(0.60rem, 0.82vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 230, 211, 0.35);
  line-height: 1;
}

.info-bar__icon {
  font-size: 0.9rem;
  color: var(--gold);
  opacity: 0.7;
  flex-shrink: 0;
}

.info-bar__label {
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 1.1vw, 1.0rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 230, 211, 0.75);
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   VARIANTE: PROMO — producto con badge de oferta
   ══════════════════════════════════════════════════════════ */

/* Badge "Promo del día" — oculto por defecto, visible solo en tipo promo */
.slide__promo-badge {
  display: none;
  position: absolute;
  z-index: 6;
  top: 4vh;
  left: 6vw;
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.9vw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--gold);
  padding: 7px 18px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  opacity: 0;
  /* GSAP anima la entrada */
}

.slide[data-tipo="promo"] .slide__promo-badge {
  display: block;
}

/* En promo: el tag baja para dejar espacio al badge */
.slide[data-tipo="promo"] .slide__content {
  top: calc(5vh + 44px);
}

/* Eyebrow del precio en promo */
.slide[data-tipo="promo"] .slide__price-eyebrow {
  color: var(--gold);
}

/* Precio en promo: crema intensa, más drama */
.slide[data-tipo="promo"] .slide__price {
  color: var(--gold-bright);
  text-shadow:
    0 0 50px rgba(200, 169, 110, 0.60),
    0 4px 16px rgba(0, 0, 0, 0.95);
}

/* ══════════════════════════════════════════════════════════
   VARIANTE: PLACA — composición centrada tipo póster
   ══════════════════════════════════════════════════════════ */

/* Fondo — atmósfera bordó caliente */
.slide[data-tipo="placa"] .slide__image {
  background-color: var(--bordo-deep) !important;
  background-image: none !important;
}

.slide[data-tipo="placa"] .slide__image-overlay {
  background:
    radial-gradient(ellipse 90% 65% at 50% 35%, rgba(107, 29, 42, 0.95) 0%, transparent 72%),
    radial-gradient(ellipse 55% 45% at 85% 85%, rgba(140, 46, 61, 0.40) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 10% 20%, rgba(74, 14, 26, 0.50) 0%, transparent 55%),
    linear-gradient(160deg, rgba(90, 18, 30, 0.82) 0%, rgba(14, 9, 7, 0.99) 100%);
}

.slide[data-tipo="placa"] .slide__image-tint {
  background: rgba(107, 29, 42, 0.12);
}

.slide[data-tipo="placa"] .slide__image-vignette {
  background: none;
}

.slide[data-tipo="placa"] .slide__image-wrap::before {
  background: none;
}

/* Composición centrada — layout tipo póster */
.slide[data-tipo="placa"] .slide__content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
  width: clamp(380px, 82vw, 1300px);
  text-align: center;
  align-items: center;
  gap: 3vh;
}

/* Línea bajo el contenido — centrada */
.slide[data-tipo="placa"] .slide__content::before {
  bottom: -4vh;
  left: 50%;
  margin-left: -40px;
  width: 80px;
  transform-origin: center;
}

/* Tag — centrado sin border-left, acento simétrico */
.slide[data-tipo="placa"] .slide__tag {
  border-left: none;
  padding: 0;
  background: none;
  justify-content: center;
  gap: 18px;
}

/* Reactivar accent line para placa (flanquea el texto) */
.slide[data-tipo="placa"] .slide__tag-accent {
  display: block !important;
  width: 38px;
}

/* Título — enorme, centrado, impacto máximo */
.slide[data-tipo="placa"] .slide__title {
  font-size: clamp(5rem, 10vw, 13rem);
  letter-spacing: -0.025em;
  line-height: 0.88;
  text-align: center;
}

/* Descripción — centrada, más visible */
.slide[data-tipo="placa"] .slide__desc {
  text-align: center;
  max-width: 34ch;
  font-size: clamp(1.15rem, 2vw, 1.85rem);
  color: rgba(245, 230, 211, 0.82);
}

/* ── Línea decorativa superior ────────────────────────────── */
.carteleria::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 5%,
    var(--bordo-brand) 30%,
    var(--gold) 50%,
    var(--bordo-brand) 70%,
    transparent 95%
  );
  box-shadow: 0 0 20px rgba(200, 169, 110, 0.35), 0 0 6px rgba(161, 27, 40, 0.5);
  z-index: 90;
  opacity: 0.9;
}
