/* ════════════════════════════════════════════════════════════════
   NerdOfMoves — Applied Neurology of Human Movement
   Design System: "Neural Dark"
   Deep navy foundation · Bright teal neural signals · Scientific precision
   ════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds — deep navy like an fMRI dark field */
  --bg-deep: #080C18;
  --bg-surface: #0F1729;
  --bg-elevated: #1A2744;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);

  /* Text — bright on dark for readability */
  --text-primary: #EEF0F6;
  --text-secondary: #8899B5;
  --text-muted: #5A6C8A;
  --text-inverse: #080C18;

  /* Accent — Emerald/Teal, pops like a neural signal on dark */
  --accent: #2ECC8F;
  --accent-hover: #3DDBA0;
  --accent-dim: rgba(46, 204, 143, 0.12);

  /* Action — Brighter green for dark bg */
  --action: #2ECC8F;
  --action-hover: #3DDBA0;
  --action-dim: rgba(46, 204, 143, 0.12);

  /* Mid tones */
  --mid-dark: #1A2744;
  --mid-light: #243456;

  /* Energy / Warning */
  --energy: #E86A3A;
  --energy-dim: rgba(232, 106, 58, 0.12);
  --star: #F0C050;

  /* Borders — white-based for dark bg */
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.10);
  --border-focus: rgba(46, 204, 143, 0.5);

  /* Shadows — stronger on dark bg */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(46, 204, 143, 0.12);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  /* Fonts */
  --font-body: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Vazirmatn', 'Outfit', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 100%;
  direction: rtl;
}
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
p { margin-bottom: 1.25em; }
a { color: var(--action); text-decoration: underline; text-underline-offset: 2px; transition: color var(--duration-fast) ease; }
a:hover { color: var(--action-hover); }
strong, b { font-weight: 600; }

/* ── Layout ── */
main { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 768px) {
  main { padding: 0 var(--space-4); }
  .container { padding: 0 var(--space-4); }
}

/* ── Section Patterns ── */
.section { padding: var(--space-16) 0; }
.section-sm { padding: var(--space-10) 0; }
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  line-height: 1.2;
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  max-width: 640px;
  line-height: 1.6;
}
.section-header { margin-bottom: var(--space-10); }

/* ── Animations ── */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.10s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.20s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.30s; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--action); color: var(--text-inverse);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  padding: 14px 28px; border: none; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; line-height: 1;
  box-shadow: 0 4px 24px rgba(57, 114, 52, 0.25);
  transition: all var(--duration-normal) var(--ease-out);
}
.btn-primary:hover { background: var(--action-hover); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(57, 114, 52, 0.35); color: #fff; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-primary);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500;
  padding: 13px 28px; border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md); cursor: pointer; text-decoration: none; line-height: 1;
  transition: all var(--duration-normal) var(--ease-out);
}
.btn-ghost:hover { border-color: var(--action); color: var(--action); background: var(--action-dim); transform: translateY(-2px); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.2em 0.7em; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600; line-height: 1.4;
}
.badge-category { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(76, 132, 141, 0.2); }

/* ── Card Base ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-light); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ── Accent dot ── */
.accent-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--action); flex-shrink: 0; }

/* ── View All Link ── */
.view-all-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: var(--space-3) var(--space-6);
  border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
  background: transparent; color: var(--text-secondary);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.view-all-link:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--bg-card); transform: translateY(-2px); }
.view-all-link svg { transition: transform var(--duration-fast) ease; }
.view-all-link:hover svg { transform: translateX(3px); }
html[dir="rtl"] .view-all-link svg { transform: scaleX(-1); }
html[dir="rtl"] .view-all-link:hover svg { transform: scaleX(-1) translateX(-3px); }

/* ── Empty State ── */
.empty-state { text-align: center; color: var(--text-secondary); font-size: var(--text-lg); padding: var(--space-12) 0; }

/* ── Section top accent line ── */
.section-accent-line::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--action), transparent); opacity: 0.2;
}

/* ── Form Styles ── */
input, select, textarea {
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  width: 100%;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); outline: none;
}
label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-primary); font-size: 0.9375rem; }

/* ── Latin text/numbers in RTL ── */
.ltr-embed { direction: ltr; unicode-bidi: embed; }

/* ── Responsive Global ── */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .section { padding: var(--space-10) 0; }
  .section-title { font-size: var(--text-2xl); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
