/* ============================================
   OSCAR MOISÉS — Design System
   ============================================ */
:root {
  /* Colores base */
  --black: #000000;
  --black-deep: #000000;
  --black-soft: #000000;
  --gray-900: #111111;
  --gray-800: #1a1a1a;
  --gray-500: #555555;
  --gray-300: #a0a0a0;
  --white: #ffffff;
  --white-soft: #f0f0f0;

  /* Acentos por sección */
  --accent-capital: #f5c518;      /* Amarillo capital */
  --accent-ai: #4d9fff;            /* Azul eléctrico */
  --accent-realestate: #22c55e;    /* Verde bienes raíces */
  --accent-scale: #ffffff;         /* Blanco premium */
  --accent-sales: #ff5730;         /* Naranja / rojo */
  --accent-brand: #c9a961;         /* Dorado sutil */
  --accent-ecosystem: #ffffff;     /* Todos combinados */

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

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 300ms;
  --dur-med: 700ms;
  --dur-slow: 1400ms;

  /* Dinámico (se actualiza por JS) */
  --accent: var(--accent-capital);
  --ambient-color: #000000;
}

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

html, body {
  height: 100%;
  background: #000000;
  color: var(--white);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
}

body {
  cursor: grab;
}
body.dragging { cursor: grabbing; }

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  transition: opacity 800ms var(--ease-out-expo), visibility 800ms;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-text {
  display: flex;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--white);
  flex-wrap: nowrap;
  padding: 0 24px;
}
.loader-text span {
  opacity: 0;
  transform: translateY(20px);
  animation: loaderLetter 600ms var(--ease-out-expo) forwards;
}
.loader-text .loader-space { width: 0.4em; }
.loader-text span:nth-child(1)  { animation-delay: 80ms; }
.loader-text span:nth-child(2)  { animation-delay: 160ms; }
.loader-text span:nth-child(3)  { animation-delay: 240ms; }
.loader-text span:nth-child(4)  { animation-delay: 320ms; }
.loader-text span:nth-child(5)  { animation-delay: 400ms; }
.loader-text span:nth-child(6)  { animation-delay: 480ms; }
.loader-text span:nth-child(7)  { animation-delay: 560ms; }
.loader-text span:nth-child(8)  { animation-delay: 640ms; }
.loader-text span:nth-child(9)  { animation-delay: 720ms; }
.loader-text span:nth-child(10) { animation-delay: 800ms; }
.loader-text span:nth-child(11) { animation-delay: 880ms; }
.loader-text span:nth-child(12) { animation-delay: 960ms; }

@keyframes loaderLetter {
  to { opacity: 1; transform: translateY(0); }
}

.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.loader-bar-fill {
  width: 0;
  height: 100%;
  background: var(--white);
  animation: loaderFill 1600ms var(--ease-out-expo) 1000ms forwards;
}
@keyframes loaderFill {
  to { width: 100%; }
}

/* ---- VIDEO REVEAL LOADER ---- */
.loader-video {
  gap: 0;
  background: #000;
  overflow: hidden;
}
.reveal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  opacity: 0;
  animation: revealFadeIn 700ms var(--ease-out-expo) forwards;
}
@keyframes revealFadeIn {
  to { opacity: 1; }
}
.reveal-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, transparent 30%, transparent 65%, rgba(0,0,0,0.75) 100%);
}
.reveal-name {
  position: absolute;
  bottom: clamp(48px, 10vh, 110px);
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: clamp(28px, 6.5vw, 68px);
  letter-spacing: clamp(0.18em, 0.4vw, 0.32em);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(24px);
  animation: revealName 1200ms var(--ease-out-expo) 900ms forwards;
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
@keyframes revealName {
  to { opacity: 1; transform: translateY(0); }
}
.reveal-skip {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 4;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 10px 16px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  animation: revealName 500ms var(--ease-out-expo) 1600ms forwards;
  transition: background 200ms, border-color 200ms;
}
.reveal-skip:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
}
@media (max-width: 640px) {
  .reveal-skip { top: 16px; right: 16px; font-size: 10px; padding: 8px 12px; }
}

/* ============================================
   AUDIO TOGGLE
   ============================================ */
.audio-toggle {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 1200; /* por encima de la topbar (900) */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.6);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms var(--ease-out-expo);
}
.audio-toggle:hover {
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.05);
}
.audio-toggle.active svg line { display: none; }

