/* =============================================
   RISEN — NAVIGATION
   One bar for the three pages. Colours come from
   per-theme tokens set on .navbar, so the dark
   Impact page restyles it by redefining four
   variables instead of overriding rules.
   Loaded after style.css, before the page sheet.
============================================= */

.navbar {
  --nav-bg:      rgba(252, 250, 255, 0.82);
  --nav-border:  rgba(152, 102, 251, 0.1);
  --nav-text:    var(--text-muted);
  --nav-strong:  var(--text);
  --nav-accent:  var(--violet);
  --nav-hairline: rgba(31, 22, 48, 0.1);
  --nav-panel:   #FCFAFF;

  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 36px;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
}

.impact-page .navbar {
  --nav-bg:      rgba(46, 26, 71, 0.78);
  --nav-border:  rgba(255, 255, 255, 0.08);
  --nav-text:    rgba(255, 255, 255, 0.68);
  --nav-strong:  #FFFFFF;
  --nav-accent:  #FFFFFF;
  --nav-hairline: rgba(255, 255, 255, 0.14);
  --nav-panel:   #2E1A47;
}

.navbar-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.navbar-logo img { height: 28px; width: auto; }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* ---- the three destinations ---- */
.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a {
  position: relative;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--nav-text);
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--nav-strong); }

.nav-links a.is-active { color: var(--nav-strong); }
/* The underline marks where you are; it is not a hover affordance, so it is
   drawn only on the active item. */
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}
.impact-page .nav-links a.is-active::after {
  background: linear-gradient(90deg, #9866FB, #FF4FA3, #FF9A4A);
}

/* ---- language ---- */
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-switcher > span { color: var(--nav-hairline); }

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  padding: 4px 7px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.lang-btn.active { color: var(--nav-accent); font-weight: 700; }
.lang-btn:hover:not(.active) { color: var(--nav-strong); }

/* ---- burger, hidden until the bar runs out of room ---- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border: none;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  color: var(--nav-strong);
}
.nav-toggle:hover { background: var(--nav-hairline); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .nav-icon-close,
.nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }

/* =============================================
   COLLAPSED BAR
   Below this width the three destinations no
   longer fit beside the call to action. They
   move into a panel rather than disappearing:
   on a phone this used to leave every page with
   no way out but the footer.
============================================= */
@media (max-width: 860px) {
  .navbar { padding: 0 20px; }
  .nav-toggle { display: inline-flex; }

  .navbar-right {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--nav-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 24px 48px rgba(31, 22, 48, 0.14);

    /* Collapsed by default, and genuinely inert: a hidden panel must not
       hand its links to the keyboard or to a screen reader. */
    display: none;
  }
  .navbar-right.is-open { display: flex; }

  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--nav-hairline);
  }
  .nav-links a.is-active::after {
    left: 4px;
    right: auto;
    bottom: 10px;
    width: 18px;
  }

  .lang-switcher { padding: 16px 4px 4px; }

  .navbar-right .btn-pill {
    margin-top: 14px;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .navbar-logo img { height: 24px; }
}
