/*
 * Hero animado de Reto Foto 2026.
 * Todos los estilos están limitados a .ny-story para no modificar el tema.
 */

.ny-story,
.ny-story * {
  box-sizing: border-box;
}

.ny-story {
  --ny-ink: #000000;
  --concurso-foto-yellow: #bea260;
  --concurso-foto-rose: #801b1d;
  --ny-label-size: clamp(1rem, .72vw, 1.125rem);
  --ny-copy-size: clamp(1.0625rem, 1vw, 1.25rem);
  position: relative;
  z-index: 1;
  width: 100%;
  height: 400vh;
  min-height: 400vh;
  overflow: hidden;
  overflow: clip;
  background: var(--ny-ink);
  isolation: isolate;
}

.ny-story__stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ny-ink);
  isolation: isolate;
}

.ny-story__stage::before,
.ny-story__stage::after {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  content: '';
}

.ny-story__stage::before {
  inset: -18%;
  background:
    radial-gradient(circle at 50% 48%, rgba(190, 162, 96, .2) 0 1px, transparent 1px 18%),
    radial-gradient(circle at 25% 68%, rgba(190, 162, 96, .16), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(128, 27, 29, .22), transparent 24%);
  mix-blend-mode: screen;
  opacity: .72;
  animation: concurso-foto-breathe 12s ease-in-out infinite alternate;
}

.ny-story__stage::after {
  top: 50%;
  left: 50%;
  width: min(68vw, 54rem);
  aspect-ratio: 1;
  border: 1px solid rgba(190, 162, 96, .24);
  border-radius: 50%;
  box-shadow:
    0 0 0 3.5vw rgba(190, 162, 96, .05),
    0 0 0 10vw rgba(128, 27, 29, .06);
  opacity: .8;
  transform: translate(-50%, -50%) rotate(-8deg) scale(.86);
  animation: concurso-foto-orbit 24s ease-in-out infinite alternate;
}

.ny-story #nyHeroCanvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--ny-ink);
}

.ny-story__wash,
.ny-story__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ny-story__wash {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .05) 28%, rgba(0, 0, 0, .1) 65%, rgba(0, 0, 0, .67) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .22), transparent 36%, transparent 66%, rgba(0, 0, 0, .22));
}

.ny-story__vignette {
  z-index: 3;
  box-shadow: inset 0 0 16vw rgba(0, 0, 0, .24);
}

.ny-story__copy {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.ny-story__scene {
  position: absolute;
  width: min(42rem, 72vw);
  margin: 0;
  opacity: 0;
  --scene-shift: 52px;
  --scene-scale: .78;
  --scene-blur: 9px;
  --scene-rotate: 0deg;
  filter: blur(var(--scene-blur));
  transform: translate3d(0, var(--scene-shift), 0) scale(var(--scene-scale)) rotate(var(--scene-rotate));
  transform-origin: center center;
  will-change: opacity, filter, transform;
  transition: filter .18s linear;
}

.ny-story__scene--center {
  top: 50%;
  left: 50%;
  width: min(44rem, 82vw);
  text-align: center;
  transform: translate3d(-50%, calc(-50% + var(--scene-shift)), 0) scale(var(--scene-scale)) rotate(var(--scene-rotate));
}

.ny-story__scene--left {
  top: 50%;
  left: clamp(1.5rem, 9vw, 9rem);
  transform: translate3d(0, calc(-50% + var(--scene-shift)), 0) scale(var(--scene-scale)) rotate(var(--scene-rotate));
}

.ny-story__scene--right {
  top: 50%;
  right: clamp(1.5rem, 9vw, 9rem);
  text-align: right;
  transform: translate3d(0, calc(-50% + var(--scene-shift)), 0) scale(var(--scene-scale)) rotate(var(--scene-rotate));
}

.ny-story__scene--bottom {
  bottom: clamp(4.8rem, 12vh, 8rem);
  left: 50%;
  text-align: center;
  transform: translate3d(-50%, var(--scene-shift), 0) scale(var(--scene-scale)) rotate(var(--scene-rotate));
}

.ny-story__eyebrow {
  display: block;
  margin-bottom: 1.2rem;
  color: rgba(255, 255, 255, .92);
  font-family: 'Gotham Rounded', Arial, sans-serif;
  font-size: var(--ny-label-size);
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ny-story__brand {
  display: block;
  width: clamp(17rem, 36vw, 32rem);
  max-width: 86vw;
  height: auto;
  margin: 0 auto clamp(1.2rem, 2.5vw, 2rem);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .32));
}

.ny-story__scene h1,
.ny-story__scene h2 {
  margin: 0;
  color: rgba(255, 255, 255, .96);
  font-family: 'Gotham Rounded', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .96;
  text-wrap: balance;
  text-shadow: 0 10px 24px rgba(0, 0, 0, .32), 0 0 42px rgba(190, 162, 96, .16);
}

