/* ==========================================================================
   Adroit Refresh — native header (assets/header.php enqueues this)
   Scoped to .ar-header only: refresh.css's --ar-* tokens live on body.adroit-refresh
   and are not present on ordinary (non-refreshed) pages, so this file defines its
   own tokens here and never reads --ar-*.
   ========================================================================== */

.ar-header {
  --arh-black: #000000;
  --arh-white: #ffffff;
  --arh-yellow: #ffdd3b;
  --arh-fuchsia: #d800a2;
  --arh-turq: #35e4cc;
  --arh-grey: #a0a0a0;
  --arh-hair: #333333;
  --arh-head: "Righteous", sans-serif;
  --arh-gutter: clamp(16px, 4vw, 48px);
  --arh-wrap: 1180px;
  --arh-h-desktop: 88px;
  --arh-h-mobile: 72px;

  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--arh-black);
  border-bottom: 1px solid var(--arh-hair);
}

.ar-header__wrap {
  width: min(100% - 2 * var(--arh-gutter), var(--arh-wrap));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--arh-h-mobile);
}
@media (min-width: 1025px) { .ar-header__wrap { min-height: var(--arh-h-desktop); } }

/* Logo */
.ar-header__logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ar-header__logo img { height: 40px; width: auto; display: block; }
.ar-header__wordmark { font-family: var(--arh-head); font-size: 20px; color: var(--arh-white); }
@media (min-width: 1025px) {
  .ar-header__logo img { height: 56px; }
  .ar-header__wordmark { font-size: 24px; }
}

/* Panel: on desktop this is just a flex row (nav + CTA); on mobile it's the collapsible drawer */
.ar-header__panel { display: contents; }

/* Primary nav list */
.ar-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ar-nav__item { position: relative; }
.ar-nav__link {
  display: inline-block;
  padding: 10px 12px;
  font-family: var(--arh-head);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--arh-yellow);
  transition: color 140ms ease;
}
.ar-nav__link:hover { color: var(--arh-white); }
.ar-nav__item.current > .ar-nav__link { color: var(--arh-turq); }

/* Sub-toggle (keyboard/touch control for dropdowns) — visually a small caret, no icon font */
.ar-nav__sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: -6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
}
.ar-nav__sub-toggle-arrow {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--arh-yellow);
  border-bottom: 2px solid var(--arh-yellow);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.ar-nav__sub-toggle[aria-expanded="true"] .ar-nav__sub-toggle-arrow { transform: rotate(-135deg); }

/* Dropdown submenu — desktop: absolutely positioned panel, opens on hover/focus-within/aria-expanded */
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
@media (min-width: 1025px) {
  .ar-nav__item--parent .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: var(--arh-black);
    border: 1px solid var(--arh-yellow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
  }
  .ar-nav__item--parent:hover > .sub-menu,
  .ar-nav__item--parent:focus-within > .sub-menu,
  .ar-nav__item--parent > .ar-nav__sub-toggle[aria-expanded="true"] ~ .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .sub-menu .ar-nav__link { display: block; padding: 10px 18px; color: var(--arh-white); font-size: 13px; }
  .sub-menu .ar-nav__link:hover { color: var(--arh-yellow); }
}

/* CTA */
.ar-header__cta {
  flex: 0 0 auto;
  font-family: var(--arh-head);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 20px;
  border: 2px solid var(--arh-fuchsia);
  color: var(--arh-fuchsia);
  box-shadow: 0 0 10px rgba(216, 0, 162, 0.6);
  transition: background 140ms ease, color 140ms ease;
  white-space: nowrap;
}
.ar-header__cta:hover, .ar-header__cta:focus-visible { background: var(--arh-fuchsia); color: var(--arh-white); }

/* Hamburger toggle (mobile only) — three CSS-drawn bars */
.ar-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.ar-nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--arh-yellow);
  transition: transform 160ms ease, opacity 160ms ease;
}
.ar-nav__toggle[aria-expanded="true"] .ar-nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ar-nav__toggle[aria-expanded="true"] .ar-nav__toggle-bar:nth-child(2) { opacity: 0; }
.ar-nav__toggle[aria-expanded="true"] .ar-nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Mobile (<1025px): hamburger drives a full-width yellow drawer
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .ar-nav__toggle { display: flex; }
  .ar-header__panel {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--arh-yellow);
    visibility: hidden;
  }
  .ar-header__panel.is-open { max-height: calc(100vh - var(--arh-h-mobile)); overflow-y: auto; visibility: visible; }
  .ar-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .ar-nav__item { border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
  .ar-nav__link { color: var(--arh-black); font-size: 18px; padding: 14px var(--arh-gutter); }
  .ar-nav__link:hover { color: var(--arh-fuchsia); }
  .ar-nav__sub-toggle-arrow { border-color: var(--arh-black); }
  .sub-menu { display: none; padding: 0 0 8px var(--arh-gutter); }
  .ar-nav__item--parent.is-open > .sub-menu { display: block; }
  .sub-menu .ar-nav__link { font-size: 15px; padding: 10px var(--arh-gutter); }
  .ar-header__cta {
    display: block;
    margin: 16px var(--arh-gutter) 20px;
    text-align: center;
    border-color: var(--arh-black);
    color: var(--arh-black);
    box-shadow: none;
  }
  .ar-header__cta:hover, .ar-header__cta:focus-visible { background: var(--arh-black); color: var(--arh-yellow); }
}

/* Focus visibility (accessibility rule: 2px turquoise outline, 2px offset) */
.ar-header a:focus-visible,
.ar-header button:focus-visible {
  outline: 2px solid var(--arh-turq);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ar-nav__sub-toggle-arrow,
  .ar-nav__toggle-bar,
  .sub-menu,
  .ar-header__cta,
  .ar-header__panel {
    transition: none !important; /* beyond Hello's own resets: this rule only removes motion, not layout, so !important is safe here and required to override the per-property transitions declared above */
  }
}

/* Hard reset for the two header buttons: Hello's theme.css and the Elementor kit style every <button>
   (border, padding, background) at higher effective specificity than a lone class. */
.ar-header button.ar-nav__toggle, .ar-header button.ar-nav__sub-toggle {
  appearance: none; -webkit-appearance: none;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 0 !important; margin: 0; min-height: 0; line-height: 0; color: inherit; font: inherit; text-shadow: none;
}
.ar-header button.ar-nav__toggle { display: none; }
.ar-header button.ar-nav__sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: -4px; }
@media (max-width: 1024px) {
  .ar-header button.ar-nav__toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; }
  .ar-header button.ar-nav__sub-toggle { width: 44px; height: 44px; margin-left: auto; }
}
.ar-header .ar-nav__toggle-bar { display: block; width: 22px; height: 2px; background: #ffdd3b; }

/* Hover: light chromatic aberration on nav links, CTA and logo */
.ar-nav__link, .ar-header__cta { transition: color 140ms ease, text-shadow 160ms ease, background 140ms ease; }
.ar-nav__link:hover, .ar-nav__link:focus-visible, .ar-header__cta:hover, .ar-header__cta:focus-visible { text-shadow: -1.5px 0 rgba(216,0,162,.85), 1.5px 0 rgba(53,228,204,.85); }
.ar-header__logo img { transition: filter 160ms ease; }
.ar-header__logo:hover img { filter: drop-shadow(-2px 0 rgba(216,0,162,.8)) drop-shadow(2px 0 rgba(53,228,204,.8)); }
@media (prefers-reduced-motion: reduce) { .ar-nav__link, .ar-header__cta, .ar-header__logo img { transition: none; } }
