/* ======================================================
   VITAL VIBES — animations.css v2.0
   NGB · IntersectionObserver-driven reveal animations
   Olive Gold palette
   ====================================================== */

/* ── Fade Up ── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Fade Left ── */
.anim-fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Fade Right ── */
.anim-fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Scale In ── */
.anim-scale-in {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Image Reveal (clip-path) ── */
.img-reveal-wrap {
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s cubic-bezier(0.77, 0, 0.175, 1);
}
.img-reveal-wrap.is-visible {
  clip-path: inset(0 0% 0 0);
}
.img-reveal-wrap img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.06);
}
.img-reveal-wrap.is-visible img {
  transform: scale(1);
}

/* ── Section Rule (horizontal line draw) ── */
.section-rule {
  width: 0;
  height: 1px;
  background: rgba(201, 164, 92, 0.3);
  transition: width 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  margin-bottom: 2rem;
}
.section-rule.is-visible {
  width: 100%;
}

/* ── Heading Line (underline draw) ── */
.heading-line {
  display: inline-block;
  position: relative;
  padding-bottom: 0.25rem;
}
.heading-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent, #c9a45c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.heading-line.is-visible::after {
  transform: scaleX(1);
}

/* ── Stagger delays ── */
.anim-delay-1 { transition-delay: 0.05s !important; }
.anim-delay-2 { transition-delay: 0.12s !important; }
.anim-delay-3 { transition-delay: 0.19s !important; }
.anim-delay-4 { transition-delay: 0.26s !important; }
.anim-delay-5 { transition-delay: 0.33s !important; }
.anim-delay-6 { transition-delay: 0.40s !important; }

/* ── Keyframes ── */
@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

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

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

@keyframes progressReveal {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent, #c9a45c), var(--accent, #3d4f33));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
  transition: transform 0.1s linear;
  will-change: transform;
}

/* ── Back-to-top ── */
.back-top {
  position: fixed;
  bottom: 2rem;
  left: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--muted, #8b8b8b);
  border: 1px solid rgba(142, 74, 90, 0.15);
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s, color 0.3s, border-color 0.3s;
  z-index: 89;
  cursor: pointer;
}
.back-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.back-top:hover {
  color: var(--accent, #3d4f33);
  border-color: rgba(184, 96, 111, 0.3);
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator__line {
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(to bottom, transparent, rgba(201, 164, 92, 0.6));
  animation: scrollLineAnim 2s ease-in-out infinite;
}
.scroll-indicator__text {
  font-family: var(--font-body, system-ui);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(253, 250, 246, 0.5);
  writing-mode: vertical-rl;
  margin-top: 0.5rem;
}
@keyframes scrollLineAnim {
  0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40%       { opacity: 1; transform: scaleY(1); transform-origin: top; }
  80%       { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-fade-left,
  .anim-fade-right,
  .anim-scale-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .img-reveal-wrap {
    clip-path: inset(0 0% 0 0) !important;
    transition: none !important;
  }
  .img-reveal-wrap img {
    transform: scale(1) !important;
    transition: none !important;
  }
  .section-rule {
    width: 100% !important;
    transition: none !important;
  }
  .heading-line::after {
    transform: scaleX(1) !important;
    transition: none !important;
  }
  .h1-line__inner {
    transform: translateY(0) !important;
    transition: none !important;
  }
  .hero-lg__bg { animation: none; }
  .scroll-indicator__line { animation: none; }
  .float-cta__pulse { animation: none; }
}
