/* =============================================================
   Manta X - Components
   Buttons, cards, forms, navigation, footer.
   ============================================================= */

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px;
}

.btn:disabled { cursor: not-allowed; background: var(--mx-surface-1); color: var(--mx-text-muted); }

/* Primary (red) */
.btn-primary {
  background: var(--mx-red);
  color: var(--mx-white);
  border-color: var(--mx-red);
}
.btn-primary:hover { background: var(--mx-red-hover); border-color: var(--mx-red-hover); }
.btn-primary:active { transform: translateY(1px); }

/* Ghost (white outline on dark) */
.btn-ghost {
  background: transparent;
  color: var(--mx-white);
  border: 1px solid var(--mx-white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* Text link */
.btn-text {
  background: transparent;
  color: var(--mx-red);
  padding: 0;
  min-height: 0;
  border: 0;
}
.btn-text:hover { text-decoration: underline; }

/* Arrow after */
.btn .arrow { display: inline-block; transition: transform var(--dur-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* =========================
   CARDS
   ========================= */
.card {
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.card > h3 { margin-bottom: var(--space-3); }
.card > p { color: var(--mx-text-muted); }

.card-hover {
  cursor: pointer;
}
.card-hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--mx-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--mx-border-strong);
}
.card-hover:hover::before { transform: scaleX(1); }

/* Featured accent */
.card-featured { border-left: 2px solid var(--mx-red); }

/* Stat card */
.stat {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--mx-hairline);
}
.stat:first-child { border-top: 0; padding-top: 0; }
.stat-num {
  font-size: clamp(56px, 6vw, 84px);
  font-weight: 700;
  line-height: 1;
  color: var(--mx-red);
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mx-text-muted);
}

/* Pill / tag */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--mx-text-muted);
  background: transparent;
  color: var(--mx-white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pill-active { background: var(--mx-red); border-color: var(--mx-red); }

/* =========================
   NAVIGATION
   ========================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--mx-black);
  border-bottom: 1px solid var(--mx-surface-1);
  z-index: 100;
  transition: background var(--dur-base) var(--ease),
              backdrop-filter var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}
.site-header.scrolled {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--mx-surface-1);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  /* Stack above .mobile-menu, which is a sibling inside the header */
  position: relative;
  z-index: 100;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--mx-white);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-logo .logo-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--mx-text-muted);
  transition: color var(--dur-fast) var(--ease);
  padding: var(--space-2) 0;
  position: relative;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--mx-white);
}
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--mx-red);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  /* Extend hover zone downward so mouse can cross the gap to the menu */
  padding-bottom: 16px;
  margin-bottom: -16px;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* Invisible bridge filling the gap between toggle and menu */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 20px;
  pointer-events: none;
}
.nav-dropdown:hover::after,
.nav-dropdown:focus-within::after {
  pointer-events: auto;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 280px;
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease) 80ms,
              transform 180ms var(--ease) 80ms;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.nav-dropdown-menu a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--mx-white);
  font-size: 15px;
}
.nav-dropdown-menu a:hover { background: rgba(255, 255, 255, 0.04); color: var(--mx-white); }

.nav-cta { padding: 10px 20px; min-height: 40px; font-size: 14px; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--mx-white);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease), top var(--dur-fast) var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* =========================
   MOBILE MENU - PREMIUM OVERLAY
   ========================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000000;
  z-index: 99;             /* Sits below header (100) so the X-toggle stays tappable */
  padding: calc(var(--nav-height) + var(--space-7)) var(--space-5) 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s;
}
/* When content is short, vertically centre via auto margins on the nav block */
.mobile-menu-nav { margin: auto 0; }
body.menu-open .mobile-menu {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.30s var(--ease) 0s, visibility 0s linear 0s;
}

/* Header border vanishes while menu is open so the two surfaces read as one */
body.menu-open .site-header {
  border-bottom-color: transparent;
}

/* Lock body scroll while menu is open */
body.menu-open {
  overflow: hidden;
}

/* Background decorative wireframe shapes (very faint, slow drift) */
.mobile-menu-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.menu-shape {
  position: absolute;
  opacity: 0.06;
  fill: none;
  stroke: #FFFFFF;
  animation: menu-shape-drift 32s ease-in-out infinite;
}
.menu-shape-1 {
  top: 4%;
  right: -22%;
  width: 90%;
  animation-duration: 38s;
}
.menu-shape-2 {
  bottom: 8%;
  left: -18%;
  width: 70%;
  animation-duration: 28s;
  animation-delay: -12s;
}
@keyframes menu-shape-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(24px, -18px) rotate(6deg); }
}

