/* ============================================================
   MAMIJOJO — KEYFRAMES & SCROLL ANIMATIONS
   ============================================================ */

/* Page transition fade-in */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
main { animation: pageFadeIn 0.5s ease 0.1s both; }

/* Shine sweep on buttons */
@keyframes btnShine {
  0%   { left: -100%; }
  100% { left: 200%; }
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-15deg);
  animation: btnShine 3s ease 2s infinite;
}
.btn-primary { position: relative; overflow: hidden; }

/* Glow pulse on orange elements */
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 20px rgba(244,128,10,0.3); }
  50%      { box-shadow: 0 0 40px rgba(244,128,10,0.6); }
}

/* Number counter tick */
@keyframes counterTick {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.stat-number.animating { animation: counterTick 0.1s ease; }

/* Stagger children reveal */
.stagger-children > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > * { opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2)  { transition-delay: 0.1s;  }
.stagger-children.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4)  { transition-delay: 0.2s;  }
.stagger-children.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6)  { transition-delay: 0.3s;  }
.stagger-children.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8)  { transition-delay: 0.4s;  }
.stagger-children.visible > *:nth-child(9)  { transition-delay: 0.45s; }

/* Card hover glow */
.service-card:hover {
  box-shadow: 0 0 0 1px rgba(244,128,10,0.3), 0 20px 60px rgba(0,0,0,0.5);
}

/* Text gradient shimmer */
@keyframes textShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.gradient-text {
  background: linear-gradient(90deg, var(--orange), var(--green), var(--gold), var(--orange));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: textShimmer 4s linear infinite;
}

/* Section entrance */
@keyframes sectionEntrance {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: none; }
}

/* Fade scale in */
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.fade-scale-in { animation: fadeScaleIn 0.6s ease both; }

/* Floating badge continuous */
@keyframes badgeFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-6px) rotate(1deg); }
  66%      { transform: translateY(3px) rotate(-1deg); }
}
.float-badge { animation: badgeFloat 4s ease infinite; }

/* Line draw animation for section dividers */
@keyframes lineDraw { from{width:0} to{width:100%} }
.line-draw {
  height: 1px; background: linear-gradient(90deg, var(--orange), transparent);
  width: 0;
}
.line-draw.visible { animation: lineDraw 1s ease forwards; }

/* Image reveal */
@keyframes imgReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
.img-reveal.visible { animation: imgReveal 0.9s cubic-bezier(0.77,0,0.175,1) forwards; }

/* Rotating gradient border */
@keyframes rotateBorder {
  to { --angle: 360deg; }
}

/* ============================================================
   LIGHT MODE THEME
   ============================================================ */
