/* MarsAI modern public redesign (B002/T008). Layered on top of the copied
   site.css token system (ink #0d0808 / panel #161010 / edge #2d1e1e /
   #f97316 / #ef4444). Owns: sticky nav + accessible mobile menu, editorial
   hero (Mars orb + orbit tracks + routing pulses + live API panel), marquee
   polish, section reveal rhythm, warm glass panels, model/pricing card
   treatment, footer grid. Motion runs at normal preference; everything
   rests under prefers-reduced-motion with all content visible. */

/* ---- Sticky nav ------------------------------------------------------------ */

.mpub-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 8, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(45, 30, 30, 0.7);
}

.mpub-nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mpub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: #e5e7eb;
  text-decoration: none;
  white-space: nowrap;
}

.mpub-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fb923c 0%, #ea580c 55%, #7c2d12 100%);
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.55), inset -2px -3px 6px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.mpub-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.mpub-links a {
  color: #a39595;
  text-decoration: none;
  transition: color 0.15s;
  position: relative;
}

.mpub-links a:hover,
.mpub-links a:focus-visible {
  color: #fff;
}

/* Underline draws on hover (motion layer keeps it quiet). */
.mpub-links a:not(.mpub-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, #f97316, #ef4444);
  transition: right 0.2s ease;
}

.mpub-links a:not(.mpub-cta):hover::after,
.mpub-links a:not(.mpub-cta):focus-visible::after {
  right: 0;
}

.mpub-navdrop {
  position: relative;
}

.mpub-navdrop-menu {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 10px);
  z-index: 60;
}

.mpub-navdrop:hover .mpub-navdrop-menu,
.mpub-navdrop:focus-within .mpub-navdrop-menu {
  display: block;
}

.mpub-drop-card {
  width: 232px;
  background: #161010;
  border: 1px solid #2d1e1e;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.mpub-drop-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 9px;
  padding: 9px 12px;
  text-decoration: none;
}

.mpub-drop-row:hover {
  background: rgba(45, 30, 30, 0.5);
}

.mpub-drop-glyph {
  color: #fb923c;
  margin-top: 2px;
}

.mpub-drop-title {
  display: block;
  color: #f3f4f6;
  font-size: 13.5px;
}

.mpub-drop-sub {
  display: block;
  color: #9ca3af;
  font-size: 12px;
}

.mpub-navlink {
  color: #a39595;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.mpub-navlink:hover {
  color: #fff;
}

.mpub-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mpub-cta {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  padding: 8px 16px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}

.mpub-cta:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.mpub-cta:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.95);
}

.mpub-cta:focus-visible,
.mpub-nav button:focus-visible,
.mpub-links a:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* Mobile menu: accessible disclosure button; panel is plain markup so it
   works without JS (details-free, checkbox-free — button toggles a class).
   No-JS fallback: the panel stays closed but every critical route is also
   reachable from the footer grid, so nothing is hidden. */
.mpub-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid #3b2727;
  border-radius: 10px;
  color: #e5e7eb;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  align-items: center;
  gap: 8px;
}

.mpub-menu-panel {
  display: none;
  border-top: 1px solid rgba(45, 30, 30, 0.7);
  background: rgba(13, 8, 8, 0.97);
}

.mpub-menu-panel.mpub-open {
  display: block;
}

.mpub-menu-panel nav {
  max-width: 1152px;
  margin: 0 auto;
  padding: 12px 20px 20px;
  display: grid;
  gap: 4px;
}

.mpub-menu-panel a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 15px;
  padding: 11px 12px;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mpub-menu-panel a:hover {
  background: #241818;
  color: #fff;
}

@media (max-width: 900px) {
  .mpub-links {
    display: none;
  }

  .mpub-menu-btn {
    display: inline-flex;
  }
}

/* Narrow phones: the nav row must never push the page sideways. "Sign in"
   stays reachable inside the menu panel, so it is dropped from the bar. */
@media (max-width: 460px) {
  .mpub-nav-inner {
    gap: 10px;
  }

  .mpub-actions {
    gap: 8px;
  }

  .mpub-navlink {
    display: none;
  }

  .mpub-actions .inp {
    max-width: 66px;
  }

  .mpub-cta {
    padding: 8px 12px;
  }

  .mpub-menu-btn {
    padding: 8px;
  }
}

/* ---- Editorial hero --------------------------------------------------------- */

