/* ============================================================
   EmotionIArt — hero cinematográfico + paneles del home.
   Solo se carga en index.php: el resto del sitio (blog, productos)
   mantiene el diseño claro pensado para lectura y SEO.
   Reutiliza los tokens de emotioniart-cms.css (--navy-*, --cyan-*).
   ============================================================ */

/* ---------- Nav progress ---------- */
.cine-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.cine-progress__bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-400));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* ---------- Barra de confianza / estadísticas ---------- */
.trust-bar { background: var(--navy-950); padding: 44px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  text-align: center;
}
.trust-stat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trust-stat__number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--cyan-400);
  text-shadow: 0 0 24px rgba(62, 207, 232, 0.35);
}
.trust-stat__number--text { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.trust-stat__label { color: var(--gray-300); font-size: 0.85rem; max-width: 160px; }

/* ---------- Zona cinematográfica: fondo fijo compartido por el hero + destacados ----------
   El video de fondo queda "pegado" (position: sticky) detrás del hero y de los 3 paneles
   destacados (MenuIA/LinksIA/FideIA), y se libera solo justo al terminar FideIA, cuando
   empieza la sección clara "Nuestras plataformas". Truco CSS estándar: el fondo sticky
   ocupa 100vh, y el contenido (cine-zone__fg) se monta encima con margin-top negativo. */
.cine-zone { position: relative; margin-top: -1px; }
.cine-zone__bg {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  background: var(--navy-950);
}
.cine-zone__fg {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
}

/* ---------- Hero ---------- */
.cine-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
}
.cine-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.cine-hero__placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(62, 207, 232, 0.16), transparent 55%),
    radial-gradient(circle at 85% 25%, rgba(62, 207, 232, 0.12), transparent 50%),
    radial-gradient(circle at 75% 15%, var(--navy-800), var(--navy-950) 65%);
}
.cine-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.45) 0%, rgba(10, 22, 40, 0.6) 45%, rgba(10, 22, 40, 0.8) 100%);
}
.cine-hero__chapter {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 5vw, 60px) 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-300);
}
.cine-hero__chapter span:last-child { color: var(--cyan-400); }

.cine-hero__body {
  position: relative;
  z-index: 2;
  padding: 0 clamp(20px, 5vw, 60px) clamp(50px, 8vh, 90px);
  max-width: 980px;
}
.cine-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 18px;
}
.cine-hero__eyebrow::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: var(--cyan-400);
}
.cine-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem);
  line-height: 1.04;
  color: var(--white);
  margin: 0 0 22px;
}
.cine-hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  filter: blur(6px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
  transition-delay: var(--word-delay, 0ms);
}
.cine-hero__title.is-in .word {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.cine-hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--gray-300);
  max-width: 620px;
  margin: 0 0 32px;
}
.cine-hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }
.cine-hero__cta .btn-primary {
  box-shadow: 0 0 0 0 rgba(62, 207, 232, 0.5);
}
.cine-hero__cta .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(62, 207, 232, 0.4);
}

.cine-hero__scroll {
  position: relative;
  z-index: 2;
  align-self: center;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--gray-300);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cine-hero__scroll .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--cyan-400), transparent);
  animation: cineScrollLine 1.8s ease-in-out infinite;
}
@keyframes cineScrollLine {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0.4; }
}

/* ---------- Panels (capítulos) ---------- */
.cine-panels { position: relative; color: var(--white); }
.cine-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
  min-height: 82vh;
  padding: 90px clamp(20px, 6vw, 70px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cine-panel:nth-child(even) .cine-panel__visual { order: 2; }

.cine-panel__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(62, 207, 232, 0.35);
  margin-bottom: 8px;
}
.cine-panel__eyebrow {
  color: var(--cyan-400);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cine-panel__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  color: var(--white);
  margin: 0 0 16px;
}
.cine-panel__text {
  color: var(--gray-300);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 0 26px;
}
.cine-panel__link {
  font-weight: 600;
  color: var(--cyan-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cine-panel__link:hover { color: var(--white); }

.cine-panel__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  border: 1px solid rgba(62, 207, 232, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cine-panel__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(62, 207, 232, 0.22), transparent 60%);
}
.cine-panel__icon {
  position: relative;
  z-index: 1;
  width: 30%;
  height: 30%;
  color: var(--cyan-400);
  opacity: 0.9;
}
.cine-panel__visual--square { aspect-ratio: 1 / 1; max-width: 460px; margin: 0 auto; }
.cine-panel__visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.15) 0%, rgba(10, 22, 40, 0.35) 55%, rgba(10, 22, 40, 0.7) 100%),
              radial-gradient(circle at 30% 25%, rgba(62, 207, 232, 0.18), transparent 60%);
}
.cine-panel__visual-note {
  position: relative;
  z-index: 1;
  color: var(--gray-300);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0 20px;
}
a.cine-panel__visual { text-decoration: none; cursor: pointer; }
a.cine-panel__visual:hover { border-color: rgba(62, 207, 232, 0.5); }

