/**
 * Navigation styles.
 *
 * Pattern:
 *   - Transparent over hero on desktop
 *   - Dropdowns hidden by default, revealed by .open class (toggled via nav.js)
 *   - Mobile: burger reveals a stacked menu panel
 *
 * All values reference tokens.css.
 */

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: var(--z-content);
  padding: var(--space-5) var(--space-12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
}

.nav-logo {
  flex-shrink: 0;
  display: block;
}

.nav-logo img {
  height: 64px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  position: relative;
}

.nav-links > li > a,
.nav-links > li > button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.3px;
  color: var(--color-text-inverse);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > button:hover {
  color: #fff;
}

.nav-links > li.has-dropdown > button .chev {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s ease;
}

.nav-links > li.has-dropdown.open > button .chev {
  transform: rotate(180deg);
}

/* ===== DROPDOWN PANEL ===== */

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 3px solid var(--color-gold);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: var(--space-3) 0;
  z-index: 1000;
}

.nav-links > li.has-dropdown.open > .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: var(--space-3) var(--space-5);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-dropdown a:hover {
  background: var(--color-cream);
}

.nav-dropdown-title {
  font-weight: var(--font-weight-medium);
  font-size: 0.95rem;
  color: var(--color-espresso);
  margin: 0;
}

.nav-dropdown-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 2px 0 0;
  line-height: 1.4;
}

/* ===== CTA ===== */

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  font-size: 0.88rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ===== BURGER ===== */

.nav-burger {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.nav-burger span {
  display: block;
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 27px; }

body.menu-open .nav-burger span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
body.menu-open .nav-burger span:nth-child(2) {
  opacity: 0;
}
body.menu-open .nav-burger span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ===== MOBILE ===== */

@media (max-width: 1024px) {
  .nav {
    padding: var(--space-4) var(--space-6);
  }
  .nav-logo img {
    height: 52px;
  }
  .nav-links, .nav-cta {
    display: none;
  }
  .nav-burger {
    display: block;
  }
}
