/* ==========================================================================
   NURREVER — v3 sub-page menu system
   Glass header controls (menu button, scroll-progress bar)
   + the full-screen overlay menu. Self-contained for
   the company sub-pages; the homepage has its own menu system and does
   not load this file. Colours: white + neon blue + black ONLY.
   ========================================================================== */

/* --- Menu toggle button (in the floating header) ---
   FIX ROUND 2 (A4): NO box, border, pill or outline anywhere — the
   hamburger floats in air like the homepage's. The old pill
   (translucent bg + 1px border + 999px radius) is gone. Horizontal
   padding is 0 so the LINES sit exactly 45px from the right edge —
   matching the logo's 45px left margin (A2); vertical padding keeps
   a decent hit area. */
.nur-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--nur-font-button);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.9em 0;
  cursor: pointer;
  transition: none;
}
.nur-menu-btn:hover {
  background: transparent;
  border-color: transparent;
}
/* FIX ROUND 2 (A3): bigger staggered lines (34 / 22 / 28px, 3px
   thick), matching the homepage hamburger; hover equalises all
   three to 34px. Pitch is 9px (3px line + 6px gap), so the X morph
   below translates by 9px. Right-aligned. */
.nur-menu-btn__lines {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  width: 34px;
  height: 21px;
}
.nur-menu-btn__lines i {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.25s ease;
}
.nur-menu-btn__lines i:nth-child(1) {
  width: 34px;
}
.nur-menu-btn__lines i:nth-child(2) {
  width: 22px;
}
.nur-menu-btn__lines i:nth-child(3) {
  width: 28px;
}
.nur-menu-btn:not([aria-expanded="true"]):hover .nur-menu-btn__lines i {
  width: 34px;
}
/* Open state: the three lines become an X — the ONLY close control
   (FIX ROUND 2 A6: the overlay's second X button is removed). Lines
   1 and 3 widen to 34px so the X is symmetric. */
.nur-menu-btn[aria-expanded="true"] .nur-menu-btn__lines i:nth-child(1) {
  width: 34px;
  transform: translateY(9px) rotate(45deg);
}
.nur-menu-btn[aria-expanded="true"] .nur-menu-btn__lines i:nth-child(2) {
  opacity: 0;
}
.nur-menu-btn[aria-expanded="true"] .nur-menu-btn__lines i:nth-child(3) {
  width: 34px;
  transform: translateY(-9px) rotate(-45deg);
}

/* --- Header wordmark: BIG, floating look (FIX ROUND 2 A5: 216px
   wide, matching the homepage bar; height follows the 775:149 aspect
   ratio). site.css sets .nur-brand__mark at 26px height; this file
   loads after it and wins. The opacity transition is the v5
   src-swap crossfade. */
.nur-header .nur-brand__mark {
  width: 216px;
  height: auto;
  transition: opacity 0.15s ease;
}

/* --- FLOATING header (FIX ROUND 2 A4/A10, homepage style) ---
   The dark glass panel + blur are gone on every sub-page: the logo
   and hamburger float in air, exactly like the homepage bar. The
   inner also goes FULL-WIDTH with 45px side padding (matching the
   homepage logo's 44.5px left offset) instead of sitting inside the
   1440px content column (the old header was inset ~300px on each
   side). The theme flip below now only changes COLOURS, never a
   bar background. Height stays 72px (site.css). */
.nur-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nur-header > .nur-container {
  width: 100%;
  padding-left: 45px;
  padding-right: 45px;
}

/* --- Logo auto-switch (v5 B5, subpages-menu.js toggles .nur-on-light
   + swaps the src) --- On light backgrounds the wordmark swaps to the
   TRUE black transparent PNG (brand/nurrever-logo-black-transparent.png)
   — NO invert(1) filter any more. Same sampler + threshold as the
   homepage. Nav links + menu button flip to dark with it. While the
   overlay menu is open the JS forces the dark theme (the overlay
   behind is dark). FIX ROUND 2 (A4): the bar stays FLOATING on light
   too — no light-glass background any more, colours only. */
.nur-header.nur-on-light {
  background: transparent;
  color: #111;
}
.nur-header.nur-on-light .nur-brand {
  color: #111;
}
.nur-header.nur-on-light .nur-nav a {
  color: rgba(17, 17, 17, 0.72);
}
.nur-header.nur-on-light .nur-nav a:hover,
.nur-header.nur-on-light .nur-nav a[aria-current="page"] {
  color: #111;
  background: rgba(0, 191, 255, 0.14);
}
.nur-header.nur-on-light .nur-menu-btn {
  color: #111;
  background: transparent;
  border-color: transparent;
}
.nur-header.nur-on-light .nur-menu-btn__lines i {
  background: #111;
}


