/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  /* Brand – Neon Red (AgentAI) */
  --red: #FF2D20;
  --red-rgb: 255, 45, 32;
  --red-dark: #B31217;
  --red-deeper: #5C0508;
  --red-accent: #FF5647;
  --red-accent-rgb: 255, 86, 71;
  --red-gradient: linear-gradient(135deg, var(--red-deeper), var(--red-dark) 35%, var(--red) 100%);

  /* Secondary accent – Warm Bronze */
  --gold: #B8965A;
  --gold-rgb: 184, 150, 90;
  --gold-light: rgba(184, 150, 90, 0.12);

  /* Neutral / Gray Scale */
  --white: #FFFFFF;
  --gray-50: #f5f5f5;
  --gray-100: #e0e0e0;
  --gray-150: #cccccc;
  --gray-200: #b3b3b3;
  --gray-300: #999999;
  --gray-400: #808080;
  --gray-500: #666666;
  --gray-600: #4d4d4d;
  --gray-700: #333333;
  --gray-800: #1a1a1a;
  --gray-900: #0d0d0d;
  --dark: #0c0c0c;

  /* Semantic States */
  --success: #2E7D32;
  --success-bg: #E8F5E9;
  --success-text: #1B5E20;
  --warning: #E65100;
  --warning-bg: #FFF3E0;
  --warning-text: #BF360C;
  --error: #C62828;
  --error-bg: #FFEBEE;
  --error-text: #B71C1C;
  --info: #1565C0;
  --info-bg: #E3F2FD;
  --info-text: #0D47A1;

  /* Text (Light mode defaults) */
  --text-primary: #FFFFFF;
  --text-secondary: #CFCFCF;
  --text-tertiary: #8A8A8A;
  --text-muted: #5D5D5D;
  --text-on-red: #FFFFFF;
  --text-on-dark: rgba(255, 255, 255, 0.87);
  --text-on-dark-secondary: rgba(255, 255, 255, 0.6);
  --text-on-dark-tertiary: rgba(255, 255, 255, 0.38);

  /* Overlays */
  --overlay-dark: rgba(0, 0, 0, 0.55);
  --overlay-darker: rgba(0, 0, 0, 0.92);
  --overlay-light: rgba(255, 255, 255, 0.7);

  /* Shadows */
  --shadow: 0 10px 35px rgba(255,45,32,.25);
  --shadow-sm: 0 4px 15px rgba(0,0,0,.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,.4);
  --shadow-hover: 0 15px 50px rgba(var(--red-rgb),.18);
  --shadow-lg: 0 20px 60px rgba(var(--red-rgb),.20);
  --shadow-red: 0 10px 35px rgba(var(--red-rgb),.35);
  --shadow-red-lg: 0 20px 60px rgba(var(--red-rgb),.30);

  /* Border Tokens */
  --border: rgba(255,255,255,.08);
  --border-light: rgba(255,255,255,.04);
  --border-red: rgba(var(--red-rgb), 0.15);
  --border-red-light: rgba(var(--red-rgb), 0.25);
  --border-red-medium: rgba(var(--red-rgb), 0.40);

  /* Glassmorphism */
  --glass: rgba(255,255,255,.04);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 22px;
  --radius-lg: 28px;
  --radius-xl: 32px;

  /* Backgrounds */
  --bg: #050505;
  --bg-rgb: 5, 5, 5;
  --bg-alt: #0B0B0D;
  --bg-card: #121012;
  --bg-elevated: #1A181B;
  --bg-light: #ffffff;
  --bg-light-rgb: 255, 255, 255;
  --bg-light-alt: #f5f5f5;
  --bg-light-card: #ffffff;
  --bg-light-warm: #f5f5f5;

  /* Aliases — backwards compat */
  --off-white: var(--gray-50);
  --gray-light: #f4f4f4;
  --gray: var(--gray-600);
  --gray-dark: var(--gray-700);

  /* Transition & Font */
  --transition: color 0.35s, background-color 0.35s, box-shadow 0.35s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Cairo', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); direction: rtl; background: var(--white); color: var(--dark); line-height: 1.75; overflow-x: hidden; transition: background-color .35s ease, color .35s ease; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; position:relative; }
.section:last-of-type { border-bottom: none; }

/* Creative section transitions */
.section-entrance { opacity:0; transform:translateY(20px); transition:opacity .8s ease,transform .8s cubic-bezier(.15,.85,.3,1.1); }
.section-entrance.visible { opacity:1; transform:translateY(0); }

/* Parallax-like section effect on scroll */
.section-parallax { background-attachment:fixed; background-size:cover; background-position:center; }
.text-center { text-align: center; }

/* Smooth theme transition */
.theme-transitioning, .theme-transitioning * { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--red-rgb),.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--red-rgb),.5); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(var(--red-rgb),.2); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(var(--red-rgb),.35); }

/* Selection */
::selection { background: rgba(var(--red-rgb),.2); color: inherit; }
[data-theme="dark"] ::selection { background: rgba(var(--red-accent-rgb),.35); }

/* Skip-to-content (accessibility) */
.skip-link { position:absolute; top:-100px; right:0; z-index:1001; background:var(--red); color:var(--text-on-red); padding:.75rem 1.5rem; font-weight:700; border-radius:0 0 4px 0; transition:top .2s; }
.skip-link:focus { top:0; }

/* Focus-visible */
:focus-visible { outline: 2px solid var(--red-accent); outline-offset: 2px; border-radius: 2px; }
.btn:focus-visible, .nav-link:focus-visible, .filter-btn:focus-visible { outline-offset: 3px; }
