/* ============================================================================
   JugaadBox global navigation. Self-contained: every rule is prefixed .jbn
   so it renders the same on the homepage, tools, Moments and static pages.
   ========================================================================== */

:root {
  --jbn-height: 68px;
  --jbn-bg: rgba(240, 239, 198, 0.94);
  --jbn-paper: #FDFCF1;
  --jbn-ink: #292929;
  --jbn-ink-soft: #5A5A52;
  --jbn-orange: #F68827;
  --jbn-orange-text: #A8500A;
  --jbn-border: rgba(41, 41, 41, 0.14);
}

/* Reserve room for the fixed bar so page content never hides under it. */
body.has-jbn {
  padding-top: var(--jbn-height);
}

/* Sticky page elements start below the bar. */
html {
  scroll-padding-top: calc(var(--jbn-height) + 12px);
}

.jbn,
.jbn * {
  box-sizing: border-box;
}

.jbn {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--jbn-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--jbn-border);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: box-shadow 0.25s ease;
}

.jbn.is-scrolled {
  box-shadow: 0 4px 18px rgba(41, 41, 41, 0.12);
}

.jbn-inner {
  max-width: 1200px;
  height: var(--jbn-height);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jbn-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.jbn-logo img {
  height: 44px;
  width: auto;
  display: block;
}

.jbn-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.jbn-link {
  position: relative;
  color: var(--jbn-ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}

.jbn-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--jbn-orange);
  transition: width 0.2s ease;
}

.jbn-link:hover,
.jbn-link:focus-visible,
.jbn-link.is-active {
  color: var(--jbn-orange-text);
}

.jbn-link:hover::after,
.jbn-link:focus-visible::after,
.jbn-link.is-active::after {
  width: 100%;
}

.jbn-link:focus-visible,
.jbn-toggle:focus-visible,
.jbn-logo:focus-visible {
  outline: 3px solid rgba(246, 136, 39, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.jbn-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.jbn-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--jbn-ink);
  border-radius: 3px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.jbn.is-open .jbn-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.jbn.is-open .jbn-toggle span:nth-child(2) { opacity: 0; }
.jbn.is-open .jbn-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.jbn-drawer {
  display: none;
}

@media (max-width: 1000px) {
  :root { --jbn-height: 60px; }

  .jbn-inner { padding: 0 1rem; }
  .jbn-logo img { height: 38px; }
  .jbn-links { display: none; }
  .jbn-toggle { display: flex; }

  .jbn-drawer:not([hidden]) {
    display: flex;
    flex-direction: column;
    background: var(--jbn-paper);
    border-top: 1px solid var(--jbn-border);
    box-shadow: 0 14px 24px rgba(41, 41, 41, 0.12);
    max-height: calc(100vh - var(--jbn-height));
    max-height: calc(100dvh - var(--jbn-height));
    overflow-y: auto;
    padding: 0.5rem 0 1rem;
  }

  .jbn-drawer .jbn-link {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(41, 41, 41, 0.06);
    font-size: 1rem;
  }

  .jbn-drawer .jbn-link::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jbn, .jbn * { transition: none !important; }
}

/* Global ambience (cursor glow and drifting shapes), so pages without style.css still get it. */
.jb-ambience {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(246, 136, 39, 0.20) 0%, rgba(246, 136, 39, 0.06) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: multiply;
}