#home-hero-track {
  --story-progress: 0;
  --story-progress-width: 0%;
  --story-glow-a: 20%;
  --story-glow-b: 82%;
  height: 520vh;
  min-height: 3200px;
  position: relative;
  background: #050608;
}

.fwp-story-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.fwp-story-atmosphere,
.fwp-story-grid,
.fwp-story-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fwp-story-atmosphere {
  z-index: -3;
  background:
    radial-gradient(circle at var(--story-glow-a) 28%, rgba(56, 189, 248, .16), transparent 34%),
    radial-gradient(circle at var(--story-glow-b) 66%, rgba(168, 85, 247, .18), transparent 36%),
    #050608;
}

.fwp-story-grid {
  z-index: -2;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(700px) rotateX(63deg) translateY(48%) scale(1.35);
  transform-origin: center bottom;
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 68%);
  mask-image: linear-gradient(to bottom, transparent 4%, #000 68%);
}

.fwp-story-vignette {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, .7), transparent 28%, transparent 72%, rgba(5, 6, 8, .6)),
    linear-gradient(180deg, rgba(5, 6, 8, .28), transparent 24%, transparent 72%, #050608 100%);
}

.fwp-story-progress {
  position: absolute;
  z-index: 30;
  left: clamp(20px, 4vw, 64px);
  bottom: clamp(24px, 5vh, 52px);
  width: min(220px, 38vw);
}

.fwp-story-progress-track {
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .16);
}

.fwp-story-progress-fill {
  height: 100%;
  width: var(--story-progress-width);
  background: linear-gradient(90deg, #38BDF8, #C9A86A);
  box-shadow: 0 0 16px rgba(56, 189, 248, .65);
}

.fwp-story-stage {
  position: relative;
  z-index: 10;
  width: min(1180px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 92px clamp(24px, 6vw, 72px) 88px;
}

.fwp-story-scene {
  position: absolute;
  inset: 92px clamp(24px, 6vw, 72px) 88px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 96px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 28px, 0);
  transition: opacity .55s ease, transform .7s cubic-bezier(.16, 1, .3, 1), visibility .55s;
  pointer-events: none;
}

.fwp-story-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.fwp-story-scene--intro,
.fwp-story-scene--final {
  grid-template-columns: 1fr;
  text-align: center;
}

.fwp-story-copy {
  position: relative;
  z-index: 5;
  max-width: 620px;
}

.fwp-story-scene--intro .fwp-story-copy,
.fwp-story-scene--final .fwp-story-copy {
  margin: 0 auto;
}

.fwp-story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #C9A86A;
  font: 700 .72rem/1 'Inter', sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.fwp-story-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

.fwp-story-title {
  margin: 0 0 20px;
  color: #fff;
  font: 700 clamp(2.55rem, 6vw, 5.7rem)/.98 'Space Grotesk', sans-serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.fwp-story-scene:not(.fwp-story-scene--intro) .fwp-story-title {
  font-size: clamp(2.25rem, 4.8vw, 4.4rem);
}

.fwp-story-title em {
  color: #38BDF8;
  font-style: normal;
  text-shadow: 0 0 28px rgba(56, 189, 248, .22);
}

.fwp-story-text {
  max-width: 590px;
  color: rgba(226, 232, 240, .74);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}

.fwp-benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.fwp-benefit-pill {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .035);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.fwp-story-visual {
  position: relative;
  min-height: clamp(340px, 54vh, 560px);
  display: grid;
  place-items: center;
}

.fwp-story-orbit {
  position: absolute;
  width: min(430px, 75vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(56, 189, 248, .035), 0 0 90px rgba(168, 85, 247, .035);
}

.fwp-story-orbit::before,
.fwp-story-orbit::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(201, 168, 106, .12);
  border-radius: inherit;
}

.fwp-story-orbit::before { inset: 12%; }
.fwp-story-orbit::after { inset: 28%; }

.fwp-story-pack {
  position: relative;
  z-index: 2;
  width: min(360px, 70vw);
  max-height: 52vh;
  object-fit: contain;
  filter: drop-shadow(0 32px 34px rgba(0, 0, 0, .55));
  transform: translate3d(0, 12px, 0) scale(.94);
  transition: transform .8s cubic-bezier(.16, 1, .3, 1), filter .8s ease;
}

.fwp-story-scene.is-active .fwp-story-pack {
  transform: translate3d(0, 0, 0) scale(1);
  filter: drop-shadow(0 34px 38px rgba(0, 0, 0, .62)) drop-shadow(0 0 32px rgba(56, 189, 248, .12));
}

.fwp-story-pack--group { width: min(520px, 82vw); }

.fwp-story-pack--pair-a,
.fwp-story-pack--pair-b {
  position: absolute;
  width: min(280px, 48%);
}

.fwp-story-pack--pair-a { transform: translate3d(-28%, 12px, 0) rotate(-4deg) scale(.94); }
.fwp-story-pack--pair-b { transform: translate3d(28%, 12px, 0) rotate(4deg) scale(.94); }
.fwp-story-scene.is-active .fwp-story-pack--pair-a { transform: translate3d(-28%, 0, 0) rotate(-4deg) scale(1); }
.fwp-story-scene.is-active .fwp-story-pack--pair-b { transform: translate3d(28%, 0, 0) rotate(4deg) scale(1); }

.fwp-story-number {
  position: absolute;
  right: 0;
  bottom: 2%;
  z-index: 1;
  color: rgba(255, 255, 255, .035);
  font: 700 clamp(7rem, 18vw, 13rem)/.8 'Space Grotesk', sans-serif;
  letter-spacing: -.08em;
  user-select: none;
}

.fwp-story-cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.fwp-story-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 26px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  transition: border-color .25s ease, background .25s ease;
}

.fwp-story-cta-secondary:hover {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .05);
}