.mpub-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 380px at 80% 6%, rgba(234, 88, 12, 0.20), transparent 62%),
    radial-gradient(600px 320px at 12% -8%, rgba(99, 102, 241, 0.16), transparent 60%),
    #0d0808;
}

.mpub-hero-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 88px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

.mpub-hero h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 18px 0 0;
}

.mpub-grad {
  background: linear-gradient(135deg, #f97316, #ef4444, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mpub-hero-sub {
  margin-top: 26px;
  font-size: 18px;
  line-height: 1.65;
  color: #9ca3af;
  max-width: 54ch;
}

.mpub-hero-sub b {
  color: #34d399;
}

.mpub-hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mpub-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  border-radius: 12px;
  padding: 14px 28px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.mpub-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.mpub-btn:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.95);
}

.mpub-btn:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.mpub-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3b2727;
  color: #e5e7eb;
  font-weight: 500;
  font-size: 16px;
  border-radius: 12px;
  padding: 13px 26px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.mpub-btn-ghost:hover {
  background: #241818;
  border-color: rgba(234, 88, 12, 0.5);
  transform: translateY(-1px);
}

.mpub-btn-ghost:active {
  transform: translateY(0) scale(0.985);
}

.mpub-btn-ghost:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.mpub-endpoints {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Hero scene: dimensional orb + orbit tracks + moons + routing pulses. */
.mpub-scene {
  position: relative;
  height: 420px;
  pointer-events: none;
  perspective: 900px;
}

.mpub-orb {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  top: 60px;
  left: 50%;
  margin-left: -95px;
  overflow: hidden;
  background: radial-gradient(circle at 32% 30%, #fdba74, #ea580c 55%, #7c2d12);
  box-shadow:
    0 0 90px 18px rgba(234, 88, 12, 0.28),
    0 0 30px 6px rgba(239, 68, 68, 0.18),
    inset -18px -22px 48px rgba(20, 3, 1, 0.55),
    inset 10px 12px 30px rgba(255, 206, 160, 0.2);
}

/* Rotating surface: dark maria patches drift across the sphere. */
.mpub-orb-texture {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background:
    radial-gradient(22% 18% at 32% 34%, rgba(122, 30, 8, 0.5), transparent 70%),
    radial-gradient(28% 20% at 54% 52%, rgba(122, 30, 8, 0.4), transparent 72%),
    radial-gradient(18% 14% at 42% 70%, rgba(140, 38, 10, 0.45), transparent 68%),
    radial-gradient(14% 10% at 64% 30%, rgba(150, 44, 12, 0.35), transparent 70%),
    radial-gradient(24% 30% at 70% 62%, rgba(90, 20, 6, 0.35), transparent 72%);
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.mpub-orbit {
  position: absolute;
  border: 1px dashed rgba(249, 115, 22, 0.35);
  border-radius: 50%;
  transform: rotateX(66deg);
}

.mpub-orbit-1 {
  width: 280px;
  height: 280px;
  top: 15px;
  left: 50%;
  margin-left: -140px;
}

.mpub-orbit-2 {
  width: 360px;
  height: 360px;
  top: -25px;
  left: 50%;
  margin-left: -180px;
}

.mpub-moon {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fca5a5;
  box-shadow: 0 0 10px 2px rgba(252, 165, 165, 0.6);
  top: -5px;
  left: 50%;
  transform: scaleY(2.4);
}

.mpub-moon-alt {
  background: #93c5fd;
  box-shadow: 0 0 10px 2px rgba(147, 197, 253, 0.6);
  top: auto;
  bottom: -5px;
  left: 22%;
}

/* Live API panel: warm glass, request line, usage, node pulses. */
.mpub-api-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 14px;
  border: 1px solid rgba(45, 30, 30, 0.9);
  background: linear-gradient(160deg, rgba(30, 20, 20, 0.88), rgba(16, 10, 10, 0.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px rgba(0, 0, 0, 0.4);
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  pointer-events: auto;
}

.mpub-api-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #9ca3af;
}

.mpub-api-ok {
  color: #6ee7b7;
}

.mpub-api-route {
  margin-top: 10px;
  position: relative;
  height: 26px;
  border-radius: 6px;
  background: rgba(234, 88, 12, 0.06);
  border: 1px solid rgba(234, 88, 12, 0.18);
  overflow: hidden;
}

.mpub-api-route::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(252, 165, 165, 0.5), transparent);
  transform: translateX(-100%);
}

.mpub-api-meta {
  margin-top: 10px;
  color: #6b7280;
}

/* Routing scene SVG: nodes, hub, dashed routes with travelling pulses. */
.mpub-routes {
  position: absolute;
  right: 0;
  top: 10px;
  width: 320px;
  height: 200px;
  overflow: visible;
}

.mpub-route {
  fill: none;
  stroke: rgba(249, 115, 22, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.mpub-node {
  fill: #2d1e1e;
  stroke: rgba(249, 115, 22, 0.55);
  stroke-width: 1.5;
}

.mpub-hub {
  fill: #f97316;
  stroke: rgba(253, 186, 116, 0.8);
  stroke-width: 1.5;
}

/* ---- Marquee ----------------------------------------------------------------- */

.mpub-marquee {
  border-top: 1px solid rgba(45, 30, 30, 0.6);
  border-bottom: 1px solid rgba(45, 30, 30, 0.6);
  background: #0d0d14;
  padding: 26px 0;
}

.mpub-marquee-label {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 18px;
}

.mpub-marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.mpub-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
}

.mpub-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #12121a;
  border: 1px solid #1f1f2b;
  border-radius: 12px;
  padding: 12px 20px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  color: #d1d5db;
  transition: border-color 0.15s, color 0.15s;
}

.mpub-chip:hover {
  border-color: #ea580c;
  color: #fff;
}

.mpub-chip .glyph {
  color: #f97316;
}

.mpub-marquee-note {
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
  margin: 16px 0 0;
}

/* ---- Section rhythm + reveal ------------------------------------------------- */

.mpub-section {
  max-width: 1152px;
  margin: 0 auto;
  padding: 76px 20px;
}

.mpub-section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.mpub-section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: #f3f4f6;
}

