/* ==================================================
   SPM PREMIUM SCROLL EXPERIENCE
================================================== */

:root {
  --premium-blue: #1268ff;
  --premium-cyan: #69c9ff;
  --premium-navy: #06183d;
}

/* Scroll progress */
.spm-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  z-index: 9999;
  background: linear-gradient(
    90deg,
    #1268ff,
    #69c9ff,
    #ffffff
  );
  box-shadow: 0 0 18px #69c9ff;
}

/* Cursor light */
.spm-cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  pointer-events: none;
  z-index: 2;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(77, 160, 255, 0.14),
    transparent 68%
  );
  transition: opacity 0.3s ease;
}

/* Flying bird */
.spm-bird {
  position: fixed;
  top: 18%;
  left: -160px;
  width: 110px;
  height: 70px;
  z-index: 15;
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgba(1, 20, 60, 0.25));
  will-change: transform;
}

.spm-bird-body {
  position: absolute;
  left: 43px;
  top: 28px;
  width: 38px;
  height: 17px;
  border-radius: 70% 55% 60% 45%;
  background: linear-gradient(135deg, #ffffff, #73bfff);
}

.spm-bird-head {
  position: absolute;
  left: 73px;
  top: 21px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
}

.spm-bird-head::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 6px;
  border-left: 14px solid #ffbe55;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.spm-bird-eye {
  position: absolute;
  right: 4px;
  top: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #071b46;
}

.spm-wing {
  position: absolute;
  left: 39px;
  top: 20px;
  width: 46px;
  height: 23px;
  border-radius: 90% 10% 80% 20%;
  transform-origin: right center;
  background: linear-gradient(135deg, #eaf6ff, #429bff);
  animation: spmWing 0.42s ease-in-out infinite alternate;
}

.spm-wing.back {
  top: 30px;
  opacity: 0.65;
  animation-delay: 0.16s;
}

.spm-bird-tail {
  position: absolute;
  left: 26px;
  top: 29px;
  border-right: 23px solid #4aa5ff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

@keyframes spmWing {
  from {
    transform: rotate(28deg) scaleY(1);
  }

  to {
    transform: rotate(-35deg) scaleY(0.55);
  }
}

/* Premium photo treatment */
.moment {
  perspective: 1200px;
}

.moment > img,
.photo-stack,
.chart {
  will-change: transform;
}

.moment > img {
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 32px 90px rgba(9, 54, 118, 0.2),
    0 8px 30px rgba(9, 54, 118, 0.12);
}

.moment > img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
}

/* Animated blue light behind sections */
.photo-story {
  position: relative;
  overflow: hidden;
}

.photo-story::before,
.photo-story::after {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.2;
  background: #55b5ff;
  animation: floatGlow 10s ease-in-out infinite alternate;
}

.photo-story::before {
  left: -20vw;
  top: 20%;
}

.photo-story::after {
  right: -22vw;
  top: 65%;
  animation-delay: -5s;
}

@keyframes floatGlow {
  from {
    transform: translateY(-70px) scale(0.9);
  }

  to {
    transform: translateY(100px) scale(1.15);
  }
}

/* Floating premium particles */
.spm-particle {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #65c6ff;
  box-shadow: 0 0 15px #65c6ff;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(110vh) scale(0.5);
  }

  15% {
    opacity: 0.7;
  }

  85% {
    opacity: 0.4;
  }

  100% {
    opacity: 0;
    transform: translateY(-15vh) scale(1.5);
  }
}

/* Text reveal */
.moment h3,
.moment p,
.moment span {
  transition:
    transform 0.9s cubic-bezier(.2,.7,.2,1),
    opacity 0.9s ease;
}

.moment:not(.visible) h3,
.moment:not(.visible) p,
.moment:not(.visible) span {
  opacity: 0;
  transform: translateY(30px);
}

.moment.visible h3 {
  transition-delay: 0.18s;
}

.moment.visible p {
  transition-delay: 0.32s;
}

.moment.visible span {
  transition-delay: 0.08s;
}

/* Image shine */
.photo-stack img,
.mosaic img {
  transition:
    transform 0.55s cubic-bezier(.2,.8,.2,1),
    filter 0.55s ease,
    box-shadow 0.55s ease;
}

.mosaic img:hover {
  z-index: 5;
  transform: translateY(-10px) scale(1.035);
  filter: saturate(1.08) contrast(1.03);
  box-shadow: 0 30px 65px rgba(7, 41, 94, 0.24);
}

/* Premium chart pulse */
.chart::after {
  content: "";
  position: absolute;
  inset: 15%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(95, 190, 255, 0.18),
    transparent 70%
  );
  animation: chartPulse 2.8s ease-in-out infinite;
}

@keyframes chartPulse {
  50% {
    transform: scale(1.2);
    opacity: 0.45;
  }
}

/* Mobile optimisation */
@media (max-width: 760px) {
  .spm-bird {
    width: 75px;
    transform: scale(0.75);
  }

  .spm-cursor-glow {
    display: none;
  }

  .photo-story::before,
  .photo-story::after {
    width: 80vw;
    height: 80vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spm-bird,
  .spm-particle {
    display: none;
  }
}
