:root {
  --bg:#0e1013; --card:#161a1f; --muted:#9aa4b2; --text:#e8edf2;
  --accent:#4da3ff; --accent2:#7ef0c6;

/* new tokens used by header/buttons */
  --blue: #2563eb;
  --border-300: #e6eaf0;
  --text-900: #111111;
  --bg-200: #f3f4f6;
  --brand-500: #4f46e5; /* indigo-500 */
  --brand-600: #4338ca; /* indigo-600 */
  --text-100: #e6edf3;

}

/* ===== Mobile header polish & sticky offset ===== */
:root {
  /* Offset used for anchor jumps when header is sticky */
  --sticky-offset: 88px; /* desktop/tablet default */
}

/* Make anchor jumps account for sticky header */
:target { scroll-margin-top: var(--sticky-offset); }
/* Helpful for native anchor scrolling & find-in-page */
html { scroll-padding-top: var(--sticky-offset); }



/* Brand mark */
.brand--mtm::after {
  content: "™";
  font-size: 0.6em;
  vertical-align: super;
  line-height: 0;
  margin-left: 2px;
  opacity: 0.9;
}

/* Brand emphasis */
.topbar .site-logo { display:flex; align-items:center; gap:.5rem; padding:6px 0; text-decoration:none; }
.topbar .site-name {
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1;
  text-decoration: none;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem); /* ~18 → ~26px */
  color: var(--topbar-fg, #fff);
}
.topbar--over-hero .site-name { text-shadow: 0 1px 2px rgba(0,0,0,.45), 0 0 1px rgba(0,0,0,.35); opacity:.98; }
.topbar:not(.topbar--over-hero) .site-name { color:#0c0c0c; }

/* Mobile guardrails */
@media (max-width: 420px){
  .topbar .site-name{
    font-size:1.15rem;
    max-width:60vw;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
}


/* Base layout (desktop/tablet) can stay as you have it.
   These mobile rules only apply when the screen is tight. */
@media (max-width: 480px) {
  .topbar .container {
    display: grid;
    grid-template-columns: 1fr auto;   /* brand | login */
    grid-template-rows: auto auto;     /* row1: brand/login, row2: nav */
    align-items: center;
    gap: 6px 12px;
  }

  /* keep brand on the left, login on the right */
  .topbar .site-logo { grid-column: 1 / 2; grid-row: 1; }
  .topbar .main-nav   { grid-column: 1 / -1; grid-row: 2; }

  /* make the nav wrap neatly on its own row */
  .topbar .main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;            /* rows / columns */
    align-items: center;
    padding: 6px 0 2px;
  }
  .topbar .main-nav a { padding: 6px 0; }

  /* ensure the login button stays right-aligned on row 1 */
  .topbar .nav__login {
    grid-column: 2 / 3;  /* this only applies if it's *outside* nav,
                            but as an anchor inside nav we enforce: */
    margin-left: auto;   /* push login to the end of the nav row when wrapped */
    padding: 6px 12px;
    border-radius: 999px;
  }

  /* If your header overlays the hero on desktop, don't overlay on small screens */
  .topbar--over-hero {
    position: relative;
    background: rgba(13,16,20,.88);
    backdrop-filter: blur(6px);
  }

  /* Make sure hero content isn’t hidden behind the taller header on mobile */
  .hero, .home-hero, .hero--home {
    padding-top: 12px;   /* gentle breathing room below the header */
  }
}


/* Accent colors (fallbacks if you don't already have brand vars) */
:root {
  --brand-accent-1: #3ddcff;  /* cyan */
  --brand-accent-2: #7df0c4;  /* mint */
}

/* Make sure we have a positioning context */
.topbar .site-name {
  position: relative;
  display: inline-block;
  padding-bottom: 2px; /* room for the underline */
}

/* The underline itself (hidden by default, no layout shift) */
.topbar .site-name::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-accent-1), var(--brand-accent-2));
  transform: scaleX(0);
  transform-origin: left;
  opacity: .9;
}

/* Hover/focus reveal — desktop and keyboard users */
@media (hover: hover) {
  .topbar .site-logo:hover .site-name::before,
  .topbar .site-logo:focus-visible .site-name::before {
    transition: transform 360ms cubic-bezier(.22,.61,.36,1);
    transform: scaleX(1);
  }
}

