/* =====================================================================
   Escenas con scroll (estilo Apple) — danielsalinasremax.com
   Lo usan index.html y en/index.html. El movimiento lo maneja
   assets/escenas.js; sin JavaScript o con "reducir movimiento" todo
   se muestra quieto y completo.
   ===================================================================== */
:root {
  --noche: #050a18;
  --noche-2: #0a1530;
  --oro: #d9a441;
  --oro-claro: #f3d68d;
  --suave: cubic-bezier(.16, 1, .3, 1);
}

/* ---------------------------------------------------------------------
   NAV: se esconde al bajar, vuelve al subir; versión oscura sobre escenas
   --------------------------------------------------------------------- */
nav#nav { transition: background .4s, backdrop-filter .4s, padding .3s, box-shadow .4s, translate .5s var(--suave); }
nav#nav.nav-oculta { translate: 0 -115%; }
nav#nav.scrolled.nav-oscura {
  background: rgba(5, 10, 24, .72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
nav#nav.scrolled.nav-oscura .nav-logo .name,
nav#nav.scrolled.nav-oscura .nav-links a { color: rgba(255, 255, 255, .9); }
nav#nav.scrolled.nav-oscura .nav-links a:hover { color: #fff; }
nav#nav.scrolled.nav-oscura .nav-logo .brand { color: rgba(255, 255, 255, .6); }
nav#nav.scrolled.nav-oscura .hamburger span { background: #fff; }
nav#nav.scrolled.nav-oscura .nav-links a.nav-cta { color: #fff; }

/* Menú: hamburguesa hasta 1100 px (antes los enlaces se amontonaban en tablet) */
@media (max-width: 1100px) {
  nav#nav .nav-links { display: none; }
  nav#nav .hamburger { display: flex; }
}
.nav-mobile { overflow-y: auto; }
@media (max-height: 760px) {
  .nav-mobile { gap: 1.4rem; }
  .nav-mobile a { font-size: 1.6rem; }
}

/* ---------------------------------------------------------------------
   HERO: texto a la izquierda, retrato a la derecha
   --------------------------------------------------------------------- */
.hero.hero-v2 {
  background-image: none;
  background-color: var(--noche);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8rem 2.5rem 6rem;
}
.hero-v2 .hero-bg {
  background:
    radial-gradient(70% 80% at 82% 30%, rgba(26, 77, 181, .55) 0%, rgba(26, 77, 181, 0) 60%),
    radial-gradient(60% 70% at 10% 90%, rgba(227, 24, 55, .18) 0%, rgba(227, 24, 55, 0) 60%),
    linear-gradient(160deg, #0b1d4d 0%, #061235 45%, var(--noche) 100%);
}
.hero-v2 .hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.hero-v2 .hero-content { text-align: left; max-width: none; padding: 0; }
.hero-v2 .hero-tag { justify-content: flex-start; margin-bottom: 1.6rem; }
.hero-v2 .hero-tag::after { display: none; }
.hero-v2 .hero-name {
  opacity: 1; transform: none; animation: none;
  font-size: clamp(3.1rem, 7vw, 6.6rem);
  line-height: .98;
  margin-bottom: 1.2rem;
}
.hero-v2 .hl { display: block; overflow: hidden; padding: 0 .04em .08em 0; margin-bottom: -.08em; }
.hero-v2 .hli { display: inline-block; }
.hero-v2 .hero-role { margin-bottom: 1.4rem; }
.hero-v2 .hero-slogan { margin: 0 0 2.4rem; max-width: 470px; }
.hero-v2 .hero-btns { justify-content: flex-start; }

/* Retrato */
.hero-retrato {
  position: relative; margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background: #0b1d4d;
  box-shadow: 0 50px 120px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
}
.hero-retrato img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; scale: 1.08; }
.hero-retrato::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 10, 24, 0) 55%, rgba(5, 10, 24, .55) 100%);
}
.hero-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 100px;
  background: rgba(10, 21, 48, .55);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  white-space: nowrap;
}
.hero-chip b { color: var(--oro-claro); font-weight: 700; }
.hero-chip.chip-a { left: 1.1rem; top: 1.1rem; }
.hero-chip.chip-b { right: 1.1rem; bottom: 4.3rem; }
.hero-chip.chip-c { left: 1.1rem; bottom: 1.1rem; }
.hero-chip .avail-dot { width: 7px; height: 7px; }
.hero-v2 .hero-avail { display: none; }
@media (min-width: 901px) {
  /* que el retrato quepa completo en laptops de poca altura */
  .hero-retrato { max-height: max(380px, calc(100svh - 13rem)); }
}

