/* =========================================================================
   🌸 SAXA DESIGN — INVITACIÓN INTERACTIVA 3D DIORAMA (ESTILO PROPUESTA.MP4)
   ========================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-cinzel: 'Cinzel', 'Times New Roman', serif;
  --font-main: var(--font-serif);
  --cream-bg: #f7f3ed;
  --rose-deep: #7a3535;
  --rose-soft: #c47b7b;
  --text-dark: #291c16;
  --text-muted: #5a453d;
  --wa-green: #25D366;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--cream-bg);
  color: var(--text-dark);
  font-family: var(--font-main);
  overflow-x: hidden;
}

/* ── PRELOADER ───────────────────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff 0%, #f6eee3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}
.preloader-logo {
  width: min(240px, 60vw);
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 15px rgba(180, 140, 100, 0.18));
}
.preloader-bar {
  width: 150px;
  height: 3px;
  background: rgba(196, 123, 123, 0.2);
  border-radius: 999px;
  overflow: hidden;
}
.preloader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #e8a5a5, var(--rose-deep), #e8a5a5);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ── BOTÓN DE MÚSICA FLOTANTE ─────────────────────────────────────────────── */
.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(196, 123, 123, 0.4);
  color: var(--rose-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(160, 110, 80, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.music-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(196, 123, 123, 0.3);
}
.music-playing {
  animation: spinMusic 5s linear infinite;
}
@keyframes spinMusic {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================================================
   🏛️ ESCENARIO DIORAMA
   ========================================================================= */
#experience {
  width: 100%;
  background: var(--cream-bg);
}
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}
.scene-diorama {
  overflow: hidden;
  background: #f7f3ed;
}

.camera-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1200px;
}

/* Lienzo Maestro que bloquea las proporciones exactas en cualquier pantalla */
.world-canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 580px;
  max-height: 1030px;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* =========================================================================
   🌲 CAPAS DEL DIORAMA MULTIPLANO (COMPOSICIÓN EXACTA)
   ========================================================================= */
.diorama-layer {
  position: absolute;
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.layer-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 0. Fondo Cielo y Colinas (Con margen generoso para cubrir cualquier paneo) */
.layer-fondo-sky {
  inset: -15%;
  width: 130%;
  height: 130%;
  z-index: 1;
}
.sky-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  filter: contrast(0.98) saturate(1.05);
}

/* 1. Pinos Acuarela */
.layer-pinos {
  bottom: 23%;
  left: 6%;
  width: 46%;
  z-index: 5;
}
.pinos-img {
  filter: drop-shadow(0 2px 4px rgba(35, 50, 30, 0.14)) drop-shadow(0 10px 22px rgba(25, 45, 25, 0.20));
}

/* 2. Camino Empedrado en Perspectiva (Borde inferior 0) */
.layer-camino {
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}
.camino-img {
  filter: drop-shadow(0 -4px 14px rgba(50, 35, 20, 0.16));
}

/* 3. Arco Floral Alargado */
.layer-arco {
  bottom: 0%;
  left: 50%;
  width: 82%;
  z-index: 15;
  transform: translateX(-50%);
}
.arco-img {
  filter: drop-shadow(0 2px 5px rgba(50, 30, 20, 0.18)) drop-shadow(0 14px 30px rgba(55, 30, 20, 0.24));
  transition: filter 0.3s ease;
}

/* 4. Fernanda / Quinceañera (Plantada al final del camino) */
.layer-personaje {
  bottom: 18%;
  left: 50%;
  width: 48%;
  z-index: 20;
  transform: translateX(-50%);
}
.personaje-img {
  filter: drop-shadow(0 2px 4px rgba(45, 25, 15, 0.18)) drop-shadow(0 15px 32px rgba(60, 30, 20, 0.28));
}

/* 5. Gatito en Primer Plano (Sobre las piedras a la derecha) */
.layer-mascota {
  bottom: 8.5%;
  right: 12%;
  width: 22%;
  z-index: 25;
}
.mascota-img {
  filter: drop-shadow(0 2px 3px rgba(40, 25, 15, 0.22)) drop-shadow(0 8px 18px rgba(50, 30, 15, 0.26));
}


/* =========================================================================
   🚪 PORTAL DE ENTRADA: VENTANA SÓLIDA QUE VUELA HACIA EL HUECO ARRIBA
   ========================================================================= */
.layer-portal {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Sin interferir con el scroll */
  background: var(--cream-bg);
  will-change: transform, opacity;
}
.portal-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 580px;
  max-height: 1030px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 46%; /* El hueco transparente arriba de la cabeza */
  filter: drop-shadow(0 18px 45px rgba(45, 25, 15, 0.28));
  will-change: transform, opacity;
}
.portal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.portal-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
  animation: hintFloat 2.2s ease-in-out infinite alternate;
}
@keyframes hintFloat {
  0%   { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, 4px); }
}
.portal-hint-text {
  font-family: var(--font-cinzel);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}