.ny-story__scene h1 {
  font-size: clamp(4.8rem, 15vw, 12rem);
}

.ny-story__scene h2 {
  font-size: clamp(2.5rem, 6.4vw, 6.6rem);
}

.ny-story__scene p {
  max-width: 25rem;
  margin: 1.3rem 0 0;
  color: rgba(255, 255, 255, .9);
  font-family: 'Gotham Rounded Book', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--ny-copy-size);
  letter-spacing: .015em;
  line-height: 1.65;
}

.ny-story__scene--right p {
  margin-right: 0;
  margin-left: auto;
}

.ny-story__image-slot {
  display: grid;
  place-items: center;
  width: clamp(4.6rem, 8vw, 7rem);
  aspect-ratio: 1;
  margin: 0 auto 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 50%;
  background: rgba(5, 5, 5, .22);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .06), 0 18px 42px rgba(0, 0, 0, .2);
}

.ny-story__image-slot img {
  display: block;
  width: 58%;
  height: auto;
  object-fit: contain;
  opacity: .9;
}

.ny-story__meta,
.ny-story__scroll {
  position: absolute;
  z-index: 5;
  color: rgba(255, 255, 255, .92);
  font-family: 'Gotham Rounded Book', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--ny-label-size);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ny-story__meta {
  top: 8rem;
  right: clamp(1.5rem, 5vw, 5rem);
}

.ny-story__scroll {
  bottom: 2.2rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .8rem;
  transform: translateX(-50%);
  white-space: nowrap;
  animation: concurso-foto-scroll-pulse 2.4s ease-in-out infinite;
}

.ny-story__scroll::before {
  display: block;
  width: 2.4rem;
  height: 1px;
  background: rgba(255, 255, 255, .72);
  content: '';
}

.ny-story__progress {
  position: absolute;
  z-index: 5;
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: 2.2rem;
  width: clamp(4rem, 10vw, 9rem);
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .32);
}

.ny-story__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--concurso-foto-yellow), var(--concurso-foto-rose), #fff);
  box-shadow: 0 0 12px rgba(190, 162, 96, .58);
  transform: scaleX(0);
  transform-origin: left center;
}

.ny-story__loader {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  background: rgba(0, 0, 0, .9);
  color: rgba(255, 255, 255, .9);
  font-family: 'Gotham Rounded Book', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--ny-label-size);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: opacity .2s ease, visibility .2s ease;
}

.ny-story__loader.is-ready {
  visibility: hidden;
  opacity: 0;
}

.ny-story__spinner {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-top-color: var(--concurso-foto-yellow);
  border-radius: 50%;
  animation: concurso-foto-spin .9s linear infinite;
}

@keyframes concurso-foto-spin {
  to { transform: rotate(360deg); }
}

@keyframes concurso-foto-breathe {
  from { opacity: .48; transform: scale(.96) rotate(0deg); }
  to { opacity: .86; transform: scale(1.04) rotate(4deg); }
}

@keyframes concurso-foto-orbit {
  from { transform: translate(-50%, -50%) rotate(-8deg) scale(.86); }
  to { transform: translate(-50%, -50%) rotate(12deg) scale(1.04); }
}

@keyframes concurso-foto-scroll-pulse {
  0%, 100% { opacity: .62; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 700px) {
  .ny-story__stage {
    min-height: 100svh;
  }

  .ny-story__meta {
    top: 5.2rem;
    right: 1rem;
  }

  .ny-story__scene {
    width: calc(100% - 2.5rem);
  }

  .ny-story__scene--center {
    width: calc(100% - 2.5rem);
  }

  .ny-story__scene--left {
    left: 1.25rem;
  }

  .ny-story__scene--right {
    right: 1.25rem;
  }

  .ny-story__scene h1 {
    font-size: clamp(4.2rem, 21vw, 7rem);
  }

  .ny-story__scene h2 {
    font-size: clamp(2.45rem, 12vw, 4.8rem);
  }

  .ny-story__brand {
    width: min(82vw, 25rem);
  }

  .ny-story__eyebrow,
  .ny-story__meta,
  .ny-story__scroll,
  .ny-story__loader {
    font-size: 1rem;
    letter-spacing: .09em;
  }

  .ny-story__scene p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .ny-story__progress {
    right: 1rem;
    bottom: 4.5rem;
    width: 4rem;
  }

  .ny-story__scroll {
    bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ny-story__stage::before,
  .ny-story__stage::after,
  .ny-story__scroll {
    animation: none;
  }

  .ny-story__scene {
    filter: none !important;
  }

  .ny-story__loader {
    transition-duration: .01ms;
  }

  .ny-story__spinner {
    animation-duration: 1.8s;
  }
}
