/* ============================================================
   LUXE INTERIORS — animations.css
   ============================================================ */

/* ── Reveal / Fade Utilities (used with GSAP & Intersection Observer) ── */

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible,
.fade-left.visible,
.fade-right.visible,
.scale-in.visible {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0.0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.6s; }

/* ── Image Reveal Clip ── */
.img-reveal {
  overflow: hidden;
}

.img-reveal img {
  transform: scale(1.15);
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-reveal.visible img { transform: scale(1); }

/* ── Text Reveal (clip-path) ── */
.text-reveal-wrap {
  overflow: hidden;
}

.text-reveal {
  transform: translateY(110%);
  display: inline-block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.text-reveal.visible { transform: translateY(0); }

/* ── Button hover ripple ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  border-radius: inherit;
  transform: scale(0);
  transition: transform 0.4s ease;
}

.btn-ripple:hover::after { transform: scale(1); }

/* ── Loading animations ── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Pulse glow (for CTA) ── */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199,169,122,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(199,169,122,0); }
}

.pulse-glow { animation: pulseGlow 2.5s ease infinite; }

/* ── Float (decorative elements) ── */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

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

/* ── Spinner (for form submission) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Line draw (decorative SVG) ── */
@keyframes lineDraw {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: lineDraw 2s ease forwards;
}

/* ── Page transition overlay ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 9000;
  transform: translateY(-100%);
}

/* ── Cursor spotlight (subtle glow follow cursor) ── */
.spotlight {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,169,122,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

/* ── Gold shimmer text ── */
@keyframes goldShimmer {
  0%   { background-position: -400px; }
  100% { background-position: 400px; }
}

.gold-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold) 20%,
    var(--gold-light) 50%,
    var(--gold) 80%
  );
  background-size: 400px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3s linear infinite;
}

/* ── Reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up,
  .fade-left,
  .fade-right,
  .scale-in {
    opacity: 1;
    transform: none;
  }
}