.portal-hint-arrow {
  color: var(--rose-deep);
  font-size: 0.82rem;
  animation: arrowBounce 1.4s ease-in-out infinite;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* =========================================================================
   ☁️ BURBUJAS COMPACTAS Y DELICADAS (ESTILO PROPUESTA.MP4)
   ========================================================================= */
.card-bubble {
  position: absolute;
  z-index: 80;
  pointer-events: auto;
  will-change: transform, opacity;
  opacity: 0;
  visibility: hidden;
  font-family: var(--font-main);
  filter: drop-shadow(0 12px 26px rgba(45, 25, 18, 0.16)) drop-shadow(0 3px 6px rgba(45, 25, 18, 0.08));
}

.cloud-shape {
  position: relative;
  width: fit-content;
  max-width: min(320px, 82vw);
  padding: 16px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ☁️ Capa trasera vaporosa: Halo suave difuminado que se funde con el fondo */
.cloud-shape::before {
  content: '';
  position: absolute;
  inset: -12px -22px;
  background: rgba(255, 255, 255, 0.93);
  border-radius: 46% 54% 58% 42% / 48% 52% 48% 52%;
  filter: blur(14px);
  -webkit-filter: blur(14px);
  z-index: -2;
  box-shadow: 
    0 0 25px 12px rgba(255, 255, 255, 0.98),
    0 0 45px 22px rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

/* ☁️ Capa delantera artesanal: Cuerpo de acuarela irregular y centro sólido para legibilidad */
.cloud-shape::after {
  content: '';
  position: absolute;
  inset: -4px -12px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 54% 46% 42% 58% / 52% 48% 54% 46%;
  filter: blur(7px);
  -webkit-filter: blur(7px);
  z-index: -1;
  box-shadow: 
    0 0 18px 8px rgba(255, 255, 255, 0.96);
  pointer-events: none;
}

/* Silueta orgánica para la Nube 1 (Mis Quince Años / Fernanda) */
#card1 .cloud-shape::before {
  border-radius: 42% 58% 62% 38% / 45% 55% 45% 55%;
}
#card1 .cloud-shape::after {
  border-radius: 56% 44% 38% 62% / 55% 45% 55% 45%;
}

/* Silueta horizontal para Fecha y Hora */
.cloud-date {
  padding: 10px 24px !important;
  gap: 2px !important;
}
.cloud-date::before {
  inset: -8px -26px !important;
  border-radius: 50px !important;
  filter: blur(12px) !important;
}
.cloud-date::after {
  inset: -3px -14px !important;
  border-radius: 50px !important;
  filter: blur(6px) !important;
}

/* Burbuja del gatito: forma orgánica suave */
.speech-tail::before {
  inset: -10px -20px -16px -20px !important;
}

/* ── TEXTOS Y TIPOGRAFÍA EDITORIAL DE LUJO (CINZEL & CORMORANT GARAMOND) ── */
.bubble-eyebrow {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--rose-deep);
  letter-spacing: 2.2px;
  text-transform: uppercase;
  line-height: 1.2;
}

.bubble-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7.5vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  line-height: 1.05;
}

.bubble-pill-date {
  font-family: var(--font-cinzel);
  font-size: 0.90rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1.25;
}
.bubble-pill-hour {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
}

.bubble-place {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.15;
}
.bubble-sub-info {
  font-family: var(--font-cinzel);
  font-size: 0.80rem;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bubble-dress {
  font-family: var(--font-cinzel);
  font-size: 1.0rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.bubble-dress-note {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
}

.bubble-cat-callout {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-style: italic;
  font-weight: 500;
  color: var(--rose-deep);
}
.bubble-cat-sub {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-muted);
}

/* ── TEXTO LIMPIO SOBRE ACUARELA (MISA) ─────────────────────────────────── */
.card-clean-watercolor {
  max-width: min(360px, 88vw);
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.95)) drop-shadow(0 6px 18px rgba(45, 25, 18, 0.12)) !important;
}
.clean-watercolor-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 16px;
}
.clean-eyebrow {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rose-deep);
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.95);
}
.clean-place {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.95);
}
.clean-sub-info {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
}

/* ── LIGAS DE TEXTO LIMPIAS CON GUIONES Y SUBRAYADO (SIN BOTONES) ───────── */
.clean-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-cinzel);
  font-size: 0.90rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dark);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap; /* Evita que los guiones se quiebren en líneas separadas */
  transition: all 0.25s ease;
  pointer-events: auto;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.95);
}

.clean-text-link u {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rose-deep);
  color: var(--text-dark);
  transition: color 0.2s ease;
}

.clean-text-link:hover {
  transform: scale(1.04);
}
.clean-text-link:hover u {
  color: var(--rose-deep);
}

.clean-text-link.link-wa-text u {
  text-decoration-color: #2e7d32;
  color: #1b5e20;
}
.clean-text-link.link-wa-text:hover u {
  color: #2e7d32;
}
.btn-wa-cute {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35) !important;
}

/* Pantalla Final */
.final-cloud {
  padding: 16px 20px !important;
  max-width: min(250px, 50vw) !important;
  gap: 5px !important;
}
.bubble-final-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--rose-deep);
  line-height: 1.05;
}
.bubble-final-sub {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.35;
}
.footer-box {
  margin-top: 4px;
}
.footer-pill {
  font-family: var(--font-cinzel);
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(196, 123, 123, 0.25);
}

/* ── CAPA BLANCA DE CIERRE CON ENLACE PARA VOLVER AL INICIO ─────────────── */
.white-fade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 48%, #ffffff 50%, #faf6f2 100%);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: opacity;
  transition: opacity 0.35s ease;
}

.white-fade-overlay.is-active {
  pointer-events: auto;
}

.restart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 30px 24px;
  max-width: min(340px, 85vw);
}

.restart-eyebrow {
  font-family: var(--font-cinzel);
  font-size: 0.90rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.restart-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6.5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--rose-deep);
  line-height: 1.1;
  margin-bottom: 6px;
}

.restart-link {
  font-family: var(--font-cinzel) !important;
  font-size: 0.92rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--text-dark) !important;
  cursor: pointer !important;
  margin-top: 10px !important;
}
.restart-link u {
  text-decoration-color: var(--rose-deep) !important;
  text-underline-offset: 4px !important;
}
