/*
 * Site header (partials/site-header.blade.php): floating purple bar, Products
 * mega dropdown, Pricing Plan + Login / account menu, mobile menu.
 * Scoped under .ae-hdr; theme styles for header/nav/a are reset here.
 */

.ae-hdr {
  --hdr-purple: #6526DE;
  --hdr-purple-dark: #5A1FD0;
  --hdr-ink: #111;
  --hdr-panel: #F0F0FD;
  --hdr-font: 'Google Sans', 'Product Sans', 'Poppins', system-ui, sans-serif;

  position: relative;
  z-index: 1000;
  padding: 12px 24px 24px;
  font-family: var(--hdr-font);
  line-height: 1.3;
}
.ae-hdr *,
.ae-hdr *::before,
.ae-hdr *::after { box-sizing: border-box; }
.ae-hdr [hidden] { display: none !important; }
.ae-hdr a { text-decoration: none; }
.ae-hdr button { font-family: inherit; }
.ae-hdr ul { margin: 0; padding: 0; list-style: none; }
.ae-hdr li { margin: 0; }
.ae-hdr svg { display: block; flex: none; }

/* ------------------------------------------------------------ spooky offer */
.ae-spooky {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100px;
  margin: 0;
  padding: 16px 20px;
  overflow: hidden;
  border-radius: 0;
  background-color: #E07000;
}
.ae-spooky::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(255, 236, 170, .5), transparent 60%),
    linear-gradient(170deg, #F7B733 0%, #F3A200 34%, #E07000 72%, #C64A00 100%);
  background-size: 160% 100%;
  content: "";
}
.ae-spooky__scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ae-spooky__house {
  position: absolute;
  top: 0;
  width: min(30%, 343px);
  height: 100%;
  object-fit: contain;
}
.ae-spooky__house--left {
  left: 0;
  object-position: left top;
}
.ae-spooky__house--right {
  right: 0;
  object-position: right top;
}
.ae-spooky__graveyard {
  position: absolute;
  bottom: -3px;
  left: 5%;
  width: min(26%, 292px);
  height: 78px;
  object-fit: contain;
  object-position: left bottom;
}
.ae-spooky__scene::after {
  position: absolute;
  inset: 30% 0 0;
  background: linear-gradient(transparent, rgba(42, 19, 64, .16));
  content: "";
}
.ae-spooky__spider {
  position: absolute;
  top: 0;
  left: 18%;
  width: 34px;
  height: auto;
  transform-origin: center top;
}
.ae-spooky__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}
.ae-spooky__offer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 7px 16px 7px 10px;
  border: 1px solid rgba(255, 236, 170, .55);
  border-radius: 16px;
  background: rgba(246, 170, 40, .94);
}
.ae-spooky__pumpkin {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
}
.ae-spooky__copy { min-width: 0; }
.ae-spooky__eyebrow {
  margin: 0;
  color: #2A1340;
  font-family: 'Baloo 2', var(--hdr-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}
.ae-spooky__headline {
  margin: 0;
  color: #1A1026;
  font-family: 'Baloo 2', var(--hdr-font);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}
.ae-spooky__note {
  color: #2A1340;
  font-size: 13px;
  font-weight: 600;
  opacity: .85;
}
.ae-spooky__code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 7px 16px;
  font: inherit;
  border: 1.5px dashed rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: #2A1340;
  color: #CBBFE3;
  cursor: pointer;
}
.ae-spooky__code:hover,
.ae-spooky__code:focus-visible {
  border-color: #fff;
  color: #fff;
}
.ae-spooky__code:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.ae-spooky__copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.ae-spooky__code-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
}
.ae-spooky__code-value {
  color: #FFC58A;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}
.ae-spooky__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: none;
  padding: 10px 24px;
  border-radius: 999px;
  background: #1A1026;
  color: #fff;
  font-family: 'Baloo 2', var(--hdr-font);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
  transition: transform .15s ease, filter .15s ease;
}
.ae-spooky__cta:hover { color: #fff; filter: brightness(1.15); transform: translateY(-1px); }
.ae-spooky__cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ------------------------------------------------------------ bar */
.ae-hdr__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  min-height: 60px;
  margin: 0 auto;
  padding: 10px 12px 10px 22px;
  border-radius: 30px;
  background: var(--hdr-purple);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.ae-hdr__logo { display: flex; flex: none; align-items: center; }
.ae-hdr__logo img { display: block; width: auto; height: 31px; max-width: 264px; }

.ae-hdr__nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 0;
}
.ae-hdr .ae-hdr__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 16px;
  font-weight: 430;
  letter-spacing: -.2px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  opacity: .92;
  transition: opacity .15s ease;
}
.ae-hdr .ae-hdr__link:hover,
.ae-hdr .ae-hdr__link:focus-visible,
.ae-hdr .ae-hdr__link[aria-expanded="true"],
.ae-hdr .ae-hdr__link.is-current { color: #fff; background: none; opacity: 1; }
.ae-hdr .ae-hdr__link.is-current { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.ae-hdr .ae-hdr__link--products { opacity: 1; }
.ae-hdr__grid { display: flex; }

.ae-hdr__actions { display: flex; flex: none; align-items: center; gap: 12px; }
.ae-hdr .ae-hdr__pricing {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  height: 36px;
  padding: 0 19px 0 20px;
  border-radius: 18px;
  background: linear-gradient(90deg, #FBC901 0%, #FBC901 77%, #D09700 100%);
  color: #000;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}
/* The two light diagonal stripes behind "Plan". */
.ae-hdr .ae-hdr__pricing::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 83px;
  width: 20px;
  background: linear-gradient(90deg, #FCD434 0 12px, transparent 12px 16px, #FCD434 16px 20px);
  transform: skewX(51deg);
  pointer-events: none;
}
.ae-hdr .ae-hdr__pricing > * { position: relative; }
.ae-hdr__crown { fill: #000; margin-top: -1px; }
.ae-hdr .ae-hdr__pricing:hover,
.ae-hdr .ae-hdr__pricing:focus-visible { color: var(--hdr-ink); filter: brightness(1.05); transform: translateY(-1px); }
.ae-hdr .ae-hdr__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border-radius: 18px;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ae-hdr .ae-hdr__login:hover,
.ae-hdr .ae-hdr__login:focus-visible { color: var(--hdr-ink); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }

/* ------------------------------------------------------------ account menu */
.ae-hdr__account { position: relative; }
.ae-hdr .ae-hdr__avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 4px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--hdr-ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.ae-hdr .ae-hdr__avatar-btn:hover,
.ae-hdr .ae-hdr__avatar-btn:focus-visible { background: #fff; color: var(--hdr-ink); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.ae-hdr__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8B4FF0, #6A2ED6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  object-fit: cover;
}
.ae-hdr__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 230px;
  padding: 8px;
  border: 1.5px solid #E4E2FA;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(40, 10, 80, .18);
}
.ae-hdr__menu-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid #F1EDF8;
}
.ae-hdr__menu-who strong { color: var(--hdr-ink); font-size: 14px; font-weight: 600; }
.ae-hdr__menu-who span { overflow: hidden; color: #6E6880; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ae-hdr .ae-hdr__menu a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--hdr-ink);
  font-size: 14px;
  font-weight: 500;
}
.ae-hdr .ae-hdr__menu a:hover,
.ae-hdr .ae-hdr__menu a:focus-visible { background: #F5F1FE; color: var(--hdr-purple); }
.ae-hdr .ae-hdr__menu a.log-logout-button { color: #DC2029; }

/* ------------------------------------------------------------ products panel */
.ae-hdr__products { position: static; }
.ae-hdr__panel {
  --notch-x: 50%;
  position: absolute;
  z-index: 2;
  top: calc(100% + 10px);
  left: 50%;
  width: min(923px, calc(100vw - 32px));
  padding: 30px 33px 33px;
  border: 3.5px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(var(--hdr-panel), var(--hdr-panel)) padding-box,
    linear-gradient(180deg, #948DE5 0%, #C7C3F3 55%, #E5E5FF 100%) border-box;
  transform: translateX(-50%);
  animation: ae-hdr-drop .18s ease-out;
}
/* The bump in the panel's top border under the Products link: part of the
   border itself (smooth shoulders, no line across its base), rising 10px so
   it meets the bar. */
.ae-hdr__bump {
  position: absolute;
  top: -13.75px;
  left: var(--notch-x);
  display: block;
  width: 140px;
  height: 16px;
  transform: translateX(-50%);
  pointer-events: none;
}
.ae-hdr__panel::after {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.ae-hdr .ae-hdr__cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 35px;
}
.ae-hdr .ae-hdr__card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  height: 80px;
  padding: 0 0 0 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 5px rgba(0, 0, 0, .25);
  color: var(--hdr-ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ae-hdr .ae-hdr__card:hover,
.ae-hdr .ae-hdr__card:focus-visible { color: var(--hdr-ink); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(40, 10, 80, .22); }
.ae-hdr .ae-hdr__card.is-current { box-shadow: 0 0 0 2px var(--hdr-purple), 0 3px 6px rgba(0, 0, 0, .25); }
.ae-hdr__card-title { min-width: 0; font-size: 17px; font-weight: 400; line-height: 1.15; }
/* Every artwork is 81x90; shown at the same box on every card. */
.ae-hdr__art { flex: none; width: 63px; height: 70px; object-fit: contain; object-position: right center; }

@keyframes ae-hdr-drop {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ------------------------------------------------------------ burger + mobile */
.ae-hdr .ae-hdr__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  cursor: pointer;
}
.ae-hdr .ae-hdr__burger:hover { background: rgba(255, 255, 255, .26); }
.ae-hdr__burger span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ae-hdr__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ae-hdr__mobile {
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 10px auto 0;
  padding: 10px 16px 16px;
  border: 2px solid #E4E2FA;
  border-radius: 22px;
  background: var(--hdr-panel);
  box-shadow: 0 12px 30px rgba(40, 10, 80, .15);
}
.ae-hdr .ae-hdr__m-toggle,
.ae-hdr .ae-hdr__m-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid #E1DEF5;
  background: none;
  color: var(--hdr-ink);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.ae-hdr .ae-hdr__m-toggle:hover,
.ae-hdr .ae-hdr__m-item:hover { background: none; color: var(--hdr-purple); }
.ae-hdr__m-toggle svg { transition: transform .2s ease; }
.ae-hdr__m-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ae-hdr__m-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 0 14px; border-bottom: 1px solid #E1DEF5; }
.ae-hdr .ae-hdr__m-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--hdr-ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
}
.ae-hdr .ae-hdr__m-tool:hover { color: var(--hdr-purple); }
.ae-hdr .ae-hdr__m-tool img { flex: none; width: 27px; height: 30px; object-fit: contain; }
.ae-hdr__m-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; }
.ae-hdr__m-actions .ae-hdr__login { background: #fff; box-shadow: inset 0 0 0 1.5px #DDD6EA; }

@media (max-width: 1180px) {
  .ae-hdr__nav { gap: 22px; }
  .ae-hdr .ae-hdr__link,
  .ae-hdr .ae-hdr__pricing,
  .ae-hdr .ae-hdr__login { font-size: 15px; }
  .ae-hdr__logo img { height: 27px; }
}
@media (max-width: 1024px) {
  .ae-hdr__nav,
  .ae-hdr__bar > .ae-hdr__actions { display: none; }
  .ae-hdr .ae-hdr__burger { display: flex; }
}
@media (min-width: 1025px) {
  .ae-hdr__mobile { display: none !important; }
}
@media (max-width: 600px) {
  .ae-hdr { padding: 12px 12px 16px; }
  .ae-hdr__bar { min-height: 54px; padding: 8px 8px 8px 16px; border-radius: 27px; }
  .ae-hdr__logo img { height: 24px; max-width: 204px; }
}
@media (prefers-reduced-motion: reduce) {
  .ae-hdr__panel { animation: none; }
}
@media (max-width: 760px) {
  .ae-spooky {
    min-height: 128px;
    padding: 10px 14px;
    border-radius: 0;
  }
  .ae-spooky__content { flex-wrap: wrap; gap: 8px; }
  .ae-spooky__offer { max-width: 100%; }
  .ae-spooky__house {
    top: auto;
    bottom: 0;
    width: 38%;
    height: 50%;
    opacity: .8;
    object-position: bottom;
  }
  .ae-spooky__graveyard { bottom: -8px; width: 38%; height: 58px; }
  .ae-spooky__spider { top: auto; right: 2%; bottom: 0; left: auto; width: 18px; }
}
@media (max-width: 480px) {
  .ae-spooky {
    min-height: 132px;
    padding: 8px 10px;
    border-radius: 0;
  }
  .ae-spooky__content { gap: 7px; }
  .ae-spooky__offer { gap: 9px; padding: 5px 10px; }
  .ae-spooky__eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  .ae-spooky__headline { font-size: 17px; }
  .ae-spooky__note { font-size: 11px; }
  .ae-spooky__code { padding: 6px 12px; }
  .ae-spooky__cta { padding: 7px 18px; }
  .ae-spooky__house { width: 44%; }
  .ae-spooky__graveyard { width: 48%; }
}
@media (max-width: 360px) {
  .ae-spooky { min-height: 112px; }
  .ae-spooky__content { gap: 6px; }
  .ae-spooky__eyebrow { font-size: 7px; letter-spacing: 1px; }
  .ae-spooky__headline { font-size: 16px; }
  .ae-spooky__note { font-size: 10px; }
  .ae-spooky__code { gap: 5px; padding: 5px 8px; }
  .ae-spooky__code-value { font-size: 12px; letter-spacing: 1px; }
  .ae-spooky__cta { gap: 4px; padding: 6px 10px; font-size: 11px; }
}
