/* ==========================================================================
   KKMI ZLITEN — Minimalist Clean Design + Full Animations + Islamic Light Effect
   Palette:
     - Primary Slate : #2d3748
     - Accent Yellow : #fbff24
     - Background    : #e2e8f0
     - Warm Cream    : #ede4d4
   Fonts:
     - Judul         : Coolvetica Regular
     - Subjudul      : Sora
     - Isi           : Plus Jakarta Sans
     - Arabic        : Montaser
   ========================================================================== */

@font-face {
  font-family: 'Coolvetica Regular';
  src: local('Coolvetica Rg'), local('Coolvetica Regular'), local('Coolvetica'),
       url('../fonts/Coolvetica-Regular.woff2') format('woff2'),
       url('../fonts/Coolvetica-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montaser';
  src: local('Montaser'), local('Montaser Arabic'),
       url('../fonts/Montaser.woff2') format('woff2'),
       url('../fonts/Montaser.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --slate: #2d3748;
  --yellow: #fbff24;
  --bg: #e2e8f0;
  --cream: #ede4d4;
  --surface: #f8fafc;
  --border: rgba(45, 55, 72, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--slate);
  overflow-x: hidden;
  transition: background-color 0.7s ease, color 0.5s ease;
}

.font-heading {
  font-family: 'Coolvetica Regular', 'Coolvetica', 'Sora', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.font-subheading {
  font-family: 'Sora', sans-serif;
}
.font-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.font-arabic {
  font-family: 'Montaser', 'Amiri', 'Cairo', serif;
  line-height: 1.85;
}

/* ================= SCROLL PROGRESS BAR ================= */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--slate), var(--yellow));
  z-index: 120;
  transition: width 0.08s linear;
}

/* ================= CUSTOM macOS-STYLE CURSOR ================= */
@media (pointer: fine) {
  body.mac-cursor-active,
  body.mac-cursor-active a,
  body.mac-cursor-active button,
  body.mac-cursor-active input,
  body.mac-cursor-active select,
  body.mac-cursor-active textarea,
  body.mac-cursor-active label {
    cursor: none !important;
  }

  #mac-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: var(--slate);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.2s ease,
                opacity 0.2s ease;
  }

  #mac-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: rgba(45, 55, 72, 0.08);
    border: 1.5px solid rgba(45, 55, 72, 0.45);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-radius 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.25s ease,
                border-color 0.25s ease;
  }

  #mac-cursor-ring.is-hovering {
    width: 48px;
    height: 48px;
    background: rgba(251, 255, 36, 0.28);
    border-color: var(--slate);
  }

  #mac-cursor-ring.is-clicking {
    width: 24px;
    height: 24px;
    background: rgba(251, 255, 36, 0.55);
  }

  #mac-cursor-dot.is-hovering {
    width: 6px;
    height: 6px;
    background: var(--slate);
  }

  body.light-effect-on #mac-cursor-ring {
    border-color: rgba(251, 255, 36, 0.85);
    background: rgba(251, 255, 36, 0.14);
    box-shadow: 0 0 22px rgba(251, 255, 36, 0.45);
  }
  body.light-effect-on #mac-cursor-dot {
    background: #fbff24;
    box-shadow: 0 0 10px #fbff24;
  }
}

@media (pointer: coarse) {
  #mac-cursor-dot, #mac-cursor-ring { display: none !important; }
}

/* ================= NAVBAR GLASS & SLIDING PILL ================= */
.navbar-glass {
  background-color: rgba(226, 232, 240, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(45, 55, 72, 0.1);
  transition: all 0.35s ease;
}

.navbar-glass.scrolled {
  background-color: rgba(237, 228, 212, 0.9);
  box-shadow: 0 10px 32px rgba(45, 55, 72, 0.08);
}

.nav-pill-container {
  position: relative;
}

#nav-sliding-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 9999px;
  background-color: var(--yellow);
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: left 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease;
}

.nav-link-item {
  position: relative;
  z-index: 1;
  transition: color 0.25s ease, transform 0.2s ease;
}
.nav-link-item.active-nav {
  color: var(--slate) !important;
  font-weight: 700;
}

