/* ================================
   chanaway5000 — Nav (clean slate)
   ================================ */

/* Vars */
:root {
  --ink: #022351;
  --rule: #eaeaea;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;            /* mobile header becomes 56px below */
}

/* Header shell */
.site-header {
  position: sticky; top: 0; z-index: 10000;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  height: var(--header-h);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  box-sizing: border-box;
  font-family: 'Barlow', system-ui, sans-serif;
}

/* Brand */
.brand {
  color: var(--ink); text-decoration: none;
  font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}

/* Hamburger */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  color: var(--ink);
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: ""; display: block; width: 22px; height: 2px; background: currentColor;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; top: -6px; }
.nav-toggle__bar::after  { position: absolute; top:  6px; }
.nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Mobile panel — hidden by default */
#primary-nav {
  display: none;               /* closed */
  position: fixed;             /* never clipped by parents */
  left: 0; right: 0; top: 56px;/* matches mobile header height */
  background: #fff;
  border-top: 1px solid var(--rule);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  padding: 12px var(--gutter);
  z-index: 9999;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}

/* Open states — either hook works */
body.nav-open #primary-nav,
.site-header.is-open #primary-nav {
  display: block;
  transform: translateY(0); opacity: 1; pointer-events: auto;
}

/* Menu list */
.primary-nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.primary-nav__list a {
  display: block; padding: 12px 4px;
  color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .02em;
}
.primary-nav__list a:hover { text-decoration: underline; }

/* Scroll lock when open */
.no-scroll { overflow: hidden; }

/* Desktop: inline menu, hide hamburger */
@media (min-width: 861px) {
  .site-header { height: var(--header-h); }
  #primary-nav {
    display: block !important;
    position: static; left: auto; right: auto; top: auto;
    border: 0; padding: 0; box-shadow: none;
    transform: none; opacity: 1; pointer-events: auto;
  }
  .primary-nav__list {
    flex-direction: row; align-items: center; gap: 22px;
  }
  .primary-nav__list a {
    padding: 8px 0; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat; background-size: 0% 2px; background-position: 0 100%;
    transition: background-size .2s ease;
  }
  .primary-nav__list a:hover { background-size: 100% 2px; }
  .nav-toggle { display: none; }
}

/* Mobile height tweak */
@media (max-width: 860px) {
  .site-header { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  #primary-nav, .primary-nav__list a { transition: none; }
}

/* Remove extra underline on current/active nav link */
.primary-nav__list a,
.primary-nav__list a:visited {
  text-decoration: none;
}

.primary-nav__list a.active,
.primary-nav__list a[aria-current="page"] {
  background-size: 100% 2px;  /* keep the blue rule if you like it */
  text-decoration: none;      /* remove default underline */
}

/* === Fix double underline on nav links === */
.primary-nav__list a,
.primary-nav__list a:visited {
  text-decoration: none;
}

.primary-nav__list a:hover {
  text-decoration: none;           /* remove browser underline */
  background-size: 100% 2px;       /* keep only the animated underline */
}

/* ============================================
   Subtle Transparent Navigation Enhancement
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85); /* translucent white */
  backdrop-filter: blur(12px);            /* adds soft blur behind */
  -webkit-backdrop-filter: blur(12px);    /* Safari support */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* soft separation line */
  transition: background 0.3s ease;
}

/* Optional: slightly increase opacity when scrolling */
body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.95);
}

/* ============================================
   Transparent Nav Buttons / Links
   ============================================ */

/* Base link styling inside the transparent header */
.site-header .primary-nav__list a {
  background: rgba(255, 255, 255, 0.2);   /* soft translucency */
  backdrop-filter: blur(8px);             /* glassy look behind text */
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 8px 14px;
  transition: background 0.25s ease, color 0.25s ease;
  color: rgba(2, 35, 81, 0.9);            /* subtle navy text */
}

/* Hover / focus state */
.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  background: rgba(255, 255, 255, 0.4);   /* slightly more visible on hover */
  color: rgba(2, 35, 81, 1);
  text-decoration: none;
}

