/* ==================== GLOBAL BASE & RESET ==================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
}

body {
  margin: 0;
  color: #d0d9e2;
  background: #051118;
  font-family: 'Open Sans', sans-serif;
  overflow-x: hidden;
}

/* Base Typographic Hierarchy */
h1, h2, h3, h4, a, label, button, nav, .brand {
  font-family: 'Montserrat', sans-serif;
}

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

/* ==================== GLOBAL BUTTON TYPOGRAPHY ==================== */
.btn-primary,
.btn-register-action,
.contact button,
button[type="submit"] {
  display: inline-block;
  background: linear-gradient(135deg, #dfbe79 0%, #c5a059 100%) !important;
  color: #051118 !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 14px 28px !important;
  border: 0 !important;
  border-radius: 2px !important;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover,
.btn-register-action:hover,
.contact button:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #ebd193 0%, #dfbe79 100%) !important;
  color: #051118 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(223, 190, 121, 0.3);
}

/* ==================== GLOBAL HEADER & DYNAMIC REVERSE GRADIENT ==================== */
header#header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  border-bottom: 1px solid rgba(223, 190, 121, 0.2);
  box-shadow: none;
  overflow: hidden;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Base Gradient Layer (Top of page: Navy -> Blue) */
header#header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #081822 0%, #0f354e 55%, #1d628c 100%);
  z-index: -2;
  transition: opacity 0.5s ease;
  opacity: 1;
}

/* Reversed Gradient Layer (Scroll State: Blue -> Navy) */
header#header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1d628c 0%, #0f354e 45%, #081822 100%);
  z-index: -1;
  transition: opacity 0.5s ease;
  opacity: 0;
}

/* Scrolled State: Cross-fades seamlessly into the reversed gradient */
header#header.scrolled {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55) !important;
  border-bottom: 1px solid rgba(223, 190, 121, 0.35) !important;
}

header#header.scrolled::before {
  opacity: 0;
}

header#header.scrolled::after {
  opacity: 1;
}

/* Utility Bar */
.utility {
  height: 32px;
  padding: 0 5.5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 13, 19, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font: 500 9px 'Montserrat', sans-serif;
  letter-spacing: .14em;
  color: #b0c4de;
  position: relative;
  z-index: 1;
}

.utility a {
  margin-left: 25px;
  color: #dfbe79;
  transition: color 0.2s;
}

.utility a:hover {
  color: #ffffff;
}

/* Main Navigation Bar (76px) */
.nav {
  height: 76px;
  padding: 0 5.5vw;
  display: flex;
  align-items: center;
  background: transparent !important;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 230px;
}

.brand strong {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.logo-369 {
  display: inline-flex;
  align-items: baseline;
  position: relative;
}

.logo-369 .num-3 {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important;
  font-size: 30px;
  color: #dfbe79;
  z-index: 3;
  position: relative;
  margin-right: -2px;
  line-height: 0.9;
}

.logo-369 .num-6 {
  font-family: 'League Spartan', sans-serif !important;
  font-weight: 800 !important;
  font-size: 31px;
  color: #dfbe79;
  z-index: 2;
  position: relative;
  margin-right: -3px;
  line-height: 0.9;
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.45));
}

.logo-369 .num-9 {
  font-family: 'League Spartan', sans-serif !important;
  font-weight: 800 !important;
  font-size: 31px;
  color: #dfbe79;
  z-index: 1;
  position: relative;
  line-height: 0.9;
}

.brand-nexus {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  font-size: 25px;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.brand small {
  font: 500 7px 'Open Sans', sans-serif;
  letter-spacing: .12em;
  margin-top: 6px;
  color: #a0b2bc !important;
}

.nav nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}

.nav nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .07em;
  color: #ffffff;
  transition: color 0.25s ease;
}

.nav nav a:hover {
  color: #dfbe79;
}

