/* ── site nav — full width, logo left half, links right half ─────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: #ffffff00;
  display: flex;
  align-items: stretch;
  z-index: 100;
  overflow: visible;
}

/* small logo on the left — home button */
.nav-logo-link {
  width: 25%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 14px;
  padding-right: 14px;
  text-decoration: none;
  overflow: hidden;
}

.nav-logo-img {
  height: 28px;
  width: auto;
  max-width: 100%;
  display: block;
  opacity: 0.75;
  transition: opacity var(--duration-fast) var(--ease);
}

.nav-logo-link:hover .nav-logo-img {
  opacity: 1;
}

.nav-logo-link--hidden {
  visibility: hidden;
  pointer-events: none;
}

/* three links — columns 9, 10, 11 out of 12; column 12 = right margin */
.nav-links {
  width: calc(100% / 2); /* 3/12 = one quarter */
  margin-left: auto;
  color: var(--color-main);
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.nav-links > a,
.nav-dropdown > a,
.nav-dropdown-inner > a {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-xs);
  color: var(--color-main);
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-left: 10px;
  display: block;
  line-height: var(--nav-height);
  transition: color var(--duration-fast) var(--ease);
}

.nav-num {
  display: inline-flex;
  align-items: center;
  color: var(--color-main);
  margin-right: 15px;
  padding-right: 15px;
  border-right: 2px solid currentColor;
  opacity: 1px;
  height: 10px; /* ← controls the line length */
}

.nav-links > a:hover,
.nav-dropdown > a:hover,
.nav-dropdown-inner > a:hover {
  font-weight: 1100;
  color: #121212;
}

.nav-links > a.active,
.nav-dropdown > a.active,
.nav-dropdown-inner > a.active {
  font-weight: 1100;
}

/* ── play dropdown ───────────────────────────────────────────────────────── */
.nav-dropdown {
  display: flex;
  align-items: center;
}

/* inner wrapper is only as wide as the "2 | Play" text —
   the menu is positioned relative to this, not the full grid cell */
.nav-dropdown-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nav-height);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-9px);
  flex-direction: column;
  gap: 5px;
  padding-left: 20px;
  white-space: nowrap;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: var(--text-xs);
  color: #838383;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: block;
  line-height: 1.6;
  transition: color var(--duration-fast) var(--ease);
}

.nav-dropdown-menu a:hover {
  color: var(--color-main);
  font-style: italic;
}

.nav-dropdown-menu a.active {
  color: var(--color-main);
}

/* ── hamburger — hidden on desktop ──────────────────────────────────────────── */
.nav-hamburger {
  display: none;
}

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

/* ── mobile nav ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Solid white so the open menu forms one seamless white block from top */
  .site-nav {
    background: #ffffff;
  }

  /* Logo fills the nav minus the hamburger button width */
  .nav-logo-link {
    width: calc(100% - 52px);
  }

  /* Hide desktop link bar entirely */
  .nav-links {
    display: none;
  }

  /* ── hamburger button ─────────────────────────────────────────────────── */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 52px;
    flex-shrink: 0;
    padding: 0 16px;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    align-self: stretch;
  }

  .nav-hamburger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #4e4e4e;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* × state when open */
  .nav-hamburger--open span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
  }
  .nav-hamburger--open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-hamburger--open span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
  }

  /* ── mobile dropdown menu ─────────────────────────────────────────────── */
  .nav-mobile-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 0.5px solid #e0e0e0;
    flex-direction: column;
    padding: 6px 0 14px;
    z-index: 99;
    animation: nav-menu-in 0.18s ease;
  }

  .nav-mobile-menu--open {
    display: flex;
  }

  .nav-mobile-menu a {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--text-xs);
    color: var(--color-main);
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 11px 20px;
    display: block;
    transition: color var(--duration-fast) var(--ease);
  }

  .nav-mobile-menu a:hover,
  .nav-mobile-menu a.active {
    font-weight: 1100;
    color: #121212;
  }

  @keyframes nav-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
