/* ── NAV / HEADER ──────────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 48px;
  /* Use transform for state changes — avoids layout recalc */
  transition: padding .4s var(--ease), background .4s;
  /* Promote to own compositor layer up front */
  will-change: transform;
  contain: layout style;
}

#site-nav.scrolled {
  padding: 12px 48px;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

#site-nav.hidden {
  transform: translateY(-100%);
}

/* Logo */
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  /* Push everything after the logo to the right */
  margin-right: auto;
}
.nav-logo span { color: var(--red); }

/* Links */
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .25s;
}
.nav-links a:hover { color: #fff; }

/* Language selector — sibling of nav-links so it stays visible on mobile */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.nav-lang::before {
  content: '';
  display: block;
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 10px 0 2px;
}
.nav-lang a {
  font-size: 11px;
  letter-spacing: .15em;
  padding: 4px 6px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .25s;
}
.nav-lang a:hover { color: #fff; }
.nav-lang a.active { color: var(--red); font-weight: 700; }

/* Inline CTA in nav */
.nav-cta {
  padding: 10px 24px;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: background .25s, color .25s;
}

.nav-cta:hover { background: var(--red); color: #fff; }

/* ── HAMBURGER ─────────────────────────────────────────────────────────────── */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px; /* 4px; */
  z-index: 110;
}
#nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s, width .3s;
  transform-origin: center;
}
#nav-toggle span:nth-child(3) { width: 60%; margin-left: auto; }

#site-nav.nav-open #nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#site-nav.nav-open #nav-toggle span:nth-child(2) { opacity: 0; }
#site-nav.nav-open #nav-toggle span:nth-child(3) { width: 100%; transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  #site-nav       { padding: 18px 24px; }
  #site-nav.scrolled { padding: 12px 24px; }
  #nav-toggle     { display: flex; }

  #site-nav.nav-open {
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--midnight-mid);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .45);
    transition: max-height .35s var(--ease);
    z-index: 105;
  }

  /* #site-nav.nav-open .nav-links { display: flex; } */
  #site-nav.nav-open .nav-links {
    max-height: 420px; /* generous ceiling — enough for 4 links + CTA */
  }

  .nav-links li {
    width: 100%;
    border-top: 1px solid var(--border);
  }

  /* .nav-links a { font-size: 18px; } */

  .nav-links a,
  .nav-links button {
    display: block;
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    text-align: left;
    border-radius: 0;   /* full-width rows read better than pill buttons here */
  }

  /* Lang selector stays in the top bar on mobile (not inside the hamburger) */
  .nav-lang::before { display: none; }
  .nav-lang { gap: 0; }
  .nav-lang a { font-size: 11px; padding: 4px 4px; }

  /* Don't auto-hide the bar on mobile — keep the lang selector reachable */
  #site-nav.hidden { transform: none; }
}
