:root {
  --purple: #7b2fbe;
  --purple-dark: #5a1f8e;
  --purple-deep: #3d1463;
  --pink: #e91e8c;
  --pink-soft: #fce4f2;
  --text: #1c1229;
  --muted: #5c4f6e;
  --line: #eadff5;
  --bg: #faf7fd;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(90, 31, 142, 0.12);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", "Noto Sans Arabic", "Tahoma", sans-serif;
  line-height: 1.6;
}

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

a {
  color: var(--purple);
  text-decoration: none;
}

a:hover {
  color: var(--pink);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* Language visibility */
html[lang="en"] [data-lang="ar"],
html[lang="ar"] [data-lang="en"] {
  display: none !important;
}

html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", "Segoe UI", "Tahoma", sans-serif;
}

/* Header */
#site-header {
  min-height: var(--header-h);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  justify-self: start;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover,
.nav a.is-active {
  color: var(--purple);
  background: #f3e9fb;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
}

.lang-toggle,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}

.lang-toggle {
  background: #f3e9fb;
  color: var(--purple-dark);
  padding: 8px 12px;
  min-width: 52px;
}

.btn {
  padding: 12px 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 140%);
}

.btn:hover {
  color: var(--white);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--purple);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--purple-dark);
  background: #f3e9fb;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1.02rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(233, 30, 140, 0.45), transparent 36%),
    linear-gradient(145deg, var(--purple-deep) 0%, var(--purple) 52%, #9b3ed4 100%);
  padding: 72px 0 80px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 320px;
  height: 320px;
  border-radius: 40% 60% 70% 30%;
  background: rgba(255, 255, 255, 0.08);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffe6f5;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  max-width: 16ch;
}

.hero .lead {
  margin: 0 0 28px;
  max-width: 38rem;
  font-size: 1.15rem;
  color: #f3e9fb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero .powered {
  margin: 0;
  color: #e8d4f5;
  font-size: 0.95rem;
}

.hero .powered a {
  color: var(--white);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.hero .powered a:hover {
  color: #ffd6ef;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section .intro {
  margin: 0 0 32px;
  color: var(--muted);
  max-width: 40rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.card h3 {
  margin: 12px 0 8px;
  font-size: 1.12rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3e9fb, var(--pink-soft));
  color: var(--purple);
  font-size: 1.3rem;
  font-weight: 800;
}

.steps {
  counter-reset: step;
}

.step h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-inline-end: 10px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 0.9rem;
  vertical-align: middle;
}

.callout {
  background: var(--white);
  border-radius: 24px;
  padding: 36px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.callout.accent {
  background: linear-gradient(135deg, #4a1a78, var(--purple));
  color: var(--white);
  border: 0;
}

.callout.accent p,
.callout.accent .intro {
  color: #f3e9fb;
}

.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.cta-band {
  text-align: center;
  padding: 64px 0 80px;
}

.cta-band .actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Legal */
.legal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.legal h2 {
  margin-top: 28px;
  font-size: 1.2rem;
}

.legal p,
.legal li {
  color: var(--muted);
}

.page-hero {
  padding: 56px 0 12px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.page-hero .intro {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
}

.page-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f3e9fb;
  color: var(--purple-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.contact-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-section {
  padding-top: 28px;
}

.contact-grid {
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
}

.contact-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-card .icon {
  flex-shrink: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.contact-card-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.contact-card .contact-kicker {
  margin: 0 0 2px;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  fill: none;
  stroke: var(--purple);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-phones {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.contact-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contact-tel {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}

.wa-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f9ef;
  color: #0f8a45;
  font-size: 0.82rem;
  font-weight: 700;
}

.wa-chip:hover {
  color: #0b6b38;
  background: #d4f3e0;
}

/* Footer */
#site-footer,
.site-footer {
  margin-top: auto;
}

.site-footer {
  background: var(--purple-deep);
  color: #e8d4f5;
  padding: 36px 0 28px;
}

.site-footer a {
  color: var(--white);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 16px;
}

.powered-by {
  font-weight: 700;
  color: var(--white);
  margin: 0 0 8px;
}

.powered-by a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  color: #cbb6e0;
}

/* Desktop download / QR */
.download-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(233, 30, 140, 0.4), transparent 36%),
    linear-gradient(145deg, var(--purple-deep) 0%, var(--purple) 55%, #9b3ed4 100%);
}

.download-shell .site-header {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.download-shell .brand,
.download-shell .nav a {
  color: var(--white);
}

.download-shell .nav a:hover,
.download-shell .nav a.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.download-shell .lang-toggle {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.download-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 56px;
  text-align: center;
}

.download-main h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.download-main .lead {
  margin: 0 auto 28px;
  max-width: 28rem;
  color: #f3e9fb;
}

.qr-card {
  display: inline-block;
  background: var(--white);
  padding: 18px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.qr-card img {
  display: block;
  width: 280px;
  height: 280px;
}

.download-url {
  display: inline-block;
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: #e8d4f5;
  word-break: break-all;
}

.download-url:hover {
  color: var(--white);
}

.qr-file {
  color: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.qr-file:hover {
  color: var(--white);
}

.download-shell .site-footer {
  background: transparent;
}


@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .site-header {
    height: auto;
  }

  .site-header .inner {
    height: auto;
    grid-template-columns: 1fr auto;
    padding: 10px 0;
    row-gap: 8px;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .header-actions .btn {
    display: none;
  }
}
