/* ============================================
   SARAH GLASS MUSIC - ANIMATION SYSTEM
   Elegant, subtle animations for a refined aesthetic
   ============================================ */

/* === KEYFRAME ANIMATIONS === */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-soft {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

  100% {
    background-position: 200% 0;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === ANIMATION UTILITIES === */

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fade-in 0.7s ease-out forwards;
}

.animate-slide-in-right {
  animation: slide-in-right 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slide-in-left 0.8s ease-out forwards;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-pulse-soft {
  animation: pulse-soft 3s ease-in-out infinite;
}

.animate-scale-in {
  animation: scale-in 0.6s ease-out forwards;
}

/* === STAGGER DELAYS === */

.animation-delay-100 {
  animation-delay: 100ms;
}

.animation-delay-200 {
  animation-delay: 200ms;
}

.animation-delay-300 {
  animation-delay: 300ms;
}

.animation-delay-400 {
  animation-delay: 400ms;
}

.animation-delay-500 {
  animation-delay: 500ms;
}

.animation-delay-600 {
  animation-delay: 600ms;
}

.animation-delay-700 {
  animation-delay: 700ms;
}

.animation-delay-800 {
  animation-delay: 800ms;
}

/* === HOVER TRANSITIONS === */

.hover-lift {
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease-out;
}

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

.hover-glow {
  transition: box-shadow 0.4s ease-out;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(180, 83, 9, 0.15);
}

/* === IMAGE EFFECTS === */

.img-reveal {
  clip-path: inset(0 0 100% 0);
  animation: img-reveal 1.2s ease-out forwards;
}

@keyframes img-reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* === SCROLL MARGIN === */

section[id] {
  scroll-margin-top: 80px;
}

/* === IMAGE LOADING === */

img {
  background-color: #f5f5f4;
  transition: transform 0.7s ease-out, filter 0.5s ease-out;
}

/* === FOCUS STYLES === */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
}

/* === SMOOTH SCROLLING === */

html {
  scroll-behavior: smooth;
}

/* === LINK UNDERLINE ANIMATION === */

.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #b45309;
  transition: width 0.4s ease-out;
}

.link-underline:hover::after {
  width: 100%;
}

/* === BUTTON PRESS EFFECT === */

.btn-press {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn-press:active {
  transform: scale(0.98);
}

/* === SCROLL ANIMATION UTILITIES === */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

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

/* Staggered children animations */
.stagger-children>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.stagger-children.is-visible>* {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.is-visible>*:nth-child(1) {
  transition-delay: 100ms;
}

.stagger-children.is-visible>*:nth-child(2) {
  transition-delay: 200ms;
}

.stagger-children.is-visible>*:nth-child(3) {
  transition-delay: 300ms;
}

.stagger-children.is-visible>*:nth-child(4) {
  transition-delay: 400ms;
}

.stagger-children.is-visible>*:nth-child(5) {
  transition-delay: 500ms;
}

.stagger-children.is-visible>*:nth-child(6) {
  transition-delay: 600ms;
}