/* ═══════════════════════════════════════════
   OWN360 NAVIGATION
   Fixed nav, burger menu, drawer, theme toggle
═══════════════════════════════════════════ */

/* --- Site nav bar --- */
#sitenav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 60px;
  background: var(--cream);
  border-bottom: 1px solid var(--rule2);
}

#sitenav.scrolled {
  box-shadow: 0 2px 12px var(--sh);
}

/* --- Logo --- */
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
}

.nav-logo span {
  color: var(--ink);
}

/* --- Nav links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink2);
  text-decoration: none;
  padding: 6px 12px;
  transition: color .15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--forest);
}

/* --- CTA link --- */
.nav-link.cta {
  background: var(--forest);
  color: #fff !important;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .05em;
  padding: 9px 20px;
  margin-left: 10px;
  transition: background .18s, box-shadow .18s;
}

.nav-link.cta:hover {
  background: var(--forest2);
  box-shadow: 0 3px 14px rgba(27, 94, 56, .3);
}

/* --- Burger menu --- */
.nav-burger {
  display: none;
  background: none;
  border: 1.5px solid var(--rule);
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink2);
  transition: all .28s;
  transform-origin: center;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-burger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Mobile drawer --- */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(280px, 80vw);
  height: 100vh;
  background: var(--cream);
  border-left: 1px solid var(--rule);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 72px 0 24px;
  transition: right .3s cubic-bezier(.25, .46, .45, .94);
  box-shadow: -20px 0 60px var(--sh2);
}

.nav-drawer.open {
  right: 0;
}

.nav-drawer a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
  padding: 14px 28px;
  border-bottom: 1px solid var(--rule2);
  transition: color .15s;
}

.nav-drawer a:hover {
  color: var(--ink);
}

.nav-drawer .dcta {
  background: var(--forest);
  color: #fff !important;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  margin: 20px 28px 0;
  text-align: center;
  padding: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

/* --- Theme toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--rule);
  padding: 6px 12px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: normal;
  color: var(--ink2);
  transition: border-color .2s, color .2s;
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.theme-toggle svg {
  flex-shrink: 0;
  transition: transform .4s;
}

/* --- Scroll progress bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--forest);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* --- Back to top button --- */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  background: var(--cream2);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: background .2s, color .2s;
}

#back-to-top.visible {
  display: flex;
}

#back-to-top:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}