/* ================= ANIMATIONS (SCROLL REVEAL, MARQUEE, CARDS) ================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-track-left {
  display: flex;
  width: max-content;
  animation: marqueeLeft 34s linear infinite;
}
.marquee-track-right {
  display: flex;
  width: max-content;
  animation: marqueeRight 38s linear infinite;
}
.marquee-track-left:hover,
.marquee-track-right:hover {
  animation-play-state: paused;
}

.card-lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px -14px rgba(45, 55, 72, 0.16);
  border-color: rgba(45, 55, 72, 0.35);
}

.btn-magnetic {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease,
              background-color 0.25s ease;
}
.btn-magnetic:active {
  transform: scale(0.96);
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float-slow {
  animation: floatSlow 5.5s ease-in-out infinite;
}

/* ================= LIGHT EFFECT TOGGLE (ISLAMIC NUANCE & HALAQAH AL-QUR'AN) ================= */
.light-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1.5px solid rgba(45, 55, 72, 0.22);
  background: rgba(255, 255, 255, 0.65);
  transition: all 0.35s ease;
}
.light-toggle-track {
  width: 34px;
  height: 18px;
  border-radius: 9999px;
  background: rgba(45, 55, 72, 0.25);
  position: relative;
  transition: background-color 0.35s ease;
}
.light-toggle-knob {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #ffffff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

body.light-effect-on .light-toggle-btn {
  background: rgba(45, 55, 72, 0.92);
  border-color: #fbff24;
  color: #fbff24;
  box-shadow: 0 0 22px rgba(251, 255, 36, 0.42);
}
body.light-effect-on .light-toggle-track {
  background: #fbff24;
}
body.light-effect-on .light-toggle-knob {
  transform: translateX(16px);
  background: #2d3748;
}

/* Ambient Layers when Light Effect is ON */
#islamic-ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.light-effect-on #islamic-ambient-layer {
  opacity: 1;
}

/* Top Golden Lantern Glow + Interactive Cursor Spotlight */
#islamic-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px circle at var(--mx, 50%) var(--my, 20%), rgba(251, 255, 36, 0.17), transparent 65%),
    radial-gradient(900px ellipse at 50% 0%, rgba(251, 255, 36, 0.22), rgba(237, 228, 212, 0.08) 45%, transparent 72%);
}

/* Subtle Islamic Geometric Pattern Overlay */
#islamic-pattern {
  position: fixed;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23fbff24' stroke-width='0.7'%3E%3Cpath d='M40 0 L52 28 L80 40 L52 52 L40 80 L28 52 L0 40 L28 28 Z'/%3E%3Ccircle cx='40' cy='40' r='11'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}

/* Floating Nur Light Particles */
.nur-particle {
  position: fixed;
  border-radius: 9999px;
  background: radial-gradient(circle, #fbff24 0%, rgba(251, 255, 36, 0) 70%);
  pointer-events: none;
  opacity: 0;
  animation: nurFloat var(--dur, 9s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes nurFloat {
  0%   { transform: translateY(20px) scale(0.6); opacity: 0; }
  30%  { opacity: 0.55; }
  70%  { opacity: 0.35; }
  100% { transform: translateY(-90px) scale(1.2); opacity: 0; }
}

/* Global Islamic Luminous Palette shift when Light Effect is ON */
body.light-effect-on {
  background-color: #1f2735;
  color: #ede4d4;
}
body.light-effect-on .navbar-glass {
  background-color: rgba(31, 39, 53, 0.88);
  border-bottom-color: rgba(251, 255, 36, 0.22);
}
body.light-effect-on .navbar-glass.scrolled {
  background-color: rgba(25, 32, 44, 0.94);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}
body.light-effect-on .light-surface {
  background-color: rgba(45, 55, 72, 0.86) !important;
  border-color: rgba(251, 255, 36, 0.22) !important;
  color: #ede4d4 !important;
}
body.light-effect-on .light-cream-section {
  background-color: rgba(36, 45, 61, 0.92) !important;
  border-color: rgba(251, 255, 36, 0.18) !important;
}
body.light-effect-on .light-text-muted {
  color: rgba(237, 228, 212, 0.78) !important;
}
body.light-effect-on .light-heading-glow {
  color: #ede4d4 !important;
  text-shadow: 0 0 28px rgba(251, 255, 36, 0.22);
}
body.light-effect-on .nav-link-item {
  color: #ede4d4;
}
body.light-effect-on .nav-link-item.active-nav {
  color: #2d3748 !important;
}

/* Special Halaqah Al-Qur'an Showcase Panel (Appears smoothly when Light Effect ON) */
#halaqah-showcase {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-16px);
  transition: max-height 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.65s ease,
              transform 0.65s ease;
}
body.light-effect-on #halaqah-showcase {
  max-height: 2400px;
  opacity: 1;
  transform: translateY(0);
}

.glow-card {
  box-shadow: 0 0 0 1px rgba(251, 255, 36, 0.25), 0 18px 40px -12px rgba(0, 0, 0, 0.45);
}
.glow-card:hover {
  box-shadow: 0 0 24px rgba(251, 255, 36, 0.3), 0 20px 44px -10px rgba(0, 0, 0, 0.55);
}
