/* ==========================================================================
   MapArte Studio — Estilos Cinematográficos Oscuros (Arquitectura DataPriv / InfoSec Build)
   Fondo oscuro profundo #080C14 con acentos ámbar/oro, paneles de video nítidos
   con fondo difuminado y la herramienta protagonista al inicio.
   ========================================================================== */

:root {
  --bg: #0B0F17;
  --card: #111827;
  --card2: #161F30;
  --line: rgba(51, 65, 85, 0.6);
  --ink: #F1F5F9;
  --mut: #94A3B8;
  --acc: #C5A880;          /* Oro mapa / acento marca */
  --acc2: #D4AF37;
  --nav-h: 64px;
  --font-display: "Cinzel", "Playfair Display", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background-color: var(--bg);
}

/* Capas fijas con z-index seguro y body transparente sobre capas fijas */
body {
  background-color: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

#site-bg-underlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  z-index: -3;
  pointer-events: none;
}

#backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

#vidbg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  background: #080C14 center/cover;
  filter: blur(36px) saturate(1.2);
  transform: scale(1.2);
  transition: opacity 1.2s ease;
}

#vid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.bd {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  background: #080C14;
}
.bd.on { opacity: 1; }
.bd .bl {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  animation: dpkb2 24s ease-in-out infinite alternate paused;
}
.bd.on .bl { animation-play-state: running; }
@keyframes dpkb2 { to { transform: scale(1.06); } }

.bd::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 23, 0.72);
}
.bd.lt::after { background: rgba(11, 15, 23, 0.55); }
.bd .ph { display: none; }

/* En escritorio: paneles nítidos con fondo difuminado */
@media(min-width: 901px) and (orientation: landscape) {
  .bd.pn .bl {
    filter: blur(28px) saturate(1.15);
    transform: scale(1.15);
  }
  .bd.pn .ph {
    display: block;
    position: absolute;
    z-index: 1;
    right: max(32px, calc((100vw - 1160px) / 2 + 20px));
    top: calc(50% + 32px);
    height: min(74vh, 760px);
    width: auto;
    max-width: 42vw;
    transform: translateY(-50%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
    object-fit: cover;
    animation: dpkb 22s ease-in-out infinite alternate paused;
  }
  .bd.pn.on .ph { animation-play-state: running; }
  .bd.pn.left .ph {
    right: auto;
    left: max(32px, calc((100vw - 1160px) / 2 + 20px));
  }
}
@keyframes dpkb { to { transform: translateY(-50%) scale(1.03); } }

:root[data-vid] #vid, :root[data-vid] #vidbg { opacity: 1; }
:root[data-vid] #backdrop { opacity: 0; }

/* Secciones de video */
.screen {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(72px, 12vh, 120px) 0;
  position: relative;
}
@media(min-width: 901px) {
  .col-left { max-width: 520px; width: 100%; }
  .col-right { margin-left: auto; max-width: 520px; width: 100%; }
}

.dp-eyebrow {
  font: 600 0.75rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--acc);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dp-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(1.8rem, 4.2vw, 2.9rem);
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}
.dp-lead {
  color: #CBD5E1;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 54ch;
  margin-top: 12px;
}
.dp-glass {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Interacciones y revelado */
@media(scripting: enabled) {
  .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.85s ease, transform 0.85s ease;
    transition-delay: calc(var(--i, 0) * 50ms);
  }
  .rv.in { opacity: 1; transform: none; }
}
.w { display: inline-block; }

/* Marquesina */
.marq {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid rgba(51, 65, 85, 0.5);
  padding: 14px 0;
  background: rgba(11, 15, 23, 0.85);
}
.marq > div { display: inline-block; animation: dpmq 48s linear infinite; }
.marq span {
  margin: 0 28px;
  color: var(--mut);
  font: 500 0.82rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.marq span::before {
  content: "✦";
  color: var(--acc);
  margin-right: 24px;
  font-size: 0.75rem;
}
@keyframes dpmq { to { transform: translateX(-50%); } }

/* Galería horizontal anclada (data-hscroll) */
[data-hscroll] { padding: 0; }
.hs-stick {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hs-track {
  display: flex;
  gap: 24px;
  padding: 0 32px;
  will-change: transform;
}
.hs-track > * {
  flex: none;
  width: min(80vw, 420px);
}

/* Tarjetas 3D Tilt */
[data-tilt] {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease-out;
}

/* Acordeón FAQ nativo */
details {
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  padding: 16px 0;
}
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: #FFFFFF;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--acc);
  transition: transform 0.25s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  color: var(--mut);
  margin-top: 10px;
  line-height: 1.65;
  font-size: 0.95rem;
}

/* WhatsApp flotante */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.25s;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}
.wa-float.on { opacity: 1; pointer-events: auto; }
.wa-float:hover { transform: scale(1.08); }

/* Cuadro en pared (Mockup) y Lienzo */
.wall-mockup-frame {
  box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.3);
}

#poster-element {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#poster-element:hover {
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(197, 168, 128, 0.35);
}

/* Modal Upsell Post-Descarga */
#modal-upsell {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#modal-upsell-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
}
