/* ============================================================
   WombatNET unified header  ·  2026-08
   One header for main site, Help Centre and articles.
   Tokens mirror the Elementor kit: #020101 / #7ED994 / Syne.
   Namespaced .wn-* — no Bootstrap, no parent-theme deps.
   ============================================================ */
:root {
  --wn-h: 60px;
  --wn-bg: rgba(2, 1, 1, 0);
  --wn-glass: rgba(2, 1, 1, 0.82);
  --wn-line: rgba(255, 255, 255, 0.14);
  --wn-line-soft: rgba(255, 255, 255, 0.08);
  --wn-text: #ffffff;
  --wn-muted: #c7c8c8;
  --wn-green: #7ED994;
  --wn-amber: #F5A623;
  --wn-red: #FF5E70;
  --wn-panel: #0e0e0e;
  --wn-font: 'Syne', sans-serif;
}
@media (min-width: 1200px) { :root { --wn-h: 72px; } }

/* No text underlines anywhere in the header/drawer — hover is a colour
   change only (also neutralises Bootstrap's global a:hover underline). */
.wn-header a, .wn-header a:hover, .wn-header a:focus,
.wn-drawer a, .wn-drawer a:hover, .wn-drawer a:focus {
  text-decoration: none !important;
}

/* ---- Bar ---------------------------------------------------- */
.wn-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--wn-h);
  z-index: 10000;
  background: var(--wn-bg);
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
  font-family: var(--wn-font);
}
.wn-header.is-scrolled {
  background: var(--wn-glass);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--wn-line-soft);
}
body.admin-bar .wn-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wn-header { top: 46px; } }

/* Mobile: the bar is solid (not a transparent overlay) and page content is
   pushed below it — the old in-flow bar did the same, and Elementor page
   tops (e.g. About Us portrait) were designed for that offset.
   KB + article templates manage their own offsets (their rules are
   !important and equal/greater, so they win where they apply). */
@media (max-width: 1199px) {
  .wn-header,
  .wn-header.is-scrolled {
    background: rgba(2, 1, 1, 0.94);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--wn-line-soft);
  }
  body { padding-top: var(--wn-h); }
  body.page-template-page-knowledge-base { padding-top: 0; }
  /* Order-funnel pages use the Elementor "Landing Page Header" (template
     29520, in normal flow) instead of this fixed bar — no offset needed. */
  body.page-template-template-shadow-box { padding-top: 0; }
}

.wn-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ---- Logo ---------------------------------------------------- */
.wn-logo { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.wn-logo img { height: 30px; width: auto; display: block; }
@media (min-width: 1200px) { .wn-logo img { height: 34px; } }

/* ---- Desktop nav --------------------------------------------- */
.wn-nav { display: none; }
@media (min-width: 1200px) {
  .wn-nav { display: block; margin-left: auto; }
  .wn-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
  .wn-nav > ul > li { position: relative; }
  .wn-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    font: 600 15px/1 var(--wn-font);
    color: var(--wn-text);
    text-decoration: none;
    background: none; border: 0; cursor: pointer;
    position: relative;
    transition: color .25s ease;
  }
  .wn-link:hover, .wn-link:focus-visible, .wn-link[aria-expanded="true"], .wn-link.is-current { color: var(--wn-green); }
  .wn-link .wn-caret { transition: transform .25s ease; }
  .wn-link[aria-expanded="true"] .wn-caret { transform: rotate(180deg); }
  .wn-ext { opacity: .55; }
}

/* ---- Mega panel ---------------------------------------------- */
.wn-mega {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 660px; max-width: calc(100vw - 40px);
  background: var(--wn-panel);
  border: 1px solid var(--wn-line-soft);
  border-radius: 22px;
  padding: 18px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
}
.wn-mega.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}
.wn-mega-col { display: flex; flex-direction: column; gap: 4px; }
.wn-mega-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 14px;
  text-decoration: none;
  transition: background .2s ease;
}
.wn-mega-item:hover, .wn-mega-item:focus-visible { background: rgba(255,255,255,.05); }
.wn-mega-item svg { flex-shrink: 0; width: 22px; height: 22px; stroke: var(--wn-green); margin-top: 2px; }
.wn-mega-item b { display: block; font: 600 14.5px/1.3 var(--wn-font); color: var(--wn-text); }
.wn-mega-item:hover b { color: var(--wn-green); }
.wn-mega-item span { display: block; font: 400 12.5px/1.45 var(--wn-font); color: var(--wn-muted); margin-top: 3px; }

