/* =============================================
   Beyond Smart Homes — Animations CSS
   animations.css
   ============================================= */

/* ── Floating hero particles ── */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
}
.hero-particles span:nth-child(1)  { width:6px;  height:6px;  left:10%; background:#F5C518; animation-duration:8s;  animation-delay:0s;   opacity:.4; }
.hero-particles span:nth-child(2)  { width:4px;  height:4px;  left:25%; background:#fff;    animation-duration:11s; animation-delay:1s;  opacity:.2; }
.hero-particles span:nth-child(3)  { width:8px;  height:8px;  left:40%; background:#F5C518; animation-duration:9s;  animation-delay:2s;  opacity:.3; }
.hero-particles span:nth-child(4)  { width:3px;  height:3px;  left:55%; background:#fff;    animation-duration:13s; animation-delay:0.5s;opacity:.15;}
.hero-particles span:nth-child(5)  { width:6px;  height:6px;  left:70%; background:#F57C18; animation-duration:10s; animation-delay:3s;  opacity:.3; }
.hero-particles span:nth-child(6)  { width:5px;  height:5px;  left:85%; background:#F5C518; animation-duration:7s;  animation-delay:1.5s;opacity:.35;}
.hero-particles span:nth-child(7)  { width:4px;  height:4px;  left:15%; background:#F57C18; animation-duration:12s; animation-delay:4s;  opacity:.2; }
.hero-particles span:nth-child(8)  { width:7px;  height:7px;  left:60%; background:#fff;    animation-duration:9s;  animation-delay:2.5s;opacity:.15;}
.hero-particles span:nth-child(9)  { width:3px;  height:3px;  left:32%; background:#F5C518; animation-duration:14s; animation-delay:0.8s;opacity:.25;}
.hero-particles span:nth-child(10) { width:5px;  height:5px;  left:78%; background:#fff;    animation-duration:11s; animation-delay:3.5s;opacity:.2; }

@keyframes floatUp {
  0%   { transform: translateY(110vh) scale(0.8); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1.1); opacity: 0; }
}

/* ── Pulse (WhatsApp float button) ── */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

@keyframes pulseOrange {
  0%   { box-shadow: 0 0 0 0 rgba(245,124,24,.45); }
  70%  { box-shadow: 0 0 0 12px rgba(245,124,24,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,124,24,0); }
}

/* ── Card hover lift ── */
.card, .pillar-card, .category-card, .diff-card, .package-card, .timeline-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover, .pillar-card:hover, .category-card:hover,
.diff-card:hover, .package-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,.35);
}

/* ── AOS base (lightweight, no external lib needed on simple pages) ── */
[data-aos] {
  transition-property: transform, opacity;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(.25,.46,.45,.94);
}
[data-aos="fade-up"]    { opacity:0; transform:translateY(40px); }
[data-aos="fade-down"]  { opacity:0; transform:translateY(-40px);}
[data-aos="fade-right"] { opacity:0; transform:translateX(-40px);}
[data-aos="fade-left"]  { opacity:0; transform:translateX(40px); }
[data-aos="zoom-in"]    { opacity:0; transform:scale(0.85);       }
[data-aos].aos-animate  { opacity:1; transform:none;               }

/* ── ROI results reveal ── */
#roi-results {
  animation: none;
}
#roi-results.animate-in {
  animation: revealDown 0.6s ease forwards;
}
@keyframes revealDown {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0);    }
}

/* ── Explanation items stagger ── */
.explanation-item {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.explanation-item.revealed {
  opacity: 1;
  transform: translateX(0);
}
.explanation-item:nth-child(1) { transition-delay: 0.05s; }
.explanation-item:nth-child(2) { transition-delay: 0.15s; }
.explanation-item:nth-child(3) { transition-delay: 0.25s; }
.explanation-item:nth-child(4) { transition-delay: 0.35s; }
.explanation-item:nth-child(5) { transition-delay: 0.45s; }
.explanation-item:nth-child(6) { transition-delay: 0.55s; }

/* ── Thermometer animation ── */
.thermo-wrap {
  display: inline-block;
  position: relative;
  width: 48px;
  height: 120px;
}
.thermo-tube {
  width: 14px;
  height: 80px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 8px 8px 0 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  overflow: hidden;
}
.thermo-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #F57C18, #F5C518);
  animation: thermRise 2.5s ease-in-out infinite alternate;
}
@keyframes thermRise {
  from { height: 25%; }
  to   { height: 72%; }
}
.thermo-bulb {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #F57C18, #F5C518);
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Lock close animation ── */
.lock-icon {
  display: inline-block;
  font-size: 2.4rem;
  animation: lockBounce 3s ease-in-out infinite;
}
@keyframes lockBounce {
  0%,100% { transform: scale(1) rotate(0deg);   }
  30%      { transform: scale(1.15) rotate(-8deg); }
  60%      { transform: scale(1.08) rotate(6deg);  }
}

/* ── Pricing progress bar ── */
.progress-bar {
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  margin-bottom: 36px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #F5C518, #F57C18);
  border-radius: 4px;
  transition: width 0.45s cubic-bezier(.4,0,.2,1);
}

/* ── Wizard step transitions ── */
.wizard-step {
  display: none;
  animation: stepIn 0.4s ease;
}
.wizard-step.active {
  display: block;
}
@keyframes stepIn {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0);    }
}

/* ── Choice buttons ── */
.choice-btn {
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.choice-btn:hover {
  transform: scale(1.04);
}
.choice-btn.selected {
  border-color: #F5C518 !important;
  background: rgba(245,197,24,.15) !important;
  color: #F5C518 !important;
}

/* ── Number buttons ── */
.num-btn.selected {
  background: #F5C518 !important;
  color: #0A1628 !important;
  transform: scale(1.06);
}

/* ── Package card selected ── */
.package-card.selected {
  border: 2px solid #F5C518 !important;
  box-shadow: 0 0 0 4px rgba(245,197,24,.2), 0 20px 48px rgba(0,0,0,.35);
}

/* ── Timeline line draw ── */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  background: linear-gradient(to bottom, #F5C518, #F57C18);
  transform: translateX(-50%);
  animation: lineGrow 1.5s ease forwards;
  transform-origin: top;
}
@keyframes lineGrow {
  from { height: 0; }
  to   { height: 100%; }
}

/* ── Account tab switch ── */
.account-tab {
  transition: color 0.22s, border-color 0.22s;
}
.account-tab.active {
  color: #F5C518;
  border-bottom: 3px solid #F5C518;
}

/* ── Nav scrolled ── */
#bsh-nav {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
#bsh-nav.scrolled {
  background: rgba(10,22,40,.97) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* ── Mobile menu overlay ── */
#mobile-menu {
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
#mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

/* ── Success box bounce ── */
.success-box {
  animation: successPop 0.5s cubic-bezier(.17,.67,.35,1.3) forwards;
}
@keyframes successPop {
  from { transform:scale(0.85); opacity:0; }
  to   { transform:scale(1);    opacity:1; }
}

/* ── Diff card icon glow ── */
.diff-icon {
  transition: filter 0.3s;
}
.diff-card:hover .diff-icon {
  filter: drop-shadow(0 0 12px #F5C518);
}

/* ── Button active press ── */
.btn-primary:active, .btn-outline:active {
  transform: scale(0.96);
}
