/* ==========================================================================
   Hooshiwa Meta-Platform (hooshiwa.ir) - Enterprise Design System v6.0
   Uniting Madar (Indigo/Cyan Engineering Network) & Pulse (Emerald/Teal Academy)
   Typography: DanaFaNum (Regular 400, Bold 700, Black 900)
   ========================================================================== */

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --border-subtle: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --madar-indigo: #4f46e5;
  --hooshiwa-cyan: #06b6d4;
  --pulse-emerald: #10b981;
}

html.dark {
  --bg-main: #050811;
  --bg-card: #0b1120;
  --bg-elevated: #111a2e;
  --border-subtle: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: 'Dana', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.75;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[x-cloak] {
  display: none !important;
}

.dir-ltr {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

/* Top Neon Progress Bar */
#hooshiwaTopProgress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
}

#hooshiwaTopProgress .bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.8);
  transition: width 0.25s ease, opacity 0.25s ease;
}

/* Glassmorphism Surfaces */
.glass-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html.dark .glass-header {
  background: rgba(5, 8, 17, 0.86);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html.dark .glass-card {
  background: rgba(11, 17, 32, 0.85);
}

/* Subtle Grid & Ambient Glows */
.hero-grid-bg {
  background-image: radial-gradient(rgba(99, 102, 241, 0.16) 1px, transparent 1px),
                    radial-gradient(rgba(16, 185, 129, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes orbitSpinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.04); }
}

.animate-orbit-slow {
  animation: orbitSpin 28s linear infinite;
  transform-origin: center;
}

.animate-orbit-reverse {
  animation: orbitSpinReverse 22s linear infinite;
  transform-origin: center;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}
