/* ==========================================================================
   nexus-store — CE header, dark glass pill (option B) — nx-header.rN.css
   2026-10-14, front-end round (docs/plans/2026-10-14-frontend-round/header-design.md, client go: option B).
   ".rN" = Cloudflare cache-buster: bump N (file name + config/theme.yml) on every change.

   Most of option B lives in the designer's CE header doc 8 (elementor-8170201) as ordinary CE settings, so it shows
   and stays editable in the CE editor: pill colour/border/shadow + blur snippet (column Custom CSS), reversed logo
   file, menu/dropdown/burger colours, search bar, account dropdown, side cart, Checkout button (#8EB364 + ink).
   This file only holds what CE 2.12 has no control for, plus the smoke wisps (§5, r2; JS half nx-header.rN.js). Keyed to fixed CE element ids: if the designer rebuilds one
   of these widgets, the matching rule silently stops applying — update the id here.
     5a4512c8   pill column              aebc54d    nav menu (burger + dropdowns)
     491e1ae9   search (topbar skin)     46268bd9   sign-in (account icon)
     7b562f19   shopping cart (toggle + side cart)
   Colours: the --nx-* tokens here (custom.css §01); the CE settings use the same values as literals (CE has no
   access to our tokens): ink #F2F2F2, soft #A3A9A3, green #8EB364, panel #121812, hover row #1F291F.
   ========================================================================== */

/* 1. Dropdowns: CE rounds the panel (12px); nested panels a little less, the phone burger panel only at the bottom
      (it hangs off the bar, full width). */
