/* Wing's Kitchen - Modern Minimalist Animations & Transitions */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Smooth horizontal scrolling */
.smooth-scroll {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Modern easing functions */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

  /* Motion design timing */
  --duration-instant: 100ms;
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;
  --duration-slowest: 1200ms;
}

/* Fade in animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }

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

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

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

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

/* Scale animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

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

@keyframes pulse {

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

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

/* Slide animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

/* Rotation animations */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* Utility classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

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

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

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

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

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

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

/* Staggered animations */
/* Staggered sequences */
.stagger-1 {
  animation-delay: 100ms;
}

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

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

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

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

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

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

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

.stagger-9 {
  animation-delay: 900ms;
}

.stagger-10 {
  animation-delay: 1000ms;
}

/* Existing stagger classes specific for some components */
.animate-stagger-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.animate-stagger-2 {
  animation-delay: 0.2s;
  opacity: 0;
}

.animate-stagger-3 {
  animation-delay: 0.3s;
  opacity: 0;
}

.animate-stagger-4 {
  animation-delay: 0.4s;
  opacity: 0;
}

.animate-stagger-5 {
  animation-delay: 0.5s;
  opacity: 0;
}

/* Modern Hover Effects */
.hover-lift {
  transition: transform 0.4s var(--ease-out-quart), box-shadow 0.4s var(--ease-out-quart);
  will-change: transform;
}

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

.hover-scale {
  transition: transform 0.4s var(--ease-out-quart);
  will-change: transform;
}

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

.hover-brightness {
  transition: filter 0.3s var(--ease-out-quart);
}

.hover-brightness:hover {
  filter: brightness(1.05) contrast(1.05);
}

/* Subtle glow hover */
.hover-glow {
  transition: box-shadow 0.4s var(--ease-out-quart);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(201, 154, 92, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Smooth border hover */
.hover-border {
  position: relative;
  transition: color 0.3s var(--ease-out-quart);
}

.hover-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #c99a5c, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-quart);
}

.hover-border:hover::before {
  opacity: 1;
}

/* Modern Button Animations */
.btn-animated {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out-quart),
    box-shadow 0.3s var(--ease-out-quart);
  will-change: transform;
}

.btn-animated:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 154, 92, 0.25);
}

.btn-animated:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-out-expo), height 0.6s var(--ease-out-expo), opacity 0.6s ease;
  opacity: 0;
}

.btn-ripple:hover::after {
  width: 300px;
  height: 300px;
  opacity: 1;
}

.btn-ripple:active::after {
  opacity: 0;
  transition-duration: 0s;
}

/* Loading animations */
.loading-spinner {
  animation: rotate 1s linear infinite;
}

.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Shimmer loading effect */
.shimmer {
  background: linear-gradient(to right,
      #f0f0f0 0%,
      #e0e0e0 20%,
      #f0f0f0 40%,
      #f0f0f0 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Modern Smooth Transitions */
.transition-smooth {
  transition: all 0.3s var(--ease-out-quart);
}

.transition-slow {
  transition: all 0.6s var(--ease-out-expo);
}

.transition-fast {
  transition: all 0.15s var(--ease-out-quart);
}

/* Micro-interactions */
.hover-subtle {
  transition: opacity 0.3s var(--ease-out-quart);
}

.hover-subtle:hover {
  opacity: 0.8;
}

.active-press {
  transition: transform 0.1s var(--ease-out-quart);
}

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

/* Parallax effect helper */
.parallax {
  transition: transform 0.1s ease-out;
}

/* Image reveal animation */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #c99a5c;
  transform: translateX(-100%);
  animation: reveal 1s ease forwards;
}

@keyframes reveal {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Text animations */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

/* Modern Menu Item Hover Effects */
.menu-item {
  transition: transform 0.4s var(--ease-out-quart),
    box-shadow 0.4s var(--ease-out-quart);
  will-change: transform;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.menu-item:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.menu-item:hover .menu-item-image {
  transform: scale(1.05);
}

.menu-item-image {
  transition: transform 0.6s var(--ease-out-expo);
  will-change: transform;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .menu-item {
    /* Larger tap targets for mobile */
    min-height: 120px;
  }

  .menu-item:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(201, 154, 92, 0.2);
  }
}

/* Menu item shimmer effect on hover */
.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: left 0.6s var(--ease-out-quart);
  pointer-events: none;
}

.menu-item:hover::before {
  left: 100%;
}

/* Modern Navigation Transitions */
.nav-link {
  position: relative;
  transition: color 0.3s var(--ease-out-quart);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c99a5c, transparent);
  transform: translateX(-50%);
  transition: width 0.4s var(--ease-out-expo);
}

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