.fwp-whatsapp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: #25D366;
  color: #062b16;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .18);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.fwp-whatsapp-cta:hover {
  transform: translateY(-2px);
  background: #2ee071;
  box-shadow: 0 16px 34px rgba(37, 211, 102, .28);
}

.fwp-whatsapp-cta:focus-visible {
  outline: 3px solid rgba(37, 211, 102, .35);
  outline-offset: 3px;
}

.fwp-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .6);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.fwp-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 22px;
  margin: 8px auto 0;
  background: linear-gradient(#C9A86A, transparent);
  animation: fwp-story-scroll 1.7s ease-in-out infinite;
}

@keyframes fwp-story-scroll {
  0%, 100% { transform: scaleY(.25); transform-origin: top; opacity: .4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* Progressive enhancement: the complete story stays readable if JS is unavailable. */
#home-hero-track:not(.story-ready) {
  height: auto;
  min-height: 0;
}

#home-hero-track:not(.story-ready) .fwp-story-sticky {
  height: auto;
  overflow: visible;
}

#home-hero-track:not(.story-ready) .fwp-story-stage {
  height: auto;
  padding-top: 110px;
}

#home-hero-track:not(.story-ready) .fwp-story-scene {
  position: relative;
  inset: auto;
  min-height: min(720px, 92vh);
  margin-bottom: 56px;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

#home-hero-track:not(.story-ready) .fwp-story-progress,
#home-hero-track:not(.story-ready) .fwp-scroll-hint {
  display: none;
}

@media (max-width: 760px) {
  #home-hero-track { height: 500vh; min-height: 3000px; }
  .fwp-story-stage { padding: 88px 22px 88px; }
  .fwp-story-scene {
    inset: 82px 22px 82px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, .9fr);
    align-content: center;
    gap: 12px;
    text-align: center;
  }
  .fwp-story-copy { margin: 0 auto; }
  .fwp-story-title { margin-bottom: 14px; }
  .fwp-story-text { font-size: .96rem; line-height: 1.55; }
  .fwp-benefit-list { justify-content: center; margin-top: 18px; }
  .fwp-story-visual { min-height: 260px; }
  .fwp-story-pack { width: min(260px, 68vw); max-height: 34vh; }
  .fwp-story-pack--group { width: min(330px, 82vw); }
  .fwp-story-pack--pair-a, .fwp-story-pack--pair-b { width: min(205px, 49%); }
  .fwp-story-orbit { width: min(310px, 74vw); }
  .fwp-story-number { right: 5%; bottom: 1%; }
  .fwp-story-progress { left: 20px; bottom: 24px; }
  .fwp-story-progress { width: 220px; max-width: calc(100vw - 40px); }
  .fwp-scroll-hint { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #home-hero-track { height: auto; min-height: 0; }
  .fwp-story-sticky { height: auto; overflow: visible; }
  .fwp-story-stage { height: auto; padding: 110px 24px 70px; }
  .fwp-story-scene {
    position: relative;
    inset: auto;
    min-height: min(720px, 92vh);
    margin-bottom: 56px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .fwp-story-progress, .fwp-scroll-hint { display: none; }
  .fwp-story-pack, .fwp-story-scene.is-active .fwp-story-pack { transform: none; transition: none; }
}