/* Red accent rule that strokes left-to-right when menu opens */
.mobile-menu-accent {
  position: absolute;
  top: calc(var(--nav-height) + var(--space-7));
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--mx-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.20s;
  z-index: 1;
}
body.menu-open .mobile-menu-accent {
  transform: scaleX(1);
}

/* Centered nav block */
.mobile-menu-nav {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  text-align: center;
  margin: 0 auto;
}
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.mobile-menu-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s var(--ease), transform 0.45s var(--ease);
}
body.menu-open .mobile-menu-item {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger 80ms apart, after background fades */
body.menu-open .mobile-menu-item:nth-child(1) { transition-delay: 0.18s; }
body.menu-open .mobile-menu-item:nth-child(2) { transition-delay: 0.26s; }
body.menu-open .mobile-menu-item:nth-child(3) { transition-delay: 0.34s; }
body.menu-open .mobile-menu-item:nth-child(4) { transition-delay: 0.42s; }
body.menu-open .mobile-menu-item:nth-child(5) { transition-delay: 0.50s; }

/* Closing: collapse stagger to zero so it feels instant */
body:not(.menu-open) .mobile-menu-item {
  transition-delay: 0s;
}

/* Top-level link / Services button styling */
.mobile-menu-item > a,
.mobile-menu-toggle-services {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 600;
  color: var(--mx-white);
  text-decoration: none;
  padding: 6px 0;
  cursor: pointer;
  background: none;
  border: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-item > a:hover,
.mobile-menu-toggle-services:hover { color: var(--mx-red); }
.mobile-menu-item > a[aria-current="page"] { color: var(--mx-red); }

.mobile-menu-toggle-services svg {
  transition: transform 0.3s var(--ease);
  color: currentColor;
}
.mobile-menu-toggle-services[aria-expanded="true"] {
  color: var(--mx-red);
}
.mobile-menu-toggle-services[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Services sub-menu */
.mobile-menu-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  text-align: center;
  transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
}
.mobile-menu-toggle-services[aria-expanded="true"] + .mobile-menu-sub {
  max-height: 600px;
  padding-top: 18px;
}
.mobile-menu-sub a {
  display: block;
  font-size: 20px;
  font-weight: 400;
  color: var(--mx-text-muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.mobile-menu-sub a:hover { color: var(--mx-white); }
.mobile-menu-sub a[aria-current="page"] { color: var(--mx-red); }

/* Menu footer (social + email) */
.mobile-menu-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-7) 0 var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.45s var(--ease) 0.55s;
  /* Solid backdrop fading up so scrolling nav content is occluded cleanly */
  background: linear-gradient(to top, #000 60%, rgba(0, 0, 0, 0));
  pointer-events: none;
}
.mobile-menu-footer > * {
  pointer-events: auto;
}
body.menu-open .mobile-menu-footer {
  opacity: 1;
}
body:not(.menu-open) .mobile-menu-footer {
  transition-delay: 0s;
}
.mobile-menu-social {
  display: flex;
  gap: 12px;
}
.mobile-menu-social a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border: 1px solid var(--mx-hairline);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--mx-text-muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.mobile-menu-social a:hover {
  color: var(--mx-red);
  border-color: var(--mx-red);
}
.mobile-menu-social svg { width: 18px; height: 18px; }
.mobile-menu-email {
  font-size: 13px;
  color: var(--mx-text-muted);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.mobile-menu-email:hover { color: var(--mx-white); }

/* Hamburger toggle: white default, red on hover */
.nav-toggle:hover { color: var(--mx-red); }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 480px) {
  .mobile-menu-list { gap: 30px; }
  .mobile-menu-sub { gap: 12px; }
  .mobile-menu-sub a { font-size: 18px; }
}

/* =========================
   FORMS
   ========================= */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }

.form-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mx-text-muted);
  text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--mx-white);
  font-size: var(--fs-body);
  font-family: var(--font-sans);
  transition: border-color var(--dur-fast) var(--ease);
  min-height: 52px;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--mx-text-muted); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--mx-red);
}

.form-textarea { resize: vertical; min-height: 140px; }

.form-error {
  color: var(--mx-red);
  font-size: var(--fs-caption);
}

.form-check {
  display: inline-flex;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--mx-text-muted);
  font-size: var(--fs-caption);
  line-height: 1.5;
  cursor: pointer;
}
.form-check input { margin-top: 3px; accent-color: var(--mx-red); }

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: var(--mx-black);
  border-top: 1px solid var(--mx-surface-1);
  padding-block: var(--space-9) var(--space-5);
  color: var(--mx-text-muted);
  font-size: var(--fs-caption);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-8);
}

.footer-brand .nav-logo { margin-bottom: var(--space-4); font-size: 20px; }
.footer-brand p { max-width: 32ch; color: var(--mx-text-muted); line-height: 1.6; }

