/* ============================================================
   UpgradeAirKit.com — nav.css  (PRO HEADER — "The Fresh Standard")
   The ONE canonical navigation skin. Loaded LAST so it overrides
   the legacy nav rules in design-system.css / landing.css / shop.css.
   Reuses Lulu design-system tokens (--navy/--green/--gold/etc).

   Structure (header markup is byte-identical across all 6 pages,
   only the per-page aria-current differs):
     .site-header#site-header
       > .site-header__utility > .site-header__utility-inner
           > .utility__left
           > .utility__right > .utility__phone
       > .site-header__inner
           > .brand (.brand__mark svg + .brand__text) — LOCKED logo
           > .nav-toggle[data-nav-toggle]
           > .nav#primary-nav
               > .nav__links > li > a
               > .nav__actions
                   > .nav-cart > .nav-cart__count[data-cart-count]
                   > .nav-cta
   nav.js hooks preserved: [data-nav-toggle], #primary-nav, .is-scrolled,
   .is-open, .nav-open, .nav-cart__count, [data-cart-count].
   Breakpoint: 1100px (matches DESKTOP_BP in js/nav.js).
   ============================================================ */

/* ---------------- Header shell ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  --util-h: 38px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(220, 229, 239, .85);
  transition: background .35s ease, box-shadow .35s ease,
              border-color .35s ease;
}
/* whisper-thin green air-glow hairline along the very top edge */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad-green);
  opacity: .85;
  z-index: 3;
}
/* condense + solidify + layered shadow + stronger frost once scrolled */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  backdrop-filter: saturate(190%) blur(20px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .6) inset,
    0 6px 18px rgba(12, 42, 77, .08),
    0 18px 40px rgba(12, 42, 77, .10);
  border-bottom-color: transparent;
}

/* ---------------- Utility bar (ink navy) ---------------- */
.site-header__utility {
  position: relative;
  z-index: 2;
  background: var(--grad-navy, linear-gradient(135deg,#0E3157,#0C2A4D 55%,#081C36));
  color: #C6D6EC;
  overflow: hidden;
  max-height: var(--util-h);
  opacity: 1;
  transition: max-height .4s cubic-bezier(.22,.61,.36,1),
              opacity .3s ease;
}
.site-header__utility::after { /* soft air-glow on the right */
  content: "";
  position: absolute;
  inset: -60% -5% auto auto;
  width: 320px;
  height: 200%;
  background: radial-gradient(closest-side, rgba(47,168,79,.22), transparent 72%);
  pointer-events: none;
}
.site-header.is-scrolled .site-header__utility {
  max-height: 0;
  opacity: 0;
}
.site-header__utility-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw, 1180px);
  margin-inline: auto;
  padding-inline: var(--gutter, clamp(18px, 4vw, 48px));
  height: var(--util-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__utility p {
  margin: 0;
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}
.utility__dot { color: rgba(255, 255, 255, .35); margin-inline: .5em; }
.utility__phone {
  color: #fff;
  font-weight: 700;
  transition: color .18s ease;
}
.utility__phone:hover,
.utility__phone:focus-visible { color: #6BE08C; }
.utility__phone:focus-visible {
  outline: 2px solid #6BE08C;
  outline-offset: 3px;
  border-radius: 5px;
}

/* ---------------- Main bar ---------------- */
.site-header__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw, 1180px);
  margin-inline: auto;
  padding-inline: var(--gutter, clamp(18px, 4vw, 48px));
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  min-height: 76px;
  transition: min-height .35s ease;
}
.site-header.is-scrolled .site-header__inner { min-height: 62px; }

/* ---------------- Brand lockup (logo is LOCKED — placement only) ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  line-height: 1;
  flex: 0 0 auto;
  margin-right: auto; /* push nav + actions to the right */
}
.brand__mark {
  flex: 0 0 auto; height: 40px; width: 40px; border-radius: 13px; display: block;
  filter: drop-shadow(0 5px 13px rgba(28,122,55,.34));
  transition: transform .35s cubic-bezier(.2,.9,.3,1.1);
}
.brand:hover .brand__mark { transform: translateY(-1px) rotate(-3deg) scale(1.04); }
.brand__text { display: inline-flex; flex-direction: column; gap: 4px; }
.brand__word {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  color: var(--navy); letter-spacing: -.02em; line-height: 1;
}
.brand__word b { color: var(--green); font-weight: 800; }
.brand__tld { font-style: normal; font-weight: 700; font-size: .64em; color: var(--ink-soft); margin-left: 1px; vertical-align: text-top; }
.brand__tag {
  font-family: var(--font-body); font-weight: 600; font-size: .55rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft);
  line-height: 1; margin-top: 1px;
}
.site-header.is-scrolled .brand__word { color: var(--navy); }