/* ---------- Mockup LinksIA (ejemplo visual dentro del panel destacado) ---------- */
.linksia-mock {
  position: relative;
  z-index: 1;
  width: 84%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.linksia-mock__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600));
  color: var(--navy-950);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.linksia-mock__handle {
  color: var(--gray-300);
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.linksia-mock__btn {
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(62, 207, 232, 0.3);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Mockup FideIA (preview clicable que abre el demo) ---------- */
.fideia-mock {
  position: relative;
  z-index: 1;
  width: 84%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fideia-mock__label {
  color: var(--cyan-400);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.fideia-mock__stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(62, 207, 232, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--gray-300);
  font-size: 0.85rem;
}
.fideia-mock__stat strong { color: var(--white); font-family: var(--font-display); }
.fideia-mock__cta {
  margin-top: 6px;
  color: var(--cyan-400);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
}

[data-cine-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-cine-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .cine-panel { grid-template-columns: 1fr; min-height: auto; padding: 60px 22px; }
  .cine-panel:nth-child(even) .cine-panel__visual { order: 0; }
  .cine-panel__visual { aspect-ratio: 16 / 10; }
  .cine-panel__visual.cine-panel__visual--square { aspect-ratio: 1 / 1; max-width: 100%; }
}

/* ---------- Botón "Ver detalles" que abre un modal (mismo look que .read-more) ---------- */
.product-modal-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
  color: var(--cyan-600);
}
.product-modal-trigger:hover { color: var(--navy-900); }

/* ---------- Modal de producto (Humanvia / Petvia) ---------- */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}
.product-modal.is-open { display: block; }
.product-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.72);
}
.product-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 4vh auto;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.product-modal__close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--gray-100);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--navy-900);
  cursor: pointer;
}
.product-modal__close:hover { background: var(--gray-300); }
.product-modal__title { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 4px 0 20px; clear: both; }
.product-modal__photo,
.product-modal__video {
  width: 100%;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  margin-bottom: 18px;
}
.product-modal__photo { aspect-ratio: 4 / 3; max-height: 320px; }
.product-modal__photo img { width: 100%; height: 100%; object-fit: contain; }
.product-modal__video { aspect-ratio: 16 / 9; }
.product-modal__video video,
.product-modal__video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.product-modal__video--portrait { aspect-ratio: 9 / 16; max-width: 320px; margin: 0 auto 18px; }

.product-modal__embed {
  width: 100%;
  height: 520px;
  max-height: 65vh;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 8px;
  border: 1px solid var(--gray-300);
}
.product-modal__embed iframe { width: 100%; height: 100%; border: 0; }
.product-modal__embed-fallback { font-size: 0.85rem; color: var(--gray-500); margin: 0 0 18px; }
.product-modal__dialog h3 { margin-top: 1.4em; font-size: 1.15rem; }
.product-modal__list { padding-left: 1.2em; margin: 10px 0 18px; color: var(--gray-700); }
.product-modal__list li { margin-bottom: 6px; }
.product-modal__price {
  background: var(--gray-100);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 18px 0;
}
.product-modal__price-tag { font-family: var(--font-display); font-weight: 700; color: var(--navy-950); font-size: 1.1rem; margin-bottom: 6px; }
.product-modal__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }

@media (prefers-reduced-motion: reduce) {
  .cine-hero__title .word { opacity: 1; transform: none; filter: none; transition: none; }
  .cine-hero__scroll .line { animation: none; }
  [data-cine-reveal] { opacity: 1; transform: none; transition: none; }
}