.footer-col h4 {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mx-white);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  color: var(--mx-text-muted);
  font-size: var(--fs-body);
  transition: color var(--dur-fast) var(--ease);
}
.footer-col a:hover { color: var(--mx-white); }

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.footer-social a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border: 1px solid var(--mx-hairline);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.footer-social a:hover { border-color: var(--mx-red); color: var(--mx-red); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid var(--mx-surface-1);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* =========================
   SERVICE ICONS
   ========================= */
.service-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mx-white);
  margin-bottom: var(--space-4);
  transition: transform var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  transition: stroke-width var(--dur-base) var(--ease);
}
.card-hover:hover .service-icon {
  transform: translateY(-4px) scale(1.08) rotate(-3deg);
  color: var(--mx-red);
}
.card-hover:hover .service-icon svg {
  stroke-width: 2;
}

/* =========================
   BLOG CARDS
   ========================= */
.post-card { display: flex; flex-direction: column; gap: var(--space-3); }
.post-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-caption);
  color: var(--mx-text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.post-card h3 { transition: color var(--dur-fast) var(--ease); }
.post-card:hover h3 { color: var(--mx-red); }

/* =========================
   UTILITY COMPONENTS
   ========================= */
.cta-band {
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-border);
  border-left: 2px solid var(--mx-red);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

/* CTA grid collapses to single column on mobile */
@media (max-width: 768px) {
  .cta-band { padding: var(--space-6); }
  .cta-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-6) !important;
  }
}
@media (max-width: 480px) {
  .cta-band { padding: var(--space-5); }
}

.logo-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-7);
  align-items: center;
  opacity: 0.6;
}
.logo-strip div {
  aspect-ratio: 3 / 1;
  border: 1px dashed var(--mx-hairline);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mx-text-muted);
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 768px) { .logo-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); } }

/* =========================
   COOKIE CONSENT BANNER
   ========================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--mx-surface-1);
  border-top: 1px solid #333333;
  padding: var(--space-4) var(--space-5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  transform: translateY(110%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}
.cookie-banner[data-visible="true"] {
  transform: translateY(0);
}
.cookie-banner-text {
  color: var(--mx-white);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 60ch;
}
.cookie-banner-text a {
  color: var(--mx-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner-text a:hover { color: var(--mx-white); }
.cookie-banner-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}
.cookie-banner-actions .btn {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .cookie-banner-text { font-size: 13px; }
  .cookie-banner-actions {
    flex-direction: row;
    width: 100%;
  }
  .cookie-banner-actions .btn {
    flex: 1;
    padding: 10px 14px;
  }
}

@media (max-width: 320px) {
  .cookie-banner-actions { flex-direction: column; }
}

/* =========================
   LEGAL DOCUMENT TYPOGRAPHY
   ========================= */
.legal-doc {
  color: var(--mx-white);
  font-size: var(--fs-body-lg);
  line-height: 1.7;
}
.legal-doc h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
  color: var(--mx-text-muted);
  letter-spacing: 0.02em;
}
.legal-doc p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
}
.legal-doc ul,
.legal-doc ol {
  list-style: revert;
  padding-left: var(--space-5);
  margin-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--mx-text-muted);
  max-width: 70ch;
}
.legal-doc ul li,
.legal-doc ol li { padding-left: var(--space-2); }
.legal-doc strong { color: var(--mx-white); font-weight: 600; }
.legal-doc a {
  color: var(--mx-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-doc a:hover { color: var(--mx-white); }

/* =========================
   BLOG ARTICLE TYPOGRAPHY
   ========================= */
.article-body {
  color: var(--mx-white);
  font-size: var(--fs-body-lg);
  line-height: 1.75;
  max-width: 70ch;
  margin-inline: auto;
}
.article-body > * + * { margin-top: var(--space-5); }
.article-body h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  letter-spacing: -0.015em;
}
.article-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}
.article-body p { color: var(--mx-white); }
.article-body p.lead {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.55;
  color: var(--mx-white);
}
.article-body ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--mx-text-muted);
  font-size: var(--fs-body-lg);
}
.article-body ul li {
  padding-left: var(--space-5);
  position: relative;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 1px;
  background: var(--mx-red);
}
.article-body ol {
  padding-left: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--mx-text-muted);
  font-size: var(--fs-body-lg);
}
.article-body strong { color: var(--mx-white); font-weight: 700; }
.article-body a {
  color: var(--mx-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5) 0;
  font-size: var(--fs-body);
}
.article-body th,
.article-body td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--mx-hairline);
  color: var(--mx-text-muted);
}
.article-body th {
  color: var(--mx-white);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom-color: var(--mx-red);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  font-size: var(--fs-caption);
  color: var(--mx-text-muted);
  letter-spacing: 0.04em;
  margin-top: var(--space-4);
}
.article-meta .dot { width: 3px; height: 3px; background: var(--mx-text-muted); border-radius: 50%; opacity: 0.6; }