/* ---------------- Primary nav (desktop default) ---------------- */
.site-header .nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
  margin: 0;
}

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 1.5vw, 1.5rem);
}
.nav__links li { margin: 0; }

.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;            /* each link stays on ONE line */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .86rem;
  letter-spacing: .005em;
  color: var(--navy);
  padding: .4rem .1rem;
  transition: color .18s ease;
}
.nav__links a:hover,
.nav__links a:focus-visible { color: var(--green-dark); }

/* elegant underline that grows from the left */
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }

/* active page — green with a small left marker dot */
.nav__links a[aria-current="page"] { color: var(--green-dark); font-weight: 700; }
.nav__links a[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--grad-green);
  box-shadow: 0 2px 6px rgba(47,168,79,.5);
  flex: 0 0 auto;
}
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------------- Right cluster (cart + CTA) ---------------- */
.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: 0 0 auto;
}

/* Cart — clean outlined ghost pill */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  height: 44px;
  padding: 0 .95rem;
  border-radius: var(--radius-pill, 999px);
  color: var(--navy);
  background: rgba(255, 255, 255, .4);
  border: 1.5px solid var(--line, #DCE5EF);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  transition: background .18s ease, color .18s ease,
              border-color .18s ease, box-shadow .2s ease, transform .15s ease;
  flex: 0 0 auto;
}
.nav-cart:hover,
.nav-cart:focus-visible {
  color: var(--green-dark);
  border-color: var(--green);
  background: var(--green-light, #E8F6EC);
  box-shadow: 0 6px 18px rgba(47,168,79,.18);
  transform: translateY(-1px);
}
.nav-cart svg { width: 21px; height: 21px; display: block; }
.nav-cart__label { line-height: 1; }

.nav-cart__count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill, 999px);
  background: var(--grad-green);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .68rem;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: var(--glow-green, 0 8px 24px rgba(47,168,79,.35));
  transition: transform .2s ease, opacity .2s ease;
}
.nav-cart__count[data-cart-count="0"] { opacity: 0; transform: scale(.4); }