.elementor-8170201 .elementor-element-aebc54d .elementor-nav--main .elementor-nav--dropdown .elementor-nav--dropdown {
  border-radius: 10px;
}
.elementor-8170201 .elementor-element-aebc54d nav.elementor-nav__container.elementor-nav--dropdown {
  border-radius: 0 0 14px 14px;
  border-top-width: 0;
}
.elementor-8170201 .elementor-element-aebc54d nav.elementor-nav__container.elementor-nav--dropdown li:first-child > a {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* 2. Search top bar (topbar skin): CE paints the bar's side borders and the results list with its own light
      defaults; no control reaches them. */
.elementor-8170201 .elementor-element-491e1ae9.elementor-search--skin-topbar .elementor-search__container {
  border-color: var(--nx-surface-solid);
}
.elementor-8170201 .elementor-element-491e1ae9 .elementor-search__products {
  background-color: var(--nx-surface-solid);
}
.elementor-8170201 .elementor-element-491e1ae9 .elementor-search__input::placeholder {
  color: var(--nx-text-soft);
  opacity: 1;
}

/* 3. Side cart: the count sits inside the (now light) bag icon; buttons share one typography control, so the
      Checkout weight is set here. */
.elementor-8170201 .elementor-element-7b562f19 .elementor-cart__toggle .elementor-button-icon[data-counter]:before {
  font-weight: 700;
}
.elementor-8170201 .elementor-element-7b562f19 a.elementor-button--checkout:not(#e) {
  font-weight: 600;
}

/* 4. Phone bar tap targets: the four header controls get a 44px hit area (WCAG 2.5.5 / platform guidance); the
      icons keep their size. With the column's 2px mobile padding (CE) the bar is ~48px. */
@media (max-width: 767px) {
  .elementor-8170201 .elementor-element-491e1ae9 .elementor-search__toggle,
  .elementor-8170201 .elementor-element-46268bd9 .elementor-nav--main a.elementor-item,
  .elementor-8170201 .elementor-element-7b562f19 .elementor-cart__toggle .elementor-button,
  .elementor-8170201 .elementor-element-aebc54d .elementor-menu-toggle {
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* 5. Smoke off the pill ends (client add-on 2026-10-14). Four soft wisps (two per end) on pseudo-elements that CE
      does not use: column ::before/::after (A, tucked under the pill, slow) and column-wrap ::after / widget-wrap
      ::after (B, start at the pill edge). The wisp art is a static SVG (feTurbulence + feDisplacementMap + blur),
      rasterised once; the keyframes animate transform and opacity only (compositor, no layout/paint per frame).
      Rules: z-index -1 so they sit under the pill and every control, pointer-events none, never over nav text
      (they live in the side gutters beside the pill, desktop y 0-110 = inside the ad's top keep-clear band), opacity
      0.2-0.32. Phone/tablet: two small wisps curling up into the bar's bottom corners, inside the viewport. Scrolled (html.nx-hd-scrolled, set
      by nx-header.rN.js past 60px): smoke fades out and stops; it comes back at the top of the page. Reduced
      motion: one faint static wisp per end. */
.elementor-8170201 {
  --nx-hd-wisp-1: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cfilter id='s' x='-30%25' y='-60%25' width='160%25' height='220%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.03' numOctaves='3' seed='7'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='70' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='2.2'/%3E%3C/filter%3E%3Cg filter='url(%23s)'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23E9EEE6' stop-opacity='0.9'/%3E%3Cstop offset='.55' stop-color='%23E9EEE6' stop-opacity='0.41'/%3E%3Cstop offset='1' stop-color='%23E9EEE6' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23F2F2F2' stop-opacity='0.7'/%3E%3Cstop offset='.55' stop-color='%23F2F2F2' stop-opacity='0.32'/%3E%3Cstop offset='1' stop-color='%23F2F2F2' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%23B9D49A' stop-opacity='0.5'/%3E%3Cstop offset='.55' stop-color='%23B9D49A' stop-opacity='0.23'/%3E%3Cstop offset='1' stop-color='%23B9D49A' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='125' cy='58' rx='70' ry='22' fill='url(%23g0)'/%3E%3Cellipse cx='70' cy='44' rx='55' ry='18' fill='url(%23g1)'/%3E%3Cellipse cx='150' cy='46' rx='26' ry='12' fill='url(%23g2)'/%3E%3C/g%3E%3C/svg%3E");
  --nx-hd-wisp-2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cfilter id='s' x='-30%25' y='-60%25' width='160%25' height='220%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.014 0.035' numOctaves='3' seed='23'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='78' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='2.2'/%3E%3C/filter%3E%3Cg filter='url(%23s)'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23F2F2F2' stop-opacity='0.85'/%3E%3Cstop offset='.55' stop-color='%23F2F2F2' stop-opacity='0.38'/%3E%3Cstop offset='1' stop-color='%23F2F2F2' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23B9D49A' stop-opacity='0.45'/%3E%3Cstop offset='.55' stop-color='%23B9D49A' stop-opacity='0.20'/%3E%3Cstop offset='1' stop-color='%23B9D49A' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%23E9EEE6' stop-opacity='0.65'/%3E%3Cstop offset='.55' stop-color='%23E9EEE6' stop-opacity='0.29'/%3E%3Cstop offset='1' stop-color='%23E9EEE6' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='115' cy='54' rx='72' ry='20' fill='url(%23g0)'/%3E%3Cellipse cx='60' cy='60' rx='40' ry='14' fill='url(%23g1)'/%3E%3Cellipse cx='145' cy='38' rx='40' ry='14' fill='url(%23g2)'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-8170201 .elementor-element-5a4512c8::before,
.elementor-8170201 .elementor-element-5a4512c8::after,
.elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap::after,
.elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  background: var(--nx-hd-wisp-1) center / 100% 100% no-repeat;
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: opacity .6s ease;
  animation: 9s ease-in-out infinite nxhd-smoke-l;
}
/* A, left: tucked 40px under the pill's left end */
.elementor-8170201 .elementor-element-5a4512c8::before {
  --o: .32;
  width: 170px; height: 85px; top: 8px; left: calc(15px - 130px);
  transform-origin: 100% 60%;
}
/* A, right (mirrored art, different speed and phase) */
.elementor-8170201 .elementor-element-5a4512c8::after {
  --o: .28;
  width: 170px; height: 85px; top: 4px; right: calc(15px - 130px);
  background-image: var(--nx-hd-wisp-2);
  transform-origin: 0 60%;
  animation: 11.5s ease-in-out -4.2s infinite nxhd-smoke-r;
}
/* B, left: starts at the pill edge, a little higher */
.elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap::after {
  --o: .2;
  width: 120px; height: 62px; top: -12px; right: 100%;
  background-image: var(--nx-hd-wisp-2);
  transform-origin: 100% 70%;
  animation: 7.4s ease-in-out -2.6s infinite nxhd-smoke-bl;
}
/* B, right: the widget wrap sits 11px inside the pill (padding + border) */
.elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after {
  --o: .2;
  width: 120px; height: 62px; top: -24px; left: calc(100% + 11px);
  transform-origin: 0 70%;
  animation: 8.3s ease-in-out -6.1s infinite nxhd-smoke-br;
}
@keyframes nxhd-smoke-l {
  0%   { opacity: 0; transform: translate3d(28px, 12px, 0) scale(.72); }
  28%  { opacity: var(--o); }
  62%  { opacity: calc(var(--o) * .7); }
  100% { opacity: 0; transform: translate3d(-46px, -26px, 0) scale(1.28) rotate(-7deg); }
}
@keyframes nxhd-smoke-r {
  0%   { opacity: 0; transform: translate3d(-28px, 12px, 0) scaleX(-1) scale(.72); }
  28%  { opacity: var(--o); }
  62%  { opacity: calc(var(--o) * .7); }
  100% { opacity: 0; transform: translate3d(46px, -26px, 0) scaleX(-1) scale(1.28) rotate(-7deg); }
}
/* B wisps paint inside the pill's own stacking context (above its tint), so they start AT the edge and only move
   outward: they never cross into the pill or over a nav item. */
@keyframes nxhd-smoke-bl {
  0%   { opacity: 0; transform: translate3d(0, 10px, 0) scale(.7); }
  30%  { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(-52px, -22px, 0) scale(1.3) rotate(-8deg); }
}
@keyframes nxhd-smoke-br {
  0%   { opacity: 0; transform: translate3d(0, 10px, 0) scaleX(-1) scale(.7); }
  30%  { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(52px, -22px, 0) scaleX(-1) scale(1.3) rotate(-8deg); }
}
/* Phone + tablet (<=1024px): the pill is at (or within 15px of) the screen edge, so wisps stay INSIDE the viewport
   (on touch devices a fixed element poking past the edge widens the layout viewport = sideways scroll). They curl
   up into the bar's bottom corners from just below it and vanish behind it; they grow inward, never outward. */
@media (max-width: 1024px) {
  .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap::after,
  .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after { content: none; }
  .elementor-8170201 .elementor-element-5a4512c8::before,
  .elementor-8170201 .elementor-element-5a4512c8::after {
    --o: .22;
    width: 84px; height: 42px; top: 58px;
    animation-name: nxhd-smoke-pl;
  }
  .elementor-8170201 .elementor-element-5a4512c8::before { left: 16px; transform-origin: 0 50%; }
  .elementor-8170201 .elementor-element-5a4512c8::after { right: 16px; transform-origin: 100% 50%; animation-name: nxhd-smoke-pr; }
}
@media (max-width: 767px) {
  .elementor-8170201 .elementor-element-5a4512c8::before,
  .elementor-8170201 .elementor-element-5a4512c8::after { top: 28px; }
  .elementor-8170201 .elementor-element-5a4512c8::before { left: 2px; }
  .elementor-8170201 .elementor-element-5a4512c8::after { right: 2px; }
}
@keyframes nxhd-smoke-pl {
  0%   { opacity: 0; transform: translate3d(0, 16px, 0) scale(.7); }
  35%  { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(0, -14px, 0) scale(1.12); }
}
@keyframes nxhd-smoke-pr {
  0%   { opacity: 0; transform: translate3d(0, 16px, 0) scaleX(-1) scale(.7); }
  35%  { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(0, -14px, 0) scaleX(-1) scale(1.12); }
}
/* CE's sticky keeps an invisible in-flow clone of the header (.elementor-sticky__spacer). Its copies of the wisps
   are static and transformed, so they would widen the page (sideways scroll) and animate unseen: drop them. */
.elementor-8170201 .elementor-sticky__spacer .elementor-element-5a4512c8::before,
.elementor-8170201 .elementor-sticky__spacer .elementor-element-5a4512c8::after,
.elementor-8170201 .elementor-sticky__spacer .elementor-element-5a4512c8 > .elementor-column-wrap::after,
.elementor-8170201 .elementor-sticky__spacer .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after {
  content: none;
  animation: none;
}
/* scrolled: fade out and stop (no animation = no compositing work while reading) */
html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8::before,
html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8::after,
html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap::after,
html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after {
  animation: none;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .elementor-8170201 .elementor-element-5a4512c8::before,
  .elementor-8170201 .elementor-element-5a4512c8::after,
  .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap::after,
  .elementor-8170201 .elementor-element-5a4512c8 > .elementor-column-wrap > .elementor-widget-wrap::after {
    animation: none;
    will-change: auto;
  }
  .elementor-8170201 .elementor-element-5a4512c8::before { opacity: .12; transform: translate3d(0, -6px, 0); }
  .elementor-8170201 .elementor-element-5a4512c8::after { opacity: .12; transform: translate3d(0, -6px, 0) scaleX(-1); }
  html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8::before,
  html.nx-hd-scrolled .elementor-8170201 .elementor-element-5a4512c8::after { opacity: 0; }
}