.nav-link.active::after {
  width: 100%;
  background: #c99a5c;
}

/* Smooth nav link scale */
.nav-link:hover {
  transform: translateY(-1px);
  transition: transform 0.3s var(--ease-out-quart);
}

/* Modern Form Input Animations */
.form-input {
  transition: border-color 0.3s var(--ease-out-quart),
    box-shadow 0.3s var(--ease-out-quart),
    transform 0.2s var(--ease-out-quart);
  will-change: box-shadow;
}

.form-input:hover {
  border-color: rgba(201, 154, 92, 0.3);
}

.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(201, 154, 92, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #c99a5c;
}

/* Input label float animation */
.input-group {
  position: relative;
}

.input-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s var(--ease-out-quart);
  pointer-events: none;
  color: #9ca3af;
}

.form-input:focus~.input-label,
.form-input:not(:placeholder-shown)~.input-label {
  top: -8px;
  font-size: 0.75rem;
  color: #c99a5c;
  background: white;
  padding: 0 4px;
}

/* Backdrop blur animation */
.backdrop-animate {
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.3s ease;
}

.backdrop-animate.active {
  backdrop-filter: blur(10px);
}

/* Card flip animation */
.card-flip {
  perspective: 1000px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* Scroll reveal utility */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu animations */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Modal animations for mobile */
@keyframes slideUpModal {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

.modal-mobile-enter {
  animation: slideUpModal 0.3s ease-out forwards;
}

/* Swipe navigation animations - Smooth and gentle */
@keyframes slideInFromRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

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

@keyframes slideInFromLeft {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }

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

.modal-slide-left {
  animation: slideInFromLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-slide-right {
  animation: slideInFromRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth modal content transitions */
#food-detail-modal .relative {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gentle image transition */
#modal-image {
  transition: background-image 0.4s ease-in-out;
}

/* Smooth text content fade */
#modal-title,
#modal-price,
#modal-description {
  transition: opacity 0.2s ease-in-out;
}

/* Fast page-turn transitions for modal content */
#food-detail-modal .relative {
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

#modal-image {
  transition: background-image 0.2s ease-out;
}

#modal-title,
#modal-price,
#modal-description {
  transition: opacity 0.15s ease-out;
}

/* Smooth scrolling within modals */
@media (max-width: 640px) {
  .modal-content-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Ensure close button is always visible on mobile */
  #food-detail-modal #close-modal-top {
    position: fixed;
    top: 1rem;
    right: 1rem;
  }
}

/* Better button layout for modal actions */
.modal-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .modal-action-buttons button {
    font-size: 14px;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Better touch feedback */
.touch-feedback {
  position: relative;
  overflow: hidden;
}

.touch-feedback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(201, 154, 92, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.touch-feedback:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* Touch-friendly interactive elements */
.touch-friendly {
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Toast notification animation */
@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

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

.toast {
  animation: slideInFromTop 0.3s ease forwards;
}

/* Video overlay animation */
.video-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

/* Mobile-first responsive utilities */
@media (max-width: 640px) {

  /* Larger, more tappable buttons */
  .btn-animated,
  .btn-ripple {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Better form inputs on mobile */
  .form-input {
    font-size: 16px;
    /* Prevents zoom on iOS */
    min-height: 44px;
  }

  /* Improved category filter buttons */
  .category-btn,
  .menu-category-btn {
    padding: 12px 24px;
    white-space: nowrap;
    font-size: 14px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Modal optimization */
  #food-detail-modal {
    padding: 0;
  }

  /* Prevent body scroll when modal is open */
  body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Menu preview items - better touch targets */
  #menu-items-preview>div {
    padding: 16px 0;
    min-height: 60px;
  }

  /* Smooth horizontal scroll for categories */
  .smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .smooth-scroll>* {
    scroll-snap-align: start;
  }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
  .menu-item {
    min-height: 140px;
  }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .safe-area-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .safe-area-top {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   ADVANCED MOTION DESIGN ANIMATIONS
   ======================================== */

/* Reveal animations with blur */
@keyframes revealBlur {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
  }

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

/* Zoom entrance */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

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

/* Bounce entrance */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

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

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

/* Slide and fade combined */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(60px);
  }

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

/* Rotate and fade */
@keyframes rotateFadeIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }

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

/* Wave animation */
@keyframes wave {

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

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

/* Glow pulse */
@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(201, 154, 92, 0.3);
  }

  50% {
    box-shadow: 0 0 20px rgba(201, 154, 92, 0.8), 0 0 30px rgba(201, 154, 92, 0.4);
  }
}

/* Flip card */
@keyframes flipIn {
  from {
    transform: perspective(400px) rotateY(-90deg);
    opacity: 0;
  }

  to {
    transform: perspective(400px) rotateY(0);
    opacity: 1;
  }
}

/* Elastic bounce */
@keyframes elasticBounce {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.25);
  }

  40% {
    transform: scale(0.75);
  }

  60% {
    transform: scale(1.15);
  }

  80% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
}

