/* ==========================================================================
   Miss Pepper AI — Site chrome
   Interior-page header, page mastheads, footer. Sparse + glass-light.
   ========================================================================== */

/* --- Top bar (universal nav-menu spot) ------------------------------- */
.mp-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  transition: background .25s var(--mp-ease), border-color .25s var(--mp-ease), box-shadow .25s var(--mp-ease);
}
.mp-topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--mp-topbar-h);
  padding-block: 0.5rem;
}
.mp-topbar__brand { display: inline-flex; flex: 0 0 auto; }
.mp-topbar__brand img { width: clamp(8rem, 12vw, 11rem); height: auto; }
.mp-topbar__nav { margin-left: auto; }          /* keep nav right-aligned */
.mp-topbar__more { display: none; }              /* trust cluster — shown only in the open mobile menu */
.mp-topbar__nav .mp-menu {                       /* a top nav stays on one line */
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
}
.mp-topbar__nav .mp-menu > .menu-item > a { white-space: nowrap; }

/* Transparent over a hero at the top of the page; solid glass once scrolled. */
.mp-topbar--overlay { background: transparent; border-bottom: 1px solid transparent; }
.mp-topbar--solid,
.mp-topbar.is-stuck {
  background: rgba(5, 17, 27, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mp-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

/* The fixed bar would cover content; offset pages that have no hero behind it. */
body:not(.mp-has-hero) .mp-main { padding-top: var(--mp-topbar-h); }

/* Placeholder shown until a menu is assigned to the "primary" location. */
.mp-topbar__placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  border: 1px dashed var(--mp-panel-border);
  border-radius: 0.6rem;
  color: var(--mp-muted);
  font-family: var(--mp-body);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mp-topbar__placeholder::before {
  content: "";
  width: 1.15rem;
  height: 0.72rem;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  opacity: 0.7;
}

.mp-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mp-body);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.mp-menu a { color: var(--mp-muted); transition: color .18s var(--mp-ease); }
.mp-menu a:hover,
.mp-menu .current-menu-item > a { color: var(--mp-ink); }

/* Dropdown submenus */
.mp-menu .menu-item { position: relative; }
.mp-menu .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 0.4em;
  border: 0.3em solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  vertical-align: 0.15em;
  opacity: 0.75;
}
.mp-menu .sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 70;
  display: none;
  min-width: 12rem;
  margin: 0.6rem 0 0;
  padding: 0.5rem;
  list-style: none;
  background: rgba(5, 17, 27, 0.96);
  border: 1px solid var(--mp-line);
  border-radius: 0.6rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.mp-menu .menu-item-has-children:hover > .sub-menu,
.mp-menu .menu-item-has-children:focus-within > .sub-menu { display: block; }
.mp-menu .sub-menu .menu-item { display: block; }
.mp-menu .sub-menu a { display: block; padding: 0.5rem 0.7rem; border-radius: 0.4rem; white-space: nowrap; }
.mp-menu .sub-menu a:hover { background: rgba(255, 255, 255, 0.06); }

/* --- Hamburger toggle + collapsed mobile nav ------------------------- */
.mp-topbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--mp-panel-border);
  border-radius: 0.5rem;
  cursor: pointer;
}
.mp-topbar__toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  background: var(--mp-ink);
  transition: transform .2s var(--mp-ease), opacity .2s var(--mp-ease);
}
.mp-topbar.is-open .mp-topbar__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mp-topbar.is-open .mp-topbar__toggle span:nth-child(2) { opacity: 0; }
.mp-topbar.is-open .mp-topbar__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 60rem) {
  .mp-topbar__toggle { display: flex; }
  .mp-topbar__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin: 0;
    padding: 0.6rem clamp(1.35rem, 5vw, 2rem) 1.2rem;
    background: rgba(5, 17, 27, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--mp-line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
  .mp-topbar.is-open .mp-topbar__nav { display: block; }
  .mp-topbar__nav .mp-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }
  .mp-topbar__nav .mp-menu > .menu-item { width: 100%; border-top: 1px solid rgba(162, 207, 231, 0.1); }
  .mp-topbar__nav .mp-menu > .menu-item:first-child { border-top: 0; }
  .mp-topbar__nav .mp-menu > .menu-item > a { display: block; padding: 0.8rem 0; white-space: normal; }
  .mp-topbar__nav .mp-menu .menu-item-has-children > a::after { float: right; margin-top: 0.55em; }
  .mp-topbar__nav .mp-menu .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    margin: 0 0 0.5rem;
    padding: 0 0 0 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  .mp-topbar__nav .mp-menu .sub-menu a { padding: 0.55rem 0; }

  /* Trust / policy cluster — only inside the opened mobile menu. */
  .mp-topbar__more { display: block; margin-top: 0.4rem; padding-top: 0.85rem; border-top: 1px solid rgba(162, 207, 231, 0.16); }
  .mp-topbar__morelabel { margin: 0.7rem 0 0.25rem; color: var(--mp-orange); font-family: var(--mp-body); font-size: 0.66rem; letter-spacing: var(--mp-tracking-copy); text-transform: uppercase; }
  .mp-topbar__morelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
  .mp-topbar__morelist a { display: block; padding: 0.5rem 0; color: var(--mp-muted); }
  .mp-topbar__morelist a:hover { color: var(--mp-ink); }
  .mp-topbar__more .mp-social { margin-top: 0.35rem; }
}