.mpub-section-head p {
  color: #9ca3af;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

/* Scroll reveal: sections slide up once via IntersectionObserver adding
   [data-revealed]. Reduced motion: always visible, no transform ever. */
[data-reveal] {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  [data-reveal][data-revealed] {
    opacity: 1;
    transform: none;
  }

  /* No-JS safety: if the observer never runs, keep content visible. */
  html.no-io [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---- Cards (features / how-it-works / downloads) ------------------------------ */

.mpub-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.mpub-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mpub-card {
  background: linear-gradient(165deg, rgba(24, 16, 16, 0.85), #161010 60%);
  border: 1px solid #2d1e1e;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}

a.mpub-card,
.mpub-card[data-linked] {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.mpub-card:hover,
.mpub-card[data-linked]:hover {
  border-color: #3b2727;
  transform: translateY(-2px);
}

.mpub-card h3 {
  margin: 12px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #f3f4f6;
}

.mpub-card p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
}

.mpub-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(234, 88, 12, 0.14);
  color: #fb923c;
}

/* Grid and flex children must be allowed to shrink below their content
   width, otherwise a long code line widens the whole page on phones. */
.mpub-hero-inner > *,
.mpub-grid-2 > *,
.mpub-grid-3 > *,
.mpub-feature-list > *,
.mpub-signup-band > * {
  min-width: 0;
}

.mpub-hero-copy pre,
.mpub-card pre,
.mpub-term pre {
  max-width: 100%;
}

/* Docs/download code samples: the compiled site.css has no overflow-x-auto
   utility, so long curl/npm lines used to widen the whole page past 390px.
   Keep the scroll inside the pre (and inside wide tables) instead. */
main pre {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

main table {
  max-width: 100%;
  overflow-x: auto;
}

/* 390px: body is a flex column, and main's `mx-auto` auto margins cancel
   flex stretch, so main used to size itself to max-content (long code
   tokens) and stretched the page to 805px. Pin it to the container width
   and let the auto margins center it on desktop as before. */
body > main {
  width: 100%;
  min-width: 0;
}

main :is(p, h1, h2, h3, h4, li, td, th, code, a, span, div) {
  overflow-wrap: anywhere;
}

/* Grid items (e.g. the docs "Connect your tools" cards) carry min-width:
   auto, and the min-content floor includes the code block's max-content,
   which blew the single-column 390px track wide. Drop the floor; the pre
   scrolls internally instead. */
main .grid > * {
  min-width: 0;
}

/* Inline code tokens keep the copied `white-space: pre`, which ignores
   overflow-wrap and pushed /docs to 728px. Inline code may wrap; code
   inside a pre stays preformatted and scrolls. */
main :not(pre) > code {
  white-space: normal;
}

.mpub-step-num {
  position: absolute;
  top: -12px;
  left: 22px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.mpub-card-relative {
  position: relative;
}

.mpub-card h3.mpub-with-step {
  margin-top: 18px;
}

/* ---- Editorial feature list (no card chrome, no decorative icon chips) -------- */

.mpub-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 56px;
}

.mpub-feature {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 16px;
}

.mpub-feature h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #f3f4f6;
}

.mpub-feature p {
  margin: 0;
  color: #9ca3af;
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 46ch;
}

/* Last item spans the full row so a five-item list never leaves a hole. */
.mpub-feature:last-child {
  grid-column: 1 / -1;
}

/* ---- Numbered steps (rail, not cards) ---------------------------------------- */

.mpub-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.mpub-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 18px;
}

.mpub-step .mpub-step-num {
  position: static;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.mpub-step-body h3 {
  margin: 2px 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #f3f4f6;
}

.mpub-step-body p {
  margin: 0;
  color: #9ca3af;
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 62ch;
}

/* ---- Terminal panel ------------------------------------------------------------ */

.mpub-term {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(45, 30, 30, 0.9);
  background: #0b0708;
  cursor: pointer;
}

.mpub-term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(45, 30, 30, 0.6);
}

.mpub-term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mpub-term-title {
  margin-left: 10px;
  font-size: 12px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Local meta links replace the auto-loading badge images: no external
   request, no third-party chrome. */
.mpub-meta-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(120, 90, 80, 0.5);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: #c9b8b0;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.mpub-meta-link:hover {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.08);
  color: #f7e4da;
}

.mpub-meta-link:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* The replay control is a native button (Enter/Space, focus ring). */
.mpub-term-replay {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(120, 90, 80, 0.55);
  border-radius: 8px;
  color: #d6c3bb;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mpub-term-replay:hover {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.45);
  color: #f7e4da;
}

.mpub-term-replay:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.mpub-term-out {
  margin: 0;
  padding: 16px;
  min-height: 340px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
}

/* ---- Lineup tags ----------------------------------------------------------------- */

.mpub-lineup-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin: 0 0 10px;
}

.mpub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- CTA band --------------------------------------------------------------------- */

.mpub-cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #2d1e1e;
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(234, 88, 12, 0.22), transparent 65%),
    #161010;
  padding: 56px 32px;
  text-align: center;
}

