/* ══════════════════════════════════════════════
   Scroll-Triggered Animations
   ══════════════════════════════════════════════ */

/* Fade-in-up entrance — smoother, slower */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-enter) var(--ease-enter),
              transform var(--duration-enter) var(--ease-enter);
}

.animate-on-scroll--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children — smoother delays */
.animate-stagger > .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-stagger > .animate-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.animate-stagger > .animate-on-scroll:nth-child(3) { transition-delay: 0.24s; }
.animate-stagger > .animate-on-scroll:nth-child(4) { transition-delay: 0.36s; }

/* ══════════════════════════════════════════════
   Parallax — will-change for GPU acceleration
   ══════════════════════════════════════════════ */
.parallax-bg {
  position: absolute;
  inset: -20% 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}

[data-parallax] {
  will-change: transform;
}

[data-parallax-mid],
[data-parallax-fg] {
  will-change: transform;
}

/* ══════════════════════════════════════════════
   Hover / Interaction
   ══════════════════════════════════════════════ */

/* Card hover lift — softer, slower */
.card {
  transition: transform var(--duration-normal) var(--ease-apple),
              box-shadow var(--duration-normal) var(--ease-apple);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.card--dark:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Button hover */
.btn {
  transition: transform var(--duration-fast) var(--ease-apple),
              background var(--duration-fast) var(--ease-apple),
              box-shadow var(--duration-fast) var(--ease-apple);
}

.btn:hover {
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.95);
}

/* ══════════════════════════════════════════════
   Background Grid Pattern (for parallax layer)
   ══════════════════════════════════════════════ */
.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.bg-grid--light {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ══════════════════════════════════════════════
   Data floating particles (ambient) — smoother
   ══════════════════════════════════════════════ */
.bg-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.bg-particles span {
  position: absolute;
  font-size: 10px;
  color: rgba(41, 151, 255, 0.08);
  font-family: var(--font-text);
  font-weight: 300;
  animation: float 25s infinite cubic-bezier(0.25, 0.02, 0.16, 1);
}

@keyframes float {
  0% { transform: translateY(100%) rotate(0deg); opacity: 0; }
  8% { opacity: 0.6; }
  92% { opacity: 0.6; }
  100% { transform: translateY(-100%) rotate(3deg); opacity: 0; }
}
