/* ---------- Mobile base (default, no media query) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: transform 0.4s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 180%;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.55) 0%, rgba(10, 9, 8, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.75rem, 0.6rem + 1vw, 1.5rem) 2rem 0;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-badge img {
  display: block;
  /* Mobile/tablet size, +12.5% on the original clamp. width:auto keeps the
     horizontal scale locked to the height. The laptop+ override below is
     unaffected. */
  height: clamp(2.25rem, 1.8rem + 1.35vw, 3.09rem);
  width: auto;
}

/* Animated underline marker under the desktop nav — laptop+ only */
.header-line {
  display: none;
}

.nav-desktop {
  display: none;
}

.nav-item {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: color 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
}

/* ---------- Hamburger toggle (SVG path-morph) ---------- */
.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.nav-toggle svg {
  /* +15% on the original 1.7rem. The SVG scales from its viewBox, so width
     follows height and the icon grows evenly on both axes. The toggle is
     display:none at laptop+, so this is mobile/tablet only. */
  height: 1.96rem;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle .line {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle .line-top-bottom {
  stroke-dasharray: 12 63;
}

.site-header.is-open .nav-toggle svg {
  transform: rotate(-45deg);
}

.site-header.is-open .nav-toggle .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

/* ---------- Mobile accordion panel ---------- */
.nav-mobile {
  position: relative;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: rgba(18, 16, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: max-height 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
}

.site-header.is-open .nav-mobile {
  max-height: 620px;
  opacity: 1;
  transition: max-height 0.7s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease 0.1s;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem clamp(1rem, 0.5rem + 3vw, 3rem) 2rem;
}

.nav-mobile-links .nav-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1.15rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.nav-mobile-links .nav-item:last-child {
  border-bottom: 0;
}

.site-header.is-open .nav-mobile-links .nav-item {
  opacity: 1;
  transform: translateY(0);
}

.site-header.is-open .nav-mobile-links .nav-item:nth-child(1) { transition-delay: 0.15s; }
.site-header.is-open .nav-mobile-links .nav-item:nth-child(2) { transition-delay: 0.22s; }
.site-header.is-open .nav-mobile-links .nav-item:nth-child(3) { transition-delay: 0.29s; }
.site-header.is-open .nav-mobile-links .nav-item:nth-child(4) { transition-delay: 0.36s; }
.site-header.is-open .nav-mobile-links .nav-item:nth-child(5) { transition-delay: 0.43s; }
.site-header.is-open .nav-mobile-links .nav-item:nth-child(6) { transition-delay: 0.50s; }

/* ---------- Laptop: swap to full horizontal nav ---------- */
@media (min-width: 1024px) {
  .nav-bar {
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 20px;
    padding-left: 2rem;
  }

  .logo-badge {
    position: absolute;
    left: 2rem;
    top: 100%;
    margin-top: 0.6rem;
    transform: translateY(-50%);
  }

  .logo-badge img {
    height: clamp(2.75rem, 2.2rem + 1.5vw, 3.5rem);
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile {
    display: none;
  }

  .header-line {
    display: block;
    position: relative;
    margin-top: 0.6rem;
    pointer-events: none;
  }

  .header-line .line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: rgba(255, 255, 255, 0.55);
    transition: left 0.35s ease, width 0.35s ease;
  }

  .header-line .seg-right {
    right: 0;
  }

  .header-line .marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 1px;
    background: #cc2420;
    transition: left 0.35s ease, width 0.35s ease;
  }

  .nav-desktop {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  }

  .nav-desktop .nav-item {
    font-size: 1.02rem;
    padding-bottom: 4px;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 1440px) {
  .nav-desktop {
    gap: 2.25rem;
  }
}
