:root {
  --mh-burgundy: #781125;
  --mh-burgundy-deep: #570a18;
  --mh-burgundy-dark: #41131d;
  --mh-gold: #e2ad32;
  --mh-gold-light: #f3d88d;
  --mh-cream: #fffaf3;
  --mh-cream-deep: #f6efe5;
  --mh-paper: #fffdf9;
  --mh-ink: #292220;
  --mh-muted: #6f625d;
  --mh-line: #eadfd4;
  --mh-radius: 22px;
  --mh-radius-large: 32px;
  --mh-shadow: 0 18px 48px rgba(74, 24, 30, .13);
  --mh-shadow-hover: 0 26px 65px rgba(74, 24, 30, .19);
}

html { scroll-behavior: smooth; }

body.modern-heritage {
  background-color: var(--mh-cream);
  background-image:
    linear-gradient(rgba(120, 17, 37, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 17, 37, .018) 1px, transparent 1px);
  background-size: 5px 5px;
  color: var(--mh-ink);
  font-family: "Open Sans", Arial, sans-serif;
}

body.modern-heritage h1,
body.modern-heritage h2,
body.modern-heritage h3,
body.modern-heritage h4,
body.modern-heritage h5,
body.modern-heritage h6,
body.modern-heritage button,
body.modern-heritage .button,
body.modern-heritage .brand strong {
  font-family: Montserrat, Arial, sans-serif;
}

body.modern-heritage a:focus-visible,
body.modern-heritage button:focus-visible,
body.modern-heritage input:focus-visible,
body.modern-heritage select:focus-visible {
  outline: 3px solid var(--mh-gold);
  outline-offset: 3px;
}

