/* ============================================================
   PARADIGM BIO METAL — Animations
   Second Pass: Industrial motion, liquid flows, premium reveals
   ============================================================ */

/* ── Pulse Dot (Hero badge) ────────────────────────────────── */
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(63, 160, 240, 0.4); }
  50% { opacity: 0.5; transform: scale(0.7); box-shadow: 0 0 0 6px rgba(63, 160, 240, 0); }
}

/* ── Scroll bounce (Hero indicator) ────────────────────────── */
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ── Scroll wheel (inside mouse) ───────────────────────────── */
@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ── Glow line (paradigma underline) ───────────────────────── */
@keyframes glowLine {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--clr-blue-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 18px var(--clr-blue-glow); }
}

/* ── Gear rotation ─────────────────────────────────────────── */
@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gearSpinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* ── Float animation ───────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ── Hero Cinematic Animations (Gears & Fluid) ─────────────── */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes liquidOrganicFlow {
  0% {
    transform: rotate(-10deg) translate3d(-0.8%, 0, 0) scaleX(1.03) scaleY(0.96) skewX(-2deg);
    opacity: 0.30;
    border-radius: 48% 52% 68% 32% / 42% 58% 44% 56%;
  }
  50% {
    transform: rotate(-6deg) translate3d(1.2%, -16px, 0) scaleX(1.07) scaleY(0.92) skewX(3deg);
    opacity: 0.42;
    border-radius: 58% 42% 48% 52% / 56% 44% 58% 42%;
  }
  100% {
    transform: rotate(-12deg) translate3d(-1.2%, 8px, 0) scaleX(0.98) scaleY(1.02) skewX(-1deg);
    opacity: 0.34;
    border-radius: 44% 56% 38% 62% / 62% 38% 54% 46%;
  }
}

@keyframes pulseFluid {
  0% { transform: scale(1) translate(0, 0); opacity: 0.22; }
  50% { transform: scale(1.07) translate(18px, -18px); opacity: 0.34; }
  100% { transform: scale(0.94) translate(-18px, 18px); opacity: 0.26; }
}

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-500px); opacity: 0; }
}

@keyframes bgBreathe {
  0% { transform: scale(1); opacity: 0.25; filter: blur(4px) contrast(1.2); }
  100% { transform: scale(1.05); opacity: 0.4; filter: blur(2px) contrast(1.3); }
}

/* ── Shimmer (button shine) ────────────────────────────────── */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Badge text shimmer ────────────────────────────────────── */
@keyframes badgeShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Industrial pulse ring ─────────────────────────────────── */
@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(30, 136, 229, 0.3); }
  70% { transform: scale(1); opacity: 0; box-shadow: 0 0 0 12px rgba(30, 136, 229, 0); }
  100% { transform: scale(0.95); opacity: 0; }
}

/* ── Glow breathe for icons ────────────────────────────────── */
@keyframes glowBreathe {
  0%, 100% { box-shadow: 0 0 8px rgba(30, 136, 229, 0.1); }
  50% { box-shadow: 0 0 20px rgba(30, 136, 229, 0.25); }
}

/* ── Subtle slide horizontal ───────────────────────────────── */
@keyframes slideHorizontal {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Grid lines pulse ──────────────────────────────────────── */
@keyframes gridPulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.07; }
}

/* ── Fade In Up ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Fade In Down ──────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Fade In Scale ─────────────────────────────────────────── */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* ── Slide In Right ────────────────────────────────────────── */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Slide In Left ─────────────────────────────────────────── */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Counter number roll ───────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section divider glow ──────────────────────────────────── */
@keyframes dividerGlow {
  0%, 100% { width: 60px; opacity: 0.8; }
  50% { width: 100px; opacity: 1; }
}

/* ── Scroll Reveal Classes ─────────────────────────────────── */

/* SAFETY FALLBACK: Only hide elements when JS is running (body.js-ready).
   This ensures content is always visible even if JS fails to load. */

/* Base state: MODIFIED TO NEVER HIDE CONTENT */
body.js-ready .reveal,
body.js-ready .reveal--left,
body.js-ready .reveal--right,
body.js-ready .reveal--scale,
body.js-ready .reveal--clip-left,
body.js-ready .reveal--clip-right,
body.js-ready .reveal--clip-up,
body.js-ready .reveal--scale-up {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
  transition: none !important;
}

