/* Molhem public pages — same colours and fonts as the app. */

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('fonts/baloo-bhaijaan-2-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Baloo Bhaijaan 2';
  src: url('fonts/baloo-bhaijaan-2-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/poppins-semibold.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --purple: #412475;
  --purple-ink: #1d1236;
  --lilac: #c48cdf;
  --lilac-soft: #f5eefa;
  --lilac-line: #e6d6f1;
  --orange: #ff7723;
  --orange-soft: #fff1e7;
  --text: #2a2233;
  --muted: #625a6c;
  --bg: #fbf9fd;
  --card: #ffffff;
  --radius: 18px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Baloo Bhaijaan 2', system-ui, -apple-system, 'Segoe UI',
    Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

:lang(ar) {
  font-family: 'Baloo Bhaijaan 2', 'Poppins', system-ui, Tahoma, Arial, sans-serif;
}
:lang(en) {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.lang-block:lang(ar) {
  font-size: 17px;
  line-height: 1.85;
}

a {
  color: var(--purple);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--orange);
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
}
.skip:focus {
  inset-inline-start: 16px;
  top: 12px;
  z-index: 10;
  background: var(--card);
  padding: 8px 12px;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--lilac-line);
}
.topbar-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand img {
  display: block;
  height: 44px;
  width: auto;
}
.lang-switch {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lang-switch a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--lilac-line);
  background: var(--card);
  color: var(--purple);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch a:hover {
  border-color: var(--lilac);
  background: var(--lilac-soft);
  color: var(--purple);
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--purple) 0%, #5a3497 60%, #7a4bb0 100%);
  color: #fff;
}
.hero-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 16px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.hero-text {
  flex: 1;
  min-width: 0;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.25;
  font-weight: 700;
}
.hero p {
  margin: 0;
  color: #efe6f8;
  max-width: 60ch;
}
.hero .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.hero-mascot {
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

/* ── Content ─────────────────────────────────────────────────────────── */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}
.lang-block {
  padding-top: 28px;
  scroll-margin-top: 72px;
}
.lang-block + .lang-block {
  margin-top: 28px;
  border-top: 2px dashed var(--lilac-line);
}
.lang-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--purple);
  font-size: clamp(24px, 4.2vw, 32px);
  line-height: 1.3;
}
.lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 70ch;
}

.card {
  background: var(--card);
  border: 1px solid var(--lilac-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 16px 0;
  box-shadow: 0 1px 0 rgba(65, 36, 117, 0.04), 0 10px 30px -18px rgba(65, 36, 117, 0.25);
}
.card h2 {
  margin: 0 0 10px;
  color: var(--purple);
  font-size: 21px;
  line-height: 1.4;
}
.card h3 {
  margin: 18px 0 6px;
  color: var(--purple-ink);
  font-size: 17px;
  line-height: 1.45;
}
.card p {
  margin: 8px 0;
}
.card ul,
.card ol {
  margin: 8px 0;
  padding-inline-start: 22px;
}
.card li {
  margin: 4px 0;
}
.card li::marker {
  color: var(--orange);
  font-weight: 700;
}

.card.highlight {
  border: 2px solid var(--lilac);
  background: linear-gradient(180deg, var(--lilac-soft), #fff 70%);
}
.card.warn {
  border-color: #ffd2b3;
  background: var(--orange-soft);
}
.card.warn h2 {
  color: #9a3c00;
}

.steps {
  list-style: none;
  padding: 0 !important;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 44px;
  margin: 12px 0;
  min-height: 32px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 32px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.email-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--lilac-soft);
  border: 1px dashed var(--lilac);
}
.email-box a {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 17px;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
.button:hover {
  background: #e8640f;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: 'Poppins', sans-serif;
}

.meta {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--lilac-line);
  background: #fff;
}
.footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 16px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.footer-links a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}

/* ── Home tiles ──────────────────────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.tile {
  display: block;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--lilac-line);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.tile:hover {
  border-color: var(--lilac);
  color: var(--text);
  background: var(--lilac-soft);
}
.tile strong {
  display: block;
  color: var(--purple);
  font-size: 18px;
  margin-bottom: 2px;
}
.tile span {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 560px) {
  .hero-inner {
    padding: 26px 16px 30px;
  }
  .hero-mascot {
    width: 92px;
  }
  .card {
    padding: 16px;
  }
  .brand img {
    height: 36px;
  }
  .lang-switch a {
    padding: 5px 11px;
    font-size: 13px;
  }
  .email-box {
    padding: 10px 12px;
  }
  .email-box a {
    font-size: 14.5px;
  }
  .steps li {
    padding-inline-start: 38px;
  }
}

@media print {
  .topbar,
  .hero-mascot,
  .lang-switch {
    display: none;
  }
  .hero {
    background: none;
    color: var(--text);
  }
  .hero p {
    color: var(--text);
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}

.hero h1 .h1-sub {
  display: block;
  margin-top: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.66em;
  font-weight: 600;
  color: #efe6f8;
}
[dir='rtl'] .hero h1 .h1-sub {
  text-align: right;
}

/* An English line inside an Arabic section keeps its own direction but sits on
   the Arabic side. */
[dir='rtl'] p.ltr {
  text-align: right;
}
.card-top {
  margin-top: 32px;
}
