/* =============================================================
   YouTube Notes — Animation Layer
   Pure CSS + IntersectionObserver (no external libs)
   ============================================================= */

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children via inline --i delay */
.reveal[style*='--i'] {
  transition-delay: calc(var(--i) * 90ms);
}

/* ---------- Entrance (above the fold, plays on load) ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-rise {
  opacity: 0;
  animation: rise 0.8s var(--ease-out) forwards;
}
.d1 {
  animation-delay: 0.05s;
}
.d2 {
  animation-delay: 0.15s;
}
.d3 {
  animation-delay: 0.25s;
}
.d4 {
  animation-delay: 0.35s;
}
.d5 {
  animation-delay: 0.45s;
}

/* ---------- Hero visual float + tilt ---------- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-frame {
  animation: float 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

/* ---------- Glow pulse ---------- */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.65;
    transform: translateX(-50%) scale(1.05);
  }
}

.hero-glow {
  animation: pulse-glow 8s ease-in-out infinite;
}

/* ---------- Grid background pattern ---------- */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 75%);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Shimmer on brand pill ---------- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ---------- Animated gradient border for feature hover accent ---------- */
@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Marquee (optional trusted logos) ---------- */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Count-up helper visibility ---------- */
.stat-num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Button ripple-ish sheen ---------- */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.btn-primary:hover::after {
  opacity: 1;
  animation: shimmer 1.2s linear;
}
