/* ===================================================================
   JOVIT MINI-SITE EFFECTS — HorizonX-inspired food-style animations
   Effects: Entrance Bloom, Breathing Orb, Liquid Text Reveal,
            Scroll-Driven Gallery, Steam Particles, Parallax Shift
   Includes prefers-reduced-motion + mobile support
   =================================================================== */

/* ===== ROOT VARS ===== */
:root {
  --bloom-duration: 0.8s;
  --bloom-stagger: 0.08s;
  --liquid-duration: 1.2s;
  --orb-color: rgba(212, 175, 55, 0.15);
  --orb-color-2: rgba(10, 92, 54, 0.12);
  --steam-color: rgba(255, 220, 180, 0.4);
  --ease-bloom: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-liquid: cubic-bezier(0.77, 0, 0.18, 1);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .bloom-in,
  .liquid-reveal,
  .gallery-bloom,
  .steam-particles,
  .breathing-orb {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* ==================================================================
   EFFECT 1: ENTRANCE BLOOM — Elements bloom from center on scroll
   Inspired by HorizonX "Entrance Bloom" — image stack blooms from
   the centre and unwinds into a slow composition
   ================================================================== */
.bloom-in {
  opacity: 0;
  transform: scale(0.6) translateY(40px);
  transition: opacity var(--bloom-duration) var(--ease-bloom),
              transform var(--bloom-duration) var(--ease-bloom);
  will-change: transform, opacity;
}

.bloom-in.bloom-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Staggered bloom for grids */
.gallery-grid .gallery-item:nth-child(1),
.gallery-grid .gallery-photo-item:nth-child(1) { transition-delay: 0s; }
.gallery-grid .gallery-item:nth-child(2),
.gallery-grid .gallery-photo-item:nth-child(2) { transition-delay: var(--bloom-stagger); }
.gallery-grid .gallery-item:nth-child(3),
.gallery-grid .gallery-photo-item:nth-child(3) { transition-delay: calc(var(--bloom-stagger) * 2); }
.gallery-grid .gallery-item:nth-child(4),
.gallery-grid .gallery-photo-item:nth-child(4) { transition-delay: calc(var(--bloom-stagger) * 3); }
.gallery-grid .gallery-item:nth-child(5),
.gallery-grid .gallery-photo-item:nth-child(5) { transition-delay: calc(var(--bloom-stagger) * 4); }
.gallery-grid .gallery-item:nth-child(6),
.gallery-grid .gallery-photo-item:nth-child(6) { transition-delay: calc(var(--bloom-stagger) * 5); }

/* Feature cards bloom from left */
.mini-feature.bloom-in { transform: scale(0.7) translateX(-30px); }
.mini-feature.bloom-in.bloom-visible { transform: scale(1) translateX(0); }

/* Info card blooms from right */
.mini-info-card.bloom-in { transform: scale(0.7) translateX(30px); }
.mini-info-card.bloom-in.bloom-visible { transform: scale(1) translateX(0); }

/* CTA section blooms from bottom */
.mini-cta.bloom-in { transform: scale(0.8) translateY(60px); }
.mini-cta.bloom-in.bloom-visible { transform: scale(1) translateY(0); }

/* ==================================================================
   EFFECT 2: LIQUID TEXT REVEAL — Headings reveal with clip-path wipe
   Inspired by HorizonX "Aurel Liquid Hero"
   ================================================================== */
.liquid-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--liquid-duration) var(--ease-liquid);
  will-change: clip-path;
}
.liquid-reveal.liquid-visible { clip-path: inset(0 0 0 0); }

.liquid-reveal-up {
  clip-path: inset(100% 0 0 0);
  transition: clip-path var(--liquid-duration) var(--ease-liquid);
  will-change: clip-path;
}
.liquid-reveal-up.liquid-visible { clip-path: inset(0 0 0 0); }

.section-subtitle.liquid-reveal { transition-delay: 0.3s; }

