/* =========================================================
   Invitationsolo - Enhancement layer (animasi & tampilan)
   Dimuat setelah custom.css, tidak mengubah file tema asli.
   ========================================================= */

:root {
  --gold: #d1a221;
  --gold-soft: #f3dfa2;
  --rose: #e8a6b5;
  --ink: #2b2b3a;
  --glass: rgba(255, 255, 255, 0.7);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

/* ---------- Scroll progress bar ---------- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0;
  z-index: 99999;
  background: linear-gradient(90deg, var(--gold), var(--rose), var(--gold));
  background-size: 200% 100%;
  animation: progressShift 4s linear infinite;
  box-shadow: 0 0 10px rgba(209, 162, 33, 0.6);
}
@keyframes progressShift { to { background-position: 200% 0; } }

/* ---------- Kursor glow (desktop) ---------- */
#cursor-glow {
  position: fixed;
  width: 340px; height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(209, 162, 33, 0.16), rgba(232, 166, 181, 0.08) 45%, transparent 70%);
  transition: opacity 0.4s;
  opacity: 0;
}

/* ---------- Hero ---------- */
#home h2 {
  background: linear-gradient(90deg, var(--gold), #c0577a, var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 6s linear infinite;
}
@keyframes gradientText { to { background-position: 200% center; } }

#home .typed-cursor {
  display: inline-block;
  width: 2px;
  margin-left: 3px;
  background: var(--gold);
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Bingkai HP: dibiarkan sesuai tema (tanpa transform/filter di .custom-carousel-1
   supaya urutan lapisan bingkai di atas slide tidak rusak). */
#phone-frame-slider {
  pointer-events: none; /* klik/geser tetap tembus ke slide di bawahnya */
}

/* Partikel mengambang (hati / kelopak) */
#particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.particle {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  will-change: transform, opacity;
  animation: riseUp linear infinite;
}
@keyframes riseUp {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  10%  { opacity: 0.75; }
  90%  { opacity: 0.5; }
  100% { transform: translate3d(var(--drift, 40px), -110vh, 0) rotate(360deg) scale(1.1); opacity: 0; }
}

/* ---------- Tombol ---------- */
.btn { position: relative; overflow: hidden; transition: transform 0.35s var(--ease-out), box-shadow 0.35s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18); }
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
}
.btn:hover::after { animation: shine 0.8s; }
@keyframes shine { to { left: 130%; } }

/* CTA berdenyut */
.call-to-action .btn-gradient { animation: pulseGlow 2.4s ease-in-out infinite; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209, 162, 33, 0.55); }
  50%      { box-shadow: 0 0 0 16px rgba(209, 162, 33, 0); }
}

/* ---------- Header glass ---------- */
#header .header-body { transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s; }
html.sticky-header-active #header .header-body {
  background: var(--glass) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
#mainNav .nav-link { position: relative; }
#mainNav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: all 0.35s var(--ease-out);
  transform: translateX(-50%);
}
#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after { width: 60%; }

/* ---------- Fitur ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

#fitur .feature-box {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(209, 162, 33, 0.12);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s, background 0.45s, border-color 0.45s;
  transform-style: preserve-3d;
  will-change: transform;
}
#fitur .feature-box:hover {
  background: #fff;
  border-color: rgba(209, 162, 33, 0.5);
  box-shadow: 0 22px 45px rgba(209, 162, 33, 0.22);
}
#fitur .feature-box-icon img,
#fitur .feature-box-icon svg {
  transition: transform 0.6s var(--ease-out);
}
#fitur .feature-box:hover .feature-box-icon img,
#fitur .feature-box:hover .feature-box-icon svg {
  transform: scale(1.18) rotate(-8deg);
}
#fitur h2 {
  position: relative;
  display: inline-block;
}
#fitur h2::after {
  content: "";
  display: block;
  height: 4px;
  width: 0;
  margin: 8px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  transition: width 1.1s var(--ease-out) 0.3s;
}
#fitur h2.in::after { width: 70%; }

/* ---------- Counter ---------- */
.counters .counter { transition: transform 0.4s var(--ease-out); }
.counters > div:hover .counter { transform: scale(1.08); }
.counters strong {
  background: linear-gradient(135deg, var(--gold), #c0577a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counters img { animation: bobIcon 3.5s ease-in-out infinite; }
.counters > div:nth-child(2) img { animation-delay: 0.6s; }
.counters > div:nth-child(3) img { animation-delay: 1.2s; }
@keyframes bobIcon { 50% { transform: translateY(-10px) scale(1.06); } }

/* Harga: lihat pricing.css */
.badge-primary { animation: badgeWiggle 3s ease-in-out infinite; }
@keyframes badgeWiggle {
  0%, 85%, 100% { transform: rotate(0); }
  90% { transform: rotate(-8deg) scale(1.1); }
  95% { transform: rotate(8deg) scale(1.1); }
}

/* ---------- Dekorasi lingkaran ---------- */
.custom-el { animation: drift 9s ease-in-out infinite alternate; }
.custom-el:nth-child(odd) { animation-duration: 12s; }
@keyframes drift {
  from { transform: translate(0, 0) rotate(0); }
  to   { transform: translate(18px, -26px) rotate(45deg); }
}

/* ---------- Tombol WhatsApp melayang ---------- */
#wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 58px; height: 58px;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 30px;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
  animation: waPulse 2s infinite;
  transition: transform 0.3s var(--ease-out);
}
#wa-float:hover { transform: scale(1.15) rotate(-8deg); color: #fff; }
@keyframes waPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70%  { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Pengguna yang mengurangi gerakan ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  #particles, #cursor-glow { display: none; }
}
@media (max-width: 767px) {
  #cursor-glow { display: none; }
}
