/* Fine Scrolling Film Grain (now actually visible on dark & light backgrounds) */
.page-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background-image: var(--real-grain);
  background-repeat: repeat;
  background-size: 120px 120px;
  opacity: 0.085;
  mix-blend-mode: normal;
}

@media (prefers-color-scheme: light) {
  .page-wrapper::before {
    opacity: 0.065;
    mix-blend-mode: multiply;
  }
}

/* Animation 03: Frame-Mask Trim (After Effects / Premiere Track Matte Reveal) */
.jump-cut {
  opacity: 0;
  transform: translateY(48px);
  clip-path: inset(0 0 100% 0);
  will-change: transform, clip-path, opacity;
}

body.is-loaded .jump-cut {
  animation: frameMaskTrim 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.is-loaded .jc-1 { animation-delay: 0.08s; }
body.is-loaded .jc-2 { animation-delay: 0.20s; }
body.is-loaded .jc-3 { animation-delay: 0.34s; }
body.is-loaded .jc-4 { animation-delay: 0.46s; }

body.is-loaded .hero-visual.jc-2 {
  animation-delay: 0.26s;
  animation-duration: 0.85s;
}

@keyframes frameMaskTrim {
  0% {
    opacity: 0;
    transform: translateY(48px);
    clip-path: inset(0 0 100% 0);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: none;
  }
}

/* True Seamless Infinite Marquee Loop */
.marquee {
  overflow: hidden;
  background: var(--accent);
  color: #ffffff;
  padding: 0.72rem 0;
  border-top: 1px solid var(--border);
}

.marquee-inner {
  display: flex;
  width: max-content;
  animation: infiniteMarquee 26s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

@keyframes infiniteMarquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Screenshot / Focus Blackout Deterrent on Protected Images */
.protected-media.is-blackout::after {
  content: "PROTECTED PREVIEW";
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000000;
  color: #ff3b00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Floating WhatsApp Button — Liquid Glass + Periodic Shake */
.whatsapp-float {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 80;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(
    180deg,
    rgba(28, 28, 32, 0.72) 0%,
    rgba(12, 12, 14, 0.58) 100%
  );
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: #25d366;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 26px rgba(0, 0, 0, 0.42);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: waShake 6s ease-in-out infinite;
}

.whatsapp-float svg {
  width: 24px;
  height: 24px;
}

.whatsapp-float:hover {
  animation: none;
  transform: scale(1.08);
  background: #25d366;
  color: #0a0a0b;
  border-color: #25d366;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.38);
}

@media (prefers-color-scheme: light) {
  .whatsapp-float {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(244, 241, 234, 0.62) 100%
    );
    color: #16a34a;
    border: 1px solid rgba(10, 10, 11, 0.14);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 8px 22px rgba(10, 10, 11, 0.14);
  }
}

/* Quick subtle shake every 6 seconds */
@keyframes waShake {
  0%, 86%, 100% {
    transform: rotate(0deg) scale(1);
  }
  88% {
    transform: rotate(-10deg) scale(1.05);
  }
  90% {
    transform: rotate(10deg) scale(1.05);
  }
  92% {
    transform: rotate(-8deg) scale(1.04);
  }
  94% {
    transform: rotate(6deg) scale(1.03);
  }
  96% {
    transform: rotate(0deg) scale(1);
  }
}