/* ==================================================================
   EFFECT 3: BREATHING ORB — Pulsing background glow
   Inspired by HorizonX "Breathing Orb"
   ================================================================== */
.mini-hero { position: relative; }

.breathing-orb {
  position: absolute; top: 50%; left: 50%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--orb-color) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none; z-index: 0;
  animation: breathe 5s ease-in-out infinite;
  will-change: transform, opacity;
}

.breathing-orb-2 {
  position: absolute; top: 30%; right: -10%;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, var(--orb-color-2) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  animation: breathe2 7s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes breathe2 {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.mini-hero .container { position: relative; z-index: 2; }

/* ==================================================================
   EFFECT 4: STEAM PARTICLES — Floating food particles
   ================================================================== */
.steam-particles {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 1;
}

.steam-particle {
  position: absolute; bottom: -20px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--steam-color);
  box-shadow: 0 0 12px 3px var(--steam-color);
  animation: steamRise linear infinite;
  will-change: transform, opacity;
}

@keyframes steamRise {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translateY(-40vh) translateX(15px) scale(1.5); opacity: 0.6; }
  100% { transform: translateY(-80vh) translateX(-10px) scale(0.5); opacity: 0; }
}

/* Food-specific particle colors */
.mini-hero.fastfood .steam-particle,
.mini-hero.fastfood-eleme .steam-particle {
  background: rgba(255, 180, 80, 0.5);
  box-shadow: 0 0 10px 3px rgba(255, 150, 50, 0.4);
}
.mini-hero.mart-restaurant .steam-particle {
  background: rgba(255, 200, 100, 0.4);
  box-shadow: 0 0 12px 3px rgba(212, 175, 55, 0.3);
}
.mini-hero.hotel .steam-particle {
  background: rgba(255, 240, 220, 0.3);
  box-shadow: 0 0 14px 4px rgba(255, 230, 200, 0.2);
}

/* ==================================================================
   EFFECT 5: HOVER GLOW — Card hover with inner glow
   ================================================================== */
.mini-info-card { position: relative; overflow: hidden; }
.mini-info-card::after {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.mini-info-card:hover::after { opacity: 1; }

.gallery-photo-item { overflow: hidden; }
.gallery-photo-item img,
.gallery-photo-item { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.gallery-photo-item:hover { transform: scale(1.03); }

/* ==================================================================
   EFFECT 6: SCROLL CUE
   ================================================================== */
.mini-scroll-cue {
  position: absolute; bottom: 25px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
  z-index: 2; animation: cueBob 2s ease-in-out infinite;
}
.mini-scroll-cue i { font-size: 0.9rem; }

@keyframes cueBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ==================================================================
   MOBILE OPTIMIZATIONS
   ================================================================== */
@media (max-width: 768px) {
  .breathing-orb { width: 300px; height: 300px; }
  .breathing-orb-2 { width: 200px; height: 200px; }
  .steam-particle { width: 4px; height: 4px; }
  .bloom-in { transform: scale(0.8) translateY(30px); transition-duration: 0.6s; }
  .mini-feature.bloom-in { transform: scale(0.9) translateX(-15px); }
  .mini-info-card.bloom-in { transform: scale(0.9) translateX(15px); }
  .mini-cta.bloom-in { transform: scale(0.9) translateY(40px); }
  .liquid-reveal, .liquid-reveal-up { transition-duration: 0.8s; }
  .steam-particles .steam-particle:nth-child(n+8) { display: none; }
  .mini-scroll-cue { display: none; }
}

@media (max-width: 480px) {
  .breathing-orb { width: 200px; height: 200px; }
  .breathing-orb-2 { display: none; }
  .steam-particles .steam-particle:nth-child(n+5) { display: none; }
}

/* Performance */
.bloom-in:not(.bloom-visible) { pointer-events: none; }
.bloom-in { backface-visibility: hidden; }
