/* ============================================================
   OZI Technology — multi-page header additions

   The bulk of the navbar / dropdown / mobile-menu styling already
   lives in site.css and is reused as-is. This file adds only what
   the multi-page split needs:
     1. active-page highlighting
     2. the theme toggle (lifted out of the home page's inline <style>
        so every page gets it)
     3. a wider mobile breakpoint fix for the accordion
   Brand accent: --ozi-blue-green-500 (#1C99BF).
   ============================================================ */

/* ── 1. Active page ──────────────────────────────────────── */

.nav__link.is-active {
  color: var(--fg-strong);
  font-weight: 600;
}

/* The underline bar is shared with :hover — pin it open for the
   current page so the state reads without hovering. */
.nav__link.is-active::after {
  transform: scaleX(1);
}

.mobile-menu__summary.is-active,
.mobile-menu__link.is-active {
  color: var(--ozi-cyan-glow);
}

.mobile-menu__summary.is-active {
  font-weight: 600;
}

/* ── 2. Theme toggle ─────────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--ozi-ink-100);
  cursor: pointer;
  padding: 0;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--ozi-cyan-glow);
  border-color: var(--ozi-blue-green-500);
  background: color-mix(in srgb, var(--ozi-blue-green-500) 12%, transparent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ozi-cyan-glow);
  outline-offset: 2px;
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
}

.theme-toggle__icon--sun { display: block; }
.theme-toggle__icon--moon { display: none; }

html[data-theme="light"] .theme-toggle__icon--sun { display: none; }
html[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* ── 3. Mobile accordion ─────────────────────────────────── */

@media (max-width: 1240px) {
  /* Inside the mobile drawer the dropdown body is a plain stacked
     list, not a floating panel — reset the desktop grid. */
  .mobile-menu__dropdown .nav-menu {
    padding: 0;
    width: auto;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .mobile-menu__dropdown .nav-menu__grid {
    display: block;
  }

  .mobile-menu__dropdown .nav-menu__group {
    margin-bottom: 18px;
  }

  .mobile-menu__dropdown .nav-menu__header {
    margin-bottom: 14px;
  }

  .mobile-menu__dropdown .nav-menu__title {
    font-size: 16.4px;
  }

  .mobile-menu__dropdown .nav-menu__sub {
    display: none;
  }
}
