/* ===========================================
   HAVFUN — global.css (Enterprise v2.0)
   Core Typography & Design System
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  /* Colors - Pure Obsidian & Brand Glows */
  --bg-primary:    #000000;
  --bg-secondary:  #080808;
  --bg-card:       #0A0A0A;
  
  --accent-1:      #7B2FFF; /* Electric Purple */
  --accent-2:      #00C896; /* Emerald Cyan */
  --accent-cta:    #FF003C; /* Chillbase Red style */
  
  --text-primary:   #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted:     rgba(255, 255, 255, 0.35);
  
  --border-subtle:  rgba(255, 255, 255, 0.08);
  --border-glow:    rgba(123, 47, 255, 0.25);
  
  /* Fonts */
  --font-body:      'Inter', -apple-system, system-ui, sans-serif;
  --font-display:   'Outfit', sans-serif;
  
  /* Layout */
  --container-max:  1440px;
  --section-pad:    clamp(100px, 15vh, 200px);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html {
  background-color: var(--bg-primary);
  scroll-behavior: initial; /* Lenis handles this */
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--bg-primary);
}

/* ── Typography Utils ───────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.outline-text {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.25);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

img, video, canvas {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

/* ── Common Base Animations ──────────────── */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

/* ═══════════════════════════════════════════
   VIBE+ NAV POPUP  (nvp prefix)
   Shown on all pages when VIBE+ button is pressed
   ═══════════════════════════════════════════ */

/* Overlay */
.nvp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nvp-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

/* Card */
.vibe-popup-card {
  position: relative;
  background: rgba(8, 8, 18, 0.97);
  border: 1px solid rgba(123, 47, 255, 0.45);
  border-radius: 24px;
  padding: 48px 44px 36px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.07) inset,
    0 0 60px rgba(123, 47, 255, 0.22),
    0 0 120px rgba(0, 212, 255, 0.07),
    0 40px 80px rgba(0, 0, 0, 0.7);
}

.vibe-popup-card::-webkit-scrollbar { display: none; }

/* Animated blob — top-right */
.vibe-popup-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.32), transparent 70%);
  border-radius: 50%;
  animation: nvp-blob-1 5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

/* Animated blob — bottom-left */
.vibe-popup-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.2), transparent 70%);
  border-radius: 50%;
  animation: nvp-blob-2 6s ease-in-out infinite alternate-reverse;
  pointer-events: none;
  z-index: 0;
}

@keyframes nvp-blob-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, 18px) scale(1.2); }
}

@keyframes nvp-blob-2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-14px, -14px) scale(1.15); }
}

/* Close button */
.nvp-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}

.nvp-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Heading */
.nvp-heading {
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.nvp-heading h2 {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: clamp(2.8rem, 9vw, 4.2rem);
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
  text-shadow: 2px 2px 0px #8b0000, 4px 4px 0px #4b0082;
  margin: 0;
}

/* Form groups */
.nvp-form-group {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.nvp-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
  caret-color: #7b2fff;
}

.nvp-input::placeholder { color: rgba(255, 255, 255, 0.28); }

.nvp-input:focus {
  outline: none;
  border-color: rgba(123, 47, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.12);
}

.nvp-textarea {
  min-height: 96px;
  resize: vertical;
}

/* Submit button */
.nvp-submit {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 18px 36px;
  background: linear-gradient(135deg, #7b2fff 0%, #4b0082 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 1.05rem;
  box-shadow: 0 8px 0 #3b0066, 0 16px 32px rgba(123, 47, 255, 0.38);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
  cursor: pointer;
  margin-top: 20px;
  display: block;
}

.nvp-submit:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 11px 0 #3b0066, 0 22px 40px rgba(123, 47, 255, 0.55);
}

.nvp-submit:active:not(:disabled) {
  transform: translateY(8px);
  box-shadow: 0 0 0 #3b0066;
}

.nvp-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success state */
#vibe-popup-success {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0;
  position: relative;
  z-index: 1;
}

.nvp-success-title {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 0px #8b0000, 4px 4px 0px #4b0082;
  line-height: 1.15;
  margin-bottom: 12px;
}

.nvp-success-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
  font-family: var(--font-body);
}

.nvp-close-success {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  padding: 10px 28px;
  border-radius: 100px;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.nvp-close-success:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* Nav links at popup bottom */
.nvp-nav-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 1;
}

.nvp-nav-links a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.nvp-nav-links a:hover { color: rgba(255, 255, 255, 0.8); }

/* Mobile */
@media (max-width: 767px) {
  .vibe-popup-card {
    padding: 40px 22px 28px;
    border-radius: 20px;
    max-height: 88vh;
  }

  .nvp-heading h2 {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .nvp-input {
    padding: 13px 14px;
    font-size: 1rem;
  }

  .nvp-textarea { min-height: 88px; }

  .nvp-submit {
    padding: 16px 28px;
    font-size: 1rem;
    margin-top: 16px;
  }

  .nvp-nav-links { gap: 14px; margin-top: 18px; }
}

/* =============================================
   MUSIC TOGGLE BUTTON — site-wide fixed control
   ============================================= */
@keyframes mtb-pulse {
  0%   { transform: scale(1);    opacity: 0.55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes mtb-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

#music-toggle-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 8000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(123, 47, 255, 0.55);
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 18px rgba(123, 47, 255, 0.25), 0 4px 16px rgba(0,0,0,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 232, 240, 0.85);
  padding: 0;
  outline: none;
  animation: mtb-float 3.2s ease-in-out infinite;
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
/* pulse ring — only when music is playing */
#music-toggle-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(123, 47, 255, 0.6);
  animation: mtb-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
#music-toggle-btn.is-muted::before {
  animation: none;
  opacity: 0;
}
#music-toggle-btn.is-muted {
  animation: none;
  border-color: rgba(136, 136, 160, 0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  color: var(--text-muted);
}
#music-toggle-btn:hover {
  color: #fff;
  border-color: var(--accent-1);
  box-shadow: 0 0 28px rgba(123, 47, 255, 0.5), 0 4px 16px rgba(0,0,0,0.5);
  transform: scale(1.1);
  animation: none;
}
#music-toggle-btn:active {
  transform: scale(0.93);
}
#music-toggle-btn .mtb-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease;
  line-height: 0;
}
#music-toggle-btn .mtb-icon-off {
  opacity: 0;
}
#music-toggle-btn.is-muted .mtb-icon-on {
  opacity: 0;
}
#music-toggle-btn.is-muted .mtb-icon-off {
  opacity: 1;
}
@media (max-width: 767px) {
  #music-toggle-btn {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
  }
}