/* Shake animation */
@keyframes shake {

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

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Float animation */
@keyframes float {

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

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

/* Swing animation */
@keyframes swing {
  20% {
    transform: rotate(15deg);
  }

  40% {
    transform: rotate(-10deg);
  }

  60% {
    transform: rotate(5deg);
  }

  80% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* Gradient animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

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

/* Utility classes for motion design */
.motion-reveal-blur {
  animation: revealBlur var(--duration-slow) var(--ease-out-expo) forwards;
  opacity: 0;
}

.motion-zoom-in {
  animation: zoomIn var(--duration-normal) var(--ease-out-quart) forwards;
  opacity: 0;
}

.motion-bounce-in {
  animation: bounceIn var(--duration-slower) var(--ease-bounce) forwards;
  opacity: 0;
}

.motion-slide-up-fade {
  animation: slideUpFade var(--duration-slow) var(--ease-out-expo) forwards;
  opacity: 0;
}

.motion-rotate-fade {
  animation: rotateFadeIn var(--duration-slow) var(--ease-spring) forwards;
  opacity: 0;
}

.motion-wave {
  animation: wave 2s var(--ease-smooth) infinite;
}

.motion-float {
  animation: float 3s var(--ease-smooth) infinite;
}

.motion-glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.motion-flip-in {
  animation: flipIn var(--duration-slower) var(--ease-out-quart) forwards;
  opacity: 0;
}

.motion-elastic {
  animation: elasticBounce var(--duration-slower) var(--ease-elastic) forwards;
}

.motion-shake {
  animation: shake var(--duration-slow) ease-in-out;
}

.motion-swing {
  animation: swing 1s ease-in-out;
}

/* Scroll-triggered animations */
.scroll-motion {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
    transform var(--duration-slow) var(--ease-out-expo);
}

.scroll-motion.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax effect */
.parallax-slow {
  transform: translateY(0);
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.parallax-medium {
  transform: translateY(0);
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.parallax-fast {
  transform: translateY(0);
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Magnetic cursor effect */
.magnetic {
  transition: transform var(--duration-fast) var(--ease-out-quart);
  will-change: transform;
}

.magnetic:hover {
  transform: scale(1.1);
}

/* Morphing shapes */
@keyframes morph {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.motion-morph {
  animation: morph 8s ease-in-out infinite;
}

/* Text reveal */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: textReveal var(--duration-slow) var(--ease-out-expo) forwards;
}

/* Gradient text animation */
.gradient-text-animated {
  background: linear-gradient(90deg, #c99a5c, #f0d6a8, #c99a5c, #f0d6a8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s linear infinite;
}

/* Stagger delay utilities */
.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

.stagger-5 {
  animation-delay: 0.5s;
}

.stagger-6 {
  animation-delay: 0.6s;
}

.stagger-7 {
  animation-delay: 0.7s;
}

.stagger-8 {
  animation-delay: 0.8s;
}

/* Interactive hover states with motion */
.motion-hover-lift {
  transition: transform var(--duration-fast) var(--ease-out-quart),
    box-shadow var(--duration-fast) var(--ease-out-quart);
}

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

.motion-hover-grow {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.motion-hover-grow:hover {
  transform: scale(1.05);
}

.motion-hover-glow {
  transition: filter var(--duration-normal) ease,
    box-shadow var(--duration-normal) ease;
}

.motion-hover-glow:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 30px rgba(201, 154, 92, 0.5);
}

/* Page transition effects */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.page-enter {
  animation: pageEnter var(--duration-slow) var(--ease-out-expo);
}

/* Loading skeleton shimmer */
@keyframes shimmerSkeleton {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      #f0f0f0 0%,
      #e0e0e0 20%,
      #f0f0f0 40%,
      #f0f0f0 100%);
  background-size: 1000px 100%;
  animation: shimmerSkeleton 2s infinite linear;
  border-radius: 8px;
}

/* Attention seekers */
.attention-pulse {
  animation: pulse 2s var(--ease-smooth) infinite;
}

.attention-bounce {
  animation: elasticBounce 1s var(--ease-elastic);
}

.attention-shake {
  animation: shake 0.5s ease-in-out;
}

/* Background animations */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

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

.bg-gradient-animated {
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite;
}

/* Card entrance animations */
.card-entrance {
  animation: slideUpFade var(--duration-slow) var(--ease-out-expo) forwards;
  opacity: 0;
}

.card-entrance-1 {
  animation-delay: 0.1s;
}

.card-entrance-2 {
  animation-delay: 0.2s;
}

.card-entrance-3 {
  animation-delay: 0.3s;
}

.card-entrance-4 {
  animation-delay: 0.4s;
}

/* Performance optimization */
.will-animate {
  will-change: transform, opacity;
}

.will-animate-complete {
  will-change: auto;
}

/* ========================================
   MODERN MODAL ANIMATIONS
   ======================================== */

/* Modal entrance animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

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

.modal-content-animate {
  animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modern image reveal with zoom */
@keyframes modalImageReveal {
  from {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.modal-image-reveal {
  animation: modalImageReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Text reveal with smooth fade and slide */
@keyframes modalTextReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(2px);
  }

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

.modal-text-reveal {
  animation: modalTextReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* Smooth content transition for switching items */
@keyframes contentSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
  }
}

@keyframes contentSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
  }

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

.content-slide-out {
  animation: contentSlideOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.content-slide-in {
  animation: contentSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Enhanced menu item hover with 3D effect */
.menu-item {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.menu-item:hover {
  animation: menuItemFloat 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menuItemFloat {
  0% {
    transform: translateY(0) rotateX(0deg);
  }

  50% {
    transform: translateY(-8px) rotateX(2deg);
  }

  100% {
    transform: translateY(-4px) rotateX(0deg);
  }
}

/* Modern category button pulse */
.category-filter:hover {
  animation: categoryPulse 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes categoryPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(201, 154, 92, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 8px rgba(201, 154, 92, 0.2);
  }
}

/* Smooth scroll indicator animation */
@keyframes scrollBounce {

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

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

.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

/* Liquid loading animation */
@keyframes liquidFill {
  0% {
    transform: translateY(100%);
  }

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

.liquid-loading {
  animation: liquidFill 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glitch effect for special items */
@keyframes glitch {

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

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }
}

.glitch-hover:hover {
  animation: glitch 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Ripple effect on click */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }

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

.ripple-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(201, 154, 92, 0.4) 0%, transparent 70%);
  transform: scale(0);
  pointer-events: none;
}

.ripple-effect:active::after {
  animation: ripple 0.6s ease-out;
}

/* Magnetic pull effect */
@keyframes magneticPull {
  0% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(var(--mouse-x), var(--mouse-y));
  }

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

.magnetic-pull {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth parallax layers */
.parallax-layer-1 {
  transform: translateZ(-100px) scale(1.1);
}

.parallax-layer-2 {
  transform: translateZ(-200px) scale(1.2);
}

.parallax-layer-3 {
  transform: translateZ(-300px) scale(1.3);
}

/* Neon glow effect */
@keyframes neonGlow {

  0%,
  100% {
    text-shadow: 0 0 10px rgba(201, 154, 92, 0.5),
      0 0 20px rgba(201, 154, 92, 0.3),
      0 0 30px rgba(201, 154, 92, 0.2);
  }

  50% {
    text-shadow: 0 0 20px rgba(201, 154, 92, 0.8),
      0 0 30px rgba(201, 154, 92, 0.5),
      0 0 40px rgba(201, 154, 92, 0.3);
  }
}

.neon-text {
  animation: neonGlow 2s ease-in-out infinite;
}

/* Ink spread effect */
@keyframes inkSpread {
  0% {
    clip-path: circle(0% at 50% 50%);
  }

  100% {
    clip-path: circle(150% at 50% 50%);
  }
}

.ink-reveal {
  animation: inkSpread 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Morphing border animation */
@keyframes morphBorder {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.morph-border {
  animation: morphBorder 8s ease-in-out infinite;
}

/* Crystal loading animation */
@keyframes crystalShine {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(201, 154, 92, 0.3),
      inset 0 0 5px rgba(201, 154, 92, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(201, 154, 92, 0.6),
      inset 0 0 10px rgba(201, 154, 92, 0.4);
  }
}

.crystal-loading {
  animation: crystalShine 1.5s ease-in-out infinite;
}

/* Reduced motion - Respect user preferences */
@media (prefers-reduced-motion: reduce) {

  .modal-content-animate,
  .modal-image-reveal,
  .modal-text-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}