/* Entrada del hero (solo con JavaScript y movimiento permitido) */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-v2 .hli { transform: translateY(108%); animation: escSube 1.15s var(--suave) forwards; }
  html.js .hero-v2 .hl-1 .hli { animation-delay: .35s; }
  html.js .hero-v2 .hl-2 .hli { animation-delay: .5s; }
  html.js .hero-retrato { clip-path: inset(100% 0 0 0 round 28px); animation: escCortina 1.5s var(--suave) .45s forwards; }
  html.js .hero-retrato img { scale: 1.3; animation: escAcercar 2.4s var(--suave) .45s forwards; }
  html.js .hero-chip { opacity: 0; translate: 0 14px; animation: escAparece .9s var(--suave) forwards, escFlota 6s ease-in-out infinite 2.4s; }
  html.js .hero-chip.chip-a { animation-delay: 1.25s, 2.4s; }
  html.js .hero-chip.chip-b { animation-delay: 1.45s, 3.1s; }
  html.js .hero-chip.chip-c { animation-delay: 1.65s, 3.8s; }
}
@keyframes escSube { to { transform: translateY(0); } }
@keyframes escCortina { to { clip-path: inset(0 0 0 0 round 28px); } }
@keyframes escAcercar { to { scale: 1.08; } }
@keyframes escAparece { to { opacity: 1; translate: 0 0; } }
@keyframes escFlota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 900px) {
  .hero.hero-v2 { padding: 7rem 1.5rem 4rem; }
  .hero-v2 .hero-inner { grid-template-columns: 1fr; gap: 2.6rem; }
  .hero-v2 .hero-content { text-align: center; }
  .hero-v2 .hero-tag { justify-content: center; }
  .hero-v2 .hero-slogan { margin: 0 auto 2.2rem; }
  .hero-v2 .hero-btns { justify-content: center; }
  .hero-retrato { max-width: 440px; width: 100%; margin: 0 auto; aspect-ratio: 4 / 4.6; }
}
@media (max-width: 680px) {
  .hero-v2 .hero-scroll { display: none; }
}

/* ---------------------------------------------------------------------
   ESCENAS FIJAS (sticky): la sección mide varias pantallas y su contenido
   se queda quieto mientras el scroll avanza la animación
   --------------------------------------------------------------------- */
.escena, .declaracion {
  position: relative;
  padding: 0 !important;
  background: var(--noche);
  color: #fff;
}
.escena { height: 220vh; }
.declaracion { height: 240vh; }
.escena-sticky, .declaracion-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

/* --- Video que avanza cuadro a cuadro --- */
.escena-media { position: absolute; inset: 0; background: var(--noche); }
.escena-media video, .escena-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.escena-media .escena-final { position: absolute; inset: 0; }
html.js .escena-media .escena-final { display: none; }
html:not(.js) .escena-media video { display: none; }
.escena-velo {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 10, 24, .7) 0%, rgba(5, 10, 24, 0) 26%),
    linear-gradient(0deg, rgba(5, 10, 24, .9) 0%, rgba(5, 10, 24, .35) 32%, rgba(5, 10, 24, 0) 55%);
}
.escena-velo.lateral {
  background:
    linear-gradient(180deg, rgba(5, 10, 24, .7) 0%, rgba(5, 10, 24, 0) 26%),
    linear-gradient(90deg, rgba(5, 10, 24, .82) 0%, rgba(5, 10, 24, .45) 26%, rgba(5, 10, 24, 0) 44%),
    linear-gradient(0deg, rgba(5, 10, 24, .85) 0%, rgba(5, 10, 24, 0) 45%);
}

/* Textos que aparecen y se van según el avance */
.escena-cap {
  position: absolute;
  left: clamp(1.25rem, 6vw, 5.5rem);
  bottom: clamp(5.5rem, 13vh, 8.5rem);
  width: min(640px, calc(100% - 2.5rem));
  will-change: opacity, transform;
}
.escena-cap.derecha { left: auto; right: clamp(1.25rem, 6vw, 5.5rem); text-align: right; }
.escena-cap.derecha .esc-kicker { justify-content: flex-end; }
html.js .escena-cap { opacity: 0; pointer-events: none; }
html.js .escena-cap.visible { pointer-events: auto; }
html:not(.js) .escena-cap:not(.final) { display: none; }

