/* ================================================================
   ScanItUp — Animations & Enhancement Styles
   animations.css — loaded globally after missalert-main
   ================================================================ */

/* ── Scroll Progress Bar ────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--cyan));
  background-size: 200% 100%;
  z-index: 9999;
  animation: shimmer-progress 2s linear infinite;
  transition: width 0.1s linear;
}
@keyframes shimmer-progress {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── Announcement Bar ───────────────────────────────────────────── */
:root { --announce-h: 44px; }
.announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--announce-h);
  background: linear-gradient(90deg, #0a1628 0%, #0d2137 50%, #0a1628 100%);
  border-bottom: 1px solid rgba(6,229,200,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 48px 0 16px;
  overflow: hidden;
  animation: announce-slide-in 0.5s ease 0.2s both;
}
@keyframes announce-slide-in {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
.announce-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(6,229,200,.04), transparent);
  animation: sweep 3s ease-in-out infinite;
}
@keyframes sweep {
  0%,100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}
.announce-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.announce-badge {
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  color: var(--obsidian);
  font-size: .68rem;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.announce-text { color: rgba(255,255,255,.7); }
.announce-cta {
  color: var(--cyan);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .82rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: gap .18s ease, color .18s ease;
}
.announce-cta:hover { color: var(--gold); gap: 9px; }
.announce-cta i { font-size: .72rem; }
.announce-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  font-size: .8rem;
  padding: 4px 6px;
  line-height: 1;
  transition: color .18s ease;
}
.announce-close:hover { color: rgba(255,255,255,.8); }

/* Push header down by announce bar height */
.header { top: var(--announce-h); }
.announce-hidden .header { top: 0; }
.announce-hidden { --announce-h: 0px; }

/* ── Scroll-Reveal Animations ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.reveal--left  { transform: translateX(-40px); }
.reveal.reveal--right { transform: translateX(40px); }
.reveal.reveal--scale { transform: scale(.92); }
.reveal.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Stagger helper — set via JS data-stagger-delay="N" */
.reveal[data-delay="1"]  { transition-delay: .1s; }
.reveal[data-delay="2"]  { transition-delay: .2s; }
.reveal[data-delay="3"]  { transition-delay: .3s; }
.reveal[data-delay="4"]  { transition-delay: .4s; }
.reveal[data-delay="5"]  { transition-delay: .5s; }
.reveal[data-delay="6"]  { transition-delay: .6s; }

/* ── Enhanced .fade-in (already used in templates) ──────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Button Ripple Effect ────────────────────────────────────────── */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: ripple-anim .55s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(80); opacity: 0; }
}

/* ── Shimmer Shine on Primary Buttons ───────────────────────────── */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.btn-primary:hover::after { left: 125%; }

/* ── Card Hover Lift ─────────────────────────────────────────────── */
.card-hover {
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,.14);
}

/* ── Glowing Pulse on Active/CTA Elements ───────────────────────── */
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(6,229,200,.4); }
  50%      { box-shadow: 0 0 0 10px rgba(6,229,200,0); }
}
.glow-pulse { animation: glow-pulse 2s ease-in-out infinite; }

/* ── Floating Animation (hero badges, decorative elements) ──────── */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes float-slow {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}
.float       { animation: float 3s ease-in-out infinite; }
.float-slow  { animation: float-slow 5s ease-in-out infinite; }

/* ── Gradient Text Animation ─────────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
.gradient-text-anim {
  background: linear-gradient(270deg, var(--cyan), var(--gold), #a78bfa, var(--cyan));
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

/* ── Typing Cursor ──────────────────────────────────────────────── */
.typing-cursor::after {
  content: '|';
  color: var(--cyan);
  animation: cursor-blink .75s step-end infinite;
  margin-left: 2px;
}
@keyframes cursor-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Hero Orb Ambient Glow Enhancements ─────────────────────────── */
@keyframes orb-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(20px,-15px) scale(1.05); }
  66%      { transform: translate(-15px,10px) scale(.97); }
}
.hero-orb-1 { animation: orb-drift 12s ease-in-out infinite; }
.hero-orb-2 { animation: orb-drift 16s ease-in-out infinite reverse; }

