/* ==========================================================================
   PERJALANAN JIWA & WAKTU — SYMBOLIC ANIMATION DESIGN SYSTEM
   "Satu Simbol, Satu Kebenaran — Ketiadaan Manusia di Hadapan Allah"
   ========================================================================== */

:root {
  --bg-void: #040507;
  --bg-void-card: rgba(13, 17, 23, 0.75);
  --bg-void-lighter: #0c1017;

  --color-ruh: #38bdf8;
  --color-rahim: #fb7185;
  --color-dunia: #f59e0b;
  --color-barzakh: #818cf8;
  --color-akhirat: #fbbf24;

  --font-cinzel: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: initial;
  font-family: var(--font-sans);
  background-color: var(--bg-void);
  color: #f8fafc;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  background-color: var(--bg-void);
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

h1, h2, h3, h4 {
  text-shadow: 0 4px 20px rgba(4,5,7,0.95), 0 0 30px rgba(0,0,0,0.9);
}

#webgl-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 0;
}

.noise-overlay {
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.5;
}

.ambient-halo {
  width: 950px; height: 950px;
  background: radial-gradient(circle, rgba(56,189,248,0.06) 0%, rgba(14,116,144,0.02) 40%, transparent 70%);
  filter: blur(90px);
  transition: all 1.2s cubic-bezier(0.16,1,0.3,1);
}

/* ============================================================
   FLOATING DOCK NAVIGATION
   ============================================================ */

#scroll-realm-navigator {
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1);
}

.realm-dot {
  position: relative;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
}

.realm-dot .dot-core {
  width: 7px; height: 7px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}

.realm-dot:hover .dot-core {
  background-color: rgba(251,191,36,0.8);
  transform: scale(1.3);
  box-shadow: 0 0 10px #fbbf24;
}

.realm-dot.active .dot-core {
  background-color: #fbbf24;
  border-color: #fde047;
  transform: scale(1.5);
  box-shadow: 0 0 14px #fbbf24, 0 0 28px rgba(251,191,36,0.5);
}

.nav-tooltip {
  position: absolute;
  right: 38px; top: 50%;
  transform: translateY(-50%) translateX(10px);
  padding: 4px 12px;
  background: rgba(10,12,18,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9999px;
  font-family: var(--font-cinzel);
  font-size: 10px;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.realm-dot:hover .nav-tooltip,
.nav-audio-btn:hover .nav-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }

.nav-audio-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s ease;
  position: relative;
}

.nav-audio-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(251,191,36,0.5); }

.nav-audio-btn .audio-wave { display: flex; align-items: center; gap: 2px; height: 12px; }
.nav-audio-btn .audio-wave .bar { width: 2px; height: 4px; background-color: rgba(255,255,255,0.4); border-radius: 1px; transition: all 0.2s ease; }

.nav-audio-btn.playing .audio-wave .bar { background-color: #fbbf24; animation: equalize 1s infinite alternate ease-in-out; }
.nav-audio-btn.playing .audio-wave .bar:nth-child(1) { animation-delay: 0.1s; height: 10px; }
.nav-audio-btn.playing .audio-wave .bar:nth-child(2) { animation-delay: 0.3s; height: 14px; }
.nav-audio-btn.playing .audio-wave .bar:nth-child(3) { animation-delay: 0.2s; height: 8px; }

@keyframes equalize { 0% { height: 3px; } 100% { height: 14px; } }

/* ============================================================
   REALM SECTIONS BASE
   ============================================================ */

.realm-section { position: relative; z-index: 10; width: 100%; }

/* ============================================================
   STAGE BADGE — Minimal Realm Indicator
   ============================================================ */

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  font-family: var(--font-cinzel);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.stage-badge[data-realm-color="cyan"]   { border-color: rgba(56,189,248,0.25); color: rgba(125,211,252,0.8); }
.stage-badge[data-realm-color="rose"]   { border-color: rgba(251,113,133,0.25); color: rgba(253,164,175,0.8); }
.stage-badge[data-realm-color="gold"]   { border-color: rgba(245,158,11,0.25); color: rgba(252,211,77,0.8); }
.stage-badge[data-realm-color="indigo"] { border-color: rgba(129,140,248,0.25); color: rgba(165,180,252,0.8); }
.stage-badge[data-realm-color="amber"]  { border-color: rgba(251,191,36,0.3); color: rgba(252,211,77,0.9); }

/* ============================================================
   VERSE / QUOTE CARD — Satu Kartu Utama Per Realm
   ============================================================ */

.verse-card {
  display: inline-block;
  max-width: 640px;
  width: 100%;
  padding: 28px 40px;
  border-radius: 9999px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.04) 0%, rgba(4,5,7,0.5) 70%);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  text-align: center;
  transition: all 0.5s ease;
}

