/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Scale-up reveal variant */
.reveal--scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal--scale.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ========== HERO ANIMATIONS ========== */
.hero .reveal:nth-child(1) { transition-delay: 0.15s; }
.hero .reveal:nth-child(2) { transition-delay: 0.35s; }
.hero .reveal:nth-child(3) { transition-delay: 0.55s; }
.hero .reveal:nth-child(4) { transition-delay: 0.75s; }
.hero .reveal:nth-child(5) { transition-delay: 0.95s; }
.hero .reveal {
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== FLOATING GRADIENT ORBS ========== */
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 20px) scale(1.1); }
  66% { transform: translate(30px, -40px) scale(0.9); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, 35px) scale(1.08); }
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.25) 0%, transparent 65%);
  top: -15%;
  left: 10%;
  animation: float-1 14s ease-in-out infinite;
}
.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.15) 0%, transparent 65%);
  top: 15%;
  right: 5%;
  animation: float-2 18s ease-in-out infinite;
}
.hero__orb--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.12) 0%, transparent 65%);
  bottom: 5%;
  left: 45%;
  animation: float-3 12s ease-in-out infinite;
}

/* ========== ANIMATED GRID BACKGROUND ========== */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, black 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, black 20%, transparent 65%);
  pointer-events: none;
  animation: grid-drift 20s linear infinite;
  z-index: 0;
}

@keyframes grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 80px 80px; }
}

/* ========== CARD HOVER — ANIMATED GRADIENT BORDER ========== */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--accent-cyan), transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -2;
  pointer-events: none;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
}
.card::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg-card);
  border-radius: calc(var(--radius-lg) - 1px);
  z-index: -1;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== TIER CARD SHIMMER ========== */
/* The featured tier card now uses a gradient-border technique via ::after */
.tier-card--featured::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan), var(--accent-gold));
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -2;
  opacity: 0.5;
  animation: shimmer 4s ease-in-out infinite;
}

/* Inner fill to sit on top of the gradient border */
.tier-card--featured > * {
  position: relative;
  z-index: 1;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ========== MARQUEE / CAROUSEL ========== */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
}
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-secondary), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-secondary), transparent);
}

.marquee__track {
  display: flex;
  gap: var(--space-3xl);
  animation: marquee 43s linear infinite;
  width: max-content;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-base);
}
.marquee__item:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.marquee__item img,
.marquee__item svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.marquee__item span {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Second marquee row — reverse direction */
.marquee--reverse .marquee__track {
  animation-direction: reverse;
}

/* ========== STAT NUMBER PULSE ========== */
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 30px rgba(0, 180, 216, 0.4); }
}

.stats__number.counted {
  animation: pulse-glow 2s ease-in-out;
}

/* ========== GLOWING DIVIDER LINE ========== */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-gold), transparent);
  opacity: 0.5;
  margin: 0;
  border: none;
}

/* ========== PROCESS LINE DRAW ========== */
.process__step.visible .process__step-num {
  animation: scale-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scale-in {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========== FLOATING PARTICLES ========== */
@keyframes particle-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.particles__dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: particle-float linear infinite;
  opacity: 0;
}
.particles__dot:nth-child(1) { left: 10%; animation-duration: 18s; animation-delay: 0s; }
.particles__dot:nth-child(2) { left: 25%; animation-duration: 22s; animation-delay: 3s; width: 2px; height: 2px; background: var(--accent-gold); }
.particles__dot:nth-child(3) { left: 40%; animation-duration: 16s; animation-delay: 6s; }
.particles__dot:nth-child(4) { left: 55%; animation-duration: 20s; animation-delay: 2s; width: 2px; height: 2px; background: var(--accent-gold); }
.particles__dot:nth-child(5) { left: 70%; animation-duration: 24s; animation-delay: 5s; }
.particles__dot:nth-child(6) { left: 85%; animation-duration: 17s; animation-delay: 1s; width: 2px; height: 2px; }
.particles__dot:nth-child(7) { left: 95%; animation-duration: 21s; animation-delay: 4s; background: var(--accent-gold); }
.particles__dot:nth-child(8) { left: 5%; animation-duration: 19s; animation-delay: 7s; }

/* ========== YOUTUBE PIPELINE TAB/PANEL TRANSITIONS ========== */
.youtube__tab {
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.youtube__panel-inner {
  transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1), transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== BUTTON SHINE EFFECT ========== */
.btn--primary {
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  transition: none;
  animation: btn-shine 4s ease-in-out infinite;
}

@keyframes btn-shine {
  0%, 85%, 100% { left: -75%; }
  90% { left: 125%; }
}

/* ========== ECOSYSTEM CARD TILT GLOW ========== */
.ecosystem__card {
  position: relative;
  overflow: hidden;
}
.ecosystem__card::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.15), transparent 70%);
  border-radius: 50%;
  top: -75px;
  left: -75px;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.ecosystem__card:hover::before {
  opacity: 1;
}

/* ========== MOBILE MENU OVERLAY ========== */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  z-index: 999;
}
.nav__overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========== FAQ CHEVRON ROTATION ========== */
.faq__item.active .faq__trigger svg {
  transform: rotate(180deg);
}

/* ========== REDUCE MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal--scale {
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
}