body.light-mode {
  --dark:       #F5F0EA;
  --dark-2:     #EDE8E1;
  --dark-3:     #E4DDD5;
  --dark-4:     #D9D1C7;
  --dark-card:  rgba(245,240,234,0.95);
  --white:      #1A1A1A;
  --off-white:  #2D2D2D;
  --gray-1:     #444444;
  --gray-2:     #666666;
  --gray-3:     #999999;
  --glass:      rgba(0,0,0,0.04);
  --glass-border: rgba(0,0,0,0.1);
  --shadow-card: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-heavy:0 20px 80px rgba(0,0,0,0.2);
}
body.light-mode .nav.scrolled {
  background: rgba(245,240,234,0.95);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
body.light-mode .nav-link        { color: rgba(26,26,26,0.8); }
body.light-mode .nav-call        { color: #555; }
body.light-mode .dropdown-menu   { background: #fff; }
body.light-mode .mobile-menu     { background: #F5F0EA; }
body.light-mode .mobile-links a  { color: #444; }
body.light-mode .footer          { background: #E8E2D9; }
body.light-mode .footer-copy,
body.light-mode .footer-made     { color: #888; }
body.light-mode .footer-links a  { color: #666; }
body.light-mode #preloader       { background: #F5F0EA; }
body.light-mode .service-card    { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-mode .testimonial-card{ background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-mode .calculator-card { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-mode .calc-option     { background: rgba(0,0,0,0.03); }
body.light-mode .hero-bg-overlay {
  background: linear-gradient(to right, rgba(245,240,234,0.92) 40%, rgba(245,240,234,0.5) 100%);
}
body.light-mode .stat-item       { border-color: rgba(0,0,0,0.08); }
body.light-mode .stat-item:hover { background: rgba(0,0,0,0.03); }
body.light-mode .contact-strip   { background: #EDE8E1; }
body.light-mode .why-reason      { border-color: rgba(0,0,0,0.08); }
body.light-mode .story-ghost-number { color: rgba(0,0,0,0.05); }
body.light-mode #cursor-dot      { background: var(--orange); }
body.light-mode #cursor-ring     { border-color: rgba(244,128,10,0.4); }

/* Toggle button */
#theme-toggle {
  position: fixed; top: 50%; right: 0;
  transform: translateY(-50%);
  z-index: 1200;
  width: 44px; height: 44px;
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: -2px 0 12px rgba(0,0,0,0.3);
}
#theme-toggle:hover {
  background: var(--orange);
  transform: translateY(-50%) translateX(-2px);
}
#theme-toggle .icon-sun  { display: none; }
#theme-toggle .icon-moon { display: block; }
body.light-mode #theme-toggle .icon-sun  { display: block; }
body.light-mode #theme-toggle .icon-moon { display: none; }

/* -- THEME TOGGLE — FULLY VISIBLE FIX -- */
#theme-toggle {
  position: fixed !important;
  bottom: 100px !important;
  right: 28px !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  z-index: 99999 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(244,128,10,0.6) !important;
  background: #1C1C1C !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(244,128,10,0.2) !important;
  font-size: 1.2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: white !important;
  line-height: 1 !important;
}
#theme-toggle:hover {
  background: var(--orange) !important;
  transform: scale(1.1) !important;
  border-color: var(--orange) !important;
}
body.light-mode #theme-toggle {
  background: #fff !important;
  border-color: rgba(244,128,10,0.6) !important;
}

/* -- THEME TOGGLE — NUCLEAR POSITION FIX -- */
#theme-toggle {
  position: fixed !important;
  bottom: 104px !important;
  right: 28px !important;
  top: unset !important;
  left: unset !important;
  transform: none !important;
  z-index: 999999 !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  border: 2px solid var(--orange) !important;
  background: #111 !important;
  box-shadow: 0 0 0 4px rgba(244,128,10,0.15), 0 4px 20px rgba(0,0,0,0.8) !important;
  font-size: 1.3rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  pointer-events: all !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* -- THEME TOGGLE — PILL CAPSULE ABOVE WHATSAPP -- */
#theme-toggle {
  position: fixed !important;
  bottom: 100px !important;
  right: 28px !important;
  top: unset !important;
  left: unset !important;
  transform: none !important;
  z-index: 999999 !important;
  width: 60px !important;
  height: 100px !important;
  border-radius: 30px !important;
  border: 2px solid rgba(244,128,10,0.5) !important;
  background: rgba(20,20,20,0.95) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important;
  font-size: 1.4rem !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding-bottom: 10px !important;
  cursor: pointer !important;
  pointer-events: all !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
#theme-toggle:hover {
  border-color: var(--orange) !important;
  box-shadow: 0 4px 32px rgba(244,128,10,0.35) !important;
}

/* The sliding knob inside the pill */
#theme-toggle::before {
  content: '' !important;
  position: absolute !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark)) !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  transition: top 0.4s cubic-bezier(0.34,1.56,0.64,1), background 0.3s ease !important;
  box-shadow: 0 2px 12px rgba(244,128,10,0.5) !important;
}
body.light-mode #theme-toggle::before {
  top: 44px !important;
  background: linear-gradient(135deg, #8DC63F, #6BA82E) !important;
  box-shadow: 0 2px 12px rgba(141,198,63,0.5) !important;
}

/* Hide the emoji spans — knob does the visual work */
#theme-toggle .icon-moon,
#theme-toggle .icon-sun {
  display: none !important;
}

/* Small label under the pill */
#theme-toggle::after {
  content: 'DARK' !important;
  position: absolute !important;
  bottom: -22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.1em !important;
  color: var(--gray-2) !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
body.light-mode #theme-toggle::after {
  content: 'LIGHT' !important;
  color: var(--gray-2) !important;
}

/* Push WhatsApp button down slightly to give room */
.wa-float {
  bottom: 28px !important;
}

/* -- THEME TOGGLE — NAV PILL (beside Contact) -- */
#theme-toggle {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 14px 7px 8px !important;
  border-radius: 100px !important;
  background: #1C1C1C !important;
  border: 1.5px solid rgba(255,255,255,0.12) !important;
  cursor: pointer !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  font-family: var(--font-body) !important;
  letter-spacing: 0.06em !important;
  color: var(--gray-1) !important;
  text-transform: uppercase !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  position: static !important;
  bottom: unset !important;
  right: unset !important;
  box-shadow: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 36px !important;
  width: auto !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
}
#theme-toggle:hover {
  border-color: var(--orange) !important;
  color: var(--white) !important;
}

/* Knob circle with icon */
#theme-toggle .icon-moon,
#theme-toggle .icon-sun {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  font-size: 0.95rem !important;
  flex-shrink: 0 !important;
  transition: background 0.3s ease !important;
}
#theme-toggle .icon-moon {
  background: linear-gradient(135deg, #2d2d6b, #1a1a4a) !important;
  box-shadow: 0 2px 8px rgba(50,50,150,0.4) !important;
}
#theme-toggle .icon-sun {
  background: linear-gradient(135deg, #F4800A, #ffb347) !important;
  box-shadow: 0 2px 8px rgba(244,128,10,0.5) !important;
}

