/* ============================================
   Real International Technology - Portfolio Presentation
   Design System
   ============================================ */

/* Google Fonts: Inter (Latin body), Space Grotesk (Latin display) — Arabic via local Mestika @font-face */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================
   Local Font: Mestika (Arabic display, full family)
   ============================================ */
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-ExtraLight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mestika';
  src: url('assets/fonts/Mestika-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Variables — Real International Technology Brand
   ============================================ */
:root {
  /* Brand Primary Colors (paired in headlines per brand rule) */
  --color-primary: #412971;          /* Primary Purple */
  --color-primary-light: #5B3D8E;
  --color-primary-dark: #2E1A52;
  --color-secondary: #0C231E;        /* Primary Green (deep) */
  --color-secondary-light: #1A3D33;
  --color-accent: #273B85;           /* Royal Blue accent */

  /* Accent palette */
  --color-teal: #398194;
  --color-brick: #8B2418;
  --color-pink: #E9678B;
  --color-wine: #5C2238;
  --color-navy: #051623;
  --color-orange: #E28C3E;
  --color-blue: #273B85;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #FAFAF9;
  --color-gray-50: #F8F9FA;
  --color-gray-100: #F1F3F5;
  --color-gray-200: #E9ECEF;
  --color-gray-300: #DEE2E6;
  --color-gray-400: #CED4DA;
  --color-gray-500: #ADB5BD;
  --color-gray-600: #868E96;
  --color-gray-700: #495057;
  --color-gray-800: #343A40;
  --color-gray-900: #212529;
  --color-black: #0A0C0B;            /* Brand Black */

  /* Typography */
  --font-arabic: 'Mestika', 'Tajawal', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body-en: 'Inter', system-ui, sans-serif;

  /* Font Sizes */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 20px;
  --text-lg: 24px;
  --text-xl: 28px;
  --text-2xl: 36px;
  --text-3xl: 44px;
  --text-4xl: 56px;
  --text-5xl: 72px;
  --text-6xl: 96px;
  --text-7xl: 120px;
  --text-8xl: 160px;
  --text-9xl: 200px;

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Slide dimensions — never change */
  --slide-width: 1920px;
  --slide-height: 1080px;
  --slide-padding: 96px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 12, 11, 0.05);
  --shadow-md: 0 4px 6px rgba(10, 12, 11, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 12, 11, 0.12);
  --shadow-xl: 0 25px 50px rgba(65, 41, 113, 0.15);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-arabic);
  font-weight: var(--font-regular);
  line-height: 1.5;
  color: var(--color-gray-900);
  background-color: var(--color-gray-200);
  direction: rtl;
}

/* ============================================
   Slide Base
   ============================================ */
.slide {
  width: var(--slide-width);
  height: var(--slide-height);
  position: relative;
  overflow: hidden;
  background-color: var(--color-white);
  page-break-after: always;
  page-break-inside: avoid;
  direction: rtl;
}

/* ============================================
   Typography Classes
   ============================================ */
.heading-display { font-size: var(--text-9xl); font-weight: var(--font-black); line-height: 0.95; letter-spacing: -0.02em; }
.heading-1 { font-size: var(--text-8xl); font-weight: var(--font-black); line-height: 1.0; letter-spacing: -0.02em; }
.heading-2 { font-size: var(--text-7xl); font-weight: var(--font-bold); line-height: 1.05; letter-spacing: -0.02em; }
.heading-3 { font-size: var(--text-6xl); font-weight: var(--font-bold); line-height: 1.1; letter-spacing: -0.01em; }
.heading-4 { font-size: var(--text-5xl); font-weight: var(--font-bold); line-height: 1.15; }
.heading-5 { font-size: var(--text-4xl); font-weight: var(--font-semibold); line-height: 1.2; }
.heading-6 { font-size: var(--text-3xl); font-weight: var(--font-semibold); line-height: 1.25; }

.body-xl { font-size: var(--text-xl); font-weight: var(--font-regular); line-height: 1.6; }
.body-lg { font-size: var(--text-lg); font-weight: var(--font-regular); line-height: 1.6; }
.body-md { font-size: var(--text-md); font-weight: var(--font-regular); line-height: 1.6; }
.body-base { font-size: var(--text-base); font-weight: var(--font-regular); line-height: 1.5; }

.font-arabic { font-family: var(--font-arabic); }
.font-display { font-family: var(--font-display); letter-spacing: 0.02em; }
.font-body-en { font-family: var(--font-body-en); }

.text-uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.text-tracked { letter-spacing: 0.15em; }

/* ============================================
   Bidirectional Text Helpers
   --------------------------------------------
   Use <bdi> or .lat for Latin tokens (acronyms,
   product names, numerals) inside Arabic strings.
   This isolates them from the surrounding RTL
   bidi context so they render in correct order
   and don't push surrounding Arabic punctuation.
   ============================================ */
bdi,
.lat {
  unicode-bidi: isolate;
  direction: ltr;
  font-family: var(--font-display);
  font-weight: inherit;
  display: inline-block;
}
.lat-tight { letter-spacing: 0; }

/* ============================================
   Color Utilities
   ============================================ */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-white { color: var(--color-white); }
.text-black { color: var(--color-black); }
.text-gray { color: var(--color-gray-600); }
.text-gray-strong { color: var(--color-gray-800); }

.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-white { background-color: var(--color-white); }
.bg-black { background-color: var(--color-black); }
.bg-gray { background-color: var(--color-gray-50); }

/* ============================================
   REAL Mark (square logo)
   ============================================ */
.real-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.real-mark--sm { width: 56px; height: 56px; font-size: 18px; }
.real-mark--md { width: 96px; height: 96px; font-size: 28px; }
.real-mark--lg { width: 160px; height: 160px; font-size: 48px; }
.real-mark--xl { width: 240px; height: 240px; font-size: 72px; }

.real-mark--invert {
  background-color: var(--color-white);
  color: var(--color-black);
}

/* ============================================
   Modular Grid Hints (Ref 1 style)
   ============================================ */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 96px 96px;
  pointer-events: none;
}

.grid-bg--dark {
  background-image:
    linear-gradient(to right, rgba(10,12,11,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,12,11,0.04) 1px, transparent 1px);
}

/* ============================================
   Corner Arrow (Ref 1 style)
   ============================================ */
.corner-arrow {
  position: absolute;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner-arrow svg { width: 100%; height: 100%; }

/* ============================================
   Cards
   ============================================ */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.card--dark {
  background-color: var(--color-black);
  border-color: var(--color-gray-800);
  color: var(--color-white);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: white;
  }

  .slide {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    page-break-after: always;
    page-break-inside: avoid;
    break-after: page;
    break-inside: avoid;
    box-shadow: none !important;
    margin: 0;
  }

  * {
    box-shadow: none !important;
    -webkit-filter: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .no-print { display: none !important; }
}