.verse-card:hover { border-color: rgba(255,255,255,0.16); transform: translateY(-2px); }

.verse-arabic {
  font-size: clamp(22px, 4vw, 32px);
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  line-height: 1.5;
  direction: rtl;
}

.verse-text {
  font-size: clamp(13px, 2.5vw, 16px);
  color: rgba(255,255,255,0.75);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 12px;
}

.verse-source {
  font-family: var(--font-cinzel);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ============================================================
   SYMBOLIC CENTER — Container utama animasi per realm
   ============================================================ */

.symbolic-center { display: flex; align-items: center; justify-content: center; }

/* ============================================================
   REALM 1: SOUL ORB — Satu Titik Primordial Berdenyut
   ============================================================ */

.soul-orb {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}

.soul-core {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #e0f2fe 0%, #38bdf8 60%, rgba(56,189,248,0.3) 100%);
  box-shadow: 0 0 20px #38bdf8, 0 0 50px rgba(56,189,248,0.5), 0 0 100px rgba(56,189,248,0.2);
  animation: soulPulse 3s ease-in-out infinite;
  position: relative; z-index: 3;
}

@keyframes soulPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px #38bdf8, 0 0 50px rgba(56,189,248,0.5); }
  50% { transform: scale(1.3); box-shadow: 0 0 30px #38bdf8, 0 0 80px rgba(56,189,248,0.7), 0 0 140px rgba(56,189,248,0.3); }
}

.soul-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(56,189,248,0.2);
  animation: soulRingExpand 3s ease-out infinite;
}

.soul-ring-1 { width: 60px; height: 60px; animation-delay: 0s; }
.soul-ring-2 { width: 90px; height: 90px; animation-delay: 0.8s; border-color: rgba(56,189,248,0.12); }
.soul-ring-3 { width: 120px; height: 120px; animation-delay: 1.6s; border-color: rgba(56,189,248,0.06); }

@keyframes soulRingExpand {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* ============================================================
   REALM 2: EKG HEARTBEAT — Detak Jiwa yang Ditiupkan
   ============================================================ */

.ekg-wrap {
  position: relative;
  width: 300px; height: 80px;
  overflow: hidden;
}

.ekg-svg { width: 100%; height: 100%; }

.ekg-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: ekgDraw 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(251,113,133,0.8));
}

@keyframes ekgDraw {
  0% { stroke-dashoffset: 600; opacity: 0; }
  15% { opacity: 1; }
  60% { stroke-dashoffset: 0; opacity: 1; }
  80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.ekg-cursor {
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(251,113,133,0.8), transparent);
  animation: ekgCursor 2.5s ease-in-out infinite;
  filter: blur(1px);
}

@keyframes ekgCursor {
  0% { left: 0; opacity: 0; }
  5% { opacity: 1; }
  80% { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* 4 Takdir Minimal Row */
.destiny-minimal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 36px;
  flex-wrap: wrap;
}

.destiny-minimal-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 20px;
  font-family: var(--font-cinzel);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,164,175,0.7);
  transition: all 0.3s ease;
}

.destiny-minimal-item:hover { color: rgba(253,164,175,1); transform: translateY(-4px); }
.destiny-minimal-item:hover svg { filter: drop-shadow(0 0 8px rgba(251,113,133,0.8)); }

.destiny-connector {
  width: 30px; height: 1px;
  background: linear-gradient(to right, rgba(251,113,133,0.3), rgba(251,113,133,0.1));
}

/* ============================================================
   REALM 3: JAM PASIR — Waktu yang Mengalir Habis
   ============================================================ */

.hourglass-wrap {
  display: flex; align-items: center; justify-content: center;
}

.hourglass-body {
  position: relative;
  width: 80px;
  display: flex; flex-direction: column; align-items: center;
}

