/* MVMHub theme, shared by every mvmhub.app page.
 *
 * MVMHub pages are branded as the app, published by Muslim Votes Matter (MVM),
 * not in the PeerLabs house style. Colours come from the app's iOS colour
 * assets (MVMHub Assets.xcassets: primaryBrand, primaryBackground,
 * cardBackground, hairline, heroSurface*, tint*Foreground), and type from MVM's
 * logo guide: Montserrat Bold for display, system UI for body text, as in the
 * app. The logo is MVM's artwork, used unaltered apart from the check mark
 * turning cream in dark mode, as the app's own splash screen does.
 *
 * Semantic tokens are redefined here, so page.css's layout themes itself. This
 * file also holds the MVM chrome both MVMHub templates share: the brand bar and
 * the footer. Page-specific layout (the beta landing page) lives in its own
 * stylesheet.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap');

:root {
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Montserrat', var(--font-sans);

  --mvm-orange: #F15625;        /* primaryBrand, logo guide */

  --bg: #FFF8F0;                /* primaryBackground */
  --bg-warm: #EFE3D3;           /* chipBackground */
  --surface: #FFFFFF;           /* cardBackground */
  --surface-sunk: #EFE3D3;      /* chipBackground */
  --fg: #000000;                /* primaryForeground */
  --fg-muted: #595454;          /* tint1Foreground */
  --border: #DCC9AE;            /* hairline */
  --border-strong: #908C8C;     /* tint2Foreground: 3:1 against white, for inputs */
  --accent: var(--mvm-orange);
  --accent-fg: #FFFFFF;
  /* primaryBrand darkened, same hue, for normal-size text: MVM orange itself
     is 2.8-3.4:1 on these backgrounds, and this is at least 4.6:1. The brand
     orange stays for fills, focus rings and the wordmark. */
  --accent-text: #BC360C;
  --hero-top: #FFE2D4;          /* heroSurfaceTop */
  --hero-border: #F6C7B4;       /* heroBorder */
  --hero-bottom: #FFEDE4;       /* heroSurfaceBottom */
  --track: rgb(188 190 192 / 0.3);   /* tint2Neutral at 30%: the page indicator's track */
  --danger: #C71A19;            /* destructiveBackground */
  --shadow: 0 1px 2px rgb(30 17 10 / 0.06), 0 12px 32px rgb(30 17 10 / 0.08);
  --frame: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E110A;
    --bg-warm: #2E2218;
    --surface: #322317;
    --surface-sunk: #2E2218;
    --fg: #FFF8F0;
    --fg-muted: #B0A79F;
    --border: #453325;
    --border-strong: #81766F;
    --accent-text: #F58460;     /* primaryBrand lightened: at least 4.6:1 (the orange is 3.4:1 on the hero) */
    --hero-top: #4D3320;
    --hero-border: #603C28;
    --hero-bottom: #2A1B11;
    --danger: #FF8A80;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

body {
  background:
    radial-gradient(60rem 30rem at 20% -10%, var(--hero-top), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
}

/* Brand bar and footer, shared by both MVMHub templates */

.brand-bar,
.mvm-footer {
  width: min(var(--frame), 100% - 2rem);
  margin-inline: auto;
}

.brand-bar {
  padding: var(--space-6) 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--fg);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand-accent {
  color: var(--mvm-orange);
}

.mvm-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0 var(--space-10);
  font-size: var(--text-caption-size);
  line-height: var(--text-caption-lh);
  color: var(--fg-muted);
}

.mvm-footer p {
  margin: 0 0 var(--space-1);
}

.mvm-footer a {
  color: var(--fg-muted);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* Documents: terms, privacy, support (templates/mvmhub.html). page.css lays
   them out; this sets them on a card in the app's style, with Montserrat
   headings. */

.mvm-doc {
  --frame: 48rem;
  font-size: 1rem;
}

.mvm-doc .page {
  width: min(var(--frame), 100% - 2rem);
  max-width: none;
  margin: var(--space-8) auto var(--space-12);
  padding: var(--space-12) var(--space-10) var(--space-10);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.mvm-doc .page-header {
  border-bottom-color: var(--border);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
}

.mvm-doc .page-title,
.mvm-doc .page-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mvm-doc .page-title {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.375rem);
  line-height: 1.15;
}

.mvm-doc .page-updated {
  color: var(--mvm-orange);
  font-weight: 600;
}

.mvm-doc .page-body h2 {
  font-size: 1.1875rem;
  line-height: 1.35;
}

.mvm-doc .page-body p,
.mvm-doc .page-body li {
  line-height: 1.65;
}

@media (max-width: 40rem) {
  .mvm-doc .page {
    width: min(var(--frame), 100% - 1rem);
    margin-top: var(--space-5);
    padding: var(--space-8) var(--space-5) var(--space-6);
    border-radius: 1rem;
  }

  .mvm-doc .page-title {
    font-size: 1.75rem;
  }
}

@media print {
  body {
    background: none;
  }

  .mvm-doc .page {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: auto;
  }
}
