/* Build Station Brand Fonts - Complete Implementation */
/* Following industry best practices with proper unicode ranges and font-display optimization */

/* ========================================
   UNI SANS FAMILY - ENGLISH/LATIN SCRIPT
   ======================================== */

/* Uni Sans Thin - Weight 100 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-ThinItalic.otf') format('opentype');
  font-weight: 100;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Light - Weight 300 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-LightItalic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Book - Weight 350 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Book.otf') format('opentype');
  font-weight: 350;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-BookItalic.otf') format('opentype');
  font-weight: 350;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Regular - Weight 400 (Primary) */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Regular.otf') format('opentype'),
       url('./Bstn-Fonts/Uni Sans Family/UniSansRegular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-RegularItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Medium - Weight 500 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Semi Bold - Weight 600 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Semi-Bold.otf') format('opentype'),
       url('./Bstn-Fonts/Uni Sans Family/UniSansSemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-SemiBoldItalic.otf') format('opentype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Bold - Weight 700 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Bold.otf') format('opentype'),
       url('./Bstn-Fonts/Uni Sans Family/Uni Sans Bold-82d9.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Uni Sans Heavy - Weight 800 */
@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-Heavy.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Uni Sans';
  src: url('./Bstn-Fonts/Uni Sans Family/Uni-Sans-HeavyItalic.otf') format('opentype');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========================================
   DIN NEXT LT ARABIC - ARABIC/RTL SCRIPT
   ======================================== */

/* DIN Next Light - Weight 300 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/din-next-lt-arabic-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* DIN Next Regular - Weight 400 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/dinnextltarabic-regular.woff.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* DIN Next Medium - Weight 500 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/DINNextLTArabic-Medium-2.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* DIN Next Bold - Weight 700 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/ArbFONTS-DINNextLTArabic-Bold-4.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* DIN Next Heavy - Weight 800 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/ArbFONTS-DINNextLTArabic-Heavy2-2.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* DIN Next Black - Weight 900 */
@font-face {
  font-family: 'DIN Next LT Arabic';
  src: url('./Bstn-Fonts/DIN Next/ArbFONTS-DINNextLTArabic-Black-3.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200D, U+2010-2011, U+204F, U+2E41, U+0660-0669, U+06F0-06F9;
}

/* ========================================
   CSS CUSTOM PROPERTIES SYSTEM
   ======================================== */

:root {
  /* Build Station Font Stacks with Comprehensive Fallbacks */
  --font-primary-en: 'Uni Sans', 'Helvetica Neue', 'Arial', 'Liberation Sans', sans-serif;
  --font-primary-ar: 'DIN Next LT Arabic', 'Tahoma', 'Arial Unicode MS', 'Lucida Grande', sans-serif;
  
  /* Default to English fonts */
  --font-primary: var(--font-primary-en);
  --font-secondary: var(--font-primary-en);
  
  /* Font Weight Scale */
  --font-weight-thin: 100;
  --font-weight-light: 300;
  --font-weight-book: 350;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-heavy: 800;
  --font-weight-black: 900;
  
  /* Text Direction */
  --text-direction: ltr;
  --text-align: left;
}

/* Arabic Language Override */
:root[lang="ar"],
[lang="ar"] {
  --font-primary: var(--font-primary-ar);
  --font-secondary: var(--font-primary-ar);
  --text-direction: rtl;
  --text-align: right;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Language-specific font classes */
.font-en {
  font-family: var(--font-primary-en) !important;
  direction: ltr;
  text-align: left;
  font-feature-settings: 'kern' 1, 'liga' 1, 'clig' 1, 'calt' 1;
}

.font-ar {
  font-family: var(--font-primary-ar) !important;
  direction: rtl;
  text-align: right;
  font-feature-settings: 'kern' 1, 'medi' 1, 'init' 1, 'fina' 1;
}

/* Font Weight Utilities */
.font-weight-100 { font-weight: var(--font-weight-thin) !important; }
.font-weight-300 { font-weight: var(--font-weight-light) !important; }
.font-weight-350 { font-weight: var(--font-weight-book) !important; }
.font-weight-400 { font-weight: var(--font-weight-regular) !important; }
.font-weight-500 { font-weight: var(--font-weight-medium) !important; }
.font-weight-600 { font-weight: var(--font-weight-semibold) !important; }
.font-weight-700 { font-weight: var(--font-weight-bold) !important; }
.font-weight-800 { font-weight: var(--font-weight-heavy) !important; }
.font-weight-900 { font-weight: var(--font-weight-black) !important; }

/* Font Loading States */
.fonts-loading {
  visibility: hidden;
}

.fonts-loaded {
  visibility: visible;
}

/* Fallback for older browsers */
@supports not (font-display: swap) {
  @font-face {
    font-family: 'Uni Sans Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
    font-weight: 100 900;
    font-style: normal;
    font-display: block;
  }
  
  .font-en {
    font-family: 'Uni Sans Fallback', Arial, sans-serif !important;
  }
}