/* ================================================================
   MANDOOB PLATFORM — PUBLIC SEO PAGES
   Dark marketing theme for the public, indexable content pages.
   Token names follow the --mp-* convention of design-system.css,
   but the palette is the dark landing-page palette, not the light
   admin one. Deliberately self-contained: these pages load no
   Tailwind CDN compiler and no Spline iframe, so they stay fast
   and text-rich for crawlers.
   RTL-first: use logical properties, never left/right.
   ================================================================ */

:root {
  /* Surfaces (dark) */
  --mp-bg:            #020617;
  --mp-bg-alt:        #0b1120;
  --mp-surface:       rgba(15, 23, 42, 0.60);
  --mp-surface-hover: rgba(30, 41, 59, 0.60);
  --mp-border:        rgba(255, 255, 255, 0.07);
  --mp-border-strong: rgba(255, 255, 255, 0.14);

  /* Brand */
  --mp-primary:       #6366f1;
  --mp-primary-light: #a5b4fc;
  --mp-violet:        #7c3aed;
  --mp-violet-light:  #c084fc;
  --mp-cyan-light:    #67e8f9;
  --mp-emerald:       #10b981;
  --mp-gradient:      linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  --mp-gradient-text: linear-gradient(135deg, #a5b4fc 0%, #c084fc 45%, #67e8f9 100%);

  /* Typography */
  --mp-text:           #ffffff;
  --mp-text-secondary: #94a3b8;
  --mp-text-muted:     #64748b;
  --mp-font:           'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  /* Radius (matches the design-system.css scale) */
  --mp-r-sm:   8px;
  --mp-r:      12px;
  --mp-r-lg:   16px;
  --mp-r-xl:   24px;
  --mp-r-full: 9999px;

  /* Layout */
  --mp-nav-h:  68px;
  --mp-wrap:   1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mp-bg);
  color: var(--mp-text);
  font-family: var(--mp-font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* ---- Accessibility -------------------------------------------- */
.mp-skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--mp-primary);
  color: #fff;
  border-radius: 0 0 var(--mp-r) var(--mp-r);
  font-weight: 700;
  text-decoration: none;
}
.mp-skip:focus { inset-inline-start: 0; }

:focus-visible {
  outline: 2px solid var(--mp-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Gradient text ------------------------------------------- */
.mp-grad {
  background: var(--mp-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================ NAVBAR ================ */
.mp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--mp-nav-h);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--mp-border);
}

.mp-nav__inner {
  max-width: var(--mp-wrap);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.mp-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--mp-gradient);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}
.mp-brand__mark svg { width: 17px; height: 17px; fill: #fff; }
.mp-brand__text {
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mp-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mp-nav__links a {
  padding: 8px 12px;
  border-radius: var(--mp-r-sm);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
  white-space: nowrap;
}
.mp-nav__links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.mp-nav__links a[aria-current="page"] { color: var(--mp-primary-light); }

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

/* ================ BUTTONS ================ */
.mp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--mp-r);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.mp-btn--primary {
  background: var(--mp-gradient);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.38);
}
.mp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(99, 102, 241, 0.55);
}
.mp-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--mp-border-strong);
  color: rgba(255, 255, 255, 0.85);
}
.mp-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}
.mp-btn--sm { padding: 9px 16px; font-size: 0.875rem; }

/* ================ PAGE HEADER ================ */
.mp-hero {
  position: relative;
  padding: 72px 20px 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--mp-border);
}
.mp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(99, 102, 241, 0.20), transparent 78%) 70% 0% / 70% 120% no-repeat,
    radial-gradient(closest-side, rgba(124, 58, 237, 0.14), transparent 78%) 20% 100% / 60% 100% no-repeat;
}
.mp-hero__inner { position: relative; max-width: var(--mp-wrap); margin: 0 auto; }

.mp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: var(--mp-r-full);
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(165, 180, 252, 0.25);
  color: var(--mp-primary-light);
  font-size: 0.8125rem;
  font-weight: 700;
}

h1, h2, h3, h4 {
  color: var(--mp-text);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 20px;
}
.mp-lede {
  max-width: 68ch;
  margin: 0;
  color: var(--mp-text-secondary);
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  line-height: 1.85;
}
.mp-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ================ BREADCRUMB ================ */
.mp-crumb {
  max-width: var(--mp-wrap);
  margin: 0 auto;
  padding: 16px 20px 0;
  font-size: 0.8125rem;
  color: var(--mp-text-muted);
}
.mp-crumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.mp-crumb a { color: var(--mp-text-secondary); text-decoration: none; }
.mp-crumb a:hover { color: var(--mp-primary-light); text-decoration: underline; }
.mp-crumb li + li::before {
  content: "\2039";
  margin-inline-end: 8px;
  color: var(--mp-text-muted);
}

/* ================ CONTENT ================ */
.mp-main { max-width: var(--mp-wrap); margin: 0 auto; padding: 56px 20px 80px; }