/* Active / current page */
.site-header .primary-nav__list a.active,
.site-header .primary-nav__list a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
/* ============================================
   Refined Subtle Transparent Nav — Glass Finish
   ============================================ */

.site-header {
  background: rgba(255, 255, 255, 0.70);  /* slightly more transparent */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* When scrolled: firm it up slightly for readability */
body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

/* Nav links refined — lighter fill, less contrast block */
.site-header .primary-nav__list a {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 5px;
  color: rgba(2, 35, 81, 0.95);
  transition: background 0.25s ease, color 0.25s ease;
}

/* Hover: clean highlight, not solid white */
.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  background: rgba(255, 255, 255, 0.28);
  color: rgba(2, 35, 81, 1);
}

/* ============================================
   Balanced Neutral Transparency — No Color Bleed
   ============================================ */

.site-header {
  background: rgba(255, 255, 255, 0.78);   /* slightly higher opacity */
  backdrop-filter: blur(14px) saturate(120%) brightness(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(120%) brightness(1.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* Slightly more opaque when scrolled for readability */
body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(140%) brightness(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(140%) brightness(1.05);
}

/* Nav links refined for consistency */
.site-header .primary-nav__list a {
  background: rgba(255, 255, 255, 0.12);   /* faint translucency only */
  border-radius: 6px;
  padding: 8px 14px;
  color: rgba(2, 35, 81, 0.95);
  transition: background 0.25s ease, color 0.25s ease;
}

.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  background: rgba(255, 255, 255, 0.25);
  color: rgba(2, 35, 81, 1);
}

/* ---- Final glass polish (subtle, neutral, crisp) ---- */

.site-header{
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px) saturate(120%) brightness(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(120%) brightness(1.04);
  /* hairline separator that beats color-bleed */
  box-shadow:
    0 1px 0 rgba(0,0,0,0.06),
    0 6px 16px rgba(0,0,0,0.04);
}

/* firm up slightly when scrolling for readability */
body.scrolled .site-header{
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px) saturate(140%) brightness(1.04);
  -webkit-backdrop-filter: blur(16px) saturate(140%) brightness(1.04);
}

/* links: lighter “chips”, less blocky, cleaner hover */
.site-header .primary-nav__list a{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(2,35,81,0.06);
  color: rgba(2,35,81,0.96);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus{
  background: rgba(255,255,255,0.24);
  border-color: rgba(2,35,81,0.12);
  color: rgba(2,35,81,1);
}

/* active/current page = subtle emphasis, not a block */
.site-header .primary-nav__list a.active,
.site-header .primary-nav__list a[aria-current="page"]{
  background: rgba(255,255,255,0.32);
  border-color: rgba(2,35,81,0.16);
  font-weight: 700;
}

/* mobile: keep glass look but avoid heaviness */
@media (max-width: 860px){
  .site-header{ background: rgba(255,255,255,0.92); }
  .site-header .primary-nav__list a{ background: transparent; border: 0; }
}

/* accessibility fallback */
@media (prefers-reduced-transparency: reduce){
  .site-header{ background:#fff; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .site-header .primary-nav__list a{ background: transparent; border:0; }
}
/* ============================================
   Unified Transparent Navigation — "True Glass"
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.65);  /* moderate transparency */
  backdrop-filter: blur(18px) saturate(130%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(130%) brightness(1.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

/* When scrolled: slightly more solid for readability */
body.scrolled .site-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(140%) brightness(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(140%) brightness(1.08);
}

/* Nav links — share same translucency and blur */
.site-header .primary-nav__list a {
  background: rgba(255, 255, 255, 0.25);   /* let color bleed softly through */
  border-radius: 8px;
  padding: 8px 14px;
  color: rgba(2, 35, 81, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 0.25s ease, color 0.25s ease;
}

/* Hover / focus */
.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  background: rgba(255, 255, 255, 0.38);
  color: rgba(2, 35, 81, 1);
}

/* Active / current page */
.site-header .primary-nav__list a.active,
.site-header .primary-nav__list a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.45);
  font-weight: 700;
  color: rgba(2, 35, 81, 1);
}

/* Mobile: slightly more solid for contrast */
@media (max-width: 860px) {
  .site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px) saturate(130%);
  }
}
/* ================================
   Seamless Glass Nav (bar + buttons)
   ================================ */

/* 1) Make the header host a single glass layer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* no background color here; the ::before does it */
}
.site-header__inner { position: relative; z-index: 1; } /* content above the glass */

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* One unified translucent layer that everything shares */
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(18px) saturate(135%) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(135%) brightness(1.06);
  border-bottom: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Slightly firmer when scrolled for readability */