/* Gentle "intro" reveal (optional — applied via a class below) */
@keyframes underlineReveal {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.topbar .site-name.brand--intro::before {
  animation: underlineReveal 620ms 120ms both cubic-bezier(.22,.61,.36,1);
}

/* Dark-over-hero variant: keep it crisp without glow */
.topbar--over-hero .site-name::before { opacity: .95; }

/* Light header variant: slightly lower opacity for balance */
.topbar:not(.topbar--over-hero) .site-name::before { opacity: .85; }

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .topbar .site-name::before,
  .topbar .site-name.brand--intro::before {
    transition: none !important;
    animation: none !important;
    transform: scaleX(1); /* show as a static underline */
  }
}

/* Mobile guardrails — keep underline visible but tidy on tiny screens */
@media (max-width: 420px) {
  .topbar .site-name::before { bottom: -1px; height: 2px; }
}


/* Ensure absolute-positioned mobile menu anchors to header */
.topbar .container { position: relative; }

/* Desktop/Tablet (default) — bigger, premium look */
.topbar .main-nav {
  display: flex;
  align-items: center;
  gap: 22px;                 /* desktop spacing */
}
.topbar .nav-link {
  position: relative;
  display: inline-block;
  font-weight: 600;
  font-size: clamp(0.98rem, 0.95vw, 1.12rem);   /* ~16 → ~18px */
  color: var(--topbar-fg, #fff);
  text-decoration: none;
  padding: 8px 0;
  opacity: .96;
}
.topbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  opacity: .5;
  transition: transform 200ms ease;
}
@media (hover: hover) {
  .topbar .nav-link:hover::after { transform: scaleX(1); }
}

/* Accessible tap targets & spacing (no visual change on desktop) */
.topbar .nav .nav-link { 
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Better keyboard focus */
.topbar .nav .nav-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}

/* Reduce 300ms click delay on some touch browsers */
.topbar a, .topbar button { touch-action: manipulation; }



/* CTA/Login: pill treatment */
.topbar .nav-link--cta {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
.topbar:not(.topbar--over-hero) .nav-link--cta {
  border-color: rgba(0,0,0,.12);
  background: rgba(0,0,0,.05);
  color: #0c0c0c;
}

/* Mobile: single “Menu” button → dropdown panel */
.nav-toggle, .nav-toggle__checkbox { display: none; }

@media (max-width: 768px) {
  
  /* Show the Menu button */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06);
    font-weight: 700;
    color: var(--topbar-fg, #fff);
    cursor: pointer;
    user-select: none;
  }
  .topbar:not(.topbar--over-hero) .nav-toggle {
    border-color: rgba(0,0,0,.12);
    background: rgba(0,0,0,.05);
    color: #0c0c0c;
  }

  /* Hamburger icon */
  .nav-toggle__icon {
    width: 20px; height: 2px;
    background: currentColor;
    position: relative;
  }
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  }
  .nav-toggle__icon::before { top: -6px; }
  .nav-toggle__icon::after  { top:  6px; }

  /* Dropdown panel hidden by default */
  .topbar .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    z-index: 999;
    background: rgba(13,16,20,.98);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,.10);
    padding: 10px 12px;
    flex-direction: column;
    gap: 4px;
    border-radius: 10px;
    margin-inline: 10px;
  }
  .topbar:not(.topbar--over-hero) .main-nav {
    background: rgba(255,255,255,.98);
    border-bottom-color: rgba(0,0,0,.08);
  }

  /* Open when checkbox is checked */
  .nav-toggle__checkbox:checked ~ .main-nav { display: flex; }

  /* Big tap targets */
  .topbar .nav-link {
    display: block;
    padding: 14px 10px;
    font-size: 1.05rem;   /* bigger on mobile */
    border-radius: 10px;
  }
  .topbar .nav-link::after { display: none; } /* remove tiny underline on mobile */

  /* Login CTA sits at the end with pill styling */
  .topbar .nav-link--cta {
    align-self: flex-end;
    margin-top: 4px;
  }
}



/* unified gating style */
.mtm-gated {
  opacity: .6;
  user-select: none;
  cursor: not-allowed !important;
  filter: grayscale(10%);
}

/* make sure nested icons/text also show the cursor */
.mtm-gated * {
  cursor: not-allowed !important;
}



/* (Optional) legacy alias if you already used it somewhere */
.mtm-disabled { opacity: .6; pointer-events: none; user-select: none; }





