/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.45s ease, box-shadow 0.45s ease, transform 0.45s var(--ease-butter);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.site-header.is-sticky {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-header.is-sticky::before {
  opacity: 0;
}

.site-header--solid {
  /* Pure black — keeps white logo type clear and separates navy mark from navy-blue headers */
  background: #000000;
}

.site-header--solid::before {
  opacity: 0;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 56px);
  transition: height 0.45s ease;
}

.site-header.is-sticky .header-inner {
  height: var(--nav-h-sticky);
}

.brand img {
  width: clamp(180px, 16vw, 230px);
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.nav-link i {
  font-size: 1rem;
  opacity: 0.7;
  transition: transform 0.35s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-item.has-mega:hover > .nav-link {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.has-mega:hover > .nav-link i {
  transform: rotate(180deg);
}

.mobile-nav-foot {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  transition: gap 0.35s ease, background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.header-cta:hover {
  gap: 14px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy-deep);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Dropdowns ---------- */
@media (min-width: 1200px) {
  .nav-item.has-compact {
    position: relative;
  }

  .megapanel {
    position: absolute;
    left: -8px;
    top: calc(100% - 14px);
    min-width: 220px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease-butter), visibility 0.3s;
  }

  .nav-item.has-mega:hover .megapanel,
  .nav-item.has-mega:focus-within .megapanel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .compact-menu {
    padding: 8px;
    background: #03192a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(3, 25, 42, 0.55);
    isolation: isolate;
  }
}

.compact-menu {
  display: flex;
  flex-direction: column;
}

.compact-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.compact-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

/* ---------- Mobile nav ---------- */
@media (max-width: 1199px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .main-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding: calc(var(--nav-h) + 12px) 24px 32px;
    background: var(--navy-deep);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-butter), visibility 0.4s;
  }

  .site-header.is-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 0;
  }

  .nav-item {
    display: block;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 18px 0;
    border-radius: 0;
    font-size: 1.35rem;
    background: none !important;
  }

  .nav-item.is-open > .nav-link i {
    transform: rotate(180deg);
  }

  .megapanel {
    display: none;
    padding-bottom: 18px;
  }

  .nav-item.is-open .megapanel {
    display: block;
  }

  .compact-menu a {
    white-space: normal;
    padding: 10px 0;
  }

  .mobile-nav-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 32px;
    color: rgba(255, 255, 255, 0.75);
  }

  .mobile-nav-foot a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  /* backdrop-filter/transform would make the fixed drawer size to the header */
  .site-header.is-open {
    background: var(--navy-deep);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.62);
  padding: clamp(64px, 8vw, 110px) 0 32px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px clamp(20px, 2.5vw, 40px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-light);
}

.footer__brand {
  flex: 0 1 260px;
  max-width: 280px;
}

.footer__brand img {
  width: 230px;
  margin-bottom: 22px;
}

.footer__brand p {
  max-width: 32ch;
  font-size: 0.95rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.footer__col-title {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.footer__col a {
  width: fit-content;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer__col a:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 0.85rem;
}

.footer__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__powered {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.footer__powered a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer__powered a:hover {
  color: var(--accent);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a:hover {
  color: var(--white);
}

.footer__back-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__back-top-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.footer__back-top:hover .footer__back-top-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy-deep);
  transform: translateY(-3px);
}

@media (max-width: 991px) {
  .footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: initial;
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: none;
    flex: none;
  }
}

@media (max-width: 575px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
