/* Shared site header + footer (template-parts/site-header.php, site-footer.php).
   Loaded on every page. Everything is namespaced `aeo-` so it can't clash with page CSS. */

.aeo-topbar, .aeo-footer {
  --hf-bg: #161826;
  --hf-surface: #232532;
  --hf-text: #e9e9ed;
  --hf-accent: #9184d9;
  --hf-divider: rgba(233, 233, 237, 0.16);
  --hf-n300: #cfd3e5;
  --hf-n400: #b2b6ca;
  --hf-n500: #9397ab;
  --hf-n900: #292b31;
  --hf-a200: #e7e5fe;
  --hf-a300: #d2cefd;
  --hf-a600: #796cbf;
  --hf-a800: #423a6a;
  --hf-edge: clamp(20px, 5vw, 64px);
  --hf-font: var(--font-body, "Inter", system-ui, sans-serif);
  font-family: var(--hf-font);
  box-sizing: border-box;
}
.aeo-topbar *, .aeo-topbar *::before, .aeo-topbar *::after,
.aeo-footer *, .aeo-footer *::before, .aeo-footer *::after { box-sizing: border-box; }

/* buttons */
.aeo-topbar .aeo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  cursor: pointer; text-decoration: none; background: transparent; border: 1px solid transparent;
  font-family: var(--hf-font); font-weight: 500; font-size: 14px; line-height: 1.2; letter-spacing: 0;
  color: var(--hf-text); padding: 6px 10px; padding-inline: 10px; border-radius: 8px; white-space: nowrap;
}
.aeo-topbar .aeo-btn--primary { color: var(--hf-accent); border-color: var(--hf-accent); }
.aeo-topbar .aeo-btn--primary:hover { color: var(--hf-accent); background: rgba(145, 132, 217, 0.12); }
.aeo-topbar .aeo-btn--block { width: 100%; }
.aeo-topbar .aeo-btn--icon { width: 44px; height: 44px; padding: 0; }
.aeo-topbar .aeo-btn { padding-inline: 14px; }
.aeo-topbar .aeo-btn--icon { padding: 0; }

/* top bar */
.aeo-topbar { position: sticky; top: 0; z-index: 50; background: rgba(22, 24, 38, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hf-divider); font-size: 15px; line-height: 1.55; }
body.admin-bar .aeo-topbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .aeo-topbar { top: 46px; } }
.aeo-topbar__in { max-width: 1200px; margin: 0 auto; padding: 0 var(--hf-edge); height: 64px; display: flex; align-items: center; gap: 28px; }
.aeo-topbar .aeo-brand, .aeo-footer .aeo-brand { min-height: 44px; font-size: 18px; font-weight: 600; color: var(--hf-text); text-decoration: none; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.aeo-topbar .aeo-brand:hover, .aeo-footer .aeo-brand:hover { color: var(--hf-text); }
.aeo-topbar .aeo-brand__mark, .aeo-footer .aeo-brand__mark { width: 26px; height: 26px; border-radius: 7px; background: var(--hf-a800); box-shadow: inset 0 0 0 1px var(--hf-a600); display: grid; place-items: center; font-size: 12px; color: var(--hf-a200); }
.aeo-topbar .aeo-links { display: flex; gap: 4px; align-items: center; }
.aeo-topbar .aeo-links > a, .aeo-topbar .aeo-dd > button { color: var(--hf-n300); text-decoration: none; font: inherit; font-family: var(--hf-font); font-size: 14.5px; background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.aeo-topbar .aeo-links > a:hover, .aeo-topbar .aeo-dd > button:hover, .aeo-topbar .aeo-dd:focus-within > button, .aeo-topbar .aeo-dd.is-open > button { color: var(--hf-text); background: var(--hf-surface); }
.aeo-topbar .aeo-dd { position: relative; }
.aeo-topbar .aeo-dd__panel { position: absolute; top: calc(100% + 8px); left: -12px; width: 520px; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--hf-surface); border-radius: 14px; box-shadow: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s; }
.aeo-topbar .aeo-dd:hover .aeo-dd__panel, .aeo-topbar .aeo-dd:focus-within .aeo-dd__panel, .aeo-topbar .aeo-dd.is-open .aeo-dd__panel { opacity: 1; visibility: visible; transform: none; }
.aeo-topbar .aeo-dd__panel a { padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--hf-text); white-space: normal; }
.aeo-topbar .aeo-dd__panel a:hover { background: var(--hf-n900); color: var(--hf-text); }
.aeo-topbar .aeo-dd__panel strong { display: block; font-size: 14px; font-weight: 500; }
.aeo-topbar .aeo-dd__panel span { font-size: 12.5px; color: var(--hf-n400); }
.aeo-topbar .aeo-topcta { margin-left: auto; }
.aeo-topbar .aeo-burger { display: none; margin-left: auto; justify-content: center; }
.aeo-topbar .aeo-burger .aeo-ic-x { display: none; }
.aeo-topbar .aeo-burger[aria-expanded="true"] .aeo-ic-menu { display: none; }
.aeo-topbar .aeo-burger[aria-expanded="true"] .aeo-ic-x { display: block; }
.aeo-topbar .aeo-drawer { display: none; border-bottom: 1px solid var(--hf-divider); background: var(--hf-bg); padding: 8px var(--hf-edge) calc(24px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; }
.aeo-topbar .aeo-drawer.open { display: block; }
body.menu-open { overflow: hidden; }
.aeo-topbar .aeo-drawer a { display: flex; align-items: center; min-height: 48px; color: var(--hf-text); text-decoration: none; font-size: 16px; border-bottom: 1px solid var(--hf-divider); }
.aeo-topbar .aeo-drawer__grp { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-n500); margin: 18px 0 2px; }
.aeo-topbar .aeo-drawer a.aeo-btn { margin-top: 20px; justify-content: center; border: 1px solid var(--hf-accent); color: var(--hf-accent); }
/* mobile: hide the desktop nav + CTA, show the burger/drawer. Selectors must
   match the specificity of the desktop rules above (.aeo-topbar .x) or they lose. */