.wn-mega-rail { border-left: 1px solid var(--wn-line-soft); padding-left: 16px; display: flex; flex-direction: column; }
.wn-mega-rail h5 {
  margin: 6px 0 8px; font: 700 10.5px/1 var(--wn-font);
  letter-spacing: .14em; text-transform: uppercase; color: var(--wn-muted);
}
.wn-rail-item { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; transition: background .2s ease; }
.wn-rail-item:hover { background: rgba(255,255,255,.05); }
.wn-rail-item b { display: block; font: 600 13px/1.35 var(--wn-font); color: var(--wn-text); }
.wn-rail-item:hover b { color: var(--wn-green); }
.wn-rail-item span { font: 400 11px/1 var(--wn-font); color: var(--wn-muted); }
.wn-rail-all { margin-top: auto; padding: 10px; font: 600 12.5px/1 var(--wn-font); color: var(--wn-green); text-decoration: none; }
.wn-rail-all:hover { text-decoration: underline; }

.wn-mega-actions {
  grid-column: 1 / -1;
  display: flex; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--wn-line-soft);
  padding-top: 12px; margin-top: 2px;
}
.wn-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--wn-line);
  font: 600 12.5px/1 var(--wn-font);
  color: var(--wn-muted); text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.wn-chip:hover { color: var(--wn-green); border-color: var(--wn-green); }

/* ---- Right cluster ------------------------------------------- */
.wn-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
@media (min-width: 1200px) { .wn-actions { margin-left: 0; } }

.wn-status {
  display: none; align-items: center; justify-content: center; gap: 7px;
  min-width: 152px; box-sizing: border-box;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--wn-line);
  font: 700 11.5px/1 var(--wn-font);
  color: var(--wn-muted); text-decoration: none;
  transition: border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
@media (min-width: 700px) { .wn-status { display: inline-flex; } }
.wn-status:hover { border-color: var(--wn-green); color: var(--wn-text); }
.wn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6b7280; flex-shrink: 0;
  transition: background .3s ease, box-shadow .3s ease;
}
.wn-dot[data-state="ok"]   { background: var(--wn-green); box-shadow: 0 0 6px rgba(126,217,148,.6); }
.wn-dot[data-state="warn"] { background: var(--wn-amber); box-shadow: 0 0 6px rgba(245,166,35,.6); }
.wn-dot[data-state="down"] { background: var(--wn-red);   box-shadow: 0 0 6px rgba(255,94,112,.6); }
@media (prefers-reduced-motion: no-preference) {
  .wn-dot[data-state="ok"] { animation: wn-pulse 2.6s ease-in-out infinite; }
}
@keyframes wn-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.wn-cta {
  display: none; align-items: center;
  padding: 10px 22px; border-radius: 999px;
  border: 2px solid var(--wn-green);
  font: 700 14px/1 var(--wn-font);
  color: var(--wn-text); background: transparent;
  text-decoration: none; white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}
@media (min-width: 1200px) { .wn-cta { display: inline-flex; } }
.wn-cta:hover, .wn-cta:focus-visible { background: var(--wn-green); color: #020101; }

/* ---- Burger --------------------------------------------------- */
.wn-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 10px;
  background: none; border: 0; cursor: pointer;
  border-radius: 10px;
}
.wn-burger:focus, .wn-burger:focus-visible { outline: none; }
@media (min-width: 1200px) { .wn-burger { display: none; } }
.wn-burger span {
  display: block; height: 2px; width: 100%;
  background: var(--wn-text); border-radius: 2px;
  transition: transform .28s ease, opacity .2s ease;
}
.wn-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.wn-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wn-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Article scroll progress ---------------------------------- */
.wn-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: transparent; overflow: hidden; pointer-events: none;
}
.wn-progress i {
  display: block; height: 100%; background: var(--wn-green);
  transform: scaleX(0); transform-origin: left; will-change: transform;
}

/* ---- Mobile drawer (native <dialog>) --------------------------- */
.wn-drawer {
  position: fixed; inset: 0;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(2, 1, 1, 0.97);
  color: var(--wn-text);
  font-family: var(--wn-font);
  display: none;
  z-index: 100000;
}
.wn-drawer[open] { display: flex; flex-direction: column; }
.wn-drawer::backdrop { background: transparent; }
.wn-drawer:focus { outline: none; }
.wn-drawer .wn-logo:focus:not(:focus-visible) { outline: none; }

.wn-d-top {
  flex-shrink: 0;
  height: var(--wn-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--wn-line-soft);
}
body.admin-bar .wn-drawer .wn-d-top { margin-top: 32px; }
@media (max-width: 782px) { body.admin-bar .wn-drawer .wn-d-top { margin-top: 46px; } }
.wn-d-top .wn-logo img { height: 30px; }
.wn-d-close {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--wn-text); font-size: 26px; line-height: 1; border-radius: 10px;
}
.wn-d-close:focus, .wn-d-close:focus-visible { outline: none; }

