/* =========================================================
   JESSICA & MARCOS — HERO PREMIUM V4 / FASE 2
   Profundidad, movimiento y entrada cinematográfica
   ========================================================= */

.hero-premium {
  --hero-pointer-x: 0;
  --hero-pointer-y: 0;
  --hero-scroll-progress: 0;
  --hero-depth-back-x: 0px;
  --hero-depth-back-y: 0px;
  --hero-depth-front-x: 0px;
  --hero-depth-front-y: 0px;
  --hero-content-x: 0px;
  --hero-content-y: 0px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  padding: clamp(42px, 6vw, 84px) clamp(24px, 8vw, 120px);
  display: grid;
  align-items: center;
  justify-items: end;
  background: #f6f1e8;
}

/* La imagen real vive en una capa independiente */
.hero-premium .hero-background {
  position: absolute;
  inset: -5%;
  z-index: -8;
  background:
    url("../Imagenes/Hero/fondo-hero.jpg")
    center center / cover no-repeat;
  transform:
    translate3d(
      calc(var(--hero-pointer-x) * -10px),
      calc(
        var(--hero-pointer-y) * -8px +
        var(--hero-scroll-progress) * 28px
      ),
      0
    )
    scale(1.08);
  filter: saturate(.92) contrast(.98);
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

.hero-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -7;
  background:
    linear-gradient(
      90deg,
      rgba(247, 242, 233, .12) 0%,
      rgba(247, 242, 233, .25) 40%,
      rgba(247, 242, 233, .78) 72%,
      rgba(247, 242, 233, .94) 100%
    );
  pointer-events: none;
}

.hero-premium::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -6;
  background:
    radial-gradient(
      circle at 77% 48%,
      rgba(255,255,255,.42),
      transparent 44%
    );
  pointer-events: none;
}

.hero-scene,
.hero-vignette,
.hero-light,
.hero-grain,
.hero-depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-scene {
  z-index: -5;
}

.hero-vignette {
  background:
    radial-gradient(
      ellipse at center,
      transparent 42%,
      rgba(43, 47, 39, .08) 100%
    );
  mix-blend-mode: multiply;
}

.hero-light {
  border-radius: 50%;
  filter: blur(28px);
  opacity: .38;
  will-change: transform, opacity;
}

.hero-light-one {
  width: 36vw;
  height: 36vw;
  min-width: 260px;
  min-height: 260px;
  top: 8%;
  right: 2%;
  background: rgba(255, 248, 222, .78);
  animation: heroLightFloatOne 10s ease-in-out infinite alternate;
}

.hero-light-two {
  width: 24vw;
  height: 24vw;
  min-width: 210px;
  min-height: 210px;
  bottom: 2%;
  right: 24%;
  background: rgba(207, 214, 192, .45);
  animation: heroLightFloatTwo 12s ease-in-out infinite alternate;
}