/* Primary green CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--grad-green);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .005em;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(47,168,79,.32);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  flex: 0 0 auto;
}
.nav-cta:hover,
.nav-cta:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(47,168,79,.42);
  filter: brightness(1.04);
}
.nav-cta:active { transform: translateY(0); }
.nav-cta__arrow { transition: transform .22s ease; }
.nav-cta:hover .nav-cta__arrow { transform: translateX(3px); }

/* ---------------- Hamburger toggle ---------------- */
.site-header .nav-toggle {
  display: none; /* hidden on desktop */
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line, #DCE5EF);
  border-radius: 12px;
  background: rgba(255, 255, 255, .6);
  color: var(--navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: border-color .18s ease, background .18s ease;
}
.site-header .nav-toggle:hover { border-color: var(--green); background: var(--green-light, #E8F6EC); }
.site-header .nav-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.site-header .nav-toggle__icon { width: 26px; height: 26px; display: block; }

/* ---------------- Focus visibility (a11y) ---------------- */
.nav__links a:focus-visible,
.nav-cart:focus-visible,
.nav-cta:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============================================================
   MOBILE (<= 1100px) — elevated slide-in drawer (navy)
   Neutralizes legacy .nav.is-open (landing.css) and
   body.nav-open .site-header .nav (shop.css).
   ============================================================ */
@media (max-width: 1100px) {
  .site-header .nav-toggle { display: inline-flex; }

  /* Utility bar stays compact on mobile; phone still tappable */
  .utility__left { display: none; }
  .site-header__utility-inner { justify-content: center; }

  /* Backdrop behind the drawer */
  .site-header::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(8, 28, 54, .5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 1;
    pointer-events: none;
  }
  .site-header.nav-open::after {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* The drawer */
  .site-header .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(88vw, 380px);
    height: 100dvh;
    height: 100vh; /* fallback */
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 1.6rem) clamp(22px, 6vw, 34px) 2.2rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: var(--grad-navy, linear-gradient(135deg,#0E3157,#0C2A4D 55%,#081C36));
    box-shadow: -28px 0 70px rgba(8, 28, 54, .45);
    transform: translateX(105%);
    transition: transform .36s cubic-bezier(.22, .61, .36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
    display: flex !important; /* override legacy display:none */
  }
  .site-header.nav-open .nav,
  .site-header .nav.is-open { transform: translateX(0); }

  /* soft green air-glow at the top of the drawer */
  .site-header .nav::after {
    content: "";
    position: absolute;
    inset: -20% -30% auto -10%;
    height: 240px;
    background: radial-gradient(closest-side, rgba(47,168,79,.3), transparent 72%);
    pointer-events: none;
    z-index: 0;
  }

  /* "Menu" eyebrow */
  .site-header .nav::before {
    content: "Menu";
    position: relative;
    z-index: 1;
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    font-size: .72rem;
    color: #6BE08C;
    margin-bottom: 1rem;
  }

  .nav__links {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-bottom: 1.5rem;
  }
  .nav__links li { width: 100%; }

  .nav__links a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px; /* 44px+ tap target */
    padding: .9rem .25rem;
    font-size: 1.14rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #EAF1FB;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .nav__links a:hover,
  .nav__links a:focus-visible { color: #6BE08C; }
  .nav__links a::after { display: none; } /* no underline anim in drawer */
  .nav__links a[aria-current="page"] { color: #6BE08C; font-weight: 800; }
  .nav__links a[aria-current="page"]::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: .7rem;
    border-radius: 50%;
    background: var(--grad-green);
    box-shadow: var(--glow-green, 0 8px 24px rgba(47,168,79,.35));
    flex: 0 0 auto;
  }

  /* Actions cluster inside the drawer — stacked, prominent */
  .nav__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column-reverse; /* CTA on top, cart below */
    align-items: stretch;
    gap: .75rem;
    width: 100%;
    margin-top: auto; /* pin to bottom of drawer */
  }

  /* CTA — full-width primary inside drawer */
  .nav-cta {
    width: 100%;
    height: auto;
    min-height: 54px;
    justify-content: center;
    padding: 1rem 1.4rem;
    font-size: 1.02rem;
    border-radius: var(--radius-pill, 999px);
    box-shadow: var(--glow-green, 0 8px 24px rgba(47,168,79,.35));
  }

  /* Cart inside the drawer — full-width ghost pill on navy */
  .nav-cart {
    width: 100%;
    height: auto;
    min-height: 54px;
    padding: 1rem 1.4rem;
    justify-content: center;
    gap: .6rem;
    border-radius: var(--radius-pill, 999px);
    background: rgba(255, 255, 255, .07);
    border: 1.5px solid rgba(255, 255, 255, .25);
    color: #EAF1FB;
    font-size: 1.02rem;
    font-weight: 700;
  }
  .nav-cart:hover,
  .nav-cart:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: #6BE08C;
    box-shadow: none;
    transform: none;
  }
  .nav-cart svg { width: 24px; height: 24px; }
  .nav-cart__label::after { content: ""; }
  .nav-cart__count {
    position: static;
    border: 0;
    box-shadow: none;
    background: var(--grad-green);
    margin-left: .15rem;
  }
  .nav-cart__count[data-cart-count="0"] { opacity: 1; transform: none; }

  /* Lock background scroll when drawer is open */
  body.nav-open { overflow: hidden; }
}

/* Smaller phones: drawer near full-width */
@media (max-width: 420px) {
  .site-header .nav { width: 100vw; }
  .site-header__utility p { font-size: .72rem; }
}

@media (max-width: 480px) {
  .brand__mark { height: 34px; width: 34px; border-radius: 11px; }
  .brand__word { font-size: 1.12rem; }
  .brand__tag { font-size: .5rem; letter-spacing: .14em; }
}

/* on dark surfaces (footer) keep the wordmark legible */
.site-footer .brand__word, .brand--light .brand__word { color: #fff; }
.site-footer .brand__tag, .brand--light .brand__tag { color: #9FB4CC; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__utility,
  .site-header .nav,
  .nav__links a::after,
  .nav-cart,
  .nav-cta,
  .nav-cta__arrow,
  .nav-cart__count,
  .brand__mark,
  .site-header::after {
    transition: none !important;
  }
}

/* ============================================================
   SHARED FOOTER (loaded on every page via nav.css = last sheet,
   so this is the single source of truth — consistent site-wide).
   Polished: navy gradient, accent hairline, hover glow, responsive.
   ============================================================ */
.site-footer { position: relative; background: linear-gradient(180deg,#0C2A4D 0%, #081d36 100%); color: #9FB4CC; padding: 0; overflow: hidden; }
.site-footer::before { content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, transparent, #2FA84F 30%, #41CC65 50%, #2FA84F 70%, transparent); opacity:.95; }
.site-footer__inner { max-width: 1200px; margin: 0 auto; padding: 3.2rem 1.25rem 1.6rem; }
.site-footer__cols { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 2.6rem; align-items: start; }
.site-footer__brand { font-family: var(--font-display, 'Montserrat', sans-serif); font-weight: 800; font-size: 1.45rem; color:#fff; letter-spacing:.005em; }
.site-footer__brand b { color:#6BE08C; }
.site-footer__brand i { color:#7E94AE; font-style: normal; font-size:.88em; }
.site-footer__blurb { margin:.95rem 0 0; max-width: 42ch; line-height: 1.7; color:#B9C7D8; font-size:.95rem; }
.site-footer__lulu { font-family: var(--font-script,'Caveat',cursive); color:#6BE08C; font-size:1.7rem; line-height:1; margin:.7rem 0 0; }
.site-footer .site-footer__col h4 { margin:0 0 1rem; font-size:.78rem; letter-spacing:.13em; text-transform:uppercase; color:#fff;
  font-family: var(--font-display,'Montserrat',sans-serif); font-weight:700; }
.site-footer .site-footer__col ul { list-style:none; margin:0; padding:0; display:grid; gap:.62rem; }
.site-footer .site-footer__col a { color:#CFE0F2; text-decoration:none; font-size:.92rem; line-height:1.4;
  transition: color .18s ease, transform .18s ease; display:inline-block; }
.site-footer .site-footer__col a:hover, .site-footer .site-footer__col a:focus-visible { color:#6BE08C; transform: translateX(3px); }
.site-footer__legal { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,.1);
  font-size:.8rem; color:#7E94AE; line-height:1.6; }
@media (max-width: 780px) {
  .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .site-footer__brandcol { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .site-footer__cols { grid-template-columns: 1fr; } }

/* ---- Top nav refinement: a 5-item menu (Shop / Filters / Free System
   Match / Air Quality Guide / Blog) + cart + CTA must fit horizontally
   down to the 1100px breakpoint, then hand off to the drawer. Tighten the
   gaps/type fluidly so nothing overflows or clips at mid widths. ---- */
.site-header .nav { gap: clamp(.7rem, 1.6vw, 1.5rem); }
.site-header .nav__links { gap: clamp(.6rem, 1.4vw, 1.35rem); margin-right: clamp(.5rem, 1.4vw, 1.25rem); }
.site-header .nav__links a { font-size: clamp(.82rem, .85vw, .92rem); font-weight: 600; letter-spacing: .003em; }
/* trim the action pills a touch so the row never overflows near 1100px */
.site-header .nav-cart { padding: 0 .8rem; font-size: .82rem; }
.site-header .nav-cta { padding: 0 1.05rem; font-size: .84rem; }

/* Extra safety valve: just above the breakpoint, condense further. */
@media (min-width: 1101px) and (max-width: 1220px) {
  .site-header .nav__links { gap: .6rem; margin-right: .6rem; }
  .site-header .nav__links a { font-size: .82rem; }
  .site-header__inner { gap: .85rem; }
  .site-header .nav-cart__label { display: none; }   /* icon-only cart to save room */
  .site-header .nav-cart { padding: 0 .7rem; }
}
