/* ============================================================
   Hazim Web Studio — enhance.css (2026-09-11)
   Scroll-craft enhancement layer: progress bar, zone wash,
   hero stagger, parallax drift, magnetic CTA, audio chip.
   Layers ON TOP of style.css — nothing there is overridden.
   ============================================================ */

/* ---------- 1. Scroll progress bar (scroll = timeline) ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* ---------- 2. Zone wash (page ground shifts colour as you travel) ---------- */
.zone-wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: var(--zone-bg, transparent);
  transition: opacity 700ms ease, background 700ms ease;
}
body[data-zone] .zone-wash { opacity: 1; }

body[data-zone="hero"]      { --zone-bg: radial-gradient(60% 50% at 50% 0%,  rgba(139, 92, 246, 0.055), transparent 70%); }
body[data-zone="bukti"]     { --zone-bg: radial-gradient(70% 50% at 50% 50%, rgba(139, 92, 246, 0.035), transparent 70%); }
body[data-zone="portfolio"] { --zone-bg: radial-gradient(70% 60% at 50% 50%, rgba(34, 211, 238, 0.05),  transparent 70%); }
body[data-zone="harga"]     { --zone-bg: radial-gradient(70% 60% at 50% 50%, rgba(244, 114, 182, 0.04), transparent 70%); }
body[data-zone="kenapa"]    { --zone-bg: radial-gradient(70% 60% at 50% 50%, rgba(139, 92, 246, 0.03),  transparent 70%); }
body[data-zone="proses"]    { --zone-bg: radial-gradient(70% 60% at 50% 50%, rgba(52, 211, 153,  0.045), transparent 70%); }
body[data-zone="faq"]       { --zone-bg: radial-gradient(70% 60% at 50% 50%, rgba(139, 92, 246, 0.03),  transparent 70%); }
body[data-zone="final"]     { --zone-bg: radial-gradient(80% 70% at 50% 45%, rgba(34, 211, 238, 0.05),  transparent 72%); }

/* Keep content above the wash (header is 1100, keep cards readable) */
main { position: relative; z-index: 1; }

/* ---------- 3. Hero stagger (cascade entrance, zero JS) ---------- */
@media (min-width: 701px) {
  .hero .hero-inner > .reveal { transition-duration: 700ms; }
  .hero .hero-inner > .reveal:nth-child(1) { transition-delay: 0.05s; }  /* eyebrow   */
  .hero .hero-inner > .reveal:nth-child(2) { transition-delay: 0.16s; }  /* h1        */
  .hero .hero-inner > .reveal:nth-child(3) { transition-delay: 0.28s; }  /* lead      */
  .hero .hero-inner > .reveal:nth-child(4) { transition-delay: 0.40s; }  /* cta       */
  .hero .hero-inner > .reveal:nth-child(5) { transition-delay: 0.52s; }  /* trust     */
  .hero .hero-inner > .reveal:nth-child(6) { transition-delay: 0.64s; }  /* showcase  */
}

/* ---------- 4. Parallax drift (scroll depth, transform-only) ---------- */
[data-drift] { will-change: transform; }
/* hero screenshot rises slightly slower than the page = depth */
.hero-browser-body { display: block; }
/* big process numbers sink as you pass them = counter-motion */
.process-step .step-num { display: inline-block; }

/* ---------- 5. Active process step (signature: the step you are on lights up) ---------- */
.process-step .step-num {
  transition: box-shadow 400ms ease, border-color 400ms ease, color 400ms ease;
}
.process-step.step-active .step-num {
  color: #fff;
  border-color: rgba(139, 92, 246, 0.85);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 0 28px rgba(139, 92, 246, 0.30);
}

/* ---------- 6. Magnetic CTA ---------- */
.magnetic { will-change: transform; }
@media (hover: none) { .magnetic { will-change: auto; } }

/* ---------- 7. Audio chip — bottom left (wa-float owns bottom right) ---------- */
.audio-chip {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: 18px;
  z-index: 1150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(13, 13, 28, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font: 600 12.5px/1 var(--font);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.audio-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 10px 34px rgba(139, 92, 246, 0.22);
}
.audio-chip .ac-label { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.audio-chip .ac-title  { font-weight: 700; letter-spacing: 0.01em; }
.audio-chip .ac-sub    { color: rgba(236, 234, 246, 0.55); font-weight: 500; font-size: 11px; }

/* equalizer bars — animate only while playing */
.audio-chip .ac-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  flex: none;
}
.audio-chip .ac-eq span {
  width: 3px;
  border-radius: 2px;
  background: var(--grad);
  height: 30%;
  transform-origin: bottom;
}
.audio-chip.playing .ac-eq span { animation: ac-bounce 900ms ease-in-out infinite; }
.audio-chip.playing .ac-eq span:nth-child(2) { animation-delay: 220ms; }
.audio-chip.playing .ac-eq span:nth-child(3) { animation-delay: 440ms; }
.audio-chip.paused  .ac-eq span { animation: none; height: 30%; opacity: 0.45; }
@keyframes ac-bounce { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* music note when idle */
.audio-chip .ac-note {
  flex: none;
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
}
.audio-chip.playing .ac-note { display: none; }

@media (max-width: 560px) {
  .audio-chip .ac-sub { display: none; }
  .audio-chip { padding: 9px 12px; gap: 8px; }
}

/* ---------- 8. Reduced motion: kill decorative motion, keep feedback ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
  .zone-wash { transition: none; }
  .audio-chip.playing .ac-eq span { animation: none; height: 45%; }
  [data-drift] { transform: none !important; }
  .magnetic { transform: none !important; }
}