/* --- Header scroll-progress bar (driven by --header-progress, site.js) ---
   FIX ROUND 2 (A4): hidden — a full-width line contradicts the
   floating bar. The element + site.js are untouched. */
.nur-scroll-progress {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  pointer-events: none;
}
.nur-scroll-progress__bar {
  display: block;
  height: 100%;
  width: calc(var(--header-progress, 0) * 100%);
  background: linear-gradient(90deg, #0090FF, #00BFFF, #7DD8FF);
  transition: width 0.1s linear;
}

/* --- Full-screen overlay menu --- */
.nur-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  overflow-y: auto;
}
.nur-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.nur-menu-overlay[hidden] {
  display: none;
}
.nur-menu-overlay__panel {
  position: relative;
  width: min(100%, 1400px);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 7.5rem var(--nur-pad) 2.5rem;
}
/* FIX ROUND 2 (A6): the overlay's second X button is REMOVED (markup
   + styles) — the morphing hamburger is the only close control. */
.nur-menu-overlay__nav {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 0.95fr;
  gap: 3.5rem;
  align-items: start;
}
.nur-menu-overlay__main {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: nur-menu;
}
.nur-menu-overlay__main li {
  counter-increment: nur-menu;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nur-menu-overlay__main a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--nur-font-heading);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.45em 0;
  /* FIX ROUND 2 (B1): Palmo colour-fill wipe — the same 500ms
     left-to-right neon fill as the homepage, in pure CSS (no markup
     change): the link text is transparent over a two-stop gradient
     that slides on hover. The number ::before keeps its explicit
     neon colour (opaque, so it paints over the gradient). */
  background-image: linear-gradient(to right, #00BFFF 50%, #fff 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 500ms cubic-bezier(0.65, 0, 0.35, 1), transform 0.2s, opacity 0.3s ease;
}
.nur-menu-overlay__main a::before {
  content: "0" counter(nur-menu);
  font-family: var(--nur-font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--neon);
}
.nur-menu-overlay__main a:hover,
.nur-menu-overlay__main a[aria-current="page"] {
  background-position: 0 0;
  text-decoration: none;
  transform: translateX(10px);
}
/* Arqui9 sibling dimming: hovering a list dims its other links. */
.nur-menu-overlay__main:hover a:not(:hover),
.nur-menu-overlay__programs:hover a:not(:hover) {
  opacity: 0.45;
}
.nur-menu-overlay__heading {
  font-family: var(--nur-font-button);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon);
  margin: 0 0 1.1rem;
}
.nur-menu-overlay__programs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nur-menu-overlay__programs li {
  margin-bottom: 0.55rem;
}
.nur-menu-overlay__programs a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.2s, opacity 0.3s ease;
}
.nur-menu-overlay__programs a:hover {
  color: #fff;
  text-decoration: none;
}

/* FIX ROUND 2 (B2): hover image preview (Arqui9 mechanism — the 13
   images stack in one frame, JS toggles .is-active by link index;
   .is-default = the Home image, shown until a link is hovered).
   Same classes/sizing as the homepage preview (nurrever.css). */
.nur-menu-preview {
  position: relative;
  padding-top: 0.6rem;
}
.nur-menu-preview__frame {
  position: relative;
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.nur-menu-preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.nur-menu-preview__img.is-default,
.nur-menu-preview__img.is-active {
  opacity: 1;
}
.nur-menu-preview.has-active .nur-menu-preview__img.is-default {
  opacity: 0;
}
.nur-menu-overlay__foot {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
}
.nur-menu-overlay__foot p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}
.nur-menu-overlay__foot a {
  color: rgba(255, 255, 255, 0.85);
}
.nur-menu-overlay__foot a:hover {
  color: var(--neon);
}
.nur-menu-overlay__logo {
  display: block;
  width: auto;
  height: 30px;
}

/* Scroll lock while the menu is open (subpages-menu.js toggles it). */
html.nur-scroll-locked,
html.nur-scroll-locked body {
  overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  /* FIX ROUND 2 (B2): below 1100px the preview hides (Arqui9 hides
     its visuals on narrow screens too) and the menu is two columns. */
  .nur-menu-preview {
    display: none;
  }
  .nur-menu-overlay__nav {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
  }
}
@media (max-width: 820px) {
  .nur-menu-overlay__nav {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .nur-menu-overlay__panel {
    padding: 6.5rem 1.25rem 2rem;
  }
  .nur-header > .nur-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .nur-header .nur-brand__mark {
    width: 160px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .nur-menu-overlay,
  .nur-menu-btn__lines i,
  .nur-menu-overlay__main a {
    transition: none;
  }
}