/* ============================================
   EXPLORE ALL (menú discreto)
   ============================================ */
.explore-all {
  position: fixed;
  top: 10px;
  left: 20px;
  z-index: 1200; /* por encima de la topbar (900) */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 18px rgba(0,0,0,0.6);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 300ms var(--ease-out-expo);
  font-family: var(--font-sans);
}
.explore-all:hover {
  border-color: rgba(255,255,255,0.35);
  padding-left: 22px;
}
.explore-all .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* ============================================
   MENÚ OVERLAY
   ============================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms var(--ease-out-expo), visibility 500ms;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}
.menu-close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: all 300ms var(--ease-out-expo);
}
.menu-close:hover { transform: rotate(90deg); border-color: var(--white); }

.menu-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-nav li {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 8px 24px;
  transition: all 400ms var(--ease-out-expo);
  display: flex;
  align-items: baseline;
  gap: 20px;
  border-left: 2px solid transparent;
}
.menu-nav li:hover {
  color: var(--white);
  border-left-color: var(--white);
  padding-left: 40px;
}
.menu-nav .num {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.3);
}

/* ============================================
   STAGE / AMBIENTE
   ============================================ */
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000000;
}
.ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, var(--ambient-color) 0%, transparent 60%);
  opacity: 0.6;
  transition: background 1200ms var(--ease-out-expo), opacity 1200ms var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}

/* Piso cinematográfico: plano oscuro con halo de acento (reemplaza al grid mosaico) */
.stage-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.floor-plane {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(255,255,255,0.05) 0%, transparent 55%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.9) 100%);
}
.floor-glow {
  position: absolute;
  left: 50%;
  bottom: -8vh;
  transform: translateX(-50%);
  width: 90vw;
  height: 45vh;
  background: radial-gradient(ellipse at center, var(--accent) 0%, transparent 65%);
  opacity: 0.22;
  filter: blur(60px);
  transition: background 1200ms var(--ease-out-expo), opacity 1200ms var(--ease-out-expo);
}

/* Canvas de humo (sube y se disipa) */
#smoke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
  mix-blend-mode: screen;
}

/* Canvas de partículas */
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

/* Spotlight desde arriba */
.spotlight {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 90vh;
  background: radial-gradient(ellipse at center top, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 3;
  transition: background 1200ms var(--ease-out-expo);
}

/* ============================================
   AVATAR
   ============================================ */
.avatar-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 55vw);
  height: 88vh;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-glow {
  position: absolute;
  width: 130%;
  height: 90%;
  background: radial-gradient(ellipse at center, var(--accent) 0%, transparent 55%);
  opacity: 0.35;
  filter: blur(80px);
  transition: background 1200ms var(--ease-out-expo), opacity 1200ms;
  z-index: 1;
}

.avatar-silhouette {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform-origin: center;
  transition: transform 900ms var(--ease-out-expo), filter 900ms var(--ease-out-expo), opacity 500ms var(--ease-out-expo);
  animation: breathing 5s ease-in-out infinite;
  will-change: transform, opacity;
}
.avatar-silhouette.swapping {
  opacity: 0;
  transform: scale(0.98);
}

.avatar-silhouette svg {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.8));
  transition: filter 900ms var(--ease-out-expo);
}

.avatar-img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 30px 80px rgba(0,0,0,0.95))
    drop-shadow(0 0 60px rgba(0,0,0,0.5));
  transition: filter 900ms var(--ease-out-expo);
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  /* PNG con transparencia real → sin blend, sin borde */
  will-change: transform, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}



@keyframes breathing {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.008) translateY(-4px); }
}

.avatar-shadow {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 30px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, transparent 70%);
  filter: blur(10px);
  z-index: 0;
  animation: shadowBreath 5s ease-in-out infinite;
}
@keyframes shadowBreath {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(0.95); opacity: 0.6; }
}

/* Objeto flotante por sección */
.floating-object {
  position: absolute;
  top: 35%;
  right: -20%;
  width: 80px;
  height: 80px;
  z-index: 3;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 800ms var(--ease-out-expo) 300ms, transform 800ms var(--ease-out-expo) 300ms;
  animation: floatObj 4s ease-in-out infinite;
}
.floating-object.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@keyframes floatObj {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

/* ============================================
   CONTENIDO / TEXTOS
   ============================================ */
.content {
  position: absolute;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
  max-width: min(90vw, 720px);
  padding: 0 var(--space-4);
  pointer-events: none;
}
.content-inner {
  transition: opacity 500ms var(--ease-out-expo);
}
.content-inner.changing { opacity: 0; }

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  transition: color 900ms var(--ease-out-expo);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: var(--space-3);
}