body.scrolled .site-header::before {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(20px) saturate(145%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(145%) brightness(1.05);
}

/* 2) Buttons/links: fully transparent so the same glass shows through */
.site-header .primary-nav__list a {
  background: transparent;                /* key: no separate chip background */
  border: 0;                              
  padding: 8px 14px;
  border-radius: 8px;                      /* keeps hit-area soft without a fill */
  color: rgba(2,35,81,0.96);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, text-shadow .2s ease;
}

/* Subtle hover/focus: tiny glow/underline without adding a new background block */
.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  color: rgba(2,35,81,1);
  text-shadow: 0 0 1px rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);     /* whisper of highlight, still seamless */
}

/* Current page: slightly stronger highlight, still transparent */
.site-header .primary-nav__list a.active,
.site-header .primary-nav__list a[aria-current="page"] {
  background: rgba(255,255,255,0.10);
  font-weight: 700;
}

/* Desktop underline accent (single, no duplicates) */
@media (min-width: 861px){
  .primary-nav__list a{
    background-image: linear-gradient(currentColor,currentColor);
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 100%;
  }
  .primary-nav__list a:hover { background-size: 100% 2px; }
}

/* Mobile: keep contrast a bit higher */
@media (max-width: 860px){
  .site-header::before { background: rgba(255,255,255,0.90); }
}
/* =========================================================
   ONE glass layer on the header; buttons are transparent
   ========================================================= */

/* 0) Clean slate: kill any earlier backgrounds that fight us */
.site-header,
.site-header * {
  background-image: none !important;
}
.site-header .primary-nav__list a {
  background: transparent !important;   /* buttons share the glass */
  text-decoration: none;
  border: 0;
}

/* 1) Ensure the header forms a stacking context for ::before */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  isolation: isolate;                   /* key for layering the glass */
}

/* 2) Content sits above the glass layer */
.site-header__inner { 
  position: relative; 
  z-index: 1; 
}

/* 3) The unified “glass” lives here */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  /* Glass recipe */
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(18px) saturate(135%) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(135%) brightness(1.06);

  /* subtle separation so it reads cleanly on all heroes */
  border-bottom: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* 4) Slightly firmer when scrolling for readability */
body.scrolled .site-header::before {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px) saturate(145%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(145%) brightness(1.05);
}

/* 5) Buttons stay transparent; just a hint of feedback */
.site-header .primary-nav__list a {
  color: rgba(2,35,81,0.96);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease, text-shadow .2s ease;
}
.site-header .primary-nav__list a:hover,
.site-header .primary-nav__list a:focus {
  background: rgba(255,255,255,0.06);   /* whisper highlight */
  color: rgba(2,35,81,1);
  text-shadow: 0 0 1px rgba(255,255,255,0.6);
}
.site-header .primary-nav__list a[aria-current="page"],
.site-header .primary-nav__list a.active {
  background: rgba(255,255,255,0.10);
  font-weight: 700;
}

/* 6) Desktop underline accent (single, no duplicates) */
@media (min-width: 861px){
  .primary-nav__list a{
    background-image: linear-gradient(currentColor,currentColor) !important;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 100%;
  }
  .primary-nav__list a:hover { background-size: 100% 2px; }
}

/* 7) Mobile: a touch more solid for contrast */
@media (max-width: 860px){
  .site-header::before { background: rgba(255,255,255,0.88); }
}

/* 8) Accessibility fallback */
@media (prefers-reduced-transparency: reduce){
  .site-header::before { 
    background:#fff;
    backdrop-filter:none; 
    -webkit-backdrop-filter:none; 
  }
}
