/* ============================================================
   FABIE HAIR DESIGN v2 — animations.css
   Page-load · Scroll reveals · Hero pattern · Ken Burns
   ============================================================ */


/* ============================
   KEYFRAMES
============================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

/* Gentle float for the hero hair-strand SVG lines */
@keyframes hairFloat {
  0%,100% { transform: translateY(0px)  translateX(0px);  }
  33%      { transform: translateY(-7px) translateX(5px);  }
  66%      { transform: translateY(4px)  translateX(-4px); }
}

/* Slower float variant */
@keyframes hairFloatSlow {
  0%,100% { transform: translateY(0px)   translateX(0px); }
  40%      { transform: translateY(-10px) translateX(6px); }
  70%      { transform: translateY(5px)   translateX(-5px);}
}

/* Dot pulse */
@keyframes dotPulse {
  0%,100% { opacity: 0.28; transform: scale(1);    }
  50%      { opacity: 0.45; transform: scale(1.35); }
}


/* ============================
   HERO PAGE-LOAD
   Staggered entrance — runs once on load.
============================ */
.nav       { animation: slideDown 0.55s ease both; }

.hero-deco { animation: fadeIn 1.2s ease 0.1s both; }
.hero-bg   { animation: fadeIn 1.0s ease 0.2s both; }

.hero-content  { animation: slideUp 0.85s cubic-bezier(0.22,1,0.36,1) 0.35s both; }
.hero-eyebrow  { animation: slideUp 0.6s ease 0.55s both; }
.hero-name     { animation: slideUp 0.7s ease 0.65s both; }
.hero-desc     { animation: slideUp 0.6s ease 0.75s both; }
.hero-btns     { animation: slideUp 0.6s ease 0.85s both; }


/* ============================
   HERO PATTERN ANIMATION
   Each hair strand drifts gently at its own pace.
============================ */
.hero-deco .hs1 { animation: hairFloat     9s  ease-in-out infinite 0.0s; }
.hero-deco .hs2 { animation: hairFloatSlow 12s ease-in-out infinite 1.2s; }
.hero-deco .hs3 { animation: hairFloat     10s ease-in-out infinite 0.6s; }
.hero-deco .hs4 { animation: hairFloatSlow 11s ease-in-out infinite 2.0s; }
.hero-deco .hs5 { animation: hairFloat     8s  ease-in-out infinite 1.8s; }
.hero-deco .hs6 { animation: hairFloatSlow 13s ease-in-out infinite 0.4s; }
.hero-deco .hs7 { animation: hairFloat     9s  ease-in-out infinite 2.5s; }

.hero-deco .hs-dot {
  animation: dotPulse 4s ease-in-out infinite;
}
.hero-deco .hs-dot:nth-child(2) { animation-delay: 0.6s; }
.hero-deco .hs-dot:nth-child(3) { animation-delay: 1.2s; }
.hero-deco .hs-dot:nth-child(4) { animation-delay: 1.8s; }
.hero-deco .hs-dot:nth-child(5) { animation-delay: 2.4s; }
.hero-deco .hs-dot:nth-child(6) { animation-delay: 3.0s; }
.hero-deco .hs-dot:nth-child(7) { animation-delay: 0.3s; }


/* ============================
   SCROLL REVEALS
   script.js adds .visible via IntersectionObserver.
============================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }


/* ============================
   STAGGER — children reveal in sequence
============================ */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.stagger.visible > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 0.13s; }
.stagger.visible > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 0.21s; }
.stagger.visible > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 0.29s; }
.stagger.visible > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 0.37s; }
.stagger.visible > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 0.45s; }
.stagger.visible > *:nth-child(7)  { opacity: 1; transform: none; transition-delay: 0.53s; }
.stagger.visible > *:nth-child(8)  { opacity: 1; transform: none; transition-delay: 0.61s; }
.stagger.visible > *:nth-child(9)  { opacity: 1; transform: none; transition-delay: 0.69s; }
.stagger.visible > *:nth-child(10) { opacity: 1; transform: none; transition-delay: 0.77s; }


/* ============================
   HOVER MICRO-INTERACTIONS
============================ */

/* Gallery items lift slightly */
.gallery-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* Policy cards */
.policy-item {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.policy-item:hover {
  transform: translateY(-3px);
}

/* Buttons scale on press */
.btn {
  transition: background 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, transform 0.15s ease,
              box-shadow 0.22s ease;
}
.btn:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}





/* ============================
   MARQUEE GALLERY
============================ */
@keyframes marqueeRight {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marqueeLeft {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee-right { animation: marqueeRight linear infinite; }
.marquee-left  { animation: marqueeLeft  linear infinite; }

.marquee-slow   { animation-duration: 45s; }
.marquee-medium { animation-duration: 32s; }
.marquee-fast   { animation-duration: 24s; }


/* Service banner — smooth inner transitions defined in style.css */


/* ============================
   REDUCED MOTION
============================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-delay:      0.01ms !important;
    transition-duration:  0.01ms !important;
    scroll-behavior:      auto   !important;
  }

  .reveal, .reveal-left, .reveal-right,
  .stagger > * {
    opacity: 1;
    transform: none;
  }
}
