/* ============================================================
   Header & Navigation
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(11, 16, 25, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(230, 184, 121, 0.14);
}

.header-inner {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

/* Logo */
.brand {
    width: 100px !important;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name b {
  color: var(--dn-gold);
}

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--s-1);
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  margin-inline: auto;
  margin-right: var(--s-3);
  position: relative;
  left: 12px;
  right: 12px;
  justify-content: center;
  flex: 1;
  }
}

.nav-link {
  position: relative;
  padding: 0.55rem 0.9rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: rgba(250, 251, 245, 0.82);
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--dn-gold);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.3rem;
  height: 1px;
  background: var(--dn-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.has-mega svg.mega-chev {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  transition: transform var(--dur-fast) var(--ease);
}

.has-mega:hover svg.mega-chev {
  transform: rotate(180deg);
}

/* CTA in header */
.header-cta {
  display: none;
}

@media (min-width: 1024px) {
  .header-cta {
    display: inline-flex;
  gap: var(--s-1);
    align-items: center;
  flex: none;
  position: relative;
    z-index: 2;
  right: 12px;
  }
}

/* ---------- Mega menu ---------- */
.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 12px);
  width: min(1040px, 94vw);
  background: var(--dn-slate);
  border: 1px solid rgba(230, 184, 121, 0.16);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: var(--shadow-lg), 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur);
  z-index: 110;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.has-mega:hover .mega,
.has-mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.mega-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
}

.mega-categories {
  padding: var(--s-3) var(--s-3) var(--s-2);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-height: 540px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 184, 121, 0.3) transparent;
}

.mega-categories::-webkit-scrollbar {
  width: 6px;
}

.mega-categories::-webkit-scrollbar-thumb {
  background: rgba(230, 184, 121, 0.25);
  border-radius: 3px;
}

.mega-cat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mega-cat-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(230, 184, 121, 0.1);
}

.mega-cat-name {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dn-gold);
  font-weight: 700;
  white-space: nowrap;
}

.mega-cat-blurb {
  font-size: 0.72rem;
  color: var(--text-on-dark-muted);
  opacity: 0.6;
  font-weight: 400;
}

.mega-cat-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem;
}

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
  text-decoration: none;
}

.mega-item:hover {
  background: rgba(230, 184, 121, 0.06);
  border-color: rgba(230, 184, 121, 0.2);
  transform: translateX(2px);
}

.mega-item-icon {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--dn-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: rgba(230, 184, 121, 0.08);
  transition: background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.mega-item-icon svg {
  width: 22px;
  height: 22px;
}

.mega-item:hover .mega-item-icon {
  background: rgba(230, 184, 121, 0.16);
  animation: iconPulse 1.2s var(--ease) infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.mega-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.mega-item-name {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.3;
}

.mega-item-desc {
  font-size: 0.74rem;
  color: var(--text-on-dark-muted);
  opacity: 0.65;
  transition: opacity var(--dur-fast) var(--ease);
  line-height: 1.35;
}

.mega-item:hover .mega-item-desc {
  opacity: 1;
}

.mega-item-arrow {
  flex: none;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
  color: var(--dn-gold);
}

.mega-item:hover .mega-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

.mega-item-arrow svg {
  width: 14px;
  height: 14px;
}

/* ---------- Mega aside (featured panel) ---------- */
.mega-aside {
  background: linear-gradient(180deg, rgba(230, 184, 121, 0.05) 0%, rgba(230, 184, 121, 0.02) 100%);
  border-left: 1px solid rgba(230, 184, 121, 0.12);
  padding: var(--s-3);
  display: flex;
}

.mega-aside-inner {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.mega-aside-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dn-gold);
  font-weight: 700;
}

.mega-aside-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-on-dark);
  margin: 0;
  line-height: 1.3;
}

.mega-featured {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mega-featured-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(230, 184, 121, 0.1);
  background: rgba(11, 16, 25, 0.4);
  transition: background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
  text-decoration: none;
}

.mega-featured-card:hover {
  background: rgba(230, 184, 121, 0.08);
  border-color: rgba(230, 184, 121, 0.25);
  transform: translateX(3px);
}

.mega-featured-icon {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--dn-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-featured-icon svg {
  width: 20px;
  height: 20px;
}

.mega-featured-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.mega-featured-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-on-dark);
  line-height: 1.25;
}

.mega-featured-desc {
  font-size: 0.7rem;
  color: var(--text-on-dark-muted);
  opacity: 0.65;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mega-aside-cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.3rem;
}

.mega-aside-help {
  font-size: 0.72rem;
  color: var(--text-on-dark-muted);
  opacity: 0.6;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 1280px) {
  .mega {
    width: min(720px, 94vw);
  }
  .mega-body {
    grid-template-columns: 1fr;
  }
  .mega-aside {
    border-left: none;
    border-top: 1px solid rgba(230, 184, 121, 0.12);
  }
  .mega-categories {
    max-height: 400px;
  }
}

/* ---------- Mobile toggle ---------- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(250, 251, 245, 0.16);
  color: var(--text-on-dark);
}

.nav-toggle span {
  display: block;
  height: 1.6px;
  width: 100%;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--dn-navy);
  padding: var(--s-3) var(--s-3) var(--s-5);
  overflow-y: auto;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
    visibility var(--dur);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid rgba(230, 184, 121, 0.12);
  padding-top: var(--s-2);
}

.mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:hover {
  color: var(--dn-gold);
}

.mobile-link[aria-current="page"] {
  color: var(--dn-gold);
}

.mobile-disclosure {
  background: none;
  border: none;
  color: var(--text-on-dark-muted);
  display: inline-flex;
  align-items: center;
  padding: 0.5rem;
  transition: transform var(--dur-fast) var(--ease), color var(--dur-fast);
}

.mobile-disclosure[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--dn-gold);
}

.mobile-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}

.mobile-sub.open {
  grid-template-rows: 1fr;
}

.mobile-sub-inner {
  overflow: hidden;
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.5rem 0.7rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mobile-sub-link:hover {
  color: var(--dn-gold);
}

.mobile-cat {
  margin-bottom: 0.25rem;
}

.mobile-cat-head {
  padding: 0.7rem 0.5rem 0.3rem 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dn-gold);
  font-weight: 700;
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.5rem 0.7rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color var(--dur-fast) var(--ease),
    padding-left var(--dur-fast) var(--ease);
}

.mobile-sub-link:hover {
  color: var(--dn-gold);
  padding-left: 1.7rem;
}

.mobile-sub-icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--dn-gold);
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sub-icon svg {
  width: 20px;
  height: 20px;
}

.mobile-sub-link svg:not(.mobile-sub-icon svg) {
  width: 18px;
  height: 18px;
  color: var(--dn-gold);
  opacity: 0.7;
}

.mobile-cta {
  margin-top: var(--s-4);
  width: 100%;
  justify-content: center;
}
