/* =============================================
   نيورون - base.css
   نظام التصميم الأساسي: Reset + Variables + Typography
   ============================================= */

/* --- Google Fonts --- */
/* --- Local Fonts --- */
/* خط ثمانية - Thmanyah Serif Display (للعناوين) */
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../fonts/thmanyahserifdisplay-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../fonts/thmanyahserifdisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../fonts/thmanyahserifdisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../fonts/thmanyahserifdisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('../fonts/thmanyahserifdisplay-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE / Edge */
}

html::-webkit-scrollbar {
  display: none;               /* Chrome / Safari / Opera */
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

/* --- Design Tokens (Dark Mode = Default) --- */
:root {
  /* === الألوان الأساسية === */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-dark-bg: #0a0a0a;
  --color-dark-surface: #1a1a1a;
  --color-dark-border: #2a2a2a;
  --color-light-bg: #fafafa;
  --color-light-surface: #f0f0f0;
  --color-light-border: #e0e0e0;

  /* === ألوان العلامة التجارية === */
  --color-pink: #ff4d6a;
  --color-pink-rgb: 255, 77, 106;
  --color-pink-hover: #ff6b84;
  --color-blue: #4d9fff;
  --color-purple: #b44dff;
  --color-green: #4dff88;
  --color-teal: #4dffd4;
  --color-red: #ff4d4d;
  --color-yellow: #ffd74d;
  --color-orange: #ff8c4d;

  /* === ألوان الخدمات (تبقى كما هي في الوضعين) === */
  --service-brand-strategy: #4d9fff;
  --service-identity: #b44dff;
  --service-visual-identity: #b44dff;
  --service-product: #4dff88;
  --service-web: #ff4d4d;
  --service-ux: #ffd74d;
  --service-graphic: #ff8c4d;
  --service-naming: #4dffd4;
  --service-pitch: #4d9fff;
  --service-motion: #b44dff;
  --service-agency: #ffd74d;
  --service-funding: #4d9fff;
  --service-consulting: #b44dff;

  /* === ألوان الشهادات === */
  --testimonial-yellow: #ffd74d;
  --testimonial-purple: #b44dff;
  --testimonial-teal: #4dffd4;
  --testimonial-red: #ff4d4d;
  --testimonial-green: #4dff88;
  --testimonial-pink: #ff4d6a;

  /* === الخطوط === */
  --font-heading: 'Thmanyah Serif Display', serif;
  --font-body: 'Thmanyah Serif Display', serif;

  /* === أحجام الخطوط === */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */
  --text-7xl: 4.5rem;     /* 72px */
  --text-8xl: 6rem;       /* 96px */

  /* === المسافات === */
  --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;
  --space-32: 8rem;
  --space-40: 10rem;

  /* === الحاوية === */
  --container-max: 1400px;
  --container-padding: var(--space-6);

  /* === الظلال === */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);

  /* === الانتقالات === */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* === الحدود === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* === Z-Index === */
  --z-dropdown: 100;
  --z-header: 200;
  --z-menu: 300;
  --z-modal: 400;
  --z-cookie: 500;
  --z-toast: 600;
}

/* --- الوضع الغامق (الافتراضي) --- */
:root,
[data-theme="dark"] {
  --bg-primary: var(--color-black);
  --bg-secondary: var(--color-dark-bg);
  --bg-surface: var(--color-dark-surface);
  --bg-border: var(--color-dark-border);
  --text-primary: var(--color-white);
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --text-inverse: var(--color-black);
  color-scheme: dark;
}

/* --- الوضع الفاتح --- */
[data-theme="light"] {
  --bg-primary: var(--color-white);
  --bg-secondary: var(--color-light-bg);
  --bg-surface: var(--color-light-surface);
  --bg-border: var(--color-light-border);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-inverse: var(--color-white);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  color-scheme: light;
}

/* --- التخطيط الأساسي --- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  direction: rtl;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
  text-rendering: optimizeLegibility;
}

/* --- النصوص --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "dlig" 1, "ss01" 1, "ss02" 1, "swsh" 1;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- الحاوية --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* --- أدوات مساعدة --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hide-desktop { display: none; }
.hide-mobile { display: block; }

/* === الاستجابة === */
@media (max-width: 991px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

@media (max-width: 767px) {
  :root {
    --container-padding: var(--space-4);
  }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .hide-desktop { display: block; }
  .hide-mobile { display: none; }
}

/* === تقليل الحركة === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