.esc-kicker {
  display: flex; align-items: center; gap: .7rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--oro); margin-bottom: .9rem;
}
.esc-kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; flex-shrink: 0; }
.esc-titulo {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: .98; letter-spacing: -.025em;
  margin-bottom: 1rem;
}
.esc-titulo em { font-style: italic; font-weight: 400; color: var(--oro-claro); }
.esc-texto { font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 300; line-height: 1.65; color: rgba(255, 255, 255, .84); max-width: 34em; }
.escena-cap.derecha .esc-texto { margin-left: auto; }
.esc-grande {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.04; letter-spacing: -.035em;
  margin-bottom: .9rem;
}
.esc-dato {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 7.6rem);
  line-height: .92; letter-spacing: -.05em;
  background: linear-gradient(180deg, #fff 20%, rgba(255, 255, 255, .55));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.esc-dato small {
  font-size: .26em; font-weight: 600; letter-spacing: 0;
  -webkit-text-fill-color: rgba(255, 255, 255, .78);
  margin-left: .25em;
}
.esc-dato + .esc-dato { margin-top: .6rem; }
.esc-precio {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1; letter-spacing: -.02em; color: var(--oro-claro);
}
.esc-precio small { font-family: 'Inter', sans-serif; font-size: .28em; font-weight: 700; letter-spacing: .18em; color: var(--oro); margin-left: .3em; }
.esc-botones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.escena-cap.derecha .esc-botones { justify-content: flex-end; }
.esc-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.6rem; border-radius: 100px;
  background: #fff; color: var(--noche) !important;
  font-size: .82rem; font-weight: 700; letter-spacing: .02em;
  transition: transform .3s var(--suave), background .3s, box-shadow .3s;
}
.esc-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.esc-btn.vidrio {
  background: rgba(255, 255, 255, .1); color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.esc-btn.vidrio:hover { background: rgba(255, 255, 255, .18); }
.esc-btn svg { width: 16px; height: 16px; }

/* Pista para deslizar y barra de avance */
.escena-pista {
  position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .6);
  pointer-events: none; transition: opacity .4s;
}
.escena-pista::after { content: ''; width: 1px; height: 34px; background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); }
html:not(.js) .escena-pista { display: none; }
.escena-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1); }
.escena-barra i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--red), var(--oro));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
html:not(.js) .escena-barra { display: none; }

/* ---------------------------------------------------------------------
   DECLARACIÓN: la frase se ilumina palabra por palabra
   --------------------------------------------------------------------- */
.declaracion-sticky {
  display: flex; align-items: center; justify-content: center;
  padding: 0 clamp(1.25rem, 7vw, 7rem);
  background:
    radial-gradient(60% 50% at 50% 55%, rgba(26, 77, 181, .28) 0%, rgba(26, 77, 181, 0) 70%),
    var(--noche);
}
.decl-caja { max-width: 1120px; width: 100%; margin: 0; }
.decl-kicker {
  display: flex; align-items: center; gap: .7rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--oro); margin-bottom: 1.8rem;
}
.decl-kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.decl-texto {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: clamp(1.9rem, 4.7vw, 4.3rem);
  line-height: 1.12; letter-spacing: -.035em;
  color: #fff; quotes: none; margin: 0;
}
html.js .decl-texto .w { opacity: .16; transition: opacity .18s linear, color .4s; }
.decl-texto .w.acento.lit { color: var(--oro-claro); }
.decl-firma {
  margin-top: 2.4rem;
  display: flex; align-items: center; gap: 1rem;
  font-size: .9rem; color: rgba(255, 255, 255, .7);
}
.decl-firma img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid rgba(255, 255, 255, .2); }
.decl-firma b { display: block; color: #fff; font-weight: 600; }
html.js .decl-firma { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .8s var(--suave); }
html.js .decl-firma.visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------
   Efectos ligados al scroll en el resto de la página
   (usan translate/scale/clip-path; no chocan con las animaciones existentes)
   --------------------------------------------------------------------- */
.prop-img img[data-par] { scale: 1.14; }
[data-par], [data-sube], [data-escala] { will-change: translate, scale; }

/* ---------------------------------------------------------------------
   Celular
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  .escena { height: 175vh; }
  .declaracion { height: 200vh; }
  .escena-velo, .escena-velo.lateral {
    background:
      linear-gradient(180deg, rgba(5, 10, 24, .65) 0%, rgba(5, 10, 24, 0) 22%),
      linear-gradient(0deg, rgba(5, 10, 24, .92) 0%, rgba(5, 10, 24, .5) 34%, rgba(5, 10, 24, 0) 58%);
  }
  .escena-cap, .escena-cap.derecha {
    left: 1.25rem; right: 1.25rem; width: auto;
    bottom: 4.6rem; text-align: left;
  }
  .escena-cap.derecha .esc-kicker, .escena-cap.derecha .esc-botones { justify-content: flex-start; }
  .escena-cap.derecha .esc-texto { margin-left: 0; }
  .esc-btn { padding: .85rem 1.3rem; }
  .decl-firma { margin-top: 1.8rem; }
}

/* ---------------------------------------------------------------------
   Reducir movimiento: todo quieto, cada escena muestra su cuadro final
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .escena, .declaracion { height: auto; }
  .escena-sticky, .declaracion-sticky { position: relative; height: auto; min-height: 100svh; }
  html.js .escena-media video { display: none; }
  html.js .escena-media .escena-final { display: block; }
  html.js .escena-cap { opacity: 1; transform: none; pointer-events: auto; }
  html.js .escena-cap:not(.final) { display: none; }
  .escena-pista, .escena-barra { display: none; }
  html.js .decl-texto .w { opacity: 1; }
  html.js .decl-firma { opacity: 1; transform: none; }
  .declaracion-sticky { padding-top: 6rem; padding-bottom: 6rem; }
}