.hero-grain {
  z-index: 3;
  opacity: .14;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hero-depth {
  z-index: 2;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-depth-back {
  transform:
    translate3d(
      var(--hero-depth-back-x),
      var(--hero-depth-back-y),
      0
    );
}

.hero-depth-front {
  transform:
    translate3d(
      var(--hero-depth-front-x),
      var(--hero-depth-front-y),
      0
    );
}

.hero-leaf {
  position: absolute;
  display: block;
  width: clamp(120px, 16vw, 260px);
  aspect-ratio: 1 / 1.42;
  opacity: .12;
  border-radius: 100% 0 100% 0;
  border: 1px solid rgba(78, 91, 66, .38);
  transform: rotate(var(--leaf-angle, 20deg));
  filter: blur(.2px);
}

.hero-leaf::before,
.hero-leaf::after {
  content: "";
  position: absolute;
  background: rgba(78, 91, 66, .28);
}

.hero-leaf::before {
  width: 1px;
  height: 88%;
  left: 50%;
  top: 7%;
  transform: rotate(-28deg);
  transform-origin: center;
}

.hero-leaf::after {
  width: 46%;
  height: 1px;
  left: 26%;
  top: 51%;
  transform: rotate(36deg);
}

.hero-leaf-one {
  top: 4%;
  left: 5%;
  --leaf-angle: -34deg;
}

.hero-leaf-two {
  bottom: 4%;
  left: 18%;
  --leaf-angle: 142deg;
  opacity: .08;
}

.hero-leaf-three {
  top: 2%;
  right: -3%;
  --leaf-angle: 38deg;
  opacity: .08;
}

.hero-leaf-four {
  bottom: -9%;
  right: 8%;
  --leaf-angle: -138deg;
  opacity: .10;
}

/* =========================================================
   CONTENIDO Y PROFUNDIDAD
   ========================================================= */

.hero-content-shell {
  position: relative;
  z-index: 5;
  width: min(600px, 92vw);
  margin-left: auto;
  transform:
    translate3d(
      var(--hero-content-x),
      var(--hero-content-y),
      0
    );
  will-change: transform;
}

.hero-premium-text {
  position: relative;
  width: 100%;
  margin: 0;
  padding: clamp(26px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 3px;
  background:
    linear-gradient(
      145deg,
      rgba(255, 253, 248, .34),
      rgba(255, 253, 248, .08)
    );
  box-shadow:
    0 30px 80px rgba(49, 56, 42, .12),
    inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.hero-premium-text::before,
.hero-premium-text::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  opacity: .54;
}

.hero-premium-text::before {
  top: 13px;
  left: 13px;
  border-top: 1px solid rgba(86, 101, 74, .58);
  border-left: 1px solid rgba(86, 101, 74, .58);
}

.hero-premium-text::after {
  right: 13px;
  bottom: 13px;
  border-right: 1px solid rgba(86, 101, 74, .58);
  border-bottom: 1px solid rgba(86, 101, 74, .58);
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-kicker p {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: .66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--olive-dark);
}

.hero-kicker > span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--olive));
}

.hero-kicker > span:last-child {
  background: linear-gradient(90deg, var(--olive), transparent);
}

.hero-monogram {
  margin: 0 auto 14px;
}

.hero-premium .invite-text {
  margin-bottom: 22px;
  font-size: clamp(1.05rem, 1.65vw, 1.28rem);
}

.hero-premium h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .08em;
  font-size: clamp(3.8rem, 7.2vw, 7rem);
  line-height: .76;
}

.hero-premium h1 .hero-name {
  display: block;
}

.hero-premium h1 .hero-ampersand {
  display: block;
  margin: .16em 0 .05em;
  font-family: "Cormorant Garamond", serif;
  font-size: .36em;
  color: var(--olive);
}

.hero-divider {
  margin-top: 26px;
}

.hero-date {
  margin-bottom: 9px;
}

.hero-location {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(55, 67, 49, .78);
}

/* =========================================================
   ENTRADA CINEMATOGRÁFICA ESCALONADA
   ========================================================= */

.hero-premium [data-hero-step] {
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, 32px, 0) scale(.97);
  transition:
    opacity 1.05s cubic-bezier(.16,1,.3,1),
    transform 1.05s cubic-bezier(.16,1,.3,1),
    filter 1.05s cubic-bezier(.16,1,.3,1);
}