/* ── Stats Bar Counter Odometer effect ──────────────────────────── */
.stat-number em { font-style: normal; }

/* ── Sticky App CTA Bar (mobile bottom strip) ────────────────────── */
.app-cta-strip {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 990;
  background: linear-gradient(135deg, var(--obsidian), #0d2137);
  border-top: 1px solid rgba(6,229,200,.18);
  padding: 10px 20px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -8px 32px rgba(0,0,0,.4);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.app-cta-strip.visible {
  transform: translateY(0);
}
.app-cta-strip-text {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  line-height: 1.35;
}
.app-cta-strip-text strong { color: var(--white); display: block; font-family: var(--font-display); }
.app-cta-strip-btn {
  background: var(--cyan);
  color: var(--obsidian);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .82rem;
  padding: 10px 20px;
  border-radius: 100px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: var(--shadow-cyan);
  transition: transform .18s ease, box-shadow .18s ease;
}
.app-cta-strip-btn:hover { transform: scale(1.04); }

@media (max-width: 768px) {
  .app-cta-strip { display: flex; }
}

/* ── Section Entry Animations ───────────────────────────────────── */
@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop-in {
  0%   { opacity: 0; transform: scale(.85); }
  70%  { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── NDM (nav dropdown menu) enhanced animation ─────────────────── */
.nav-dropdown-menu {
  transition: opacity .2s ease, transform .2s cubic-bezier(.22,1,.36,1) !important;
}
.nav-dropdown.open .nav-dropdown-menu {
  animation: ndm-enter .2s cubic-bezier(.22,1,.36,1);
}
@keyframes ndm-enter {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ndm-item {
  transition: background .18s ease, transform .18s ease, color .18s ease !important;
}
.ndm-item:hover { transform: translateX(3px) !important; }

/* ── Header scroll-shrink ───────────────────────────────────────── */
.header { transition: top .35s ease, background .25s ease, box-shadow .25s ease, height .25s ease; }
.header .header-inner { transition: height .25s ease; }
.header.scrolled .header-inner { height: 62px; }

/* ── Active nav link underline slide ────────────────────────────── */
.nav-links a, .nav-links .nav-dropdown-trigger {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: left .2s ease, right .2s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  left: 8px; right: 8px;
}

/* ── WhatsApp Pulse Button (moved from inline) ───────────────────── */
.btn-whatsapp-pulse {
  background: #25D366;
  color: white;
  position: fixed;
  bottom: 80px;
  right: 20px;
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 0;
  height: 0;
  padding: 35px;
  text-decoration: none;
  border-radius: 50%;
  z-index: 980;
  animation: wa-pulse 1.5s ease-out infinite;
}
@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  80%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 768px) {
  .btn-whatsapp-pulse { bottom: 90px; }
}

/* ── Announcement bar responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .announce-bar { padding: 0 44px 0 10px; }
  .announce-text { display: none; }
  .announce-inner { gap: 8px; }
}

/* ── Section header label-tag bounce ────────────────────────────── */
@keyframes label-bounce {
  0%,100% { transform: translateY(0); }
  40%     { transform: translateY(-3px); }
  60%     { transform: translateY(-1px); }
}
.label-tag { display: inline-flex; align-items: center; gap: 7px; animation: label-bounce 2.5s ease-in-out infinite; }

/* ── Highlight text inner shimmer ───────────────────────────────── */
h1 .highlight, h2 .highlight {
  position: relative;
  display: inline;
}

/* ── Card glow on hover (dark sections) ─────────────────────────── */
.qt-step:hover .qt-step-num,
.qt-stat:hover .qt-stat-number {
  text-shadow: 0 0 24px rgba(6,229,200,.5);
  transition: text-shadow .3s ease;
}

/* ── Number counter pop ─────────────────────────────────────────── */
@keyframes num-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.counter-done { animation: num-pop .35s ease; }

/* ── Page transition overlay ────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: var(--obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
#page-loader.loading { opacity: 1; pointer-events: all; }
.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(6,229,200,.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