.wn-d-scroll { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.wn-d-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wn-d-item { border-bottom: 1px solid var(--wn-line-soft); }
.wn-d-link, .wn-d-acc {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 17px 4px;
  font: 600 21px/1.2 var(--wn-font);
  color: var(--wn-text); text-decoration: none;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.wn-d-link:active, .wn-d-acc:active { color: var(--wn-green); }
.wn-d-link.is-current { color: var(--wn-green); }
.wn-d-acc .wn-caret { transition: transform .25s ease; flex-shrink: 0; }
.wn-d-acc[aria-expanded="true"] { color: var(--wn-green); }
.wn-d-acc[aria-expanded="true"] .wn-caret { transform: rotate(180deg); }

.wn-d-sub {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.wn-d-sub > div { overflow: hidden; }
.wn-d-acc[aria-expanded="true"] + .wn-d-sub { grid-template-rows: 1fr; }
.wn-d-sub a {
  display: block; padding: 11px 4px 11px 18px;
  font: 500 16.5px/1.35 var(--wn-font);
  color: var(--wn-muted); text-decoration: none;
  border-left: 2px solid var(--wn-line-soft);
  margin-left: 4px;
}
.wn-d-sub a:active { color: var(--wn-green); border-left-color: var(--wn-green); }
.wn-d-sub a small { display: block; font-size: 12px; color: var(--wn-muted); margin-top: 2px; }
.wn-d-sub > div { padding-bottom: 6px; }

/* staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .wn-drawer[open] .wn-d-item {
    animation: wn-rise .32s cubic-bezier(.2,.7,.3,1) both;
  }
  .wn-drawer[open] .wn-d-item:nth-child(1) { animation-delay: .03s; }
  .wn-drawer[open] .wn-d-item:nth-child(2) { animation-delay: .07s; }
  .wn-drawer[open] .wn-d-item:nth-child(3) { animation-delay: .11s; }
  .wn-drawer[open] .wn-d-item:nth-child(4) { animation-delay: .15s; }
  .wn-drawer[open] .wn-d-item:nth-child(5) { animation-delay: .19s; }
  .wn-drawer[open] .wn-d-item:nth-child(6) { animation-delay: .23s; }
  .wn-drawer[open] .wn-d-foot { animation: wn-rise .32s .27s cubic-bezier(.2,.7,.3,1) both; }
}
@keyframes wn-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* closing: fade the whole sheet out; suppress item animations so they
   don't replay during the exit */
@media (prefers-reduced-motion: no-preference) {
  .wn-drawer.is-closing { animation: wn-fade-out .24s ease both; }
  .wn-drawer.is-closing .wn-d-item, .wn-drawer.is-closing .wn-d-foot { animation: none; }
}
@keyframes wn-fade-out {
  to { opacity: 0; transform: translateY(10px); }
}

.wn-d-foot {
  flex-shrink: 0;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--wn-line-soft);
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(255,255,255,.02);
}
.wn-d-cta {
  display: flex; align-items: center; justify-content: center;
  padding: 15px; border-radius: 999px;
  border: 2px solid var(--wn-green);
  font: 700 16px/1 var(--wn-font);
  color: var(--wn-text); text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.wn-d-cta:active { background: var(--wn-green); color: #020101; }
.wn-d-row { display: flex; gap: 10px; }
.wn-d-row > a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--wn-line);
  font: 600 13.5px/1 var(--wn-font);
  color: var(--wn-muted); text-decoration: none;
}
.wn-d-row > a:active { color: var(--wn-green); border-color: var(--wn-green); }

html.wn-lock, html.wn-lock body { overflow: hidden !important; }

/* ---- Legacy palette corrections (site-wide) -------------------- */
/* Demo-pink breadcrumb pills -> brand green w/ dark text (WCAG) */
#main-header .breadcrumbs a {
  background: var(--wn-green) !important;
  color: #032312 !important;
}
#main-header .breadcrumbs a:hover { background: #fff !important; color: #032312 !important; }
/* Muted blog-band site description: lift contrast on #333 */
.h-site-description { color: #aab4bd !important; }

/* Reduced motion: flatten every remaining header/drawer transition */
@media (prefers-reduced-motion: reduce) {
  .wn-header, .wn-header *, .wn-drawer, .wn-drawer * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ---- Syne via woff2 + swap (overrides the Elementor TTF set) ----
   Last-declared @font-face per family/weight wins; this file prints after
   post-11.css. Keep the preloads in header.php in sync with these URLs. */
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/uploads/2025/03/Syne-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url('/wp-content/uploads/2025/03/Syne-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600; font-display: swap; src: url('/wp-content/uploads/2025/03/Syne-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 700; font-display: swap; src: url('/wp-content/uploads/2025/03/Syne-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 800; font-display: swap; src: url('/wp-content/uploads/2025/03/Syne-ExtraBold.woff2') format('woff2'); }