.mp-prose { max-width: 72ch; }
.mp-prose h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.875rem);
  font-weight: 800;
  margin: 56px 0 18px;
  padding-top: 8px;
}
.mp-prose h2:first-child { margin-top: 0; }
.mp-prose h3 {
  font-size: clamp(1.1rem, 2.4vw, 1.3125rem);
  font-weight: 700;
  margin: 36px 0 12px;
  color: #e2e8f0;
}
.mp-prose p {
  margin: 0 0 18px;
  color: var(--mp-text-secondary);
  line-height: 1.9;
}
.mp-prose strong { color: #e2e8f0; font-weight: 700; }
.mp-prose a {
  color: var(--mp-primary-light);
  text-decoration: underline;
  text-decoration-color: rgba(165, 180, 252, 0.4);
  text-underline-offset: 3px;
}
.mp-prose a:hover { text-decoration-color: var(--mp-primary-light); }

.mp-prose ul, .mp-prose ol {
  margin: 0 0 22px;
  padding-inline-start: 24px;
  color: var(--mp-text-secondary);
}
.mp-prose li { margin-bottom: 10px; line-height: 1.85; }
.mp-prose li::marker { color: var(--mp-primary); }

/* ---- Pull-out note ------------------------------------------- */
.mp-note {
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: var(--mp-r-lg);
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-inline-start: 3px solid var(--mp-primary);
}
.mp-note p:last-child { margin-bottom: 0; }

/* ================ CARD GRID ================ */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.mp-card {
  padding: 26px;
  border-radius: var(--mp-r-xl);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.mp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.42);
  background: var(--mp-surface-hover);
}
.mp-card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--mp-r);
  background: var(--mp-gradient);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}
.mp-card__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-card h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.mp-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--mp-text-secondary);
  line-height: 1.8;
}

/* ================ WORKFLOW STEPS ================ */
.mp-steps { counter-reset: mp-step; list-style: none; padding: 0; margin: 32px 0; }
.mp-steps li {
  counter-increment: mp-step;
  position: relative;
  padding: 18px 64px 18px 20px;
  margin-bottom: 12px;
  border-radius: var(--mp-r-lg);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  color: var(--mp-text-secondary);
  line-height: 1.8;
}
.mp-steps li::before {
  content: counter(mp-step);
  position: absolute;
  inset-inline-end: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: var(--mp-r-sm);
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(165, 180, 252, 0.3);
  color: var(--mp-primary-light);
  font-weight: 800;
  font-size: 0.875rem;
  display: grid;
  place-items: center;
}
.mp-steps strong { display: block; color: #fff; margin-bottom: 4px; }

/* ================ TABLE ================ */
.mp-table-wrap { overflow-x: auto; margin: 28px 0; }
.mp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 460px;
}
.mp-table th, .mp-table td {
  padding: 13px 16px;
  text-align: start;
  border-bottom: 1px solid var(--mp-border);
}
.mp-table th {
  color: #fff;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.08);
  white-space: nowrap;
}
.mp-table td { color: var(--mp-text-secondary); }
.mp-table tr:last-child td { border-bottom: 0; }

/* ================ FAQ ================ */
.mp-faq { margin: 32px 0; }
.mp-faq details {
  margin-bottom: 12px;
  border-radius: var(--mp-r-lg);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  overflow: hidden;
}
.mp-faq details[open] { border-color: rgba(99, 102, 241, 0.35); }
.mp-faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  line-height: 1.6;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.mp-faq summary::-webkit-details-marker { display: none; }
.mp-faq summary::after {
  content: "+";
  margin-inline-start: auto;
  color: var(--mp-primary-light);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.mp-faq details[open] summary::after { transform: rotate(45deg); }
.mp-faq__body { padding: 0 22px 20px; }
.mp-faq__body p { margin: 0 0 14px; color: var(--mp-text-secondary); line-height: 1.9; }
.mp-faq__body p:last-child { margin-bottom: 0; }
.mp-faq__body ul { margin: 0 0 14px; padding-inline-start: 22px; color: var(--mp-text-secondary); }
.mp-faq__body li { margin-bottom: 8px; }

/* ================ CTA BAND ================ */
.mp-cta {
  margin: 72px auto 0;
  max-width: var(--mp-wrap);
  padding: 48px 32px;
  border-radius: var(--mp-r-xl);
  text-align: center;
  background:
    radial-gradient(closest-side, rgba(99, 102, 241, 0.22), transparent 80%) 50% 0% / 90% 150% no-repeat,
    var(--mp-bg-alt);
  border: 1px solid rgba(99, 102, 241, 0.26);
}
.mp-cta h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 900; margin-bottom: 14px; }
.mp-cta p {
  max-width: 54ch;
  margin: 0 auto 28px;
  color: var(--mp-text-secondary);
  line-height: 1.85;
}
.mp-cta__row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ================ RELATED LINKS ================ */
.mp-related {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--mp-border);
}
.mp-related h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 18px; }
.mp-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
}
.mp-related a {
  display: block;
  padding: 16px 20px;
  border-radius: var(--mp-r);
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
}
.mp-related a:hover {
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  transform: translateY(-2px);
}

/* ================ FOOTER ================ */
.mp-footer {
  border-top: 1px solid var(--mp-border);
  background: var(--mp-bg-alt);
  padding: 52px 20px 32px;
}
.mp-footer__inner {
  max-width: var(--mp-wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 36px;
}
.mp-footer h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mp-text-muted);
  margin-bottom: 14px;
}
.mp-footer ul { list-style: none; padding: 0; margin: 0; }
.mp-footer li { margin-bottom: 10px; }
.mp-footer a {
  color: var(--mp-text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color .18s ease;
}
.mp-footer a:hover { color: var(--mp-primary-light); }
.mp-footer__about p {
  color: var(--mp-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin: 12px 0 0;
  max-width: 34ch;
}
.mp-footer__bottom {
  max-width: var(--mp-wrap);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--mp-border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--mp-text-muted);
}

/* ================ MOTION ================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 640px) {
  .mp-hero { padding: 48px 20px 40px; }
  .mp-main { padding: 40px 20px 64px; }
  .mp-cta { padding: 36px 22px; border-radius: var(--mp-r-lg); }
  .mp-steps li { padding: 16px 58px 16px 18px; }
}
