/* ═══════════════════════════════════════════════════════════════
   تاتا تاتا — هوية يونانية إغريقية
   رخام · بحر إيجة · ذهب هيليني · مفتاح يوناني
   ═══════════════════════════════════════════════════════════════ */

:root {
  --brand-950: #0A1628;
  --brand-900: #132A45;
  --brand-800: #1B3A5C;
  --brand-700: #274A70;
  --brand-600: #3A628C;
  --brand-500: #5A82A8;
  --brand-400: #86A6C4;
  --brand-300: #B4C8DC;
  --brand-100: rgba(27, 58, 92, 0.10);
  --brand-50:  rgba(27, 58, 92, 0.05);

  --gold-700: #8A6E2F;
  --gold-600: #A8883A;
  --gold-500: #C6A35A;
  --gold-400: #D8BC7A;
  --gold-300: #EBD9A8;
  --gold-soft: rgba(198, 163, 90, 0.20);

  --brand: #1B3A5C;
  --accent: #1B3A5C;
  --accent-soft: rgba(27, 58, 92, 0.10);
  --accent-violet: #1B3A5C;
  --accent-cyan: #2E6B8A;
  --accent-amber: #C6A35A;
  --accent-green: #4A6B4A;
  --accent-gold: #C6A35A;
  --insight: #1B3A5C;
  --insight-strong: #132A45;
  --insight-soft: rgba(27, 58, 92, 0.10);

  --page-bg: #F3EEE4;
  --page-bg-alt: #E8E1D2;
  --card-bg: #FAF7F0;
  --card: #FAF7F0;
  --card-bg-strong: #FFFdf8;
  --card-soft: #EFE8DA;

  --surface-soft: rgba(19, 42, 69, 0.05);
  --surface-strong: rgba(19, 42, 69, 0.09);
  --surface-highlight: rgba(198, 163, 90, 0.16);
  --surface-highlight-strong: rgba(198, 163, 90, 0.28);

  --text: #243446;
  --text-strong: #132A45;
  --muted: #6E7E90;
  --muted-strong: #4A5C70;

  --border: rgba(27, 58, 92, 0.12);
  --border-strong: rgba(27, 58, 92, 0.26);
  --brand-border: var(--border);
  --gold-border: rgba(198, 163, 90, 0.55);
  --shadow: 0 12px 32px rgba(19, 42, 69, 0.10);
  --shadow-soft: 0 4px 14px rgba(19, 42, 69, 0.07);
  --shadow-strong: 0 22px 50px rgba(19, 42, 69, 0.14);
  --shadow-gold: 0 8px 24px rgba(198, 163, 90, 0.22);

  --primary: #1B3A5C;
  --primary-strong: #132A45;
  --primary-weak: rgba(27, 58, 92, 0.12);

  --field-bg: #FFFdf8;
  --field-text: var(--text);
  --field-border: rgba(27, 58, 92, 0.18);

  --btn-solid-bg: linear-gradient(135deg, #132A45 0%, #1B3A5C 55%, #274A70 100%);
  --btn-solid-text: #FAF7F0;
  --btn-gold-bg: linear-gradient(135deg, #A8883A 0%, #C6A35A 50%, #D8BC7A 100%);
  --btn-gold-text: #132A45;

  --success: #4A6B4A;
  --danger: #B33A2B;
  --warning: #B8860B;
  --success-soft-bg: rgba(74, 107, 74, 0.12);
  --success-soft-border: rgba(74, 107, 74, 0.38);
  --danger-soft-bg: rgba(179, 58, 43, 0.12);
  --danger-soft-border: rgba(179, 58, 43, 0.38);
  --warning-soft-bg: rgba(184, 134, 11, 0.14);
  --warning-soft-border: rgba(184, 134, 11, 0.40);

  --radius: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --sw-bg: #D8BC7A;
  --sw-knob: #FFFdf8;

  --hdr-bg: #FFFdf8;
  --hdr-text: #132A45;
  --hdr-border: rgba(198, 163, 90, 0.35);
  --hdr-fade: transparent;

  --grid-line: rgba(27, 58, 92, 0.06);
  --page-glow-1: rgba(27, 58, 92, 0.07);
  --page-glow-2: rgba(198, 163, 90, 0.16);

  --grad-brand: linear-gradient(135deg, #132A45, #1B3A5C);
  --grad-gold: linear-gradient(135deg, #A8883A, #D8BC7A);
  --grad-hero: linear-gradient(160deg, #F3EEE4 0%, #E8E1D2 100%);

  --font-display: 'Cinzel', 'Cormorant Garamond', 'IBM Plex Sans Arabic', Georgia, serif;
  --font-body: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
  --font-calli: 'Cormorant Garamond', 'Cinzel', Georgia, 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);

  /* Greek key (meander) */
  --greek-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath fill='none' stroke='%23C6A35A' stroke-width='1.4' d='M0 8h6V2h6v6h6V2h6v6h6V2h6'/%3E%3C/svg%3E");
  --greek-key-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath fill='none' stroke='%23D8BC7A' stroke-width='1.4' d='M0 8h6V2h6v6h6V2h6v6h6V2h6'/%3E%3C/svg%3E");

  color-scheme: light;
}

html[data-theme="dark"] {
  --brand-950: #060C14;
  --brand-900: #0B1524;
  --brand-800: #E8E1D2;
  --brand-700: #D8BC7A;
  --brand-600: #C6A35A;
  --brand-500: #EBD9A8;
  --brand-400: #F3E6C4;
  --brand-300: #FAF3E0;
  --brand-100: rgba(198, 163, 90, 0.16);
  --brand-50:  rgba(198, 163, 90, 0.08);

  --gold-700: #EBD9A8;
  --gold-600: #F0E2B8;
  --gold-500: #E6C97A;
  --gold-400: #F0E0B0;
  --gold-300: #FFF8E8;
  --gold-soft: rgba(230, 201, 122, 0.18);

  --brand: #F0EBE3;
  --accent: #E6C97A;
  --accent-soft: rgba(230, 201, 122, 0.16);
  --accent-amber: #F5E8C8;
  --accent-gold: #E6C97A;
  --insight: #E6C97A;
  --insight-strong: #F0E0B0;
  --insight-soft: rgba(230, 201, 122, 0.16);

  --page-bg: #0B1524;
  --page-bg-alt: #12253C;
  --card-bg: #152A44;
  --card: #152A44;
  --card-bg-strong: #1B3452;
  --card-soft: #101F33;

  --surface-soft: rgba(250, 247, 240, 0.07);
  --surface-strong: rgba(250, 247, 240, 0.12);
  --surface-highlight: rgba(230, 201, 122, 0.14);
  --surface-highlight-strong: rgba(230, 201, 122, 0.24);

  --text: #F0EBE3;
  --text-strong: #FFFCF6;
  --muted: #B8C4D0;
  --muted-strong: #D4DCE4;

  --border: rgba(232, 225, 210, 0.12);
  --border-strong: rgba(198, 163, 90, 0.35);
  --brand-border: var(--border);
  --gold-border: rgba(216, 188, 122, 0.40);
  --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: #E8E1D2;
  --primary-strong: #FAF7F0;
  --primary-weak: rgba(198, 163, 90, 0.16);

  --field-bg: #0A1628;
  --field-text: #E8E1D2;
  --field-border: rgba(232, 225, 210, 0.18);

  --btn-solid-bg: linear-gradient(135deg, #1B3A5C 0%, #274A70 100%);
  --btn-solid-text: #FAF7F0;
  --btn-gold-bg: linear-gradient(135deg, #A8883A 0%, #C6A35A 55%, #D8BC7A 100%);
  --btn-gold-text: #0A1628;

  --hdr-bg: #132A45;
  --hdr-text: #FAF7F0;
  --hdr-border: rgba(198, 163, 90, 0.28);

  --grid-line: rgba(232, 225, 210, 0.06);
  --page-glow-1: rgba(27, 58, 92, 0.45);
  --page-glow-2: rgba(198, 163, 90, 0.10);
  --grad-brand: linear-gradient(135deg, #132A45, #C6A35A);
  --grad-gold: linear-gradient(135deg, #A8883A, #EBD9A8);
  --grad-hero: linear-gradient(160deg, #0A1628 0%, #132A45 100%);

  --sw-bg: #1B3A5C;
  --sw-knob: #C6A35A;

  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 55% 40% at 100% 0%, var(--page-glow-1), transparent 55%),
    radial-gradient(ellipse 45% 35% at 0% 15%, 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: 1120px;
  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.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--text-strong);
  font-weight: 600;
}

a { color: var(--brand-800); text-decoration: none; }
html[data-theme="dark"] a { color: var(--gold-500); }
::selection { background: var(--gold-500); color: #132A45; }

.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; }

/* Greek key divider */
.lg-meander,
.lg-section__rule {
  display: block;
  width: 120px;
  height: 10px;
  margin: 16px auto 0;
  background-image: var(--greek-key);
  background-repeat: repeat-x;
  background-position: center;
  background-size: 40px 10px;
  border: 0 !important;
  border-radius: 0 !important;
}
html[data-theme="dark"] .lg-meander,
html[data-theme="dark"] .lg-section__rule {
  background-image: var(--greek-key-dark);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
