/* ===== NodApproved site header ======================================
   A port of the MicroArts header (css/siteHeader.css), same structure and
   same behaviours, dressed in NodApproved's logo, links and typeface.

   Colours invert: default = white elements for dark backgrounds,
   .over-light = black for light regions, toggled by the sampler in nav.js.
   The bar itself is progressive frosted glass with NO tint of its own, so
   it never has to invert — it just blurs whatever is behind it and keeps
   that background's brightness.
   ==================================================================== */
.nod-nav {
  --nav-fg: #f2f2f0;                 /* element colour on dark bg */
  --nav-bg: #101011;                 /* pill text / inverse of fg */
  --nav-h: 78px;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  pointer-events: none;              /* transparent areas don't block content */
  font-family: Inter, "Helvetica Neue", Helvetica, sans-serif;
}
.nod-nav.over-light {
  --nav-fg: #0c0c0e;
  --nav-bg: #f2f2f0;
}

/* Progressive glass: sharp along the bar's bottom edge, blurring away
   towards the top, so there is no hard line where the effect stops. */
.nod-nav::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: transparent;
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.42) 42%, #000 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.42) 42%, #000 100%);
}

.nod-nav-inner {
  pointer-events: auto;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 5rem);
}

/* ---- logo, hard left ---- */
.nod-logo {
  display: inline-flex; align-items: center; gap: 0.7rem;
  height: var(--nav-h);
  color: var(--nav-fg);
  text-decoration: none;
  transition: color .4s ease;
}
/* The mark is a white PNG, so inverting it is how it goes black over a
   light region — there is no dark variant of the file to swap in. */
.nod-logo-img {
  width: 38px; height: 38px; flex: 0 0 auto;
  object-fit: contain;
  transition: filter .4s ease;
}
.nod-nav.over-light .nod-logo-img { filter: invert(1); }
.nod-brand {
  font-size: 15px; font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---- links ---- */
.nod-links {
  display: flex; align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
  height: var(--nav-h);
}
.nod-link {
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--nav-fg);
  opacity: .72;
  text-decoration: none;
  transition: color .4s ease, opacity .25s ease;
}
.nod-link:hover { opacity: 1; }
.nod-link[aria-current="page"] { opacity: 1; }

/* ---- cta pill (inverts with the theme) ---- */
.nod-morph { position: relative; display: flex; align-items: center; }
.nod-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 22px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--nav-bg);
  background: var(--nav-fg);
  text-decoration: none;
  transition: transform .25s ease, background .4s ease, color .4s ease, box-shadow .25s ease;
}
.nod-cta:hover {
  transform: translateY(-1px);
  background: #ffbf00; color: #14100a;
  box-shadow: 0 12px 30px -18px rgba(255, 191, 0, .9);
}

/* ---- burger ---- */
.nod-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 42px; height: 42px;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.07);
  cursor: pointer;
  transition: opacity .32s ease, transform .32s ease, background .4s ease;
}
.nod-nav.over-light .nod-burger { background: rgba(12,12,14,.06); }
.nod-burger span {
  display: block; width: 20px; height: 2px;
  background: var(--nav-fg);
  transition: transform .25s ease, opacity .25s ease, background .4s ease;
}

/* ---- fullscreen mobile menu ---- */
.nod-mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 1100;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 2rem;
  background: rgba(10,10,11,.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  font-family: Inter, "Helvetica Neue", Helvetica, sans-serif;
}
.nod-mobile-nav.active { display: flex; }
.nod-mobile-nav a {
  color: #f2f2f0; text-decoration: none;
  font-weight: 300;
  font-size: clamp(2rem, 11vw, 3.2rem); line-height: 1;
  letter-spacing: -.01em;
}
.nod-mobile-nav .nod-cta {
  font-size: 12px; font-weight: 600;
  color: #101011; background: #f2f2f0;
  padding: 14px 26px; margin-top: 1rem;
}

/* ---- mobile morph: burger <-> pill on scroll direction ---- */
@media (max-width: 820px) {
  .nod-link { display: none; }
  .nod-burger { display: inline-flex; }
  .nod-brand { display: none; }          /* the mark carries it on a phone */
  .nod-morph .nod-cta {
    position: absolute; right: 0; top: 50%;
    transform: translateY(-50%) translateX(10px) scale(.9);
    opacity: 0; pointer-events: none; white-space: nowrap;
    min-height: 36px; padding: 0 16px;
    font-size: 10.5px; letter-spacing: .14em;
  }
  .nod-nav.is-cta .nod-burger { opacity: 0; transform: scale(.8); pointer-events: none; }
  .nod-nav.is-cta .nod-morph .nod-cta {
    opacity: 1; transform: translateY(-50%) translateX(0) scale(1); pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nod-logo-img, .nod-cta, .nod-burger, .nod-burger span, .nod-nav::after {
    transition: none !important;
  }
}
