/* ============================================================
   Header — dark editorial
   ============================================================ */
.wwd-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--wwd-header-height); display: flex; align-items: center;
  transition: transform .4s var(--wwd-ease), background .3s var(--wwd-ease), backdrop-filter .3s var(--wwd-ease), border-color .3s var(--wwd-ease);
  border-bottom: 1px solid transparent;
}
.wwd-header.is-scrolled {
  background: rgba(14,20,17,.78); backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom-color: var(--wwd-line);
}
.wwd-header.is-hidden { transform: translateY(-100%); }
.wwd-main { padding-top: var(--wwd-header-height); }
body.home .wwd-main { padding-top: 0; }

.wwd-header__inner { display: flex; align-items: center; gap: 1.5rem; width: 100%; }

/* Logo — full lockup rendered as a solid white mask on the dark theme */
.wwd-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.wwd-logo__full {
  display: block; height: 56px; aspect-ratio: 1296 / 767; width: auto;
  background-color: #fff;
  -webkit-mask: url('wweb-logo.png') no-repeat center / contain;
          mask: url('wweb-logo.png') no-repeat center / contain;
}
.wwd-logo__img { height: 40px; width: 40px; object-fit: contain; filter: brightness(0) invert(1); transition: filter .3s var(--wwd-ease); }
.wwd-logo__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-family: var(--wwd-font-head); font-weight: 700; font-size: 1.4rem; color: #fff; background: var(--wwd-grad); }
.wwd-logo__text { display: flex; flex-direction: column; line-height: 1; font-family: var(--wwd-font-head); font-weight: 600; font-size: 1.15rem; color: #fff; letter-spacing: -.02em; }
.wwd-logo__text span { font-weight: 400; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wwd-muted); margin-top: 4px; }

/* Nav */
.wwd-nav { margin-left: auto; }
.wwd-nav__list { display: flex; align-items: center; gap: .2rem; list-style: none; }
.wwd-nav__list a {
  position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem;
  font-family: var(--wwd-font-head); font-weight: 500; font-size: .96rem; color: var(--wwd-text); border-radius: 999px;
  transition: color .25s var(--wwd-ease), background .25s var(--wwd-ease);
}
.wwd-nav__list a:hover { color: #fff; background: rgba(255,255,255,.06); }
.wwd-nav__list .current-menu-item > a, .wwd-nav__list .current_page_item > a { color: var(--wwd-green-bright); }

/* Submenu */
.wwd-nav__list .menu-item-has-children { position: relative; }
.wwd-nav__list .sub-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px; padding: .5rem; list-style: none;
  background: var(--wwd-bg-3); border: 1px solid var(--wwd-line); border-radius: 16px; box-shadow: var(--wwd-shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .25s var(--wwd-ease); z-index: 10;
}
.wwd-nav__list .menu-item-has-children:hover > .sub-menu, .wwd-nav__list .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.wwd-nav__list .sub-menu a { display: block; padding: .6rem .85rem; font-size: .9rem; border-radius: 10px; }
.wwd-nav__list .sub-menu a:hover { background: rgba(255,255,255,.06); }

.wwd-header__actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.wwd-header__cta { padding: .45rem .5rem .45rem 1.2rem; font-size: .92rem; }
.wwd-header__cta svg { padding: 7px; width: 14px; height: 14px; }

/* Burger */
.wwd-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 46px; padding: 0 11px; background: rgba(255,255,255,.06); border: 1px solid var(--wwd-line); border-radius: 999px; cursor: pointer; }
.wwd-burger span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform .3s var(--wwd-ease), opacity .2s var(--wwd-ease); }
.wwd-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wwd-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wwd-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.wwd-drawer { position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--wwd-ease); }
.wwd-drawer[hidden] { display: none; }
.wwd-drawer.is-open { opacity: 1; }
.wwd-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw);
  background: var(--wwd-bg-2); border-left: 1px solid var(--wwd-line);
  padding: calc(var(--wwd-header-height) + 1rem) 1.6rem 2rem; overflow-y: auto;
  transform: translateX(100%); transition: transform .4s var(--wwd-ease); display: flex; flex-direction: column; gap: .25rem;
}
.wwd-drawer.is-open .wwd-drawer__panel { transform: translateX(0); }
.wwd-drawer__list { list-style: none; display: flex; flex-direction: column; }
.wwd-drawer__list a { display: block; padding: 1rem .25rem; font-family: var(--wwd-font-head); font-weight: 500; font-size: 1.4rem; color: #fff; border-bottom: 1px solid var(--wwd-line); }
.wwd-drawer__list .sub-menu { list-style: none; padding-left: 1rem; }
.wwd-drawer__list .sub-menu a { font-size: 1rem; color: var(--wwd-body); }
.wwd-drawer__list .sub-menu[hidden] { display: none; }

/* Parent row: link keeps its width, toggle sits at the end, and the rule that
   was on the link moves up here so it still spans the full row. */
.wwd-drawer__row { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--wwd-line); }
.wwd-drawer__row > a { flex: 1 1 auto; min-width: 0; border-bottom: 0; }

/* 44x44 — comfortably over the 24x24 floor in WCAG 2.5.8, and the negative
   margin keeps the chevron optically aligned with the link text. */
.wwd-drawer__toggle {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 44px; height: 44px; margin-right: -.6rem; padding: 0;
  background: none; border: 0; border-radius: 999px;
  color: #fff; cursor: pointer;
}
.wwd-drawer__toggle svg { width: 20px; height: 20px; transition: transform .25s var(--wwd-ease); }
.wwd-drawer__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.wwd-drawer__toggle:hover { background: rgba(255,255,255,.08); }

@media (prefers-reduced-motion: reduce) {
  .wwd-drawer__toggle svg { transition: none; }
}
.wwd-drawer__cta { margin-top: 1.6rem; align-self: flex-start; }

body.wwd-no-scroll { overflow: hidden; }

@media (max-width: 1000px) {
  .wwd-nav, .wwd-header__cta { display: none; }
  .wwd-burger { display: flex; }
  /* .wwd-nav carried the margin-left:auto that pushed the right cluster over;
     it's now hidden, so the actions cluster must claim that space itself. */
  .wwd-header__actions { margin-left: auto; }
}

/* Tighten the bar + logo on phones so the fixed header isn't oversized. */
@media (max-width: 600px) {
  :root { --wwd-header-height: 70px; }
  .wwd-header__inner { gap: 1rem; }
  .wwd-logo__full { height: 40px; }
}