.sand-top {
  width: 80px; height: 70px;
  clip-path: polygon(10% 0%, 90% 0%, 70% 100%, 30% 100%);
  background: rgba(245,158,11,0.08);
  border-top: 1px solid rgba(245,158,11,0.3);
  position: relative;
  overflow: hidden;
}

.sand-level {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 65%;
  background: linear-gradient(to bottom, rgba(245,158,11,0.6), rgba(245,158,11,0.9));
  animation: sandDrain 8s linear infinite;
  border-radius: 2px;
}

@keyframes sandDrain {
  0% { height: 85%; }
  85% { height: 2%; }
  100% { height: 85%; }
}

.hourglass-neck {
  width: 4px; height: 14px;
  background: rgba(245,158,11,0.2);
  border-left: 1px solid rgba(245,158,11,0.25);
  border-right: 1px solid rgba(245,158,11,0.25);
  position: relative;
  overflow: visible;
}

.sand-drip {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, rgba(245,158,11,0.9), rgba(245,158,11,0.3));
  animation: sandDrip 8s linear infinite;
  border-radius: 0 0 2px 2px;
}

@keyframes sandDrip {
  0%, 15% { height: 0; opacity: 0; }
  20% { height: 14px; opacity: 1; }
  85% { height: 14px; opacity: 1; }
  90%, 100% { height: 0; opacity: 0; }
}

.sand-bottom {
  width: 80px; height: 70px;
  clip-path: polygon(30% 0%, 70% 0%, 90% 100%, 10% 100%);
  background: rgba(245,158,11,0.06);
  border-bottom: 1px solid rgba(245,158,11,0.3);
  position: relative;
  overflow: hidden;
}

.sand-pile {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 15%;
  background: linear-gradient(to top, rgba(245,158,11,0.9), rgba(245,158,11,0.5));
  animation: sandAccumulate 8s linear infinite;
  border-radius: 2px 2px 0 0;
}

@keyframes sandAccumulate {
  0% { height: 10%; }
  85% { height: 70%; }
  100% { height: 10%; }
}

/* Quote Rotator */
.quote-rotator {
  position: relative;
  min-height: 100px;
  max-width: 560px;
  margin: 32px auto 0;
}

.rotating-quote {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.8s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}

.rotating-quote.active-quote {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

.rotating-quote-text {
  font-style: italic;
  font-size: clamp(12px, 2vw, 15px);
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 10px;
}

.rotating-quote-author {
  font-family: var(--font-cinzel);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,158,11,0.5);
}

/* ============================================================
   REALM 4: PILAR CAHAYA — Tiga Lentera dalam Kegelapan
   ============================================================ */

.light-pillars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 40px;
  height: 200px;
  margin-top: 40px;
}

.light-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pillar-beam {
  width: 2px;
  height: 0;
  background: linear-gradient(to top, transparent, rgba(129,140,248,0.8), rgba(165,180,252,0.4), transparent);
  border-radius: 2px;
  animation: pillarRise 3s ease-out forwards;
  box-shadow: 0 0 12px rgba(129,140,248,0.5), 0 0 30px rgba(129,140,248,0.2);
}

.pillar-center .pillar-beam {
  background: linear-gradient(to top, transparent, rgba(251,191,36,0.9), rgba(252,211,77,0.5), transparent);
  box-shadow: 0 0 16px rgba(251,191,36,0.6), 0 0 40px rgba(251,191,36,0.25);
  animation-delay: 0.3s;
}

.pillar-left  { animation-delay: 0.1s; }
.pillar-right { animation-delay: 0.5s; }

.pillar-left .pillar-beam  { animation-delay: 0.1s; }
.pillar-right .pillar-beam { animation-delay: 0.5s; }

@keyframes pillarRise {
  0%   { height: 0; opacity: 0; }
  30%  { opacity: 1; }
  100% { height: 160px; opacity: 1; }
}

.pillar-label {
  margin-top: 10px;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-cinzel);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(165,180,252,0.6);
  text-align: center;
  line-height: 1.5;
}

.pillar-center .pillar-label { color: rgba(252,211,77,0.7); }

/* ============================================================
   REALM 5: TIMBANGAN MIZAAN — Animasi SVG
   ============================================================ */