.navcta {
  margin-left: 30px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  background: linear-gradient(135deg, #dfbe79 0%, #c5a059 100%);
  color: #051118;
  padding: 10px 18px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navcta:hover {
  background: linear-gradient(135deg, #ebd193 0%, #dfbe79 100%);
}

.menu {
  display: none;
  background: none;
  border: 0;
  color: #dfbe79;
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
}

/* ==================== LUXURY MOBILE DRAWER WITH GRADIENT ==================== */
.drawer {
  position: fixed;
  z-index: 2000;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: linear-gradient(160deg, #081822 0%, #0d2f45 60%, #1d628c 100%) !important;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 80px 25px 40px;
  border-left: 2px solid rgba(223, 190, 121, 0.35);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer button {
  position: absolute;
  right: 20px;
  top: 18px;
  border: 0;
  background: none;
  color: #dfbe79;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.drawer a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(223, 190, 121, 0.15);
  font: 500 12px 'Montserrat', sans-serif;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.drawer a:hover {
  color: #dfbe79;
  padding-left: 6px;
}

.drawer a:last-child {
  border-bottom: none;
  color: #dfbe79;
  font-weight: 600;
  margin-top: 10px;
}

/* ==================== GLOBAL FOOTER ==================== */
footer {
  background: #02070a;
  color: #9cb2c5;
  padding: 50px 8.5vw 25px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.foot {
  display: grid;
  grid-template-columns: auto 1fr auto; /* Balances left logo, middle text, and right nav */
  align-items: center; /* Vertically aligns all 3 desktop columns perfectly */
  gap: 30px;
}

.foot .brand {
  min-width: 0;
}

.foot p {
  font-size: 12px;
  margin: 0;
  text-align: center; /* Centers the tagline cleanly between logo and links */
  color: #b0c4de;
  letter-spacing: 0.03em;
}

.foot > div {
  display: flex;
  gap: 22px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.foot > div a {
  font: 500 10px 'Montserrat', sans-serif;
  letter-spacing: 0.08em;
  color: #dfbe79;
  text-decoration: none;
  transition: color 0.25s ease;
}

.foot > div a:hover {
  color: #ffffff;
}

footer hr {
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  margin: 35px 0 18px;
}

/* Bottom Copyright Bar: Stretches across and balances both ends */
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.foot-bottom small,
footer > small {
  font: 400 9.5px 'Montserrat', sans-serif;
  color: #7a92a5;
  letter-spacing: 0.05em;
  margin: 0;
}

/* ==================== GLOBAL RESPONSIVE ==================== */
@media (max-width: 1050px) {
  .nav nav { gap: 14px; }
  .navcta { display: none; }
  .foot { 
    grid-template-columns: 1fr auto; 
    gap: 20px; 
  }
  .foot p { 
    grid-column: 1 / -1; 
    order: 3; 
    text-align: left; 
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px !important;
  }
  .utility { display: none !important; }

  header#header {
    height: 72px !important;
  }

  .nav {
    height: 72px !important;
    padding: 0 18px !important;
    background: transparent !important; /* Preserves gradient from ::before/::after */
  }

  .brand { min-width: 0; }
  .logo-369 .num-3 { font-size: 24px; }
  .logo-369 .num-6, .logo-369 .num-9 { font-size: 25px; }
  .brand-nexus { font-size: 20px; margin-left: 3px; }
  .brand small { font-size: 6px; letter-spacing: 0.08em; }

  .nav nav, .navcta { display: none !important; }
  .menu { display: block !important; margin-left: auto; }

/* ==================== FOOTER MOBILE CENTER ALIGN ==================== */
  footer {
    padding: 40px 20px 30px !important;
    text-align: center !important;
  }

  footer .foot {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }

  footer .foot .brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  footer .foot p {
    text-align: center !important;
    margin: 0 !important;
  }

  footer .foot div {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 14px 18px !important;
    margin-top: 6px !important;
  }

  footer hr {
    margin: 25px auto 18px !important;
  }

  footer small {
    display: block !important;
    text-align: center !important;
    line-height: 1.6 !important;
    margin: 0 auto !important;
  }
}