#navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: transparent;
  transition: background .4s ease, box-shadow .4s ease;
}
#navbar.light {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav-logo .logo-img {
  height: 30px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0;
  transition: filter .4s ease, opacity .4s ease;
}
#navbar.light .nav-logo .logo-img {
  filter: none;
  opacity: 1;
}

.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--white); font-size: .85rem; font-weight: 600;
  padding: 4px 10px; position: relative; display: inline-block;
  transition: color .4s ease;
  isolation: isolate;
  text-shadow: 0 0 4px rgba(0,0,0,.8); 
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: -8px -12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: -1;
}
.nav-links a:hover::before { opacity: 1; }

.nav-links li:nth-child(1) a::before { background-image: url(../../assets/images/hover1.svg); }
.nav-links li:nth-child(2) a::before { background-image: url(../../assets/images/hover2.svg); }
.nav-links li:nth-child(3) a::before { background-image: url(../../assets/images/hover3.svg); }
.nav-links li:nth-child(4) a::before { background-image: url(../../assets/images/hover4.svg); }
.nav-links li:nth-child(5) a::before { background-image: url(../../assets/images/hover5.svg); }

#navbar.light .nav-links a { color: var(--black); text-shadow: none; }

.nav-links a svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.nav-links a svg rect {
  fill: none; stroke: var(--yellow); stroke-width: 8;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  transition: stroke-dashoffset .35s cubic-bezier(.4,0,.2,1);
  opacity: .75;
}
.nav-links a:hover svg rect { stroke-dashoffset: 0; }

.nav-cta {
  background: transparent; border: 2px solid rgba(255,255,255,.6);
  font-size: .8rem; font-weight: 700; padding: 10px 22px;
  cursor: pointer; text-decoration: none; color: var(--white);
  transition: background .25s, color .25s, border-color .4s;
  letter-spacing: .02em;
}
#navbar.light .nav-cta { color: var(--black); border-color: var(--black); }
.nav-cta:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); }

.nav-menu-toggle,
.mobile-nav { display: none; }

@media (max-width: 900px) {
  html.mobile-menu-open,
  html.mobile-menu-open body { overflow: hidden; }

  #navbar,
  #navbar.light,
  #navbar.is-menu-open {
    min-height: 72px;
    padding: 14px 24px;
    background: #FAFAFA;
    backdrop-filter: none;
    box-shadow: none;
  }
  #navbar.is-menu-open { border-bottom: 1px solid rgba(10,10,10,.2); }

  .nav-logo .logo-img,
  #navbar.light .nav-logo .logo-img {
    height: 24px;
    filter: none;
    opacity: 1;
  }

  .nav-links,
  .nav-cta { display: none; }

  .nav-menu-toggle {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--black);
    cursor: pointer;
  }
  .nav-menu-toggle span {
    position: absolute;
    left: 4px;
    width: 32px;
    height: 3px;
    background: currentColor;
    border-radius: 999px;
    transition: opacity .2s ease, transform .25s ease;
  }
  .nav-menu-toggle span:first-child { top: 10px; }
  .nav-menu-toggle span:nth-child(2) { top: 19px; }
  .nav-menu-toggle span:last-child { top: 28px; }
  .nav-menu-toggle.is-open span:first-child { transform: translateY(9px) rotate(45deg); }
  .nav-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-menu-toggle.is-open span:last-child { transform: translateY(-9px) rotate(-45deg); }

  .mobile-nav {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 32px;
    background: #FAFAFA;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .25s ease, visibility .2s ease;
  }
  .mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    list-style: none;
  }
  .mobile-nav-links a {
    color: var(--black);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
  }
  .mobile-nav-cta {
    margin-top: 34px;
    padding: 7px 10px;
    border: 1px solid var(--black);
    color: var(--black);
    font-family: var(--font-hw);
    font-size: 1.05rem;
    font-weight: normal;
    line-height: 1;
    text-decoration: none;
  }
}