/* Blog listing card */
.blog-card {
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--mx-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--mx-border-strong);
}
.blog-card:hover::before { transform: scaleX(1); }
.blog-card:hover h3 { color: var(--mx-red); }
.blog-card .post-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-caption);
  color: var(--mx-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.blog-card h3 {
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color var(--dur-base) var(--ease);
}
.blog-card p {
  color: var(--mx-text-muted);
  line-height: 1.55;
}
.blog-card .read-more {
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--mx-red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================
   INTERIOR PAGE LAYOUT
   ========================= */
.page-hero {
  padding-block: calc(var(--nav-height) + var(--space-9)) var(--space-9);
  border-bottom: 1px solid var(--mx-surface-1);
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: var(--space-4); }
.page-hero h1 {
  max-width: 22ch;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}
.page-hero .lede {
  color: var(--mx-text-muted);
  font-size: var(--fs-body-lg);
  max-width: 60ch;
  line-height: 1.55;
}
.page-hero .hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

/* Blog post inline hero illustration */
.hero-illustration {
  margin: 0 0 var(--space-5);
  max-width: 100%;
  opacity: 0.95;
}
.hero-illustration svg {
  width: 100%;
  height: auto;
  max-height: 200px;
  display: block;
}
@media (max-width: 768px) {
  .hero-illustration svg { max-height: 140px; }
}

/* Answer-first extractable block */
.answer-first {
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--mx-surface-1);
}
.answer-first .eyebrow { margin-bottom: var(--space-4); }
.answer-first p {
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.5;
  max-width: 68ch;
  color: var(--mx-white);
}

/* Content section with question-H2 format */
.content-section {
  padding-block: var(--space-9);
}
.content-section h2 {
  max-width: 24ch;
  margin-bottom: var(--space-5);
}
.content-section p {
  color: var(--mx-text-muted);
  max-width: 68ch;
  line-height: 1.65;
  font-size: var(--fs-body-lg);
}
.content-section p + p { margin-top: var(--space-4); }
.content-section ul,
.content-section ol {
  max-width: 66ch;
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--mx-text-muted);
  font-size: var(--fs-body-lg);
  line-height: 1.55;
}
.content-section ul li {
  padding-left: var(--space-5);
  position: relative;
}
.content-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1px;
  background: var(--mx-red);
}
.content-section ol {
  counter-reset: list;
}
.content-section ol li {
  counter-increment: list;
  padding-left: var(--space-6);
  position: relative;
}
.content-section ol li::before {
  content: counter(list, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--mx-red);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Split two-column content */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* Info panel used on flagship pages */
.info-panel {
  background: var(--mx-surface-1);
  border: 1px solid var(--mx-border);
  border-left: 2px solid var(--mx-red);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.info-panel h3 { margin-bottom: var(--space-3); font-size: var(--fs-h3); }
.info-panel p { color: var(--mx-text-muted); font-size: var(--fs-body); line-height: 1.6; }

/* FAQ list */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--mx-hairline);
}
.faq-item {
  border-bottom: 1px solid var(--mx-hairline);
  padding: var(--space-6) 0;
}
.faq-item h3 {
  margin-bottom: var(--space-3);
  font-size: var(--fs-h4);
  font-weight: 600;
}
.faq-item p {
  color: var(--mx-text-muted);
  max-width: 70ch;
  line-height: 1.65;
}

/* Final CTA section */
.cta-final {
  padding-block: var(--space-9);
  text-align: left;
  border-top: 1px solid var(--mx-surface-1);
}
.cta-final h2 {
  max-width: 20ch;
  margin-bottom: var(--space-4);
}
.cta-final p {
  color: var(--mx-text-muted);
  font-size: var(--fs-body-lg);
  max-width: 58ch;
  margin-bottom: var(--space-6);
}

/* Metric row for service pages */
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-7);
  border-top: 1px solid var(--mx-surface-1);
  border-bottom: 1px solid var(--mx-surface-1);
}
.metric-row .metric h3 {
  font-size: clamp(40px, 4vw, 56px);
  color: var(--mx-red);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.metric-row .metric p {
  color: var(--mx-text-muted);
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .metric-row { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* Deliverables grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) { .deliverables-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .deliverables-grid { grid-template-columns: 1fr; } }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--mx-text-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
}
.scroll-indicator .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--mx-text-muted));
  animation: scroll-line 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
