/* 
  BRAND STYLE GUIDE
  Final Layout & Theme Correction
*/

:root {
  --brand-primary: #100D0C;
  --brand-accent: #7A716E;
  --brand-text: #FFFFFF;
  --brand-text-muted: rgba(255, 255, 255, 0.7);

  /* Headers and Display Fonts */
  --font-logo: "GT America Expanded", sans-serif;
  --letter-spacing-logo: -0.04em;

  --section-bg-dark: #100D0C;
  --section-bg-light: #F5F5F5;
}

/* 
  1. THEME-AWARE DYNAMIC COLORING
*/

.client-logo {
  font-family: var(--font-logo) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: var(--letter-spacing-logo) !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  color: inherit !important;
  white-space: nowrap !important;
  display: block !important;
  transition: color 0.4s ease-in-out;
}

/* 
  2. NAVIGATION BAR STRUCTURAL FIX
*/

.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 80px !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  /* Center the container */
  background-color: transparent !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.header .container {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4% !important;
  pointer-events: none !important;
  max-width: 100% !important;
}

.header_c {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}

.header_nav,
.header_cta {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  pointer-events: auto !important;
}

.header_logo {
  flex: 0 0 auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100% !important;
  pointer-events: auto !important;
}

.header_nav {
  justify-content: flex-start !important;
}

.header_cta {
  justify-content: flex-end !important;
}

/* FIXING NAV ITEM SIZES */
.nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  height: 100% !important;
  color: inherit !important;
  text-decoration: none !important;
}

.nav-item_label {
  font-size: 13px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  line-height: 1.2 !important;
}

.link-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
}

.logo {
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  width: auto !important;
}

/* Theme variable overrides */
.theme_on-color .client-logo,
.theme_on-color .nav-item {
  color: #FFFFFF !important;
}

.theme_on-light .client-logo,
.theme_on-light .nav-item {
  color: #100D0C !important;
}

/* 
  3. PRELOADER & GHOSTS 
*/
/* 1. Prevent Flicker: Initially hide any element marked for animation */
.preloader_info[data-prevent-flicker="true"] {
  opacity: 0;
  visibility: hidden;
}


.preloader_info {
  position: absolute !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: auto !important;
  text-align: center !important;
  pointer-events: none !important;
}

/* 2. The Preloader Wrapper: Fix it to the screen and ensure it sits above everything */
.preloader {
  position: fixed !important;
  inset: 0% 0% auto !important;
  /* Covers top, left, right */
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  /* Center vertically */
  justify-content: center !important;
  /* Center horizontally */
  background-color: #100D0C !important;
  /* Solid dark background */
}

/* 3. Text Alignment Utilities */
.a-center {
  text-align: center !important;
}

.text-light {
  color: #FFFFFF !important;
}

/* Prevent clicking through the preloader while it's active */
body.is-loading {
  overflow: hidden !important;
}

@media screen and (max-width: 991px) {
  .header {
    height: 60px !important;
  }

  .header_nav,
  .header_cta {
    display: none !important;
  }
}

@media screen and (max-width: 991px) {

  /* General Typography Fixes */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .h1,
  .h2,
  .h3,
  .h4,
  .p1,
  .p5,
  .t3,
  .t4,
  .t5,
  .t7,
  .title {
    line-height: 1.25 !important;
    word-wrap: break-word !important;
  }

  /* Fix Sticky Mobile CTA OVERLAP */
  .cta,
  .globe-bot-w {
    position: relative !important;
    bottom: auto !important;
    height: auto !important;
    min-height: auto !important;
    margin-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .btn-cta_c,
  .to-top {
    position: relative !important;
    bottom: auto !important;
    z-index: 10 !important;
  }

  /* Prevent horizontal scrolling and spacing issues */
  body,
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .section,
  .container {
    padding-left: 5% !important;
    padding-right: 5% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
  }

  /* Fix images extending out */
  img,
  svg {
    max-width: 100% !important;
    height: auto !important;

    /* Logo fade-in animation */
    .logo-fade-in {
      opacity: 0;
      transition: opacity 0.8s ease-out;
    }

    .logo-fade-in.loaded {
      opacity: 1;
    }
  }
}

.preloader_c {
  position: relative !important;
  z-index: 999999 !important;
}

/* Fix Header Clicks */
.header a,
.header button,
.header .nav-item,
.header .btn,
.header .link-logo {
  pointer-events: auto !important;
}

/* Global Pointer Events Fix for Overlays */
.preloader,
.preloader_c,
.preloader_bg,
.hero-w_bg_front-over,
.unit-96,
.hero-s_bot {
  pointer-events: none !important;
}

.nav-item,
.btn-cta,
.link-logo,
a,
button {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10000 !important;
}

/* ===== BARBA TRANSITION OPTIMIZATION ===== */
/* Ensure container transitions are responsive on first click */
[data-barba="wrapper"] {
  position: relative;
}

[data-barba="container"] {
  position: relative;
  width: 100%;
  will-change: opacity;
  transition: opacity 0.3s ease-in-out;
}

/* Remove any stalls in container rendering */
[data-barba-namespace] {
  display: block;
}

/* Ensure links trigger transitions immediately */
a:not([data-barba-prevent]) {
  touch-action: manipulation;
}

/* Prevent double-click delays on navigation */
a,
button,
[role="button"] {
  -webkit-touch-callout: none;
  user-select: none;
}