/* Arc Fault Records — independent site navigation, v2.0.0.
   This file must be loaded before header.js.
   Only the owned native #header is hidden, and only after JS activation. */

:root {
  --afr-site-header-height: 72px;
}

/* Native replacement is gated, reversible, and disabled in edit mode. */
html.afr-header-ready:not(.sqs-edit-mode):not(.sqs-edit-mode-active)
body:not(.sqs-edit-mode):not(.sqs-edit-mode-active) > #siteWrapper #header,
html.afr-header-ready:not(.sqs-edit-mode):not(.sqs-edit-mode-active)
body:not(.sqs-edit-mode):not(.sqs-edit-mode-active) #header {
  display: none !important;
}

#afr-site-header,
#afr-site-header *,
#afr-site-header *::before,
#afr-site-header *::after {
  box-sizing: border-box;
}

#afr-site-header {
  --afr-h-bg: #111113;
  --afr-h-text: #f4f4f2;
  --afr-h-muted: #adaeb4;
  --afr-h-border: rgba(255,255,255,.14);
  --afr-h-hover: rgba(255,255,255,.08);
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10000;
  width: 100%;
  color: var(--afr-h-text);
  background: var(--afr-h-bg);
  border-bottom: 1px solid var(--afr-h-border);
  font-family: var(--afr-header-font, Arial, Helvetica, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  transform: translateY(0);
  transition: transform .28s ease, visibility 0s linear 0s;
}

#afr-site-header[data-afr-theme="light"] {
  --afr-h-bg: #f5f5f4;
  --afr-h-text: #19191b;
  --afr-h-muted: #606168;
  --afr-h-border: rgba(0,0,0,.14);
  --afr-h-hover: rgba(0,0,0,.06);
  color-scheme: light;
}

#afr-site-header[data-afr-theme="dark"] { color-scheme: dark; }

/* The supplied logo is white on transparent; invert it for light mode. */
#afr-site-header[data-afr-theme="light"] .afr-header-logo { filter: invert(1); }

#afr-site-header.afr-header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
  visibility: hidden;
  transition: transform .28s ease, visibility 0s linear .28s;
}

#afr-site-header .afr-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1440px);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

#afr-site-header .afr-header-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}

#afr-site-header .afr-header-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#afr-site-header .afr-header-brand-main {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

#afr-site-header .afr-header-brand-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--afr-h-muted);
}

#afr-site-header .afr-header-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(200px, 48vw);
  max-height: 44px;
  object-fit: contain;
}

#afr-site-header .afr-header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

#afr-site-header .afr-header-theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--afr-h-border);
  border-radius: 8px;
  color: var(--afr-h-text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

#afr-site-header .afr-header-theme-button:hover {
  background: var(--afr-h-hover);
}
#afr-site-header .afr-header-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
#afr-site-header .afr-header-theme-label { line-height: 1; }

#afr-site-header .afr-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

#afr-site-header .afr-header-link,
#afr-site-header .afr-header-menu-button,
#afr-site-header .afr-header-theme-button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  letter-spacing: .015em;
}

#afr-site-header .afr-header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  color: var(--afr-h-muted);
  background: transparent;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

#afr-site-header .afr-header-link:hover,
#afr-site-header .afr-header-link:focus-visible {
  color: var(--afr-h-text);
  background: var(--afr-h-hover);
}

#afr-site-header .afr-header-link[aria-current="page"],
#afr-site-header .afr-header-link[aria-current="location"],
#afr-site-header .afr-header-link.afr-header-link-active,
#afr-site-header .afr-header-dropdown-trigger[aria-expanded="true"] {
  color: var(--afr-h-text);
}

#afr-site-header .afr-header-link[aria-current],
#afr-site-header .afr-header-link.afr-header-link-active {
  font-weight: 750;
}

#afr-site-header .afr-header-link[aria-current]::after,
#afr-site-header .afr-header-link.afr-header-link-active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

#afr-site-header .afr-header-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform .18s ease;
}

#afr-site-header .afr-header-dropdown-trigger[aria-expanded="true"]
.afr-header-chevron {
  transform: rotate(180deg);
}

#afr-site-header .afr-header-dropdown { position: relative; }