/* ===== Shared Header (matches .topbar/.nav markup) ===== */
.topbar{
  position: sticky; top: 0; z-index: 50;
  background:#fff; border-bottom:1px solid #eee;
}
.topbar .container{
  max-width: 1100px; margin: 0 auto;
  padding: 14px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.topbar .brand{ text-decoration:none; color:#111; font-weight:700; font-size:1.05rem; }
.topbar .nav{ display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.topbar .nav a{ text-decoration:none; color:#111; padding:8px 10px; border-radius:10px; }

/* Pills only on LIGHT header (default) */
.topbar:not(.topbar--over-hero) .nav a:hover,
.topbar:not(.topbar--over-hero) .nav a:focus {
  background:#f3f4f6;
}

.topbar:not(.topbar--over-hero) .nav a.active {
  background:#eef2ff;
}


.topbar .nav .btn.small{
  border:1px solid #ddd; padding:8px 14px; border-radius:12px; font-weight:600;
}


@media (max-width: 720px){
  .topbar .container{ flex-wrap:wrap; }
  .topbar .nav{ width:100%; gap:10px; }
}


/* Header (topbar) specific button look */
.topbar .btn.ghost {
  background: transparent;
  border: 1px solid var(--border-300);
  color: var(--text-900);
}
.topbar .btn.ghost:hover { background: var(--bg-200); }

/* Base header (light) */
.topbar{
  background:#fff;
  border-bottom:1px solid #e9eef3;
  position:sticky; top:0; z-index:50;
}

/* Overlay/dark variant for hero pages */
.topbar--over-hero{
  position:absolute;       /* sit on top of the hero */
  top:0; left:0; right:0;
  background:transparent;  /* no white bar */
  border-bottom-color:transparent;
}



/* Make text/links/buttons light on dark hero */
.hero-dark .topbar,
.topbar--over-hero { color:#e6edf3; }

.hero-dark .topbar a,
.topbar--over-hero a { color:#e6edf3; }

.hero-dark .topbar .btn.small,
.topbar--over-hero .btn.small {
  background:rgba(255,255,255,.08);
  color:#fff;
  border-color:transparent;
}


/* ===== Dark pages: make text links white (keep buttons as-is) ===== */
.hero-dark a:not(.btn),
.hero-dark .footer a {
  color: var(--text-100);
}

/* Keep visited links white too */
.hero-dark a:not(.btn):visited,
.hero-dark .footer a:visited {
  color: var(--text-100);
}

/* Hover/focus behavior on dark pages */
.hero-dark a:not(.btn):hover,
.hero-dark a:not(.btn):focus,
.hero-dark .footer a:hover,
.hero-dark .footer a:focus {
  color: var(--text-100);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* Base underline bar for nav links */
.topbar .nav .nav-link { position: relative; }
.topbar .nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}


/* Dark-hero header: use ONLY the ::after bar; never text-decoration */
.topbar--over-hero .nav a,
.topbar--over-hero .nav .nav-link {
  background: transparent !important;
  box-shadow: none;
  color: var(--text-100);
  text-decoration: none !important;   /* <- kill the extra underline */
}




/* Show the single underline bar (the ::after) when active/hovered */
.topbar--over-hero .nav .nav-link.active::after { 
  opacity: .95; 
  transform: scaleX(1); 
}
.topbar--over-hero .nav .nav-link:hover::after,
.topbar--over-hero .nav .nav-link:focus::after {
  opacity: .95;
  transform: scaleX(1);
}




/* Leave the Login button alone */
.topbar--over-hero .nav .btn.small {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: transparent;
}



/* Header height (desktop + mobile) */
:root { --topbar-h: 64px; }
@media (max-width: 640px) { :root { --topbar-h: 56px; } }

/* Give the hero/main some breathing room when the header overlays it */
body.hero-dark main,
body.hero-dark .hero,
body.hero-dark .home-hero {
  padding-top: calc(var(--topbar-h) + 24px); /* tweak 24px → 32–48px to taste */
}




/* Prevent the grey “pressed” fill in the header */
.topbar .btn.ghost:focus,
.topbar .btn.ghost:active {
  background: transparent;
  color: var(--text-900);
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}



/* If you ever want the Login to appear active ON the login page only */
body.page-login .topbar .header-login {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
}

/* ===== Toasts ===== */
.mtm-toast-root {
  position: fixed;
  z-index: 9999;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mtm-toast {
  min-width: 260px;
  max-width: min(92vw, 420px);
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  color: #fff;
  background: #111827; /* info */
  opacity: 0; transform: translateY(8px);
}

.mtm-toast--success { background: #16a34a; }
.mtm-toast--error   { background: #dc2626; }
.mtm-toast--info    { background: #111827; }

.mtm-toast__msg    { line-height: 1.35; }
.mtm-toast__close,
.mtm-toast__action {
  background: transparent; border: 0; color: inherit; cursor: pointer;
  margin-left: 8px; font-weight: 600;
}
.mtm-toast__close { font-size: 18px; opacity: .8; }
.mtm-toast__close:hover { opacity: 1; }

@keyframes mtm-toast-in  { to { opacity: 1; transform: translateY(0); } }
@keyframes mtm-toast-out { to { opacity: 0; transform: translateY(8px); } }


/* Smaller defaults */
.map-cta { --icon:14px; --py:6px; --px:10px; --fs:13px; gap:6px; padding:var(--py) var(--px); font-size:var(--fs); }
.map-cta .map-cta__icon { width:var(--icon); height:var(--icon); }

/* XS pill (use when you want it really small) */
.map-cta--xs { --icon:12px; --py:4px; --px:8px; --fs:12.5px; gap:6px; }

/* Ghost (subtle outline instead of gradient) */
.map-cta--ghost {
  background: transparent;
  color: var(--brand-600, #4338ca);
  border: 1px solid var(--brand-500, #4f46e5);
  box-shadow: none;
}
.map-cta--ghost:hover { background: rgba(79,70,229,.06); }


/* ==== Map CTA — bullet-proof tiny icon ==== */
.map-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  /* size vars (tweak if you want even smaller) */
  --icon: 12px;
  --py: 4px;
  --px: 8px;
  --fs: 12.5px;

  padding: var(--py) var(--px);
  font-size: var(--fs);
  border-radius: 999px;
  text-decoration: none;
}

/* force the SVG to ignore any global svg { width:100% } rules */
.map-cta__icon {
  width: var(--icon) !important;
  height: var(--icon) !important;
  min-width: var(--icon);
  min-height: var(--icon);
  flex: 0 0 var(--icon);
  display: inline-block !important;
}

/* ghost look (subtle outline) */
.map-cta--ghost {
  background: transparent;
  color: var(--brand-600, #4338ca);
  border: 1px solid var(--brand-500, #4f46e5);
  box-shadow: none;
}
.map-cta--ghost:hover { background: rgba(79,70,229,.06); }

/* optional: if you have a global reset like img, svg { width:100% } */
svg.map-cta__icon { width: var(--icon) !important; height: var(--icon) !important; }


@media (max-width: 380px){
  .brand--mtm::after { margin-left: 1px; }
}


.topbar .nav-link.active::after { transform: scaleX(1); }


/* ===== Membership Grid ===== */
.plan-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.plan {
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.plan--highlight {
  outline: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.plan__badge {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  margin-bottom: .75rem;
  opacity: .9;
}
.plan__badge--program { background: rgba(99, 179, 237, .15); }
.plan__badge--donation { background: rgba(16, 185, 129, .18); }
.plan__price { font-size: 2rem; margin: 0 0 .75rem; }
.plan__price span { font-size: .9rem; opacity: .8; }
.plan__list { margin: 0 0 1rem; padding-left: 1.1rem; }
.plan__list li { margin: .35rem 0; }
.plan__pill {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  margin-bottom: .5rem;
  opacity: .9;
}
.plan__note { font-size: .8rem; opacity: .9; margin-bottom: .75rem; }
.plans__foot .tiny { font-size: .75rem; opacity: .75; }

/* Buttons used on plans */
.btn { display: inline-block; padding: .75rem 1rem; border-radius: .75rem; }
.btn--primary { background: linear-gradient(90deg, #7dd3fc, #34d399); color: #0b1020; font-weight: 600; }
.btn--disabled { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); cursor: not-allowed; }


/* Dark hero band for membership page (and any future dark-hero pages) */
.hero--dark {
  background: radial-gradient(160% 120% at 0% 0%, #0b1020 0%, #0b1020 60%, rgba(8,12,24,.96) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.hero--dark h1, .hero--dark p { color: #fff; }


/* ===== Dark page theme for Membership ===== */
body.hero-dark.page-memberships {
  background: #0b1020;          /* deep navy */
  color: #eef2ff;               /* soft white text */
}

/* basic text in the main body */
body.hero-dark.page-memberships h1,
body.hero-dark.page-memberships h2,
body.hero-dark.page-memberships h3,
body.hero-dark.page-memberships p,
body.hero-dark.page-memberships li {
  color: #eef2ff;
}

/* plan cards on dark */
body.hero-dark.page-memberships .plan {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e8eefb;
}

body.hero-dark.page-memberships .plan--highlight {
  outline: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

/* price + badges read well on dark */
body.hero-dark.page-memberships .plan__price { color: #fff; }
body.hero-dark.page-memberships .plan__price span { color: rgba(255,255,255,0.8); }
body.hero-dark.page-memberships .plan__badge--program { background: rgba(99,179,237,.22); }
body.hero-dark.page-memberships .plan__badge--donation { background: rgba(16,185,129,.26); }

/* bullets and notes */
body.hero-dark.page-memberships .plan__list { color: #e8eefb; }
body.hero-dark.page-memberships .plan__note { color: rgba(255,255,255,0.9); }

/* footer notes */
body.hero-dark.page-memberships .plans__foot .tiny { color: rgba(255,255,255,0.75); }

/* ensure links are white on dark pages (your brand rule) */
body.hero-dark.page-memberships a { color: #fff; }
body.hero-dark.page-memberships a:hover { opacity: .9; }


/* ===== Dark page theme (legal pages) ===== */
body.hero-dark.page-legal {
  background: #0b1020;     /* deep navy */
  color: #eef2ff;          /* soft white */
}

body.hero-dark.page-legal h1,
body.hero-dark.page-legal h2,
body.hero-dark.page-legal h3,
body.hero-dark.page-legal p,
body.hero-dark.page-legal li {
  color: #eef2ff;
}

/* links on dark pages should be white */
body.hero-dark.page-legal a { color: #fff; }
body.hero-dark.page-legal a:hover { opacity: .9; }

/* optional: make the main container sit nicely on dark */
body.hero-dark.page-legal main { color: #eef2ff; }


/* ===== Legal pages polish ===== */
.legal-wrap{max-width:900px;margin:28px auto 60px;padding:0 20px;}
.legal-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.legal-h2{
  display:flex; align-items:center; gap:.5rem;
  margin: 1.25rem 0 .5rem;
}
.pill{
  display:inline-block; font-size:.72rem; line-height:1;
  padding:.28rem .55rem; border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(99,179,237,.22);
}
.pill--warn{ background: rgba(245,158,11,.22); }     /* amber */
.pill--ok{ background: rgba(16,185,129,.26); }       /* green*



/* === About-only dark header/footer =============================== */
/* Put this block near the very bottom of styles.css so it overrides base .topbar rules */

/* Header wrapper forces dark background & white nav on this page */
.header--dark-bg { --topbar-fg: #fff; }              /* makes your header/nav text white */
.header--dark-bg .topbar {
  background: #0b1020 !important;                    /* dark hero tone */
  border-bottom: 1px solid rgba(255,255,255,.12);
}

/* Keep the login pill readable on dark header */
.header--dark-bg .topbar .nav-link--cta {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
}

/* Footer wrapper forces dark background & light links on this page */
.footer--dark .footer {
  background: #0b1020;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer--dark .footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* === ABOUT (and any page using .topbar--over-hero) ===================== */
/* Dark header background */
.topbar--over-hero .topbar {
  background: #0b1020 !important;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

/* Light brand text (site name) on dark */
.topbar--over-hero .topbar .brand,
.topbar--over-hero .topbar .site-name {
  color: #fff !important;
}

/* Light nav links on dark */
.topbar--over-hero .topbar .nav a {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Make the Login pill WHITE with DARK text at all times */
.topbar--over-hero .topbar .nav-link--cta,
.topbar--over-hero .topbar .btn.small,
.topbar--over-hero .topbar .header-login {
  background: #fff !important;
  color: #0b1020 !important;
  border-color: #fff !important;
}
.topbar--over-hero .topbar .nav-link--cta:hover,
.topbar--over-hero .topbar .btn.small:hover,
.topbar--over-hero .topbar .header-login:hover {
  opacity: .92;
}


/* ===== ABOUT PAGE ONLY ===================================== */

/* Give the top of the body some breathing room under the dark header */
.page-about .hero--dark {
  /* bump this up/down as you like (24–40px usually feels right) */
  padding-top: 28px;
}

/* Ensure the Login pill shows DARK text on its white background (not just on hover) */
.page-about .topbar--over-hero .topbar .nav-link--cta,
.page-about .topbar--over-hero .topbar .btn.small,
.page-about .topbar--over-hero .topbar .header-login {
  background: #fff !important;
  color: #0b1020 !important;        /* dark text */
  border-color: #fff !important;
}

/* Also force the inner span/text to dark (covers any nested elements) */
.page-about .topbar--over-hero .topbar .nav-link--cta *,
.page-about .topbar--over-hero .topbar .btn.small *,
.page-about .topbar--over-hero .topbar .header-login * {
  color: #0b1020 !important;
}


/* === ABOUT PAGE: add breathing room below dark header =============== */
/* Use the header wrapper + hero adjacency so we only affect this layout */
.page-about .topbar--over-hero + .hero--dark {
  padding-top: 40px !important;  /* adjust 32–56px to taste */
}


/* === ABOUT: breathing room below the dark header ===================== */
/* Works even if something gets injected between the header and hero */
.topbar--over-hero ~ .hero--dark {
  padding-top: 56px !important;    /* adjust 48–72px to taste */
}

/* Extra room on small screens where the header is taller */
@media (max-width: 640px) {
  .topbar--over-hero ~ .hero--dark { padding-top: 72px !important; }
}


/* ABOUT: push first content down below the overlaid header */
.page-about .topbar--over-hero + .hero--dark,
.page-about .topbar--over-hero + .section {
  margin-top: calc(var(--topbar-h) + 20px) !important; /* tweak 16–40px to taste */
}

/* Fallback if something sits between header and first section/hero */
.page-about .topbar--over-hero ~ .section:first-of-type {
  margin-top: calc(var(--topbar-h) + 20px) !important;
}



/* FINAL OVERRIDE: keep mobile menu closed unless toggled */
@media (max-width: 768px){
  .topbar .main-nav { display: none !important; }
  .nav-toggle__checkbox:checked ~ .main-nav { display: flex !important; }
}


/* ===== ABOUT PAGE — Mobile menu: dark header closed, light panel opened ===== */
@media (max-width: 768px) {
  /* When the mobile menu opens under the dark header on ABOUT only... */
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav {
    background: rgba(255,255,255,.98) !important;
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
  }

  /* Make the menu links DARK inside the opened panel */
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link,
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav a {
    color: #0b1020 !important;
  }

  /* Login pill should match the light panel (dark text on subtle light bg) */
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link--cta {
    background: rgba(0,0,0,.06) !important;
    color: #0b1020 !important;
    border-color: rgba(0,0,0,.12) !important;
  }
}


/* ABOUT ONLY — when the mobile menu opens, flip panel to light and text to dark */
@media (max-width: 768px) {
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav {
    background: rgba(255,255,255,.98) !important;   /* light panel */
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
    --topbar-fg: #0b1020;                            /* <— flips link color source */
  }

  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link,
  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav a {
    color: var(--topbar-fg) !important;              /* dark links */
  }

  .page-about .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link--cta {
    background: rgba(0,0,0,.06) !important;          /* light pill in light panel */
    color: #0b1020 !important;
    border-color: rgba(0,0,0,.12) !important;
  }
}

/* Brand mark helper (used in header/footer) */
.tm {
  font-size: 0.6em;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  opacity: .9;
}


/* HOMEPAGE (dark hero) — fix desktop CTA so it's not white on white */
@media (min-width: 769px) {
  .page-home .topbar--over-hero .nav .nav-link--cta {
    background: transparent !important;
    color: #e6edf3 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22) !important;
  }

  .page-home .topbar--over-hero .nav .nav-link--cta:hover,
  .page-home .topbar--over-hero .nav .nav-link--cta:focus {
    text-decoration: underline;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.32) !important;
  }
}

/* Light-header pages keep the white pill CTA (safety guard) */
.topbar:not(.topbar--over-hero) .nav .nav-link--cta {
  background: #fff;
  color: #0c0c0c;
}


/* === HOMEPAGE + MEMBERSHIPS (dark hero) — MOBILE OPEN MENU === */
@media (max-width: 768px) {
  /* Flip panel to light, links to dark when menu is open */
  .page-home .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav,
  .page-memberships .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav {
    background: rgba(255,255,255,.98) !important;   /* solid light panel */
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
    --topbar-fg: #0b1020;                            /* dark link color */
  }

  .page-home .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link,
  .page-home .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav a,
  .page-memberships .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link,
  .page-memberships .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav a {
    color: var(--topbar-fg) !important;              /* readable dark links */
  }

  .page-home .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link--cta,
  .page-memberships .topbar--over-hero .nav-toggle__checkbox:checked ~ .main-nav .nav-link--cta {
    background: rgba(0,0,0,.06) !important;          /* light pill on light panel */
    color: #0b1020 !important;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12) !important;
  }
}

/* === MEMBERSHIPS (dark hero) — DESKTOP CTA MATCHES HOMEPAGE === */
@media (min-width: 769px) {
  .page-memberships .topbar--over-hero .nav .nav-link--cta {
    background: transparent !important;
    color: #e6edf3 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22) !important;
  }
  .page-memberships .topbar--over-hero .nav .nav-link--cta:hover,
  .page-memberships .topbar--over-hero .nav .nav-link--cta:focus {
    text-decoration: underline;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.32) !important;
  }
}


/* ===== Header color variants (works with includes/header.html) ===== */
/* Default: header/nav readable on LIGHT pages */
.topbar .brand,
.topbar .nav a,
.topbar a { color: #111827; } /* slate-900 */

/* Flip to white when the PAGE says we are on a dark hero */
.theme-hero-dark .topbar .brand,
.theme-hero-dark .topbar .nav a,
.theme-hero-dark .topbar a { color: #ffffff; }

/* Make sure SVG icons flip too */
.theme-hero-dark .topbar svg * { stroke: #ffffff; fill: #ffffff; }

/* Hover affordance */
.topbar .nav a:hover,
.topbar a:hover { opacity: .9; text-decoration: underline; }


/* ===== Header layout safeguard (works with includes/header.html) ===== */
/* Desktop-first: show full nav; hide the mobile toggle */
.topbar .container { display: flex; align-items: center; gap: 1rem; }
.topbar .main-nav { display: flex !important; align-items: center; gap: 1rem; }
.topbar .nav-link { display: inline-block; text-decoration: none; }
.topbar .nav-link:hover { text-decoration: underline; }
.topbar .nav-toggle { display: none; }           /* label */
.topbar .nav-toggle__checkbox { display: none; } /* input */

/* Mobile behavior (only below 768px) */
@media (max-width: 767.98px) {
  .topbar .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .topbar .nav-toggle__checkbox { display: block; position: absolute; left: -9999px; }
  .topbar .main-nav { display: none !important; } /* collapsed by default */
  /* Expand when the checkbox is checked */
  #navToggle:checked ~ .main-nav { display: block !important; }
}

/* Color variants you already added stay as-is; leaving them below is fine */


/* === FINAL MOBILE MENU SWITCH (container :has(#navToggle:checked)) === */
@media (max-width: 768px){
  /* Closed by default (safety, wins over older rules) */
  header.topbar .container > nav.main-nav{
    display: none !important;
  }

  /* Open when the checkbox is checked — no selector ambiguity */
  header.topbar .container:has(#navToggle:checked) > nav.main-nav{
    display: block !important;
    position: absolute;
    top: 100%; left: 0; right: 0; margin-top: 8px;
    background: #0b1020 !important;
    border-radius: 12px;
    padding: 8px 16px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25), 0 0 0 100vmax #0b1020;
    clip-path: inset(0 -100vmax);
    z-index: 1001;
  }

  /* Make sure the row doesn't clip the icon/menu */
  header.topbar, header.topbar .container{ position: relative; overflow: visible; z-index: 1000; }

  /* Readable links inside the dropdown */
  header.topbar .main-nav a:not(.nav-link--cta){
    color:#fff !important; display:block; padding:10px 12px; border-radius:8px;
  }
  header.topbar .main-nav .nav-link--cta{
    background:#fff !important; color:#0b1020 !important;
    border:1px solid rgba(0,0,0,.12) !important;
    box-shadow:0 1px 0 rgba(0,0,0,.04), inset 0 0 0 1px rgba(0,0,0,.08) !important;
  }
}


.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

.lock-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #92400e;
}
