/* Prevent Flash of Unstyled Content (FOUC) for custom elements */
zero-md:not(:defined) {
  display: none !important;
}

/* Navigation Bar */
.site-header {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 1.5rem 2rem;
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand Logo + Text */
.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-light);
}

.brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--gold-primary);
  font-weight: 500;
}

/* Nav Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-light);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-primary);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--gold-border);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 180px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.dropdown-menu a:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--text-light);
}

/* Highlight portal entry at top of dropdown */
.dropdown-menu .menu-highlight {
  color: var(--gold-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.dropdown-menu .menu-highlight:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #fff;
}

/* Subtle separator between portal entry and legal docs */
.menu-divider {
  height: 1px;
  background: rgba(212, 175, 55, 0.2);
  margin: 0.3rem 0;
}

/* Hero Section */
.hero-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
}

/* Gold Button */
.gold-button {
  display: inline-block;
  background: var(--gold-gradient);
  color: #111;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  padding: 0.9rem 2.2rem;
  border-radius: 25px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gold-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
  text-align: center;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-border),
    transparent
  );
  margin-bottom: 2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.footer-links a:hover {
  color: var(--text-light);
}

.footer-copy {
  font-size: 0.75rem;
  color: #536378;
}

/* Nested Sub-dropdown Support */
.dropdown-menu .dropdown {
  position: relative;
}

.dropdown-menu .dropdown .dropdown-menu {
  top: 0;
  left: 100%;
}

/* Mobile Toggle Button (Hidden on Desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.nav-toggle.active .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Breakpoint */
@media (max-width: 850px) {
  .site-header {
    padding: 1rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(6, 9, 17, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gold-border);
    display: none;
    padding: 1.5rem 2rem;
  }

  .main-nav.nav-open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    width: 100%;
  }

  .nav-item {
    width: 100%;
    text-align: left;
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-left: 2px solid var(--gold-primary);
    border-radius: 0;
    box-shadow: none;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-top: 0.5rem;
  }

  .dropdown-menu .dropdown .dropdown-menu {
    left: 0;
    top: 0;
    margin-left: 0.5rem;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.8rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }
}