.section-sub {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-5);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--accent);
  color: var(--black);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 400ms var(--ease-out-expo);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px -8px var(--accent);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px var(--accent);
  padding-right: 40px;
}
.cta svg {
  transition: transform 400ms var(--ease-out-expo);
}
.cta:hover svg { transform: translateX(4px); }

/* ============================================
   DRAG HINT
   ============================================ */
.drag-hint {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  z-index: 15;
  pointer-events: none;
  transition: opacity 800ms var(--ease-out-expo);
}
.drag-hint.hidden { opacity: 0; }

.hand {
  animation: handWiggle 2.5s ease-in-out infinite;
  color: rgba(255,255,255,0.5);
}
@keyframes handWiggle {
  0%, 100% { transform: translateX(-15px); }
  50% { transform: translateX(15px); }
}

/* ============================================
   INDICADORES
   ============================================ */
.indicators {
  position: absolute;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 15;
}
.indicators button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 500ms var(--ease-out-expo);
}
.indicators button::before {
  content: '';
  position: absolute;
  inset: -6px;
}
/* Puntito por defecto */
.indicators .ind-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: opacity 350ms var(--ease-out-expo),
              transform 500ms var(--ease-out-expo),
              background 350ms var(--ease-out-expo);
  transform: scale(1);
  opacity: 1;
}
.indicators button:hover .ind-dot { background: rgba(255,255,255,0.7); }

/* Ícono oculto por defecto (queda listo para el swap al activar) */
.indicators .ind-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 450ms var(--ease-out-expo),
              transform 550ms var(--ease-out-expo),
              filter 500ms var(--ease-out-expo);
  pointer-events: none;
  filter: drop-shadow(0 0 8px var(--sec-accent, #fff));
}
.indicators .ind-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Estado ACTIVO: puntito desaparece, ícono aparece */
.indicators button.active .ind-dot {
  opacity: 0;
  transform: scale(0.2);
}
.indicators button.active .ind-icon {
  opacity: 1;
  transform: scale(1);
}
.indicators button.active {
  transform: scale(1.05);
}

/* ============================================
   INTRO OVERLAY
   ============================================ */
.intro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: opacity 900ms var(--ease-out-expo), visibility 900ms;
  opacity: 0;
  visibility: hidden;
}
.intro-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.intro-content {
  text-align: center;
  max-width: 700px;
  animation: introRise 1200ms var(--ease-out-expo);
}
@keyframes introRise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.intro-question {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 16px;
}
.intro-sub {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 48px;
}
.intro-cta {
  padding: 18px 48px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.35em;
  cursor: pointer;
  border-radius: 100px;
  transition: all 400ms var(--ease-out-expo);
  font-family: var(--font-sans);
}
.intro-cta:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  padding: 18px 60px;
}

/* ============================================
   END OVERLAY
   ============================================ */
.end-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: opacity 900ms var(--ease-out-expo), visibility 900ms;
  opacity: 0;
  visibility: hidden;
}
.end-overlay.visible { opacity: 1; visibility: visible; }

.end-content {
  text-align: center;
  max-width: 720px;
}
.end-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.end-line-1 { color: rgba(255,255,255,0.5); }
.end-line-2 { color: var(--white); }

.end-cta {
  padding: 20px 56px;
  background: var(--white);
  color: var(--black);
  border: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35em;
  cursor: pointer;
  border-radius: 100px;
  transition: all 400ms var(--ease-out-expo);
  font-family: var(--font-sans);
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.end-cta:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -10px rgba(255,255,255,0.4); }