.mpub-cta-band h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin: 0;
  color: #f3f4f6;
}

.mpub-cta-band p {
  color: #9ca3af;
  margin: 14px 0 0;
}

.mpub-cta-band .mpub-hero-actions {
  justify-content: center;
  margin-top: 28px;
}

/* ---- Footer grid ------------------------------------------------------------------- */

.mpub-footer {
  border-top: 1px solid rgba(45, 30, 30, 0.6);
  margin-top: auto;
  background: #0b0708;
}

.mpub-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 44px 20px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
  font-size: 13.5px;
}

.mpub-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #e5e7eb;
}

.mpub-footer-tag {
  color: #7f6a6a;
  margin: 12px 0 0;
  line-height: 1.6;
  max-width: 34ch;
}

.mpub-footer-col h4 {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f6a6a;
  font-weight: 600;
}

.mpub-footer-col a {
  display: block;
  color: #a39595;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
}

.mpub-footer-col a:hover {
  color: #fff;
}

.mpub-footer-col a:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
  border-radius: 4px;
}

.mpub-footer-bottom {
  border-top: 1px solid rgba(45, 30, 30, 0.5);
}

.mpub-footer-bottom-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px 20px;
  color: #7f6a6a;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Responsive ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .mpub-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }

  .mpub-scene {
    height: 340px;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }

  .mpub-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mpub-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mpub-hero-inner {
    padding: 56px 20px 56px;
  }

  .mpub-scene {
    height: 280px;
  }

  .mpub-orb {
    width: 140px;
    height: 140px;
    margin-left: -70px;
    top: 30px;
  }

  .mpub-orbit-1 {
    width: 210px;
    height: 210px;
    margin-left: -105px;
    top: -5px;
  }

  .mpub-orbit-2 {
    width: 280px;
    height: 280px;
    margin-left: -140px;
    top: -40px;
  }
}