.mh-topbar {
  min-height: 36px;
  padding: 7px max(28px, calc((100vw - 1500px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(90deg, var(--mh-burgundy-deep), var(--mh-burgundy));
  color: #fff6ef;
  font-size: 12px;
  line-height: 1.4;
}

.mh-topbar a { color: #fff6ef; text-decoration: underline; text-underline-offset: 3px; }

.mh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  min-height: 82px;
  padding: 0;
  background: rgba(255, 253, 249, .96);
  border-bottom: 1px solid rgba(120, 17, 37, .08);
  box-shadow: 0 8px 30px rgba(64, 18, 24, .08);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

.mh-nav-wrap {
  width: min(1500px, 100%);
  min-height: 82px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.mh-header .brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--mh-burgundy);
  text-decoration: none;
}

.mh-header .brand img { width: 64px; height: 64px; object-fit: contain; }
.mh-header .brand strong { display: block; color: var(--mh-burgundy); font-size: 24px; line-height: 1; letter-spacing: .02em; }
.mh-header .brand i { display: none; }
.mh-header .brand small { display: block; margin-top: 4px; color: #a62a3d; font-size: 8px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }

.mh-mobile-toggle {
  display: none;
  border: 1px solid var(--mh-line);
  border-radius: 10px;
  padding: 10px 13px;
  background: var(--mh-paper);
  color: var(--mh-burgundy);
  font-weight: 700;
}

.mh-header .mh-main-nav {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: normal;
}
.mh-nav-group { position: static; display: flex; align-items: center; min-height: 82px; }

.mh-nav-trigger {
  border: 0;
  padding: 29px 0;
  background: transparent;
  color: #342827;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mh-nav-trigger::after { content: "⌄"; margin-left: 6px; color: var(--mh-burgundy); }
.mh-nav-trigger:hover, .mh-nav-trigger.active, .mh-nav-group.is-open .mh-nav-trigger { color: var(--mh-burgundy); }

.mh-mega {
  display: none;
  position: absolute;
  top: 82px;
  left: max(28px, calc((100vw - 1444px) / 2));
  right: max(28px, calc((100vw - 1444px) / 2));
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(230px, 1.15fr);
  gap: 28px;
  padding: 30px 34px;
  background: rgba(255, 250, 243, .99);
  border: 1px solid rgba(120, 17, 37, .08);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 25px 60px rgba(61, 22, 21, .16);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.mh-nav-group.is-open .mh-mega { display: grid; }

.mh-mega h3 {
  margin: 0 0 12px;
  color: var(--mh-burgundy);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.mh-mega a {
  display: block;
  margin-left: -8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #443936;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.mh-mega a:hover, .mh-mega a[aria-current="page"] { background: rgba(120, 17, 37, .06); color: var(--mh-burgundy); transform: translateX(3px); }

.mh-mega aside {
  padding: 22px;
  background: linear-gradient(145deg, rgba(120, 17, 37, .07), rgba(226, 173, 50, .13));
  border: 1px solid rgba(120, 17, 37, .07);
  border-radius: 18px;
}

.mh-mega aside span { color: var(--mh-burgundy); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.mh-mega aside strong { display: block; margin-top: 10px; color: var(--mh-burgundy); font-size: 20px; line-height: 1.35; }

.mh-member-login,
.mh-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.mh-member-login { border: 1px solid var(--mh-line); background: rgba(120, 17, 37, .035); color: var(--mh-burgundy); }
.mh-member-login.active { box-shadow: inset 0 0 0 2px rgba(120, 17, 37, .12); }
.mh-donate { background: var(--mh-gold); color: #281b00; box-shadow: 0 8px 20px rgba(180, 125, 15, .22); }
.mh-donate:hover { background: var(--mh-gold-light); transform: translateY(-2px); }

body.modern-heritage .button,
body.modern-heritage .btn {
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(74, 20, 25, .10);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

body.modern-heritage .button:hover,
body.modern-heritage .btn:hover { transform: translateY(-3px); box-shadow: 0 13px 25px rgba(74, 20, 25, .15); }

.mh-footer {
  padding: 64px max(28px, calc((100vw - 1328px) / 2)) 28px;
  display: grid;
  grid-template-columns: minmax(320px, 1.7fr) 1fr 1fr 1.2fr;
  gap: 40px 48px;
  align-items: start;
  background:
    radial-gradient(circle at 18% 35%, rgba(226, 173, 50, .09), transparent 25%),
    linear-gradient(145deg, var(--mh-burgundy-deep), #6b0c20);
  color: #f2e4d9;
  font-size: 16px;
  line-height: 1.65;
}

.mh-footer > div { min-width: 0; }
.mh-footer .mh-foot-brand { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 0 18px; align-items: center; }
.mh-footer .mh-foot-brand > a { grid-column: 1; grid-row: 1 / 3; margin: 0; padding: 0; }
.mh-footer .mh-foot-brand img { width: 145px; height: 145px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .22)); }
.mh-footer h3 { margin: 0; color: #fffaf3; font-size: 30px; line-height: 1.1; }
.mh-footer .mh-foot-brand > p:first-of-type { margin: 8px 0 0; color: #e8c979; font-size: 11px; letter-spacing: .08em; }
.mh-footer .mh-foot-brand > p:last-of-type { grid-column: 1 / -1; margin: 22px 0 0; max-width: 44ch; }
.mh-footer h4 { margin: 14px 0 16px; color: #e8c979; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.mh-footer a { display: block; margin-top: 8px; color: #f2e4d9; text-decoration: none; }
.mh-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mh-footer .copyright { grid-column: 1 / -1; margin: 0; padding-top: 18px; color: #cdb7ad; font-size: 13px; }

@media (max-width: 1240px) {
  .mh-nav-wrap { gap: 16px; padding: 0 22px; }
  .mh-main-nav { gap: 12px; }
  .mh-nav-trigger { font-size: 12px; }
  .mh-member-login, .mh-donate { padding-inline: 13px; font-size: 13px; }
}

@media (max-width: 1180px) {
  .mh-header { position: sticky; }
  .mh-nav-wrap { min-height: 76px; }
  .mh-header .brand img { width: 58px; height: 58px; }
  .mh-mobile-toggle { display: block; }
  .js .mh-main-nav { display: none; }
  .mh-header .mh-main-nav,
  .js .mh-header .mh-main-nav.is-open {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 12px 5vw 24px;
    background: rgba(255, 253, 249, .99);
    border-top: 1px solid var(--mh-line);
    box-shadow: 0 22px 38px rgba(61, 22, 21, .15);
  }
  .js .mh-header .mh-main-nav.is-open { display: block; }
  .mh-nav-group { display: block; min-height: 0; border-bottom: 1px solid var(--mh-line); }
  .mh-nav-trigger { width: 100%; padding: 16px 0; display: flex; justify-content: space-between; text-align: left; }
  .mh-nav-group:hover .mh-mega { display: none; }
  .mh-nav-group:focus-within .mh-mega { display: none; }
  .mh-nav-group.is-open .mh-mega { display: grid; }
  .mh-mega { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 4px 0 20px; border: 0; border-radius: 16px; box-shadow: none; background: transparent; }
  .mh-member-login, .mh-donate { display: flex; margin-top: 12px; }
  .mh-footer { grid-template-columns: 1.5fr 1fr; padding: 48px 28px 24px; }
}

@media (max-width: 700px) {
  .mh-topbar { min-height: 34px; padding: 7px 18px; font-size: 10px; }
  .mh-topbar span:last-child { display: none; }
  .mh-nav-wrap { min-height: 70px; padding: 0 16px; }
  .mh-header .brand { gap: 7px; }
  .mh-header .brand img { width: 50px; height: 50px; }
  .mh-header .brand strong { font-size: 21px; }
  .mh-header .brand small { font-size: 7px; }
  .mh-header .mh-main-nav, .js .mh-header .mh-main-nav.is-open { top: 70px; }
  .mh-mega { grid-template-columns: 1fr; }
  .mh-mega aside { display: none; }
  .mh-footer { grid-template-columns: 1fr 1fr; gap: 30px 22px; padding: 40px 22px 24px; }
  .mh-footer .mh-foot-brand { grid-column: 1 / -1; grid-template-columns: 125px minmax(0, 1fr); }
  .mh-footer .mh-foot-brand img { width: 125px; height: 125px; }
  .mh-footer .mh-foot-brand + div { grid-column: 1; }
  .mh-footer > div:last-of-type { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .mh-header .brand small { display: none; }
  .mh-mobile-toggle { padding: 9px 10px; font-size: 12px; }
  .mh-footer { grid-template-columns: 1fr; }
  .mh-footer .mh-foot-brand,
  .mh-footer .mh-foot-brand + div,
  .mh-footer > div:last-of-type { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.modern-heritage *,
  body.modern-heritage *::before,
  body.modern-heritage *::after { animation: none !important; transition: none !important; }
  body.modern-heritage .button:hover,
  body.modern-heritage .btn:hover,
  .mh-donate:hover,
  .mh-mega a:hover { transform: none; }
}