/* --- Page masthead (unmapped pages) ---------------------------------- */
.mp-pagehead { padding-block: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 3vw, 2.5rem); }
.mp-pagehead .mp-h2 { color: #fff; }

/* Featured-image slot — centered at the top of non-silo pages (page.php). */
.mp-pagefeat { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.mp-pagefeat__fig { margin: 0 auto; max-width: 62rem; }
.mp-pagefeat__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--mp-radius-panel);
	border: 1px solid var(--mp-panel-border);
	box-shadow: var(--mp-shadow-panel);
}

/* --- Single-post byline + author bio box ----------------------------- */
.mp-postmeta { margin-top: 0.9rem; color: var(--mp-muted); font-family: var(--mp-body); font-size: 0.95rem; }
.mp-postmeta__author { color: var(--mp-ink); text-decoration: none; font-weight: 600; }
.mp-postmeta__author:hover { color: var(--mp-orange-hot); }
.mp-postmeta__sep { margin: 0 0.45rem; opacity: 0.6; }

.mp-authorbox { margin: clamp(2rem, 5vw, 3.5rem) 0 0; }
.mp-authorbox__inner {
	display: flex;
	gap: clamp(1rem, 3vw, 1.75rem);
	align-items: flex-start;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
	border: 1px solid var(--mp-panel-border);
	border-radius: var(--mp-radius-panel);
	box-shadow: var(--mp-shadow-panel);
}
.mp-authorbox__avatar { flex: 0 0 auto; }
.mp-authorbox__img { display: block; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--mp-panel-border); object-fit: cover; }
.mp-authorbox__eyebrow { margin: 0 0 0.15rem; color: var(--mp-orange); font-family: var(--mp-body); font-size: 0.72rem; letter-spacing: var(--mp-tracking-copy); text-transform: uppercase; }
.mp-authorbox__name { margin: 0; font-family: var(--mp-display); font-size: 1.25rem; line-height: 1.2; color: #fff; }
.mp-authorbox__name a { color: inherit; text-decoration: none; }
.mp-authorbox__name a:hover { color: var(--mp-orange-hot); }
.mp-authorbox__role { margin: 0.15rem 0 0.6rem; color: var(--mp-muted); font-size: 0.9rem; }
.mp-authorbox__bio { margin: 0; color: var(--mp-muted); line-height: 1.65; }
.mp-authorbox__more { display: inline-block; margin-top: 0.7rem; color: var(--mp-orange); font-weight: 600; text-decoration: none; }
.mp-authorbox__more:hover { color: var(--mp-orange-hot); }
@media (max-width: 640px) {
	.mp-authorbox__inner { flex-direction: column; align-items: flex-start; }
}

/* --- Post list (blog / archive) -------------------------------------- */
.mp-postlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1.2rem, 2vw, 1.8rem);
}
.mp-postcard { display: grid; gap: 0.6rem; }
.mp-postcard a { color: #fff; }
.mp-postcard a:hover { color: var(--mp-orange-hot); }

/* --- Footer ----------------------------------------------------------- */
.mp-footer {
  border-top: 1px solid var(--mp-line);
  background: var(--mp-surface);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}
.mp-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem 3rem;
}
.mp-footer__brand img { width: clamp(8rem, 12vw, 11rem); height: auto; }
.mp-footer__tag {
  margin: 0.9rem 0 0;
  max-width: 26rem;
  color: var(--mp-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.mp-footer__brand { max-width: 30rem; }
.mp-footer__cta { margin-top: 1.5rem; }
.mp-footer__col { display: flex; flex-direction: column; }
.mp-footer__h {
  margin: 0 0 1.1rem;
  font-family: var(--mp-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--mp-ink);
}
.mp-footer__links { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.65rem; }
.mp-footer__links a {
  color: var(--mp-muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.15s var(--mp-ease);
}
.mp-footer__links a:hover,
.mp-footer__links a:focus-visible { color: var(--mp-ink); }
.mp-footer__legal {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--mp-line);
  color: var(--mp-muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.mp-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-footer__legal-links a { color: inherit; text-decoration: none; }
.mp-footer__legal-links a:hover,
.mp-footer__legal-links a:focus-visible { color: var(--mp-ink); text-decoration: underline; }

/* --- Social icon row (verified profiles; footer + mobile menu) ------- */
.mp-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.mp-footer__social { margin-top: 1.4rem; }
.mp-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--mp-line);
  color: var(--mp-muted);
  transition: color 0.15s var(--mp-ease), border-color 0.15s var(--mp-ease), background 0.15s var(--mp-ease), transform 0.15s var(--mp-ease);
}
.mp-social__link:hover,
.mp-social__link:focus-visible {
  color: var(--mp-ink);
  border-color: var(--mp-orange);
  background: rgba(255, 107, 0, 0.12);
  transform: translateY(-1px);
}
.mp-social__svg { display: block; }

/* --- Sticky mobile CTA (Sonic Boom — action one tap away) ------------ */
.mp-stickycta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;                 /* shown at mobile widths only */
  gap: 0.6rem;
  padding: 0.6rem 0.8rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 17, 27, 0.93);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--mp-line);
}
.mp-stickycta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 3.1rem;
  border-radius: var(--mp-radius-cta);
  font-family: var(--mp-body);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-stickycta__alt {
  flex: 0 0 auto;
  padding: 0 1.05rem;
  border: 1px solid var(--mp-panel-border);
  background: rgba(7, 27, 43, 0.5);
  color: var(--mp-ink);
}
.mp-stickycta__primary {
  flex: 1 1 auto;
  border: 1px solid var(--mp-cta-border);
  background: var(--mp-cta-grad);
  box-shadow: var(--mp-cta-glow);
  color: #fff;
}
@media (max-width: 48rem) {
  .mp-stickycta { display: flex; }
  body { padding-bottom: 4.7rem; }   /* keep content clear of the fixed bar */
}

