/**
 * JIART Coffee - Custom theme animations & enhancements
 * Matching Google Stitch Design System: Espresso Commerce B2B
 */

:root {
  --color-surface: #161311;
  --color-surface-dim: #161311;
  --color-surface-bright: #3c3836;
  --color-surface-lowest: #100e0c;
  --color-surface-low: #1e1b19;
  --color-surface-container: #221f1d;
  --color-surface-high: #2d2927;
  --color-surface-highest: #383432;
  --color-primary: #ffb77d;
  --color-primary-container: #d97707;
  --color-secondary: #4ae176;
  --color-secondary-container: #00b954;
  --color-tertiary: #ffb95f;
  --color-tertiary-container: #ca8100;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

/* Material Symbols vertical alignment */
.material-symbols-outlined {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SCROLL REVEAL & ENTRANCE ANIMATIONS
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.85s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="slide-up"] {
  transform: translateY(45px);
}

[data-animate="slide-down"] {
  transform: translateY(-35px);
}

[data-animate="slide-left"] {
  transform: translateX(-50px);
}

[data-animate="slide-right"] {
  transform: translateX(50px);
}

[data-animate="zoom-in"] {
  transform: scale(0.90);
}

[data-animate="fade-in"] {
  transform: translateY(0);
}

/* Active visible state when triggered by IntersectionObserver */
[data-animate].is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger Delays */
[data-delay="50"]  { transition-delay: 50ms; }
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="150"] { transition-delay: 150ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="250"] { transition-delay: 250ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="350"] { transition-delay: 350ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }

/* ==========================================================================
   HOVER & INTERACTION ANIMATIONS
   ========================================================================== */

.hover-card-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s ease, 
              background-color 0.3s ease;
}

.hover-card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.75), 0 0 25px 2px rgba(217, 119, 7, 0.12);
}

.hover-card-lift-green:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.75), 0 0 25px 2px rgba(74, 225, 118, 0.18);
}

/* Button arrow slide on hover */
.arrow-slide {
  transition: transform 0.25s ease;
}

.group:hover .arrow-slide {
  transform: translateX(5px);
}

/* ==========================================================================
   AMBIENT & CONTINUOUS MOTION
   ========================================================================== */

@keyframes float-soft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

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

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.18);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ambient-glow {
  0%, 100% {
    opacity: 0.45;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08) translate(-15px, 10px);
  }
}

.animate-ambient-glow {
  animation: ambient-glow 9s ease-in-out infinite alternate;
}

/* Floating WhatsApp halo glow */
.wa-halo-glow {
  box-shadow: 0 8px 24px -2px rgba(34, 197, 94, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wa-halo-glow:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 14px 32px -2px rgba(34, 197, 94, 0.7);
}

/* ==========================================================================
   ACCORDION ANIMATION
   ========================================================================== */

details summary::-webkit-details-marker {
  display: none;
}

.accordion-chevron {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

details[open] summary .accordion-chevron {
  transform: rotate(180deg);
}

/* Active navigation link styling */
.desktop-nav-link.active {
  background-color: #2d2927;
  color: #ffb77d;
}
