/* Brand Galaxy Design Tokens — Bilingual AR (IBM Plex Sans Arabic) & EN (Inter) */

:root {
  /* B4. Approved Flat Dark Mode Backgrounds (No Background Gradients) */
  --bg-deep: #000000;
  --bg-warm-dark: #131209;
  --bg-charcoal: #181818;
  --bg-surface: #1F1F1F;
  --bg-elevated: #272727;
  --bg-border: #313131;

  /* Brand Galaxy Identity Accents (Black & Gold) */
  --gold-primary: #D4AF37;
  --gold-soft: #E5C558;
  --gold-muted: #9C7E26;
  --ivory: #F5F0E1;
  --white: #FFFFFF;
  --neutral-gray: #9B9B9B;
  --muted-gray: #9E9E9E;
  --error-red: #E05A5A;

  /* Language-Specific Typefaces (Prompt 05: IBM Plex Sans Arabic for AR, Inter for EN) */
  --font-ar: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: var(--font-ar);

  /* B2. Strict Spacing Scale */
  --space-0: 0px;
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;

  /* B3. Tailwind Corner Radius Scale */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* B7. Motion Tokens */
  --ease-base: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-hover: 300ms;
  --dur-layout: 500ms;
  --dur-reveal: 700ms;
}

html[lang="ar"] {
  --font-sans: var(--font-ar);
}

html[lang="en"] {
  --font-sans: var(--font-en);
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-style: normal;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-deep);
  color: var(--white);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

/* B1. Named Text Styles (Exact Tailwind Type Scale Mapping — No Italics, No 900 Weight) */
.heading-1 {
  font-size: 3.75rem;
  line-height: 1;
  font-weight: 600;
  text-wrap: balance;
}

.heading-2 {
  font-size: 3rem;
  line-height: 1;
  font-weight: 600;
  text-wrap: balance;
}

.heading-3 {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 600;
  text-wrap: balance;
}

.heading-4 {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  text-wrap: balance;
}

.heading-5 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  text-wrap: balance;
}

.heading-6 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  text-wrap: balance;
}

.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; text-wrap: balance; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.title-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }

.body-1 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; text-wrap: pretty; }
.body-2 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; text-wrap: pretty; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; text-wrap: pretty; }
.body-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; text-wrap: pretty; }
.body-5 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; text-wrap: pretty; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; text-wrap: pretty; }

.button-lg { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.button-xsm { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }

.caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }
.caption-4 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }
.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }

html[dir="rtl"] .heading-1,
html[dir="rtl"] .heading-2 {
  line-height: 1.2;
}

@media (max-width: 768px) {
  .heading-1 { font-size: 2.25rem; line-height: 2.5rem; }
  .heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
  .heading-3 { font-size: 1.5rem; line-height: 2rem; }
}

:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -80px;
  inset-inline-start: var(--space-200);
  z-index: 1000;
  background-color: var(--gold-primary);
  color: var(--bg-deep);
  padding: var(--space-75) var(--space-200);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-hover) var(--ease-base);
}

.skip-link:focus {
  transform: translateY(96px);
}

@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;
  }
}


/* Prompt 06 — Responsive Type & RTL/LTR Typography Refinement */
html[lang="ar"] .heading-3,
html[lang="ar"] .heading-4,
html[lang="ar"] .heading-5,
html[lang="ar"] .heading-6 {
  line-height: 1.35;
}

@media (max-width: 375px) {
  .heading-1 {
    font-size: 1.875rem; /* text-3xl: 30px */
    line-height: 2.25rem; /* 36px */
  }
  .heading-2 {
    font-size: 1.5rem; /* text-2xl: 24px */
    line-height: 2rem; /* 32px */
  }
}


/* Light & Dark Theme Tokens — Preserving Black & Gold Luxury Identity */
:root,
html[data-theme="dark"] {
  --gold-btn-bg: #D4AF37;
  --gold-btn-hover: #E5C558;
  --gold-btn-text: #000000;
  --nav-bg: rgba(24, 24, 24, 0.84);
  --mobile-menu-bg: rgba(0, 0, 0, 0.94);
  --modal-scrim: rgba(0, 0, 0, 0.84);
  --card-visual-scrim: rgba(0, 0, 0, 0.42);
}

html[data-theme="light"] {
  --bg-deep: #FAF8F4;
  --bg-warm-dark: #F2EDE3;
  --bg-charcoal: #FFFFFF;
  --bg-surface: #F7F4EE;
  --bg-elevated: #ECE6DA;
  --bg-border: #DDD4C3;

  --gold-primary: #946D10;
  --gold-soft: #78570A;
  --gold-muted: #B89436;
  --gold-btn-bg: #D4AF37;
  --gold-btn-hover: #C29C28;
  --gold-btn-text: #000000;

  --ivory: #1D1B18;
  --white: #141414;
  --neutral-gray: #4A4640;
  --muted-gray: #59534A;
  --error-red: #B83232;

  --nav-bg: rgba(250, 248, 244, 0.88);
  --mobile-menu-bg: rgba(250, 248, 244, 0.96);
  --modal-scrim: rgba(20, 18, 14, 0.62);
  --card-visual-scrim: rgba(0, 0, 0, 0.36);
}


/* v3 — Brand Logo Fixed Backdrop, Adaptive Overlay & Translucent Blurred Cards */
:root,
html[data-theme="dark"] {
  --bg-overlay: rgba(0, 0, 0, 0.58);
  --section-tint: rgba(0, 0, 0, 0.22);
  --section-alt-tint: rgba(19, 18, 9, 0.44);
  --card-glass-bg: rgba(24, 24, 24, 0.78);
  --card-glass-hover: rgba(31, 31, 31, 0.90);
  --footer-glass-bg: rgba(0, 0, 0, 0.86);
}

html[data-theme="light"] {
  --bg-overlay: rgba(250, 248, 244, 0.86);
  --section-tint: rgba(250, 248, 244, 0.18);
  --section-alt-tint: rgba(242, 237, 227, 0.44);
  --card-glass-bg: rgba(255, 255, 255, 0.82);
  --card-glass-hover: rgba(255, 255, 255, 0.94);
  --footer-glass-bg: rgba(250, 248, 244, 0.92);
}