/* --- Silo interlinking band (designed [wpu_silo] replacement) --------------
   template-parts/silo-links.php parses the WP Silo Builder shortcode and emits
   its own clean, flat markup (hub + up to 10 related links) into this band,
   printed between </main> and the footer on silo pages, category archives, and
   single posts — the raw in-content silo lists are stripped in functions.php. */
.mp-silolinks {
  border-top: 1px solid var(--mp-line);
  background:
    radial-gradient(130% 150% at 12% 0%, rgba(255, 125, 22, 0.07), transparent 58%),
    var(--mp-surface);
  padding-block: clamp(2.25rem, 5vw, 3.75rem);
}
.mp-silolinks__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  font-family: var(--mp-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mp-orange-hot);
}
.mp-silolinks__eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--mp-orange-hot);
  box-shadow: 0 0 10px rgba(255, 125, 22, 0.7);
}
.mp-silolinks__title {
  margin: 0 0 1.6rem;
  font-family: var(--mp-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.1;
  color: var(--mp-ink);
}

/* Silo hub = the parent silo landing link. */
.mp-silolinks__hub {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.3rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--mp-cta-border);
  border-radius: var(--mp-radius-cta);
  background: linear-gradient(180deg, rgba(255, 125, 22, 0.16), rgba(255, 107, 0, 0.05));
  color: #fff;
  font-family: var(--mp-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .16s var(--mp-ease), box-shadow .16s var(--mp-ease);
}
.mp-silolinks__hub::before {
  content: "";
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
  background: var(--mp-cta-grad);
  box-shadow: 0 0 12px rgba(255, 107, 0, 0.65);
}
.mp-silolinks__hub:hover { transform: translateY(-1px); box-shadow: var(--mp-cta-glow); }

/* Related silo links = a responsive card grid (capped at 10 in PHP). */
.mp-silolinks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-silolinks__grid > li { margin: 0; }
.mp-silolinks__grid a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--mp-panel-border);
  border-radius: 0.7rem;
  background: linear-gradient(180deg, var(--mp-panel-fill-1), var(--mp-panel-fill-2));
  color: var(--mp-muted);
  font-family: var(--mp-body);
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
  transition: transform .16s var(--mp-ease), border-color .16s var(--mp-ease), color .16s var(--mp-ease);
}
.mp-silolinks__grid a::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mp-blue-active);
  box-shadow: 0 0 8px rgba(22, 143, 214, 0.7);
  transition: background .16s var(--mp-ease), box-shadow .16s var(--mp-ease);
}
.mp-silolinks__grid a:hover {
  transform: translateY(-2px);
  border-color: var(--mp-cta-border);
  color: var(--mp-ink);
}
.mp-silolinks__grid a:hover::before {
  background: var(--mp-orange-hot);
  box-shadow: 0 0 11px rgba(255, 125, 22, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .mp-silolinks__hub,
  .mp-silolinks__grid a { transition: none; }
  .mp-silolinks__hub:hover,
  .mp-silolinks__grid a:hover { transform: none; }
}
