@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Official Nexus Brand Colors (from brand-mark.svg & theme.css) */
  --nexus-accent: #7c5cff;
  --nexus-accent-hover: #8f72ff;
  --nexus-accent-glow: rgba(124, 92, 255, 0.4);
  --nexus-cyan: #00f0ff;
  --nexus-cyan-glow: rgba(0, 240, 255, 0.35);

  --bg-deep: #06070c;
  --bg-card: rgba(13, 17, 27, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 92, 255, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: #f1f5f9;
}

html[dir='rtl'] {
  font-family: var(--font-fa);
}

html[dir='rtl'] h1,
html[dir='rtl'] h2,
html[dir='rtl'] h3,
html[dir='rtl'] h4,
html[dir='rtl'] .font-heading {
  font-family: var(--font-fa);
  font-weight: 800;
}

html[dir='ltr'] {
  font-family: var(--font-en);
}

html[dir='ltr'] h1,
html[dir='ltr'] h2,
html[dir='ltr'] h3,
html[dir='ltr'] h4,
html[dir='ltr'] .font-heading {
  font-family: var(--font-en);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #06070c;
}
::-webkit-scrollbar-thumb {
  background: #1e2538;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7c5cff;
}

/* Background Spotlight & 3D Canvas */
#cursor-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    650px circle at var(--spot-x, 50vw) var(--spot-y, 30vh),
    rgba(124, 92, 255, 0.1),
    transparent 80%
  );
  transition: opacity 0.3s ease;
}

#bg-3d-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

/* Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.glass-panel:hover {
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(124, 92, 255, 0.2);
}

/* 3D Tilt Card */
.tilt-card {
  transform-style: preserve-3d;
  transition:
    transform 0.15s ease-out,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.tilt-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.12) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tilt-card:hover .tilt-glare {
  opacity: 1;
}

/* Glowing Elements */
.glow-text-purple {
  text-shadow: 0 0 25px rgba(124, 92, 255, 0.6);
}

.glow-text-cyan {
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

/* BOLD, SOLID HERO BUTTONS (Thick, Prominent, Elevated) */
.btn-hero-download {
  background: linear-gradient(135deg, #7c5cff 0%, #6817ea 50%, #00d4ff 100%);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 14px 35px -5px rgba(124, 92, 255, 0.65),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 62px;
}

.btn-hero-download:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 20px 45px -5px rgba(124, 92, 255, 0.8),
    0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-hero-download::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.6s ease;
}

.btn-hero-download:hover::after {
  transform: rotate(30deg) translateY(100%);
}

.btn-hero-github {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 12px 30px -5px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 62px;
}

.btn-hero-github:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(124, 92, 255, 0.6);
  box-shadow: 0 18px 40px -5px rgba(124, 92, 255, 0.35);
}

/* Generic primary button */
.btn-nexus-primary {
  background: linear-gradient(135deg, #7c5cff 0%, #6817ea 50%, #00d4ff 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 10px 25px -5px rgba(124, 92, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-nexus-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 15px 35px -5px rgba(124, 92, 255, 0.7),
    0 0 20px rgba(0, 240, 255, 0.35);
}

/* Floating Animations */
@keyframes float-gentle {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: float-gentle 4s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.35;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.85;
  }
}

.animate-pulse-ring {
  animation: pulse-ring 3s ease-in-out infinite;
}

/* Sound Wave Animation */
@keyframes soundwave {
  0%,
  100% {
    height: 6px;
  }
  50% {
    height: 28px;
  }
}

.wave-bar {
  animation: soundwave 1.1s ease-in-out infinite alternate;
}
.wave-bar:nth-child(1) {
  animation-delay: 0.1s;
}
.wave-bar:nth-child(2) {
  animation-delay: 0.35s;
}
.wave-bar:nth-child(3) {
  animation-delay: 0.15s;
}
.wave-bar:nth-child(4) {
  animation-delay: 0.45s;
}
.wave-bar:nth-child(5) {
  animation-delay: 0.25s;
}
.wave-bar:nth-child(6) {
  animation-delay: 0.55s;
}
.wave-bar:nth-child(7) {
  animation-delay: 0.3s;
}

/* Rotating Disc */
@keyframes spin-disc {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-disc {
  animation: spin-disc 9s linear infinite;
}

.spin-disc-paused {
  animation-play-state: paused;
}

/* Desktop App Mockup Frame */
.app-mockup-frame {
  box-shadow:
    0 25px 70px -15px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(124, 92, 255, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.mockup-nav-item.active {
  background: rgba(124, 92, 255, 0.2);
  color: #00f0ff;
  border-color: rgba(0, 240, 255, 0.4);
}

/* Range Slider */
input[type='range'] {
  accent-color: #7c5cff;
}

input[type='range']::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00f0ff;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}

input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00f0ff;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}

/* FAQ Accordion */
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary .faq-icon {
  transform: rotate(180deg);
}

/* Responsive Utilities & Mobile Navigation */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-menu-slide {
  animation: menuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 640px) {
  .btn-hero-download,
  .btn-hero-github {
    min-height: 52px;
  }
}