.end-back {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 300ms;
  font-family: var(--font-sans);
}
.end-back:hover { color: var(--white); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  /* Botones DENTRO de la topbar (encima del banner) — siempre visibles */
  .audio-toggle, .explore-all {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    z-index: 1200; /* por encima de la topbar (900) */
  }
  .audio-toggle {
    right: calc(env(safe-area-inset-right, 0px) + 10px);
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
  }
  .audio-toggle svg { width: 16px; height: 16px; }
  .explore-all {
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    padding: 8px 10px;
    font-size: 10px;
    background: rgba(0,0,0,0.9);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
    gap: 6px;
  }
  .explore-all:hover { padding-left: 12px; }
  .explore-all span:not(.dot) { display: none; }
  .explore-all .dot { width: 8px; height: 8px; }
  /* La topbar centra el nombre pero deja hueco lateral para los botones */
  .topbar-name { max-width: calc(100% - 110px); font-size: 10px; letter-spacing: 0.28em; }

  .avatar-container {
    width: min(480px, 65vw);
    height: 65vh;
    top: 50%;
  }

  /* Águila del video reveal en mobile: tamaño original + nombre visible */
  .reveal-video {
    object-fit: cover;
    object-position: center 38%;
    transform: none;
  }
  .reveal-name {
    bottom: clamp(80px, 14vh, 140px);
    font-size: clamp(26px, 8vw, 44px);
    letter-spacing: 0.28em;
    text-shadow: 0 2px 24px rgba(0,0,0,0.85), 0 0 40px rgba(0,0,0,0.5);
  }

  .content { bottom: 8vh; max-width: 95vw; }
  .section-title { font-size: clamp(28px, 8vw, 42px); }
  .section-sub { font-size: 14px; padding: 0 8px; }
  .cta { padding: 14px 26px; font-size: 11px; }

  .indicators {
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    gap: 16px;
  }
  .indicators button { width: 24px; height: 24px; }
  .drag-hint { bottom: 60px; }
  .drag-hint span { font-size: 9px; }

  .floating-object { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 100ms !important; }
}

/* ============================================
   TOPBAR STICKY — OSCAR MOISÉS
   ============================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 900; /* debajo del loader (1000) y overlays; encima de la escena */
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 800ms var(--ease-out-expo), transform 800ms var(--ease-out-expo);
}
.topbar.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.topbar-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.38em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1;
  padding-left: 0.38em; /* compensa el letter-spacing para centrar óptico */
  max-width: calc(100% - 260px); /* deja espacio para los botones laterales */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .topbar { height: 48px; }
  .topbar-name { font-size: 11px; letter-spacing: 0.32em; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar { transition: opacity 200ms linear; transform: none; }
}

/* =========================================================
   LEAD MODAL (form por producto)
   ========================================================= */
.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 220ms ease;
}
.lead-modal.is-open {
  display: flex;
  opacity: 1;
}
.lead-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.92) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lead-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #0d0d0f 0%, #050506 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 36px 32px 32px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 60px var(--ambient-color, rgba(255,255,255,0.05));
  color: #fff;
  transform: translateY(14px) scale(0.98);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.lead-modal.is-open .lead-modal-card {
  transform: translateY(0) scale(1);
}
.lead-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: color 160ms ease, background 160ms ease;
}
.lead-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.lead-modal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent, #f5c518);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}
.lead-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 8px;
  font-weight: 700;
}
.lead-modal-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 22px;
  line-height: 1.5;
}
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lead-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lead-field > span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.lead-field input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.lead-field input::placeholder {
  color: rgba(255,255,255,0.28);
}
.lead-field input:focus {
  border-color: var(--accent, #f5c518);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #f5c518) 18%, transparent);
}
.lead-field input.is-invalid {
  border-color: #ff5a5a;
  box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.15);
}
.lead-submit {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent, #f5c518);
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  text-transform: uppercase;
}
.lead-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent, #f5c518) 45%, transparent);
}
.lead-submit:active { transform: translateY(0); }
.lead-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.lead-error {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 12px;
  color: #ff8a8a;
  text-align: center;
}
.lead-modal-success {
  text-align: center;
  padding: 8px 0 4px;
}
.lead-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #f5c518) 18%, transparent);
  color: var(--accent, #f5c518);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent, #f5c518) 40%, transparent);
}
.lead-modal-success h3 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  margin: 0 0 8px;
}
.lead-modal-success p {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin: 0 0 22px;
  line-height: 1.5;
}
.lead-modal-success .lead-submit {
  width: 100%;
}

@media (max-width: 520px) {
  .lead-modal-card {
    padding: 30px 22px 24px;
    border-radius: 14px;
  }
  .lead-modal-title { font-size: 24px; }
  .lead-modal-sub { font-size: 13px; }
  .lead-field input { font-size: 16px; padding: 12px 13px; } /* evita zoom iOS */
}

@media (prefers-reduced-motion: reduce) {
  .lead-modal, .lead-modal-card { transition: none; }
}