.mizaan-wrap { display: flex; align-items: center; justify-content: center; }

.mizaan-svg { width: 200px; height: 160px; }

.mizaan-beam-group {
  transform-origin: 100px 50px;
  animation: scaleSwing 4s ease-in-out infinite;
}

@keyframes scaleSwing {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-6deg); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.pan-left, .pan-right { filter: drop-shadow(0 0 6px rgba(251,191,36,0.3)); }

/* 4 Pertanyaan Mengalir */
.question-flow {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 480px; margin-left: auto; margin-right: auto;
}

.flowing-question {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-radius: 9999px;
  border: 1px solid rgba(251,191,36,0.1);
  background: rgba(251,191,36,0.03);
  backdrop-filter: blur(8px);
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateX(-20px);
}

.flowing-question.revealed {
  opacity: 1; transform: translateX(0);
}

.flowing-question:hover {
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.07);
  transform: translateX(4px);
}

.q-number {
  font-family: var(--font-cinzel);
  font-size: 11px;
  font-weight: 800;
  color: rgba(251,191,36,0.5);
  flex-shrink: 0;
  width: 28px;
}

.q-text {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  text-align: left;
}

/* ============================================================
   PENUTUP: FINAL VOID SYMBOL — Manusia Kecil di Hadapan Allah
   ============================================================ */

.final-symbol-wrap {
  display: flex; align-items: center; justify-content: center;
}

.void-rings {
  position: relative;
  width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
}

.void-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  animation: voidExpand 5s ease-out infinite;
}

.vr-1 { width: 60px; height: 60px; animation-delay: 0s; border-color: rgba(251,191,36,0.1); }
.vr-2 { width: 110px; height: 110px; animation-delay: 1.2s; border-color: rgba(255,255,255,0.05); }
.vr-3 { width: 160px; height: 160px; animation-delay: 2.5s; border-color: rgba(255,255,255,0.03); }

@keyframes voidExpand {
  0%   { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.1);  opacity: 0; }
}

/* Titik manusia kecil di tengah lingkaran tak berujung */
.human-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
  animation: humanBreathe 3s ease-in-out infinite;
  position: relative; z-index: 3;
}

@keyframes humanBreathe {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%       { transform: scale(1.4); opacity: 0.8; }
}

/* Final Dua Card */
.final-dua-card {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 44px;
  border-radius: 9999px;
  background: radial-gradient(ellipse at center, rgba(251,191,36,0.06) 0%, rgba(4,5,7,0.6) 70%);
  border: 1px solid rgba(251,191,36,0.15);
  backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: 0 0 80px rgba(251,191,36,0.05), 0 20px 60px rgba(0,0,0,0.5);
  transition: all 0.5s ease;
}

.final-dua-card:hover {
  border-color: rgba(251,191,36,0.3);
  box-shadow: 0 0 100px rgba(251,191,36,0.1), 0 20px 60px rgba(0,0,0,0.5);
}

.dua-arabic {
  font-size: clamp(18px, 3vw, 26px);
  color: rgba(252,211,77,0.75);
  margin-bottom: 14px;
  font-family: var(--font-cinzel);
  letter-spacing: 0.05em;
  direction: rtl;
  line-height: 1.6;
}

.dua-text {
  font-size: clamp(12px, 2vw, 15px);
  color: rgba(255,255,255,0.65);
  font-style: italic;
  line-height: 1.9;
  margin-bottom: 12px;
}

.dua-source {
  font-family: var(--font-cinzel);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(251,191,36,0.3);
}

/* ============================================================
   BUTTON & UTILITIES
   ============================================================ */

.btn-gold-glow {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #040507 !important;
  font-family: var(--font-cinzel); font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 0 20px rgba(245,158,11,0.35), inset 0 1px 1px rgba(255,255,255,0.4);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.btn-gold-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(245,158,11,0.6);
  filter: brightness(1.12);
}

/* Reveal animations — controlled by GSAP ScrollTrigger */
.reveal-title  { opacity: 0; transform: translateY(30px); }
.reveal-card   { opacity: 0; transform: translateY(20px) scale(0.97); }
.reveal-text   { opacity: 0; transform: translateY(16px); }

/* Utilities */
.bg-void      { background-color: #040507; }
.bg-void-dark { background-color: #020305; }
