/* ============================================================
   ISP Windows & Door — Animations & Keyframes
   ============================================================ */

/* ── KEYFRAMES ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,67,0); }
  50%       { box-shadow: 0 0 0 12px rgba(212,168,67,0.08); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes widthIn {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes borderGlow {
  0%,100% { border-color: rgba(212,168,67,0.3); }
  50%      { border-color: rgba(212,168,67,0.7); }
}
@keyframes heroParallax {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.5; }
}

/* ── HERO BG PARALLAX ── */
.hero__bg {
  animation: heroParallax 8s var(--ease-out) forwards;
}

/* ── ANIMATED HERO CONTENT ── */
.hero-anim-1 { animation: fadeUp 0.8s var(--ease-spring) 0.2s both; }
.hero-anim-2 { animation: fadeUp 0.8s var(--ease-spring) 0.4s both; }
.hero-anim-3 { animation: fadeUp 0.8s var(--ease-spring) 0.6s both; }
.hero-anim-4 { animation: fadeUp 0.8s var(--ease-spring) 0.8s both; }
.hero-anim-5 { animation: fadeUp 0.8s var(--ease-spring) 1.0s both; }

/* ── FLOATING BADGE (hero accents) ── */
.float-badge {
  animation: float 4s ease-in-out infinite;
}
.float-badge:nth-child(2) { animation-delay: -2s; }
.float-badge:nth-child(3) { animation-delay: -1s; }

/* ── GOLD SHIMMER on CTAs ── */
.shimmer-btn {
  background-size: 200% auto;
  background-image: linear-gradient(
    105deg,
    var(--gold-600) 0%,
    var(--gold-400) 35%,
    var(--gold-200) 50%,
    var(--gold-400) 65%,
    var(--gold-600) 100%
  );
  animation: shimmer 3s linear infinite;
}

/* ── COUNTER ANIMATION ── */
.counter-anim {
  animation: countUp 0.6s var(--ease-spring) both;
}

/* ── GOLD PULSE on icon wraps ── */
.pulse-gold {
  animation: goldPulse 3s ease-in-out infinite;
}

/* ── CARD 3D TILT ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform var(--dur-base) var(--ease-spring);
}

/* ── STAGGER CHILDREN ── */
.stagger > * { opacity: 0; transform: translateY(24px); }
.stagger.is-visible > * {
  animation: fadeUp 0.5s var(--ease-spring) both;
}
.stagger.is-visible > *:nth-child(1)  { animation-delay: 0ms; }
.stagger.is-visible > *:nth-child(2)  { animation-delay: 80ms; }
.stagger.is-visible > *:nth-child(3)  { animation-delay: 160ms; }
.stagger.is-visible > *:nth-child(4)  { animation-delay: 240ms; }
.stagger.is-visible > *:nth-child(5)  { animation-delay: 320ms; }
.stagger.is-visible > *:nth-child(6)  { animation-delay: 400ms; }
.stagger.is-visible > *:nth-child(7)  { animation-delay: 480ms; }
.stagger.is-visible > *:nth-child(8)  { animation-delay: 560ms; }

/* ── LINE DRAW (underline animation) ── */
.line-draw {
  position: relative;
  display: inline-block;
}
.line-draw::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-spring);
}
.line-draw.is-visible::after,
.line-draw:hover::after { width: 100%; }

/* ── IMAGE REVEAL ── */
.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy-900);
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.8s var(--ease-spring);
}
.img-reveal.is-visible::after { transform: scaleX(0); }

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1.2s var(--ease-out) 0.3s;
}
.is-visible .progress-bar__fill { width: var(--progress, 75%); }

/* ── SPIN LOADER (button state) ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

/* ── BLOB decoration ── */
@keyframes blobMove {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  33%       { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  66%       { border-radius: 50% 60% 40% 40% / 40% 50% 60% 50%; }
}
.blob {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle, rgba(212,168,67,0.08) 0%, transparent 70%);
  animation: blobMove 12s ease-in-out infinite;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* ── DOT pulse indicator ── */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #22C55E;
  animation: dotPulse 2s ease-in-out infinite;
}

/* ── REDUCED MOTION OVERRIDES ── */
@media (prefers-reduced-motion: reduce) {
  .hero__bg,
  .float-badge,
  .shimmer-btn,
  .pulse-gold,
  .blob,
  .live-dot { animation: none; }
  .hero-anim-1,
  .hero-anim-2,
  .hero-anim-3,
  .hero-anim-4,
  .hero-anim-5 { animation: none; opacity: 1; transform: none; }
  .stagger > * { opacity: 1; transform: none; animation: none; }
  .line-draw::after { width: 100%; transition: none; }
  .img-reveal::after { transform: scaleX(0); transition: none; }
}
