/* Shared site nav — edit public/components/site-nav.html + this file */

#site-nav-mount:empty {
  min-height: 60px;
}

.site-nav-fallback {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.75rem;
  color: var(--bone-2, #a89a88);
  padding: 12px 16px;
  text-align: center;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
    repeating-radial-gradient(circle at 70% 50%, rgba(200, 190, 170, 0.015) 0px, rgba(200, 190, 170, 0.015) 1px, transparent 1px, transparent 5px),
    radial-gradient(ellipse at 20% 50%, rgba(40, 35, 30, 0.3) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 50%, rgba(50, 45, 38, 0.2) 0%, transparent 35%),
    linear-gradient(180deg, var(--concrete-4, #161412) 0%, #100e0c 100%);
  background-size: 4px 4px, 5px 5px, 100% 100%, 100% 100%, 100% 100%;
  border-bottom: 1px solid var(--slab-light, #2a2725);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: 60px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-brand-cluster {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Host badge — separate from Haunts365 brand cluster */
.nav-host-badge {
  flex-shrink: 1;
  min-width: 0;
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid rgba(184, 150, 11, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a,
.storefront .nav-links a {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.78rem;
  color: var(--bone-1, #e8e0d4);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.is-active,
.storefront .nav-links a.is-active {
  color: var(--yellow-1, #b8960b);
}

.nav-rivet-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-radial-gradient(circle, #3a3530 1px, transparent 1.5px);
  background-size: 12px 12px;
  background-position: 0 center;
  opacity: 0.5;
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-gear {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-gear-circle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border: 3px solid var(--yellow-1, #b8960b);
  border-radius: 50%;
  background: transparent;
}

.logo-gear-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--yellow-1, #b8960b);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.logo-gear-teeth1,
.logo-gear-teeth2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
}

.logo-gear-teeth2 {
  transform: translate(-50%, -50%) rotate(45deg);
}

.logo-gear-teeth1::before,
.logo-gear-teeth1::after,
.logo-gear-teeth2::before,
.logo-gear-teeth2::after {
  content: '';
  position: absolute;
  background: var(--yellow-1, #b8960b);
}

.logo-gear-teeth1::before,
.logo-gear-teeth2::before {
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
}

.logo-gear-teeth1::after,
.logo-gear-teeth2::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  transform: translateY(-50%);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text-main {
  font-family: var(--font-heading, 'Bebas Neue', sans-serif);
  font-size: 1.3rem;
  color: var(--yellow-1, #b8960b);
  letter-spacing: 3px;
  font-weight: bold;
  line-height: 1.1;
}

.logo-text-sub {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.55rem;
  color: var(--bone-2, #a89a88);
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1.2;
}

.hosted-by {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bone-2, #a89a88);
  white-space: nowrap;
  transform: translateY(1px);
}

.hosted-by-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(200, 192, 176, 0.35);
}

.hosted-by-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hosted-by-main {
  font-family: var(--font-heading, 'Bebas Neue', sans-serif);
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--yellow-1, #b8960b);
  line-height: 1.1;
}

.hosted-by-sub {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.55rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--bone-1, #e8e0d4);
  line-height: 1.2;
  margin-top: 1px;
}

.hosted-by-link {
  text-decoration: none;
  border-bottom: 1px dotted rgba(184, 150, 11, 0.55);
}

.hosted-by-link:hover .hosted-by-main {
  color: #d4b52a;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Pill menu trigger — always visible on standard layout pages */
.nav--pill-menu .nav-links {
  display: none !important;
}

/* Welcome track — single-line play control before menu pill */
.nav-welcome-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(184, 150, 11, 0.42);
  background: rgba(0, 0, 0, 0.35);
  color: var(--yellow-1, #b8960b);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nav-welcome-audio svg {
  width: 16px;
  height: 16px;
  display: block;
}
.nav-welcome-audio:hover,
.nav-welcome-audio:focus-visible {
  border-color: var(--yellow-1, #b8960b);
  background: rgba(20, 16, 10, 0.65);
  outline: none;
  box-shadow: 0 0 14px rgba(184, 150, 11, 0.18);
}
.nav-welcome-audio.is-playing {
  border-color: var(--yellow-1, #b8960b);
  background: rgba(184, 150, 11, 0.12);
}
.nav-welcome-audio-icon--pause[hidden] {
  display: none !important;
}
#navWelcomeAudio {
  display: none;
}

.nav-menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 150, 11, 0.42);
  background: rgba(0, 0, 0, 0.35);
  color: var(--bone-1, #e8e0d4);
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-menu-pill:hover,
.nav-menu-pill:focus-visible {
  border-color: var(--yellow-1, #b8960b);
  background: rgba(20, 16, 10, 0.65);
  box-shadow: 0 0 14px rgba(184, 150, 11, 0.18);
  outline: none;
}

.nav-menu-pill[aria-expanded="true"] {
  border-color: var(--yellow-1, #b8960b);
  background: rgba(184, 150, 11, 0.12);
}

.nav-menu-pill-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-menu-pill-bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--yellow-1, #b8960b);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-menu-pill[aria-expanded="true"] .nav-menu-pill-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-menu-pill[aria-expanded="true"] .nav-menu-pill-bars span:nth-child(2) {
  opacity: 0;
}

.nav-menu-pill[aria-expanded="true"] .nav-menu-pill-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-menu-pill-label {
  color: var(--yellow-1, #b8960b);
}

/* Legacy hamburger — immersive / legacy pages only */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bone-1, #e8e0d4);
  transition: all 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  width: min(260px, 78vw);
  right: calc(-1 * min(260px, 78vw));
  height: 100vh;
  height: 100dvh;
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, var(--concrete-4, #161412) 0%, #100e0c 100%);
  background-size: 4px 4px, 100% 100%;
  border-left: 2px solid var(--slab-light, #2a2725);
  z-index: 10001;
  transition: right 0.35s ease;
  padding: 80px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu > .nav-drawer-weather,
.mobile-menu > .nav-intel-panel {
  flex-shrink: 0;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a,
.mobile-link {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 0.8rem;
  color: var(--bone-1, #e8e0d4);
  text-decoration: none;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  flex-shrink: 0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(107, 68, 35, 0.3);
}

.mobile-menu a:hover,
.mobile-link.is-active {
  color: var(--yellow-1, #b8960b);
  border-bottom-color: rgba(184, 150, 11, 0.55);
}

.mobile-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--bone-1, #e8e0d4);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
}

.mobile-overlay.open {
  display: block;
}

@media (max-width: 1200px) {
  .hosted-by-main {
    font-size: 1rem;
    letter-spacing: 2px;
  }
  .hosted-by-sub {
    font-size: 0.5rem;
    letter-spacing: 3px;
  }
}

/* Legacy pages without nav--pill-menu: hamburger on narrow viewports */
@media (max-width: 820px) {
  .nav:not(.nav--pill-menu) .nav-links {
    display: none;
  }
  .nav:not(.nav--pill-menu) .hamburger {
    display: flex;
  }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .nav-inner {
    padding: 0 20px;
  }
  .nav:not(.nav--pill-menu) .nav-links {
    gap: 16px;
  }
  .nav:not(.nav--pill-menu) .nav-links a {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
}

@media (max-width: 1100px) {
  .nav-left {
    gap: 8px;
  }

  .nav-host-badge:not([hidden]) {
    display: flex !important;
  }

  .nav-host-badge .hosted-by-main {
    font-size: clamp(0.85rem, 3.2vw, 1.15rem);
    letter-spacing: 2px;
  }

  .nav-host-badge .hosted-by-sub {
    font-size: 0.45rem;
    letter-spacing: 2px;
  }

  .nav-host-badge .hosted-by-logo {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 500px) {
  .nav-inner {
    padding: 0 16px;
  }
  .nav-menu-pill {
    padding: 7px 12px 7px 10px;
    gap: 6px;
  }
  .nav-menu-pill-label {
    display: none;
  }
  .logo-text-main {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }
  .logo-text-sub {
    font-size: 0.5rem;
    letter-spacing: 2px;
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-host-badge {
    padding-left: 8px;
    margin-left: 0;
  }

  .nav-host-badge .hosted-by {
    gap: 5px;
  }

  .nav-host-badge .hosted-by-logo {
    width: 20px;
    height: 20px;
  }

  .nav-host-badge .hosted-by-main {
    font-size: 0.68rem;
    letter-spacing: 1px;
  }

  .nav-host-badge .hosted-by-sub {
    font-size: 0.38rem;
    letter-spacing: 1.5px;
  }
  .logo-gear {
    width: 30px;
    height: 30px;
  }
  .logo-gear-circle {
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-width: 2px;
  }
  .logo-gear-teeth1,
  .logo-gear-teeth2 {
    width: 28px;
    height: 28px;
  }
}
