:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --border: #e3e6ee;
  --text: #16203a;
  --muted: #66708a;
  --primary: #1d3a8a;
  --primary-deep: #13285f;
  --accent: #0ea5b7;
  --join: #ff6a1a;
  --join-deep: #f04a00;
  --shadow: 0 10px 30px rgba(22, 32, 58, 0.08);
  --radius: 16px;
  font-family: 'Cairo', 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
  line-height: 1.75;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1424;
    --surface: #161e33;
    --border: #26304a;
    --text: #e8ecf6;
    --muted: #9aa5c0;
    --primary: #7ea2ff;
    --primary-deep: #0b1430;
    --accent: #3fd0df;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--primary);
}

.ltr {
  direction: ltr;
  unicode-bidi: plaintext;
}

.muted {
  color: var(--muted);
}

/* Header, shared by every page */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

header .bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  direction: ltr;
}

header nav {
  display: flex;
  gap: 18px;
  margin-inline-start: auto;
}

header nav a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

header nav a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1.05rem;
}

.btn-outline {
  color: var(--primary);
  border: 1.5px solid var(--primary);
  background: transparent;
}

.btn-join {
  color: #ffffff;
  background: linear-gradient(135deg, var(--join), var(--join-deep));
  box-shadow: 0 8px 20px rgba(240, 74, 0, 0.3);
}

.btn-join:hover {
  box-shadow: 0 10px 26px rgba(240, 74, 0, 0.42);
}

.btn-light {
  color: var(--primary-deep);
  background: #ffffff;
}

/* Front page */
.home main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 64px 0 48px;
}

.pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.35;
  margin: 18px 0 12px;
}

.hero h1 .accent {
  color: var(--primary);
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 16px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.trust li::before {
  content: '✓';
  color: var(--accent);
  margin-inline-end: 6px;
  font-weight: 800;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.card-head,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--join) 16%, transparent);
  color: var(--join-deep);
  font-weight: 700;
  font-size: 0.85rem;
}

.steps-mini {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  border-inline-start: 2px solid var(--border);
}

.steps-mini li {
  position: relative;
  padding: 6px 18px;
  color: var(--muted);
}

.steps-mini li::before {
  content: '';
  position: absolute;
  inset-inline-start: -7px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.steps-mini li.done::before {
  background: var(--accent);
}

.steps-mini li.now {
  color: var(--text);
  font-weight: 700;
}

.steps-mini li.now::before {
  background: var(--join);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--join) 22%, transparent);
}

.card-foot {
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
}

.card-foot strong {
  color: var(--text);
  font-size: 1.2rem;
}

.block {
  padding: 56px 0;
}

.block h2,
.cta h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 6px;
  text-align: center;
}

.block-lead {
  text-align: center;
  color: var(--muted);
  margin: 0 0 28px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.features article,
.how li,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.features h3,
.how h3 {
  margin: 10px 0 4px;
  font-size: 1.1rem;
}

.features p,
.how p {
  margin: 0;
  color: var(--muted);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  font-size: 1.4rem;
}

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.cta {
  margin: 16px 0 8px;
  padding: 48px 24px;
  border-radius: 24px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-deep), #1d3a8a 60%, #0e7490);
}

.cta p {
  margin: 0;
  opacity: 0.88;
}

.cta .hero-actions {
  justify-content: center;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.contact-card span:not(.icon) {
  color: var(--muted);
}

/* Legal pages */
body:not(.home) main {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
}

body:not(.home) main section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 24px 16px;
  margin: 16px 0;
}

section[lang='en'] {
  direction: ltr;
  text-align: left;
}

body:not(.home) h1 {
  font-size: 1.5rem;
}

body:not(.home) h2 {
  font-size: 1.1rem;
  margin-top: 1.4em;
}

/* Footer, shared by every page */
footer {
  max-width: 1120px;
  margin: 24px auto 0;
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.legal,
.links {
  margin-bottom: 6px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }

  .features,
  .how,
  .contact-cards {
    grid-template-columns: 1fr;
  }

  header nav {
    display: none;
  }

  .header-actions {
    margin-inline-start: auto;
  }
}

@media (max-width: 480px) {
  /* Only the front page's header is full; its brand link keeps its name through its own label. */
  .home .brand span {
    display: none;
  }

  .header-actions .btn {
    padding: 7px 12px;
    font-size: 0.85rem;
  }

  .btn-lg {
    width: 100%;
  }
}

/* The links at the foot of a page are one line of text, too small for a finger on their own. */
@media (pointer: coarse) {
  footer a {
    display: inline-block;
    padding: 12px 4px;
  }

  .brand {
    min-height: 44px;
  }
}
