/* ═══════════════════════════════════════════════════════════════
   منصة أحمد الشعراوي — صانع الأبطال
   هوية تعليمية · عربي · رياضيات · علوم · دراسات · المرحلة الابتدائية
   حبر تركوازي · طاقة كهرمانية · سماء باردة
   ═══════════════════════════════════════════════════════════════ */

:root {
  --brand-950: #041C24;
  --brand-900: #0A3A45;
  --brand-800: #0E5C68;
  --brand-700: #147A84;
  --brand-600: #1A9B8E;
  --brand-500: #2BB8A9;
  --brand-400: #5DCDBC;
  --brand-300: #A8E4D8;
  --brand-100: rgba(14, 92, 104, 0.12);
  --brand-50:  rgba(14, 92, 104, 0.06);

  --gold-700: #C47A0A;
  --gold-600: #E09212;
  --gold-500: #F5A524;
  --gold-400: #F7B84A;
  --gold-300: #FCD89A;
  --gold-soft: rgba(245, 165, 36, 0.18);

  --brand: #0E5C68;
  --accent: #F5A524;
  --accent-soft: rgba(245, 165, 36, 0.14);
  --accent-violet: #0E5C68;
  --accent-cyan: #1A9B8E;
  --accent-amber: #F5A524;
  --accent-green: #1A9B8E;
  --accent-gold: #F5A524;
  --insight: #0E5C68;
  --insight-strong: #0A3A45;
  --insight-soft: rgba(14, 92, 104, 0.10);

  --page-bg: #F0F6F8;
  --page-bg-alt: #E3EEF2;
  --card-bg: #F7FBFC;
  --card: #F7FBFC;
  --card-bg-strong: #FFFFFF;
  --card-soft: #E8F2F5;

  --surface-soft: rgba(10, 58, 69, 0.05);
  --surface-strong: rgba(10, 58, 69, 0.09);
  --surface-highlight: rgba(245, 165, 36, 0.14);
  --surface-highlight-strong: rgba(245, 165, 36, 0.26);

  --text: #243A42;
  --text-strong: #0A3A45;
  --muted: #5E7680;
  --muted-strong: #3D5762;

  --border: rgba(14, 92, 104, 0.14);
  --border-strong: rgba(14, 92, 104, 0.28);
  --brand-border: var(--border);
  --gold-border: rgba(245, 165, 36, 0.50);
  --shadow: 0 14px 36px rgba(10, 58, 69, 0.10);
  --shadow-soft: 0 6px 16px rgba(10, 58, 69, 0.07);
  --shadow-strong: 0 24px 52px rgba(10, 58, 69, 0.14);
  --shadow-gold: 0 10px 28px rgba(245, 165, 36, 0.24);

  --primary: #0E5C68;
  --primary-strong: #0A3A45;
  --primary-weak: rgba(14, 92, 104, 0.12);

  --field-bg: #FFFFFF;
  --field-text: var(--text);
  --field-border: rgba(14, 92, 104, 0.20);

  --btn-solid-bg: linear-gradient(135deg, #0A3A45 0%, #0E5C68 55%, #147A84 100%);
  --btn-solid-text: #F7FBFC;
  --btn-gold-bg: linear-gradient(135deg, #E09212 0%, #F5A524 50%, #F7B84A 100%);
  --btn-gold-text: #0A3A45;

  --success: #1A8A5C;
  --danger: #C23B2E;
  --warning: #D4890A;
  --success-soft-bg: rgba(26, 138, 92, 0.12);
  --success-soft-border: rgba(26, 138, 92, 0.36);
  --danger-soft-bg: rgba(194, 59, 46, 0.12);
  --danger-soft-border: rgba(194, 59, 46, 0.36);
  --warning-soft-bg: rgba(212, 137, 10, 0.14);
  --warning-soft-border: rgba(212, 137, 10, 0.40);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --sw-bg: #F5A524;
  --sw-knob: #FFFFFF;

  --hdr-bg: #FFFFFF;
  --hdr-text: #0A3A45;
  --hdr-border: rgba(14, 92, 104, 0.12);
  --hdr-fade: transparent;

  --grid-line: rgba(14, 92, 104, 0.06);
  --page-glow-1: rgba(26, 155, 142, 0.12);
  --page-glow-2: rgba(245, 165, 36, 0.14);

  --grad-brand: linear-gradient(135deg, #0A3A45, #0E5C68);
  --grad-gold: linear-gradient(135deg, #E09212, #F7B84A);
  --grad-hero: linear-gradient(115deg, #0A3A45 0%, #0E5C68 42%, #147A84 72%, #1A9B8E 100%);

  --font-display: 'Changa', 'Tajawal', 'Cairo', sans-serif;
  --font-body: 'Tajawal', 'Cairo', system-ui, sans-serif;
  --font-calli: 'El Messiri', 'Changa', sans-serif;
  --font-mono: ui-monospace, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* نجمة هندسية عربية */
  --hero-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='none' stroke='%231A9B8E' stroke-opacity='.18' stroke-width='1.2' d='M36 6l6.5 18.5L61 31l-18.5 6.5L36 56l-6.5-18.5L11 31l18.5-6.5z'/%3E%3C/svg%3E");
  --math-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ctext x='12' y='28' fill='%230E5C68' fill-opacity='.10' font-size='18' font-family='serif'%3E%CE%A3%3C/text%3E%3Ctext x='44' y='58' fill='%23F5A524' fill-opacity='.14' font-size='16' font-family='serif'%3E%E2%88%9A%3C/text%3E%3Ccircle cx='58' cy='18' r='8' fill='none' stroke='%231A9B8E' stroke-opacity='.12'/%3E%3C/svg%3E");

  color-scheme: light;
}

html[data-theme="dark"] {
  --brand-950: #020F14;
  --brand-900: #061820;
  --brand-800: #F5A524;
  --brand-700: #F7B84A;
  --brand-600: #5DCDBC;
  --brand-500: #A8E4D8;
  --brand-400: #C8F0E6;
  --brand-300: #E8FAF5;
  --brand-100: rgba(245, 165, 36, 0.14);
  --brand-50:  rgba(245, 165, 36, 0.08);

  --gold-700: #FCD89A;
  --gold-600: #F7B84A;
  --gold-500: #F5A524;
  --gold-400: #FCD89A;
  --gold-300: #FFF0D4;
  --gold-soft: rgba(245, 165, 36, 0.16);

  --brand: #E8F4F2;
  --accent: #F5A524;
  --accent-soft: rgba(245, 165, 36, 0.16);
  --accent-amber: #FCD89A;
  --accent-gold: #F5A524;
  --insight: #5DCDBC;
  --insight-strong: #A8E4D8;
  --insight-soft: rgba(91, 205, 188, 0.14);

  --page-bg: #061820;
  --page-bg-alt: #0A2832;
  --card-bg: #0D303C;
  --card: #0D303C;
  --card-bg-strong: #12404E;
  --card-soft: #0A2430;

  --surface-soft: rgba(232, 244, 242, 0.06);
  --surface-strong: rgba(232, 244, 242, 0.10);
  --surface-highlight: rgba(245, 165, 36, 0.12);
  --surface-highlight-strong: rgba(245, 165, 36, 0.22);

  --text: #E4EEF0;
  --text-strong: #F7FBFC;
  --muted: #92A8B0;
  --muted-strong: #B8C9D0;

  --border: rgba(168, 228, 216, 0.12);
  --border-strong: rgba(245, 165, 36, 0.32);
  --brand-border: var(--border);
  --gold-border: rgba(245, 165, 36, 0.38);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.30);
  --shadow-strong: 0 24px 56px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 8px 24px rgba(0, 0, 0, 0.35);

  --primary: #E8F4F2;
  --primary-strong: #F7FBFC;
  --primary-weak: rgba(245, 165, 36, 0.16);

  --field-bg: #041C24;
  --field-text: #E4EEF0;
  --field-border: rgba(168, 228, 216, 0.18);

  --btn-solid-bg: linear-gradient(135deg, #0E5C68 0%, #147A84 100%);
  --btn-solid-text: #F7FBFC;
  --btn-gold-bg: linear-gradient(135deg, #E09212 0%, #F5A524 55%, #F7B84A 100%);
  --btn-gold-text: #0A3A45;

  --hdr-bg: #0A2832;
  --hdr-text: #F7FBFC;
  --hdr-border: rgba(91, 205, 188, 0.18);

  --grid-line: rgba(232, 244, 242, 0.05);
  --page-glow-1: rgba(26, 155, 142, 0.18);
  --page-glow-2: rgba(245, 165, 36, 0.10);
  --grad-brand: linear-gradient(135deg, #0A3A45, #F5A524);
  --grad-gold: linear-gradient(135deg, #E09212, #FCD89A);
  --grad-hero: linear-gradient(160deg, #041C24 0%, #0A3A45 55%, #0E5C68 100%);

  --sw-bg: #0E5C68;
  --sw-knob: #F5A524;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page-bg);
  overflow-x: hidden;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}

body.legend-platform,
body.arabic-platform {
  background:
    radial-gradient(ellipse 60% 45% at 100% 0%, var(--page-glow-1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 20%, var(--page-glow-2), transparent 50%),
    var(--page-bg);
}

body.legend-platform::before,
body.legend-platform::after,
body.arabic-platform::before,
body.arabic-platform::after {
  content: none !important;
  display: none !important;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
  color: var(--text-strong);
  font-weight: 700;
}

a { color: var(--brand-800); text-decoration: none; }
html[data-theme="dark"] a:not(.lg-btn):not(.acc-btn):not(.btn-submit):not(.ui-btn) {
  color: var(--gold-400);
}
html[data-theme="dark"] a.lg-btn--gold,
html[data-theme="dark"] a.acc-btn--primary,
html[data-theme="dark"] .btn-submit {
  color: #0A3A45;
}
::selection { background: var(--gold-500); color: #0A3A45; }

.platform-logo__img--light { display: block; }
.platform-logo__img--dark { display: none; }
html[data-theme="dark"] .platform-logo__img--light { display: none; }
html[data-theme="dark"] .platform-logo__img--dark { display: block; }

.lg-meander,
.lg-section__rule {
  display: block;
  width: 64px;
  height: 4px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, var(--insight), var(--gold-500));
  border: 0 !important;
  border-radius: 999px !important;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