@media (max-width: 640px) {
  .mpub-grid-3,
  .mpub-grid-2 {
    grid-template-columns: 1fr;
  }

  .mpub-feature-list {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .mpub-feature:last-child {
    grid-column: auto;
  }

  .mpub-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mpub-hero h1 {
    font-size: 38px;
  }

  .mpub-scene {
    height: 240px;
  }

  .mpub-section {
    padding: 56px 20px;
  }

  .mpub-hero-actions .mpub-btn,
  .mpub-hero-actions .mpub-btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* 390px: nothing may push the page wider than the viewport. */
@media (max-width: 390px) {
  .mpub-nav-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .mpub-hero-inner,
  .mpub-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mpub-hero h1 {
    font-size: 32px;
  }

  .mpub-hero-sub {
    font-size: 16px;
  }

  .mpub-scene {
    height: 200px;
  }

  .mpub-orb {
    width: 110px;
    height: 110px;
    margin-left: -55px;
    top: 24px;
  }

  .mpub-orbit-1 {
    width: 170px;
    height: 170px;
    margin-left: -85px;
    top: -4px;
  }

  .mpub-orbit-2 {
    width: 226px;
    height: 226px;
    margin-left: -113px;
    top: -32px;
  }

  .mpub-routes {
    width: 240px;
    height: 150px;
    right: -14px;
  }

  .mpub-api-panel {
    padding: 12px;
    font-size: 11px;
  }

  .mpub-term-out {
    min-height: 240px;
  }

  .mpub-cta-band {
    padding: 40px 18px;
  }

  .mpub-footer-bottom-inner {
    flex-direction: column;
  }
}

/* ---- Motion (normal preference) -------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .mpub-orb {
    animation: mpubDrift 7s ease-in-out infinite;
  }

  .mpub-orb-texture {
    animation: mpubSurface 90s linear infinite;
  }

  .mpub-orbit-1 {
    animation: mpubOrbitSpin 18s linear infinite;
  }

  .mpub-orbit-2 {
    animation: mpubOrbitSpin 30s linear infinite reverse;
  }

  .mpub-api-panel {
    animation: mpubPulse 4s ease-in-out infinite;
  }

  .mpub-api-route::before {
    animation: mpubRoutePulse 2.4s linear infinite;
  }

  .mpub-route {
    animation: mpubRouteDash 3s linear infinite;
  }

  .mpub-marquee-track {
    animation: mpubMarquee 32s linear infinite;
  }

  .mpub-marquee-wrap:hover .mpub-marquee-track {
    animation-play-state: paused;
  }

  .mpub-hero-copy {
    animation: mpubEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .mpub-scene {
    animation: mpubEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
  }

  .mpub-hub {
    transform-box: fill-box;
    transform-origin: center;
    animation: mpubHubPulse 3s ease-in-out infinite;
  }
}

@keyframes mpubRouteDash {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

@keyframes mpubHubPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@keyframes mpubDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes mpubSpin {
  to { transform: rotate(360deg); }
}

@keyframes mpubOrbitSpin {
  from { transform: rotateX(66deg) rotateZ(0deg); }
  to { transform: rotateX(66deg) rotateZ(360deg); }
}

@keyframes mpubSurface {
  to { transform: rotate(360deg); }
}

@keyframes mpubPulse {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

@keyframes mpubRoutePulse {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes mpubMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes mpubEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---- Reduced motion: everything rests, everything visible ------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .mpub-orb,
  .mpub-orb-texture,
  .mpub-orbit-1,
  .mpub-orbit-2,
  .mpub-api-panel,
  .mpub-api-route::before,
  .mpub-marquee-track,
  .mpub-hero-copy,
  .mpub-scene,
  .mpub-route,
  .mpub-hub {
    animation: none !important;
  }

  /* Terminal + route information remain fully visible in a final state. */
  .mpub-api-route::before {
    transform: none;
    opacity: 0.45;
  }

  .mpub-route {
    stroke-dasharray: none;
    stroke: rgba(249, 115, 22, 0.5);
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Interactive chrome rests too: hover/press transitions are motion. */
  .mpub-links a,
  .mpub-navlink,
  .mpub-cta,
  .mpub-btn,
  .mpub-btn-ghost,
  .mpub-chip,
  .mpub-card,
  .mpub-meta-link,
  .mpub-term-replay,
  .mpub-footer-col a {
    transition: none !important;
    animation: none !important;
  }
}