#afr-site-header .afr-header-submenu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  min-width: 204px;
  padding: 8px;
  border: 1px solid var(--afr-h-border);
  border-radius: 10px;
  background: var(--afr-h-bg);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  z-index: 1;
}

#afr-site-header .afr-header-submenu[hidden],
#afr-site-header .afr-header-mobile-nav[hidden] {
  display: none !important;
}

#afr-site-header .afr-header-submenu .afr-header-link {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
}

#afr-site-header .afr-header-submenu .afr-header-link[aria-current]::after {
  left: 12px;
  right: 12px;
}

#afr-site-header .afr-header-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--afr-h-border);
  border-radius: 8px;
  color: var(--afr-h-text);
  background: transparent;
  cursor: pointer;
}

#afr-site-header .afr-header-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 20px;
}

#afr-site-header .afr-header-menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .18s ease;
}

#afr-site-header .afr-header-menu-button[aria-expanded="true"]
.afr-header-menu-icon span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

#afr-site-header .afr-header-menu-button[aria-expanded="true"]
.afr-header-menu-icon span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

#afr-site-header .afr-header-mobile-nav {
  display: block;
  padding: 8px 20px 20px;
  border-top: 1px solid var(--afr-h-border);
  background: var(--afr-h-bg);
  max-height: calc(100vh - var(--afr-site-header-height));
  max-height: calc(100dvh - var(--afr-site-header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
}

#afr-site-header .afr-header-mobile-nav .afr-header-link {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font-size: 15px;
}

#afr-site-header .afr-header-mobile-nav .afr-header-dropdown-trigger {
  justify-content: space-between;
}

#afr-site-header .afr-header-mobile-nav .afr-header-submenu {
  position: static;
  min-width: 0;
  width: 100%;
  margin: 0 0 8px;
  padding: 4px 0 4px 14px;
  border: 0;
  border-left: 1px solid var(--afr-h-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#afr-site-header .afr-header-mobile-nav .afr-header-submenu .afr-header-link {
  font-size: 14px;
}

#afr-site-header .afr-header-mobile-nav .afr-header-link[aria-current]::after,
#afr-site-header .afr-header-mobile-nav .afr-header-link.afr-header-link-active::after {
  left: 0;
  right: auto;
  top: 10px;
  bottom: 10px;
  width: 2px;
  height: auto;
}

#afr-site-header :is(a, button):focus-visible {
  outline: 2px solid var(--afr-h-text);
  outline-offset: 3px;
}

#afr-site-header-spacer {
  display: block;
  width: 100%;
  height: var(--afr-site-header-height);
  pointer-events: none;
}

html.afr-header-ready {
  scroll-padding-top: calc(var(--afr-site-header-height) + 16px);
}

@media (max-width: 800px) {
  :root { --afr-site-header-height: 64px; }
  #afr-site-header .afr-header-bar {
    min-height: 64px;
    padding: 0 20px;
    gap: 16px;
  }
  #afr-site-header .afr-header-desktop-nav { display: none; }
  #afr-site-header .afr-header-menu-button { display: inline-flex; }
}

@media (max-width: 480px) {
  #afr-site-header .afr-header-actions { gap: 8px; }
  #afr-site-header .afr-header-theme-button {
    width: 44px;
    padding: 0;
  }
  #afr-site-header .afr-header-theme-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #afr-site-header,
  #afr-site-header * {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

/* Leave Squarespace's editing controls and native header available. */
html:is(.sqs-edit-mode, .sqs-edit-mode-active) #afr-site-header,
body:is(.sqs-edit-mode, .sqs-edit-mode-active) #afr-site-header,
html:is(.sqs-edit-mode, .sqs-edit-mode-active) #afr-site-header-spacer,
body:is(.sqs-edit-mode, .sqs-edit-mode-active) #afr-site-header-spacer {
  display: none !important;
}

#afr-site-header-spacer[hidden] { display: none !important; }

/* Staging: ?afr-header=preview retains the native header. */
html.afr-header-preview #afr-site-header {
  position: relative;
  transform: none !important;
  visibility: visible !important;
}
html.afr-header-preview #afr-site-header-spacer { display: none !important; }