/* Revealed states (no longer needed, but kept for safety) */
.reveal.revealed,
.reveal--left.revealed,
.reveal--right.revealed,
.reveal--scale.revealed,
.reveal--clip-left.revealed,
.reveal--clip-right.revealed,
.reveal--clip-up.revealed,
.reveal--scale-up.revealed {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
}


/* Stagger children — slower cascade for elegance */
.stagger-children .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children .reveal:nth-child(2) { transition-delay: 100ms; }
.stagger-children .reveal:nth-child(3) { transition-delay: 200ms; }
.stagger-children .reveal:nth-child(4) { transition-delay: 300ms; }
.stagger-children .reveal:nth-child(5) { transition-delay: 400ms; }
.stagger-children .reveal:nth-child(6) { transition-delay: 500ms; }

/* ── Hero entrance animations — cinematic ─────────────────── */
.hero__badge {
  animation: fadeInUpSimple 0.8s ease-out both;
}

.hero__badge-text {
  background: linear-gradient(90deg, 
    var(--clr-blue-400) 0%,
    var(--clr-blue-200) 40%,
    var(--clr-blue-400) 80%,
    var(--clr-blue-200) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: badgeShimmer 4s linear infinite;
}

.hero__title {
  animation: fadeInUpSimple 0.8s ease-out 0.2s both;
}

.hero__subtitle {
  animation: fadeInUpSimple 0.8s ease-out 0.4s both;
}

.hero__actions {
  animation: fadeInUpSimple 0.8s ease-out 0.95s both;
}


/* ── Section transition separators ─────────────────────────── */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-blue-500), transparent);
  opacity: 0.3;
  border-radius: var(--radius-full);
}

.hero::before {
  display: none;
}

/* Mobile hero stability and performance. Desktop keeps the full cinematic layer. */
@keyframes heroMobileBadgeSettle {
  from {
    opacity: 0;
    transform: translateY(-8px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

@keyframes heroMobileFluidDrift {
  from { transform: rotate(-8deg) translate3d(-1.2%, 0, 0) scaleX(1.01); }
  to { transform: rotate(-8deg) translate3d(1.2%, -8px, 0) scaleX(1.03); }
}

@media (max-width: 768px) {
  .hero__canvas {
    display: none !important;
  }

  .hero__badge {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateZ(0);
    animation: heroMobileBadgeSettle 420ms var(--ease-out) 120ms both !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: auto;
  }

  .hero__badge-text {
    background: linear-gradient(90deg, var(--clr-blue-400), var(--clr-blue-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero__badge-dot {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.62);
  }

  .hero__badge-glow {
    opacity: 0.18;
    transform: none !important;
    animation: none !important;
  }

  .hero__bg-image--1,
  .hero__metal-grid,
  .hero__cold-lights,
  .hero__noise,
  .hero__center-machine,
  .hero__gear,
  .hero__particles,
  .hero__scroll-line::after {
    animation: none !important;
  }

  .hero__bg-image,
  .hero__center-machine,
  .hero__content::before,
  .hero__title-glow,
  .text-gradient-hero {
    filter: none !important;
  }

  .hero__bg-image--2 {
    opacity: 0.18;
  }

  .hero__center-machine {
    opacity: 0.36;
  }

  .hero__metal-grid,
  .hero__cold-lights {
    opacity: 0.18;
  }

  .hero__noise {
    opacity: 0.035;
  }

  .hero__particles {
    opacity: 0.08;
    background-size: 128px 128px;
  }

  .hero__fluid {
    will-change: auto;
  }

  .hero__fluid--back {
    display: none;
  }

  .hero__fluid--main {
    opacity: 0.24;
    filter: none !important;
    box-shadow: none;
    border: 0;
    animation: heroMobileFluidDrift 12s ease-in-out infinite alternate !important;
  }

  .hero__fluid--front {
    opacity: 0.14;
    filter: none !important;
    animation: none !important;
  }

  .hero__title {
    filter: none !important;
    clip-path: none !important;
    animation: fadeInUp 520ms var(--ease-out) 180ms both !important;
  }

  .hero__subtitle {
    animation: fadeInUp 460ms var(--ease-out) 260ms both !important;
  }

  .hero__actions {
    animation: fadeInUp 460ms var(--ease-out) 340ms both !important;
  }

  .hero__stat-badge {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .btn--hero.btn--primary::after {
    display: none;
    animation: none !important;
  }

  .hero.hero--paused .hero__fluid--main {
    animation-play-state: paused !important;
  }
}

/* ── Reduced 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--left,
  .reveal--right,
  .reveal--scale {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@keyframes fadeInUpSimple {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}