:root {
  --header-pad-y: 24px;
  --header-pad-y-compact: 16px;
  --header-gutter: 40px;
  --plume-purple: #3a0469;
  --plume-purple-hover: #6816af;
  --plume-ink: #1f292e;
  --plume-muted: #5e6569;
  --plume-line: #f2f4f6;
  --plume-surface: #f2f4f6;
}

body.header-menu-open {
  overflow: hidden;
}

.header {
  --header-top: 0px;

  position: sticky;
  top: var(--header-top);
  width: 100%;
  color: var(--plume-ink);
  background: #fff;
  border-bottom: 1px solid var(--plume-line);
  font-family: "FibraOne", Verdana, sans-serif;
  transition:
    box-shadow 0.3s ease,
    --backdrop-h 0.3s ease;
  z-index: 2147483646;
}

.admin-bar .header {
  --header-top: var(--wp-admin--admin-bar--height, 32px);
}

.header.is-scrolled {
  box-shadow: 0 4px 16px rgb(29 22 29 / 8%);
}

.header.is-compact {
  --header-pad-y: var(--header-pad-y-compact);
}

#wpadminbar {
  z-index: 2147483647 !important;
}

/* Astra/Elementor reset. :where() so hover doesn't override component styles. */
.header button,
.header button:where(:hover, :focus, :active) {
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

.header a,
.header a:where(:hover, :focus) {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.header ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.header li {
  margin: 0;
  padding: 0;
}

.header :focus-visible {
  outline: 2px solid var(--plume-purple);
  outline-offset: 2px;
}

.header .plume-icon {
  display: block;
  flex: none;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--header-pad-y) var(--header-gutter);
  transition: padding 0.3s ease;
}

.header__brand {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  line-height: 0;
}

.header .header__brand .custom-logo-link {
  display: block;
  min-width: 0;
  line-height: 0;
}

/* shrinks when there is not enough room */
.header .header__brand .custom-logo {
  display: block;
  width: 134px;
  max-width: 100%;
  height: auto;
}

.header__nav {
  display: flex;
  align-self: stretch;
  margin: calc(-1 * var(--header-pad-y)) 0 calc(-1 * var(--header-pad-y)) 42px;
  transition: margin 0.3s ease;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__item {
  display: flex;
  align-items: center;
  height: 100%;
}

.header .header__trigger {
  display: flex;
  position: relative;
  align-items: center;
  height: 40px;
  color: var(--plume-purple);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
}

.header .header__label {
  padding: 10px;
}

.header .header__trigger::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--plume-purple);
  content: "";
  opacity: 0;
  transform: scaleX(0.6);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.header .header__caret {
  transition: transform 0.3s ease;
}

.header .header__trigger:hover,
.header .header__trigger:focus-visible,
.header .header__item.is-open > .header__trigger {
  color: var(--plume-purple);
}

.header .header__trigger:hover::after,
.header .header__item.is-open > .header__trigger::after,
.header .header__trigger[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.header .header__item.is-open .header__caret {
  transform: rotate(180deg);
}

/* Shared dropdown background: its height follows the open panel, so switching doesn't flash. */
@property --backdrop-h {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.header__backdrop {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 1;
  height: var(--backdrop-h);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 4px 8px 24px rgb(0 0 0 / 6%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.header.is-panel-open .header__backdrop {
  opacity: 1;
}

.header__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 2;
  clip-path: inset(0 0 max(0px, calc(100% - var(--backdrop-h))) 0);
  pointer-events: none;
  visibility: hidden;
}

.header__item.is-open > .header__panel {
  pointer-events: auto;
  visibility: visible;
}

.header .header__panel-links {
  opacity: 0;
  transform: translateY(12px);
}

.header .header__item.is-open .header__panel-links {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.header .header-promo--panel {
  opacity: 0;
}

.header .header__item.is-open .header-promo--panel {
  opacity: 1;
  transition:
    opacity 0.3s ease,
    box-shadow 0.3s ease;
}

.header__panel-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px var(--header-gutter) 43px var(--panel-start, var(--header-gutter));
}

.header .header__panel-links {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 28px;
  min-width: 200px;
  padding-top: 12px;
}

.header .header__panel-link {
  display: inline-block;
  position: relative;
  padding-left: 17px;
  color: var(--plume-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 21px;
}

.header .header__panel-link::before,
.header .header__section-link::before,
.header .header-articles__link::before {
  position: absolute;
  top: 0.5lh;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--plume-purple);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.header .header__panel-link,
.header .header__panel-link:hover,
.header .header__panel-link:focus,
.header .header__section-link,
.header .header__section-link:hover,
.header .header__section-link:focus,
.header .header-articles__link,
.header .header-articles__link:hover,
.header .header-articles__link:focus {
  text-decoration-line: underline !important;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
}

.header .header__panel-link:hover,
.header .header__panel-link:focus-visible,
.header .header__panel-link[aria-current="page"],
.header .header__section-link:hover,
.header .header__section-link:focus-visible,
.header .header__section-link[aria-current="page"] {
  text-decoration-color: currentColor !important;
}

.header .header-articles__link,
.header .header-articles__link:focus {
  text-decoration-color: currentColor !important;
}

.header .header-articles__link:hover,
.header .header-articles__link:focus-visible {
  text-decoration-color: transparent !important;
}

.header-articles {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header .header-articles__title {
  margin: 0;
  color: var(--plume-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 15px;
  text-transform: uppercase;
}

.header-articles__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header .header-articles__link {
  display: inline-block;
  position: relative;
  padding-left: 12px;
  color: var(--plume-purple);
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
}

.header .header-articles__link::before {
  width: 4px;
  height: 4px;
}

.header-articles--panel {
  flex: none;
  width: 200px;
  margin-left: auto;
  padding-top: 12px;
}

.header .header-promo {
  display: flex;
  position: relative;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 334px;
  height: 220px;
  padding: 16px;
  overflow: hidden;
  background: var(--plume-purple);
  border-radius: 16px;
  isolation: isolate;
  transition: box-shadow 0.3s ease;
}

.header .header-promo:hover,
.header .header-promo:focus-visible {
  box-shadow: 0 10px 24px rgb(58 4 105 / 18%);
}

.header-promo__image {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.header-promo:hover .header-promo__image {
  transform: scale(1.03);
}

.header-promo__tag {
  padding: 7px 10px;
  color: var(--plume-purple);
  background: rgb(255 255 255 / 91%);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 15px;
  margin-bottom: 8px;
}

.header-promo__caption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 12px;
  color: #fff;
  background: rgb(58 4 105 / 65%);
  border-radius: 8px;
}

.header-promo__quote {
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
}

.header-promo__meta {
  font-size: 10px;
  font-weight: 400;
  line-height: 13px;
}

.header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.header .header__login,
.header .header__login:hover,
.header .header__login:focus {
  color: var(--plume-purple);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  text-decoration-line: underline !important;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
}

.header .header__login:hover,
.header .header__login:focus-visible {
  text-decoration-color: currentColor !important;
}

.header .header__join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  color: #fff;
  background: var(--plume-purple);
  border: 1px solid var(--plume-purple);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.header .header__join:hover,
.header .header__join:focus-visible {
  color: #fff;
  background: var(--plume-purple-hover);
  border-color: var(--plume-purple-hover);
}

.header__toggle,
.header__scrim,
.header__drawer {
  display: none;
}

@media (max-width: 1023px) {
  :root {
    --header-gutter: 32px;
  }

  .header__nav {
    display: none;
  }

  .header__actions {
    gap: 12px;
  }

  .header .header__actions .header__join {
    min-height: 40px;
    padding: 7px 14px;
  }

  .header .header__toggle {
    display: flex;
    width: 24px;
    height: 100%;
    flex: none;
    align-items: center;
    justify-content: center;
    color: var(--plume-purple);
    border-radius: 50%;
  }

  .header__scrim {
    display: block;
    position: fixed;
    inset: var(--header-top) 0 0;
    z-index: 2;
    background: rgb(29 22 29 / 16%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .header__drawer {
    display: flex;
    position: fixed;
    top: var(--header-top);
    bottom: 0;
    left: 0;
    z-index: 3;
    flex-direction: column;
    width: min(calc(100% - 40px), 400px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 16px 0 32px rgb(29 22 29 / 20%);
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0.3s;
  }

  .header.is-drawer-open .header__scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .header.is-drawer-open .header__drawer {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .header__drawer-masthead {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 24px;
  }

  .header .header__drawer-close {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--plume-purple);
    border-radius: 50%;
  }

  .header__drawer-content {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }

  .header__drawer-nav {
    flex: 1 0 auto;
  }

  .header__section {
    border-bottom: 1px solid var(--plume-line);
  }

  .header .header__section-row {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: var(--plume-purple);
    background: #fff;
    font-weight: 600;
    text-align: left;
    transition: background-color 0.3s ease;
  }

  .header .header__section-row:hover,
  .header .header__section-row[aria-expanded="true"] {
    color: var(--plume-purple);
    background: var(--plume-surface);
  }

  .header__section-label {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header__section-icon {
    display: flex;
    width: 28px;
    height: 28px;
    flex: none;
    align-items: center;
    justify-content: center;
    background: var(--plume-surface);
    border-radius: 6px;
  }

  .header .header__section-row[aria-expanded="true"] .header__section-icon {
    background: #fff;
  }

  .header .header__section-chevron {
    transition: transform 0.3s ease;
  }

  .header .header__section-row[aria-expanded="true"] .header__section-chevron {
    transform: rotate(90deg);
  }

  .header__section-panel {
    display: grid;
    grid-template-rows: 0fr;
    background: var(--plume-surface);
    visibility: hidden;
    transition:
      grid-template-rows 0.3s ease,
      visibility 0s linear 0.3s;
  }

  .header__section.is-open > .header__section-panel {
    grid-template-rows: 1fr;
    visibility: visible;
    transition-delay: 0s;
  }

  .header .header__section-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow: hidden;
    padding: 0 24px 0 64px;
  }

  .header .header__section.is-open .header__section-links {
    padding-bottom: 16px;
  }

  .header .header__section-link {
    display: inline-block;
    position: relative;
    padding: 2px 0 2px 17px;
    color: var(--plume-ink);
    font-weight: 600;
  }

  .header__drawer-promos {
    padding: 0 24px;
  }

  .header .header-promo--drawer {
    display: none;
    width: 100%;
    height: 260px;
    min-height: fit-content;
    margin: 12px 0;
  }

  .header .header-promo--drawer.is-active {
    display: flex;
  }

  .header-articles--drawer {
    padding: 16px 24px;
    background: var(--plume-surface);
  }

  .header__drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid var(--plume-line);
  }

  .header .header__drawer-actions .header__join {
    width: 100%;
  }

  .header .header__label,
  .header .header__section-row,
  .header .header__section-link,
  .header .header__panel-link,
  .header .header-articles__title,
  .header .header-articles__link,
  .header-promo__tag,
  .header__drawer-actions .header__login,
  .header__drawer-actions .header__join {
    font-size: 20px;
    line-height: 27px;
  }

  .header-articles__list {
    gap: 16px;
  }

  .header-promo__quote,
  .header-promo__meta {
    font-size: 16px;
    line-height: 22px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-gutter: 32px;
  }
}

@media (max-width: 600px) {
  .admin-bar .header,
  .header__drawer {
    --header-top: 0px;
  }
}

@media (max-width: 380px) {
  :root {
    --header-gutter: 16px;
  }

  .header__actions {
    gap: 8px;
  }

  .header .header__actions .header__join {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header *,
  .header *::before,
  .header *::after {
    transition-duration: 0.01ms !important;
  }
}
