/* Creator page motion (26 Nov 2026: "creator kolabaja dibikin animasi kayak kelas kolabaja: gerak mouse, scroll smooth").
   Loaded after creator-page.css. Everything that hides content waits for html.cm (set by creator-motion.js), so the
   page reads fine without JavaScript. Reduced motion: no entrance, no particles, no tilt (end of file). */

/* ---- scroll progress ---- */
.cm-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, #e2725f, #b52a2a 55%, #d9a441); transform-origin: 0 50%; transform: scaleX(var(--cm-p, 0));
  box-shadow: 0 0 10px rgba(181, 42, 42, 0.35); }

/* ---- background that answers the mouse: a soft red light and a faint grid around the pointer ---- */
.cm-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--cm-bg-on, 0); transition: opacity 0.6s ease;
  background:
    radial-gradient(420px circle at var(--gx, 50%) var(--gy, 30%), rgba(181, 42, 42, 0.10), transparent 65%),
    radial-gradient(900px circle at var(--gx, 50%) var(--gy, 30%), rgba(217, 164, 65, 0.07), transparent 70%); }
.cm-bg::after { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(181, 42, 42, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(181, 42, 42, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 30%), #000, transparent 75%);
  mask-image: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 30%), #000, transparent 75%); }
.cm-fx { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
html.cm body.cr > main, html.cm body.cr > footer, html.cm body > main { position: relative; z-index: 1; }

/* ---- hero entrance (CSS only, plays once) ---- */
@keyframes cmUp { from { opacity: 0; transform: translateY(22px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cmRise { from { opacity: 0; transform: translateY(60px) rotate(-4deg) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes cmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes cmSlide { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes cmRing { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
@keyframes cmPing { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(31, 157, 85, 0); } }
@keyframes cmShine { from { background-position: -120% 0; } to { background-position: 220% 0; } }

html.cm .cr-hero-copy > * { animation: cmUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.cm .cr-hero-copy > :nth-child(1) { animation-delay: 0.05s; }
html.cm .cr-hero-copy > :nth-child(2) { animation-delay: 0.15s; }
html.cm .cr-hero-copy > :nth-child(3) { animation-delay: 0.28s; }
html.cm .cr-hero-copy > :nth-child(4) { animation-delay: 0.4s; }
html.cm .cr-hero-copy > :nth-child(5) { animation-delay: 0.52s; }
html.cm .cr-trust li { animation: cmUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.cm .cr-trust li:nth-child(1) { animation-delay: 0.6s; } html.cm .cr-trust li:nth-child(2) { animation-delay: 0.68s; }
html.cm .cr-trust li:nth-child(3) { animation-delay: 0.76s; } html.cm .cr-trust li:nth-child(4) { animation-delay: 0.84s; }
.cr-dot { animation: cmPing 1.8s ease-out infinite; }

/* the red amount in the headline gets a slow shine */
.cr-hero h1 .cr-money { background: linear-gradient(100deg, #b52a2a 0%, #b52a2a 40%, #ff8a7a 50%, #b52a2a 60%, #b52a2a 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: cmShine 4.5s 1.2s ease-in-out infinite; }

/* the phone: rises in, then floats; the inner frame follows the mouse in 3D (creator-motion.js sets --rx/--ry) */
html.cm .cr-phone { animation: cmRise 1s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both; perspective: 1100px; }
html.cm .cr-screen { animation: cmFloat 6s 1.4s ease-in-out infinite; }
.cr-screen-tilt { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 0.25s ease-out; will-change: transform; }
.cr-screen::after { content: ''; position: absolute; inset: 0; border-radius: 32px; pointer-events: none;
  background: radial-gradient(260px circle at var(--sx, 70%) var(--sy, 10%), rgba(255, 255, 255, 0.55), transparent 60%); mix-blend-mode: soft-light; opacity: 0.9; }
html.cm .cr-p-job { animation: cmSlide 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.cm .cr-p-job:nth-of-type(1) { animation-delay: 1.05s; } html.cm .cr-p-job:nth-of-type(2) { animation-delay: 1.2s; }
.cr-bell svg { transform-origin: 50% 10%; animation: cmRing 4s 2s ease-in-out infinite; }
.cr-p-job { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cr-p-job:hover { transform: translateX(4px); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.25); }

/* ---- scroll reveal ---- */
html.cm .cm-r { opacity: 0; transform: translateY(34px) scale(0.985); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
html.cm .cm-r.in { opacity: 1; transform: none; }
html.cm h2.cm-r { transform: translateY(24px); }
/* headings get a short red underline that draws in */
.cr-sec h2 { position: relative; }
html.cm .cr-sec h2::after { content: ''; display: block; width: 56px; height: 3px; margin-top: 12px; border-radius: 3px; background: #b52a2a; transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.9s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
html.cm .cr-sec h2.in::after { transform: scaleX(1); }

/* ---- cards: 3D tilt + a light that follows the mouse + one sheen when first seen ---- */
.cm-card { position: relative; transform-style: preserve-3d; will-change: transform; }
.cm-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(181, 42, 42, 0.09), transparent 60%); }
.cr-cashout.cm-card::before, .cr-steps li.cm-card::before { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 138, 122, 0.16), transparent 60%); }
.cm-card:hover::before { opacity: 1; }
.cm-card.tilting { transition: transform 0.08s linear, box-shadow 0.3s ease; box-shadow: 0 26px 50px -24px rgba(20, 20, 20, 0.35); }
.cm-card:not(.tilting) { transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cm-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.cm-shine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent); transform: skewX(-18deg); animation: cmSweep 1.3s ease-out forwards; }
@keyframes cmSweep { to { left: 130%; } }
.cr-card .cr-num { transition: color 0.3s ease, transform 0.3s ease; }
.cr-card:hover .cr-num { color: #b52a2a; transform: translateX(3px); }
.cr-card .cr-amount { transition: transform 0.3s ease; }
.cr-card:hover .cr-amount { transform: scale(1.04); transform-origin: 0 50%; }

/* ---- the money flow: a light runs through the three steps ---- */
.cr-flow { position: relative; }
.cr-flow li { position: relative; overflow: hidden; transition: transform 0.25s ease, background 0.25s ease; }
.cr-flow li:hover { transform: translateY(-3px); }
html.cm .cr-flow.in li::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 138, 122, 0.35) 50%, transparent 70%); background-size: 260% 100%; animation: cmShine 3.2s ease-in-out infinite; }
html.cm .cr-flow.in li:nth-child(2)::after { animation-delay: 0.35s; } html.cm .cr-flow.in li:nth-child(3)::after { animation-delay: 0.7s; }

/* ---- steps: a red line fills across as you scroll, numbers pop when reached ---- */
.cr-steps { position: relative; }
.cm-steps-line { position: absolute; left: 39px; right: 39px; top: 39px; height: 3px; border-radius: 3px; background: rgba(18, 18, 18, 0.08); pointer-events: none; z-index: 0; }
.cm-steps-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b52a2a, #ff8a7a); transform-origin: 0 50%; transform: scaleX(var(--cm-s, 0)); transition: transform 0.15s linear; }
.cr-steps li { position: relative; z-index: 1; }
.cr-steps li > span { position: relative; transition: background 0.4s ease, transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.4s ease; }
.cr-steps li.reached > span { background: #b52a2a; transform: scale(1.12); box-shadow: 0 0 0 6px rgba(181, 42, 42, 0.14); }
@media (max-width: 760px) {
  .cm-steps-line { left: 38px; right: auto; top: 30px; bottom: 30px; width: 3px; height: auto; }
  .cm-steps-line i { width: 100%; height: 100%; transform-origin: 50% 0; transform: scaleY(var(--cm-s, 0)); }
}

/* ---- FAQ: smooth open ---- */
.cr-faq details { transition: box-shadow 0.3s ease, transform 0.3s ease; }
.cr-faq details:hover { box-shadow: 0 14px 30px -20px rgba(20, 20, 20, 0.35); transform: translateY(-2px); }
.cr-faq details[open] summary { color: #b52a2a; }
.cr-faq details[open] summary::after { color: #b52a2a; }
.cr-faq details p { animation: cmUp 0.4s ease both; }

/* ---- buttons: magnetic pull and a glossy sweep ---- */
.cr-btn, .cr-sticky, body:not(.cr) .btn-cta { position: relative; overflow: hidden; transform: translate(var(--bx, 0), var(--by, 0)); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.15s ease, box-shadow 0.25s ease; }
.cr-btn::after, body:not(.cr) .btn-cta::after { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 50%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: skewX(-20deg); transition: left 0.6s ease; }
.cr-btn:hover::after, body:not(.cr) .btn-cta:hover::after { left: 130%; }
.cr-btn:hover { box-shadow: 0 14px 28px -14px rgba(18, 18, 18, 0.6); }
.cr-btn svg { transition: transform 0.25s ease; }
.cr-btn:hover svg { transform: translateX(4px); }
.cr-mini-balance { transition: transform 0.3s ease; }
.cr-mini-balance:hover { transform: rotate(-2deg) scale(1.03); }

/* ---- English page (older layout): cards and steps get the same tilt and light ---- */
body:not(.cr) .card.cm-card, body:not(.cr) .steps li.cm-card { will-change: transform; }

/* ---- calm modes ---- */
@media (prefers-reduced-motion: reduce) {
  html.cm .cr-hero-copy > *, html.cm .cr-trust li, html.cm .cr-phone, html.cm .cr-screen, html.cm .cr-p-job, .cr-bell svg, .cr-dot,
  .cr-hero h1 .cr-money, html.cm .cr-flow.in li::after, .cr-faq details p { animation: none !important; }
  .cr-hero h1 .cr-money { color: #b52a2a; background: none; }
  html.cm .cm-r { opacity: 1; transform: none; transition: none; }
  .cm-fx, .cm-bg { display: none; }
}
@media (hover: none) { .cm-bg, .cm-fx { display: none; } }

/* the money flow labels sit under the amounts (the coin rule made the amount inline and the label ran into it) */
.cr-flow li b { display: flex; justify-content: center; }
.cr-flow li span { display: block; margin-top: 2px; }
