/* ============================================================
   VIVAAN REALTY — animation.css
   Scroll reveals, transitions, micro-interactions
   ============================================================ */

/* ── Scroll Reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }

/* ── Hero Entrance ── */
.hero-text .hero-eyebrow {
  animation: heroFadeUp 0.8s 0.2s ease both;
}
.hero-text h1 {
  animation: heroFadeUp 0.9s 0.35s ease both;
}
.hero-location {
  animation: heroFadeUp 0.8s 0.5s ease both;
}
.hero-price-strip {
  animation: heroFadeUp 0.8s 0.6s ease both;
}
.hero-cta {
  animation: heroFadeUp 0.8s 0.7s ease both;
}
.hero-stats {
  animation: heroFadeUp 0.8s 0.85s ease both;
}
.hero-form-card {
  animation: heroFadeLeft 1s 0.4s ease both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Pulsing Red Dot ── */
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(200,16,46,0.3);
  animation: pulseRing 2s infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── Counter Animation ── */
.count-num {
  display: inline-block;
}

/* ── Shimmer Loading ── */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Floating CTA pulse ── */
.float-visit {
  animation: floatPulse 3s ease-in-out infinite;
}
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(200,16,46,0.4); }
  50% { box-shadow: 0 12px 40px rgba(200,16,46,0.65); }
}

/* ── Section background parallax feel ── */
.hero-pattern {
  animation: patternDrift 20s linear infinite;
}
@keyframes patternDrift {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}

/* ── Pricing card hover glow ── */
.pricing-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--red), transparent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}
.pricing-card:hover::after { opacity: 0.08; }

/* ── Nav logo animation ── */
.nav-logo img {
  transition: transform 0.3s ease;
}
.nav-logo img:hover { transform: scale(1.05); }

/* ── Masonry item stagger ── */
.masonry-item:nth-child(1) { animation-delay: 0.05s; }
.masonry-item:nth-child(2) { animation-delay: 0.1s; }
.masonry-item:nth-child(3) { animation-delay: 0.15s; }
.masonry-item:nth-child(4) { animation-delay: 0.2s; }
.masonry-item:nth-child(5) { animation-delay: 0.25s; }
.masonry-item:nth-child(6) { animation-delay: 0.3s; }
.masonry-item:nth-child(7) { animation-delay: 0.35s; }
.masonry-item:nth-child(8) { animation-delay: 0.4s; }

/* ── Success check animation ── */
@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
.success-icon { animation: checkPop 0.5s 0.2s ease both; }

/* ── Sticky header shrink ── */
#header { transition: all 0.35s ease; }
#header.scrolled .nav-logo img { height: 44px; }

/* ── Line draw animation ── */
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: lineDraw 2s ease forwards;
}
@keyframes lineDraw {
  to { stroke-dashoffset: 0; }
}

/* ── USP icon bounce on hover ── */
.usp-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.usp-item:hover .usp-icon {
  transform: scale(1.2) rotate(-5deg);
}

/* ── Conn card icon spin ── */
.conn-card:hover .conn-icon {
  animation: connSpin 0.5s ease;
}
@keyframes connSpin {
  0% { transform: rotate(0); }
  50% { transform: rotate(15deg); }
  100% { transform: rotate(0); }
}

/* ── Mobile: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
