/* ==========================================================================
   Vital Wellness — Animation Styles & Keyframes
   CSS transitions, progressive enhancement reveals, and reduced-motion fallbacks
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Progressive Enhancement Entrance Defaults
   -------------------------------------------------------------------------- */
/* By default, all content is fully visible for zero layout flash & SEO resilience */
[data-vw-animate="fade-up"],
[data-vw-animate="image-reveal"],
[data-vw-animate="hero"],
[data-vw-animate="hero-title"] {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Progressive reveal only when JS has active scroll animation support */
body.js-anim [data-vw-animate="fade-up"]:not(.is-animated) {
  opacity: 0;
  transform: translateY(24px);
}

body.js-anim [data-vw-animate="image-reveal"]:not(.is-animated) {
  opacity: 0;
  transform: scale(0.97);
}

[data-vw-animate="fade-up"].is-animated,
[data-vw-animate="image-reveal"].is-animated {
  opacity: 1 !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   2. Micro-Interactions & Hover Lift
   -------------------------------------------------------------------------- */
.vw-hover-lift {
  transition:
    transform var(--vw-duration-normal) var(--vw-ease-out),
    box-shadow var(--vw-duration-normal) var(--vw-ease-out);
}

.vw-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--vw-shadow-md);
}

/* --------------------------------------------------------------------------
   3. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes vw-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232, 117, 58, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(232, 117, 58, 0);
  }
}

.vw-pulse-badge {
  animation: vw-pulse-glow 2.5s infinite;
}

@keyframes vw-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.vw-skeleton-shimmer {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: vw-shimmer 1.8s infinite;
}

/* --------------------------------------------------------------------------
   4. Minimalist Pulse Page Loader (Shopify & Performance Friendly)
   -------------------------------------------------------------------------- */
.vw-loader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--vw-cream-light, #FDFBF7);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s;
  will-change: opacity, transform;
}

.vw-loader.is-hiding {
  opacity: 0;
  transform: translateY(-8px) scale(1.01);
  pointer-events: none;
}

.vw-loader.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.vw-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.vw-loader__logo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.vw-loader__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(232, 117, 58, 0.22) 0%, rgba(33, 137, 131, 0.08) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
  animation: vw-loader-glow-breathe 1.5s ease-in-out infinite;
}

.vw-loader__logo {
  width: 195px;
  height: auto;
  max-width: 82vw;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.07));
  animation: vw-loader-logo-breathe 1.5s ease-in-out infinite;
  user-select: none;
}

.vw-loader__line {
  position: relative;
  width: 58px;
  height: 2.5px;
  background: rgba(43, 42, 39, 0.1);
  border-radius: 999px;
  overflow: hidden;
  z-index: 2;
}

.vw-loader__line-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, #E8753A 0%, #218983 100%);
  border-radius: 999px;
  animation: vw-loader-line-glide 1.25s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes vw-loader-logo-breathe {
  0%, 100% {
    transform: scale(0.975);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.025);
    opacity: 1;
  }
}

@keyframes vw-loader-glow-breathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.9;
  }
}

@keyframes vw-loader-line-glide {
  0% {
    left: -45%;
  }
  100% {
    left: 100%;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section Ambient & Interactive Motion
   -------------------------------------------------------------------------- */
@keyframes vw-float-ambient {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.4deg);
  }
}

.vw-hero__media {
  animation: vw-float-ambient 4.8s ease-in-out infinite;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.vw-hero__media:hover {
  animation-play-state: paused;
  box-shadow: 0 32px 70px rgba(45, 45, 45, 0.12) !important;
}

/* --------------------------------------------------------------------------
   6. SplitText Typography Masks & Scroll Reveals
   -------------------------------------------------------------------------- */
.vw-split-line-wrap {
  overflow: hidden !important;
  display: block;
}

.vw-split-line {
  display: block;
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   5. Reduced Motion Overrides
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .vw-loader {
    display: none !important;
    visibility: hidden !important;
  }

  [data-vw-animate="fade-up"],
  [data-vw-animate="image-reveal"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .vw-hover-lift:hover {
    transform: none !important;
  }

  .vw-pulse-badge,
  .vw-skeleton-shimmer,
  .vw-loader__star,
  .vw-loader__glow-ring,
  .vw-loader__brand {
    animation: none !important;
  }
}

