/* Mateen legal pages (privacy / terms) — extends mateen-home-finance.css (--mf-*) */

.mateen-home-v2.mf-legal-page,
.mateen-home-v2 .mf-legal-page {
  background: var(--mf-paper);
}

/* —— Compact page header —— */
.mateen-home-v2 .mf-legal-hero {
  min-height: auto;
  padding-block: clamp(3rem, 7vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, var(--mf-paper-2) 0%, var(--mf-paper) 100%);
  border-bottom: 1px solid var(--mf-line);
}

.mateen-home-v2 .mf-legal-hero-stage {
  grid-template-columns: 1fr;
  max-width: 44rem;
  margin-inline: auto;
  text-align: start;
}

.mateen-home-v2 .mf-legal-hero-copy {
  max-width: 40rem;
  animation: mf-rise 0.85s var(--mf-ease) both;
}

.mateen-home-v2 .mf-legal-hero-copy .mf-brand {
  justify-content: flex-start;
}

.mateen-home-v2 .mf-legal-hero-copy h1 {
  max-width: 22ch;
  margin-block: var(--mf-space-3) var(--mf-space-4);
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.2;
  color: var(--mf-ink);
}

html[lang="en"] .mateen-home-v2 .mf-legal-hero-copy h1,
body.dirltr .mateen-home-v2 .mf-legal-hero-copy h1 {
  font-family: var(--mf-font-en);
  letter-spacing: -0.02em;
}

.mateen-home-v2 .mf-legal-hero-copy .mf-hero-sub {
  margin: 0;
  max-width: 48ch;
  font-size: var(--mf-body);
  line-height: 1.7;
  color: var(--mf-muted);
}

.mateen-home-v2 .mf-legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mf-space-3) var(--mf-space-5);
  margin-top: var(--mf-space-5);
  padding-top: var(--mf-space-4);
  border-top: 1px solid var(--mf-line);
  font-size: var(--mf-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mf-muted-2);
}

.mateen-home-v2 .mf-legal-meta a {
  color: var(--mf-brand);
  text-decoration: none;
  font-weight: 600;
}

.mateen-home-v2 .mf-legal-meta a:hover {
  color: var(--mf-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* —— Document body —— */
.mateen-home-v2 .mf-legal-body {
  padding-block: var(--mf-space-7) var(--mf-space-8);
}

.mateen-home-v2 .mf-legal-doc {
  max-width: 42rem;
  margin-inline: auto;
}

.mateen-home-v2 .mf-legal-section {
  margin-bottom: var(--mf-space-7);
  padding-bottom: var(--mf-space-6);
  border-bottom: 1px solid var(--mf-line);
  animation: mf-rise 0.7s var(--mf-ease) both;
}

.mateen-home-v2 .mf-legal-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mateen-home-v2 .mf-legal-section > .mf-eyebrow {
  margin-bottom: var(--mf-space-3);
}

.mateen-home-v2 .mf-legal-section h2 {
  margin: 0 0 var(--mf-space-4);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--mf-ink);
}

html[lang="en"] .mateen-home-v2 .mf-legal-section h2,
body.dirltr .mateen-home-v2 .mf-legal-section h2 {
  font-family: var(--mf-font-en);
}

.mateen-home-v2 .mf-legal-section h3 {
  margin: var(--mf-space-5) 0 var(--mf-space-3);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mf-ink-soft);
}

.mateen-home-v2 .mf-legal-prose p {
  margin: 0 0 var(--mf-space-4);
  font-size: var(--mf-body);
  line-height: 1.8;
  color: var(--mf-ink-soft);
}

.mateen-home-v2 .mf-legal-prose p:last-child {
  margin-bottom: 0;
}

.mateen-home-v2 .mf-legal-prose ul,
.mateen-home-v2 .mf-legal-prose ol {
  margin: 0 0 var(--mf-space-4);
  padding-inline-start: 1.35rem;
  color: var(--mf-ink-soft);
}

.mateen-home-v2 .mf-legal-prose li {
  margin-bottom: var(--mf-space-3);
  font-size: var(--mf-body);
  line-height: 1.75;
}

.mateen-home-v2 .mf-legal-prose li:last-child {
  margin-bottom: 0;
}

.mateen-home-v2 .mf-legal-prose strong {
  color: var(--mf-ink);
  font-weight: 600;
}

/* —— Part divider (terms multi-part) —— */
.mateen-home-v2 .mf-legal-part {
  margin: var(--mf-space-7) 0 var(--mf-space-6);
  padding: var(--mf-space-5);
  border: 1px solid var(--mf-line);
  border-radius: 4px;
  background: var(--mf-white);
}

.mateen-home-v2 .mf-legal-part h2 {
  margin: 0 0 var(--mf-space-2);
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  color: var(--mf-ink);
}

.mateen-home-v2 .mf-legal-part p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--mf-muted);
}

/* —— Footer nav strip —— */
.mateen-home-v2 .mf-legal-nav {
  margin-top: var(--mf-space-7);
  padding: var(--mf-space-5) var(--mf-space-6);
  border: 1px solid var(--mf-line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, var(--mf-white) 0%, var(--mf-paper-2) 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mf-space-4);
}

.mateen-home-v2 .mf-legal-nav p {
  margin: 0;
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--mf-muted);
}

.mateen-home-v2 .mf-legal-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mf-space-3);
}

@media (max-width: 640px) {
  .mateen-home-v2 .mf-legal-nav {
    flex-direction: column;
    align-items: stretch;
    padding: var(--mf-space-5);
  }

  .mateen-home-v2 .mf-legal-nav-actions .mf-btn {
    width: 100%;
    text-align: center;
  }
}