.hero-premium.hero-ready [data-hero-step] {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-premium.hero-ready [data-hero-step="1"] { transition-delay: 120ms; }
.hero-premium.hero-ready [data-hero-step="2"] { transition-delay: 240ms; }
.hero-premium.hero-ready [data-hero-step="3"] { transition-delay: 380ms; }
.hero-premium.hero-ready [data-hero-step="4"] { transition-delay: 540ms; }
.hero-premium.hero-ready [data-hero-step="5"] { transition-delay: 720ms; }
.hero-premium.hero-ready [data-hero-step="6"] { transition-delay: 860ms; }
.hero-premium.hero-ready [data-hero-step="7"] { transition-delay: 980ms; }

.hero-premium .hero-background,
.hero-premium .hero-light,
.hero-premium .hero-depth {
  opacity: 0;
  transition:
    opacity 1.3s ease,
    transform .25s cubic-bezier(.2,.7,.2,1);
}

.hero-premium.hero-ready .hero-background,
.hero-premium.hero-ready .hero-light,
.hero-premium.hero-ready .hero-depth {
  opacity: 1;
}

.hero-premium .hero-background {
  transition:
    opacity 1.6s ease,
    transform .25s cubic-bezier(.2,.7,.2,1);
}

.hero-premium-text {
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition:
    opacity 1.1s ease,
    transform 1.2s cubic-bezier(.16,1,.3,1);
}

.hero-premium.hero-ready .hero-premium-text {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Anula la entrada antigua de Fase 1 solo dentro del nuevo hero */
.hero-premium .hero-text > * {
  opacity: inherit;
  filter: inherit;
  transform: none;
  transition: inherit;
}

/* =========================================================
   INDICADOR DE SCROLL
   ========================================================= */

.hero-scroll-cue {
  z-index: 8;
  left: auto;
  right: clamp(22px, 4vw, 54px);
  bottom: clamp(22px, 4vw, 46px);
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px;
  background: rgba(59, 71, 51, .84);
  transform: none;
  animation: none;
  display: flex;
  opacity: 0;
  transition:
    opacity .9s ease 1.15s,
    transform .4s cubic-bezier(.16,1,.3,1),
    background-color .3s ease;
}

.hero-premium.hero-ready .hero-scroll-cue {
  opacity: 1;
}

.hero-scroll-cue span {
  font-family: "Montserrat", sans-serif;
  font-size: .62rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero-scroll-cue svg {
  width: 18px;
  height: 18px;
  animation: heroArrowFloat 1.8s ease-in-out infinite;
}

.hero-scroll-cue:hover {
  transform: translateY(-3px);
  background: rgba(59, 71, 51, .96);
}

/* =========================================================
   ANIMACIONES AMBIENTALES
   ========================================================= */

@keyframes heroLightFloatOne {
  from {
    transform: translate3d(-2%, -2%, 0) scale(.96);
    opacity: .28;
  }
  to {
    transform: translate3d(4%, 5%, 0) scale(1.08);
    opacity: .48;
  }
}

@keyframes heroLightFloatTwo {
  from {
    transform: translate3d(3%, 3%, 0) scale(1.02);
    opacity: .22;
  }
  to {
    transform: translate3d(-5%, -4%, 0) scale(.92);
    opacity: .42;
  }
}

@keyframes heroArrowFloat {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(4px); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .hero-premium {
    justify-items: center;
    padding: 86px 24px 110px;
  }

  .hero-premium::before {
    background:
      linear-gradient(
        180deg,
        rgba(247, 242, 233, .22) 0%,
        rgba(247, 242, 233, .65) 48%,
        rgba(247, 242, 233, .92) 100%
      );
  }

  .hero-content-shell {
    margin: auto;
    align-self: end;
  }

  .hero-premium-text {
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }

  .hero-scroll-cue {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .hero-scroll-cue:hover {
    transform: translateX(-50%) translateY(-3px);
  }
}

@media (max-width: 560px) {
  .hero-premium {
    min-height: 100svh;
    padding: 70px 16px 104px;
  }

  .hero-premium .hero-background {
    background-position: 34% center;
  }

  .hero-premium-text {
    padding: 30px 18px;
    background:
      linear-gradient(
        145deg,
        rgba(255, 253, 248, .56),
        rgba(255, 253, 248, .20)
      );
  }

  .hero-premium h1 {
    font-size: clamp(3.35rem, 17vw, 5.1rem);
  }

  .hero-kicker > span {
    width: 22px;
  }

  .hero-kicker p {
    font-size: .58rem;
    letter-spacing: .20em;
  }

  .hero-location {
    font-size: .61rem;
    letter-spacing: .15em;
  }

  .hero-scroll-cue span {
    display: none;
  }

  .hero-scroll-cue {
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
  }

  .hero-leaf {
    opacity: .06;
  }
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .hero-premium,
  .hero-premium *,
  .hero-premium *::before,
  .hero-premium *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-premium [data-hero-step],
  .hero-premium .hero-background,
  .hero-premium .hero-light,
  .hero-premium .hero-depth,
  .hero-premium-text,
  .hero-scroll-cue {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .hero-scroll-cue {
    transform: none !important;
  }
}