@media (max-width: 900px) {
  .aeo-topbar .aeo-links, .aeo-topbar .aeo-topcta { display: none; }
  .aeo-topbar .aeo-burger { display: inline-flex; }
  .aeo-topbar__in { gap: 16px; }
}
@media (min-width: 901px) { .aeo-topbar .aeo-drawer, .aeo-topbar .aeo-drawer.open { display: none; } }

/* footer */
.aeo-footer { padding: 0 0 48px; font-size: 14px; line-height: 1.55; color: var(--hf-text); }
.aeo-footer .aeo-footer__rule { height: 1px; border: 0; margin: 0 0 56px; background: linear-gradient(to right, transparent, var(--hf-divider) 48px calc(100% - 48px), transparent); }
.aeo-footer .aeo-footer__in { max-width: 1200px; margin: 0 auto; }
.aeo-footer .aeo-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; gap: 40px; margin-bottom: 48px; }
.aeo-footer .aeo-footer__about { color: var(--hf-n400); line-height: 1.65; margin: 14px 0 18px; max-width: 44ch; font-size: 14px; }
.aeo-footer .aeo-footer__h { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--hf-n500); margin: 0 0 14px; font-weight: 500; }
.aeo-footer nav a { display: flex; align-items: center; min-height: 44px; color: var(--hf-n300); text-decoration: none; font-size: 14px; opacity: 1; padding: 0; }
.aeo-footer nav a:hover { color: var(--hf-a200); }
.aeo-footer .aeo-brand { color: var(--hf-text); }
.aeo-footer .aeo-footer__social { display: flex; gap: 8px; }
.aeo-footer .aeo-footer__social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--hf-surface); color: var(--hf-n300); text-decoration: none; font-size: 12.5px; font-weight: 600; }
.aeo-footer .aeo-footer__social a:hover { color: var(--hf-a200); box-shadow: inset 0 0 0 1px var(--hf-a600); }
.aeo-footer .aeo-footer__copy { color: var(--hf-n500); font-size: 13px; padding-top: 24px; margin: 0; text-align: left; opacity: 1; }

/* page-side gutter for the footer on templates that don't wrap it themselves (block templates) */
.aeo-hf-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

@media (max-width: 1000px) {
  .aeo-footer .aeo-footer__grid { grid-template-columns: 1fr 1fr; }
  .aeo-footer .aeo-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .aeo-footer .aeo-footer__grid { grid-template-columns: 1fr; }
}

/* block-template pages: drop the template-part wrapper so the header can stay sticky and flush with the top */
header.wp-block-template-part:has(.aeo-topbar), footer.wp-block-template-part:has(.aeo-footer) { display: contents; }
.wp-site-blocks > header.wp-block-template-part + *, .wp-site-blocks > * + footer.wp-block-template-part { margin-block-start: 0; }