/* Dark mode: show moon, hide sun */
#theme-toggle .icon-moon { display: flex !important; }
#theme-toggle .icon-sun  { display: none  !important; }
body.light-mode #theme-toggle .icon-moon { display: none  !important; }
body.light-mode #theme-toggle .icon-sun  { display: flex !important; }

/* Label text via ::after */
#theme-toggle::after {
  content: 'DARK MODE' !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  color: inherit !important;
  position: static !important;
  transform: none !important;
  bottom: unset !important;
  left: unset !important;
  white-space: nowrap !important;
}
body.light-mode #theme-toggle::after {
  content: 'LIGHT MODE' !important;
}

/* Light mode pill styling */
body.light-mode #theme-toggle {
  background: #f0f0f0 !important;
  border-color: rgba(0,0,0,0.15) !important;
  color: #444 !important;
}

/* -- Remove the old fixed positioning leftovers -- */
#theme-toggle::before { display: none !important; }

/* -- Force dark as true default — ignore OS light preference -- */
body { background: var(--dark) !important; }

/* ============================================================
   FOOTER ANIMATIONS
   ============================================================ */

/* Gradient bar animation — already in style.css, enhance it */
.footer-gradient-bar {
  height: 4px !important;
  background: linear-gradient(90deg, var(--orange), var(--green), var(--gold), var(--green), var(--orange)) !important;
  background-size: 300% 100% !important;
  animation: gradientShift 3s linear infinite !important;
}

/* Footer columns fade up on scroll */
.footer-col {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.footer-col.footer-visible {
  opacity: 1;
  transform: none;
}
.footer-col:nth-child(1) { transition-delay: 0.1s; }
.footer-col:nth-child(2) { transition-delay: 0.2s; }
.footer-col:nth-child(3) { transition-delay: 0.3s; }
.footer-col:nth-child(4) { transition-delay: 0.4s; }

/* Footer links hover slide */
.footer-links a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  transition: all 0.25s ease !important;
  position: relative !important;
}
.footer-links a::before {
  content: '›' !important;
  color: var(--orange) !important;
  font-size: 1rem !important;
  opacity: 0 !important;
  transform: translateX(-8px) !important;
  transition: all 0.25s ease !important;
  margin-right: 0 !important;
}
.footer-links a:hover::before {
  opacity: 1 !important;
  transform: translateX(0) !important;
  margin-right: 6px !important;
}
.footer-links a:hover {
  color: var(--orange) !important;
  padding-left: 0 !important;
}

/* Social pills hover bounce */
.social-pill {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.social-pill:hover {
  transform: translateY(-3px) scale(1.05) !important;
  border-color: var(--orange) !important;
  color: var(--orange) !important;
}

/* Footer phone pulse on hover */
.footer-phone {
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.footer-phone::before {
  content: '??' !important;
  font-size: 0.8rem !important;
  opacity: 0 !important;
  width: 0 !important;
  transition: all 0.2s ease !important;
}
.footer-phone:hover::before {
  opacity: 1 !important;
  width: 20px !important;
}
.footer-phone:hover {
  color: var(--orange) !important;
  letter-spacing: 0.02em !important;
}

/* Footer logo float */
.footer-logo {
  animation: footerLogoFloat 4s ease-in-out infinite !important;
}
@keyframes footerLogoFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Footer tagline shimmer */
.footer-tagline {
  background: linear-gradient(90deg, var(--orange), var(--green), var(--gold), var(--orange)) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: textShimmer 3s linear infinite !important;
}

/* Footer bottom bar slide in */
.footer-bottom {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}
.footer-bottom.footer-visible {
  opacity: 1;
  transform: none;
}

/* WhatsApp footer button pulse */
.footer-wa-btn {
  animation: footerWaPulse 2.5s ease-in-out infinite !important;
}
@keyframes footerWaPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(37,211,102,0); }
}

/* Footer heading underline draw */
.footer-heading {
  position: relative !important;
  padding-bottom: 12px !important;
}
.footer-heading::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--orange), transparent) !important;
  transition: width 0.6s ease !important;
}
.footer-col.footer-visible .footer-heading::after {
  width: 100% !important;
}

/* Contact label pop */
.contact-label {
  transition: color 0.2s ease !important;
}
.footer-contact-item:hover .contact-label {
  color: var(--orange) !important;
}
.footer-contact-item {
  transition: transform 0.2s ease !important;
}
.footer-contact-item:hover {
  transform: translateX(4px) !important;
}
