/* قضاء — website styles. Arabic, RTL, responsive, light & dark. */

@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("../fonts/Tajawal-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --emerald: #1E5B4C;
  --emerald-deep: #16453A;
  --emerald-soft: #8CCBB4;
  --mint: #D3EAE0;
  --gold: #B8974F;
  --gold-soft: #D6B870;
  --gold-pale: #F3E8CC;

  --bg: #F8F6F0;
  --bg-alt: #F1EEE6;
  --card: #FFFFFF;
  --ink: #1F2A26;
  --muted: #5C6B65;
  --line: #DFE5E2;
  --accent: var(--emerald);
  --accent-ink: #FFFFFF;
  --accent-2: var(--gold);
  --chip: #E1ECE8;
  --hero-a: #22654F;
  --hero-b: #123A30;
  --shadow: 0 1px 2px rgba(20, 40, 34, .06), 0 8px 24px rgba(20, 40, 34, .06);

  --notice-bg: #FBF5E6;
  --notice-line: #EADFC2;
  --radius: 18px;
  --wrap: 1120px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1A16;
    --bg-alt: #0B1512;
    --card: #08110E;
    --ink: #E6EEEA;
    --muted: #A3B4AC;
    --line: #22332C;
    --accent: var(--emerald-soft);
    --accent-ink: #063027;
    --accent-2: var(--gold-soft);
    --chip: #152621;
    --hero-a: #14261F;
    --hero-b: #060D0B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --notice-bg: #1C1A10;
    --notice-line: #3A3320;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-weight: 700; font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }

.nav { margin-inline-start: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .98rem;
  padding: 6px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--chip); }

@media (max-width: 560px) {
  .nav .nav-optional { display: none; }
  .brand { font-size: 1.15rem; }
  .badges { gap: 8px; }
  .badge { font-size: .88rem; padding: 6px 12px; }
}

/* -------------------------------------------------------------- hero */

.hero {
  position: relative; isolation: isolate;
  color: #fff;
  background: linear-gradient(180deg, var(--hero-a), var(--hero-b));
}
/* Decorations are clipped on their own layer so the phones can overhang
   the bottom of the hero. */
.hero-deco { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.hero-deco::before {
  /* soft crescent */
  content: ""; position: absolute;
  width: 620px; height: 620px; border-radius: 50%;
  inset-inline-end: -210px; top: -240px;
  box-shadow: -70px 70px 0 0 rgba(214, 184, 112, .09);
}
.hero .wrap {
  display: grid; gap: 28px; align-items: center;
  grid-template-columns: 1fr;
  padding-block: 44px 0;
}
.hero-copy { text-align: center; }
.hero-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.5rem); margin-bottom: .3em; }
.hero h1 .gold { color: var(--gold-soft); }
.hero .lead { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: #D3EAE0; max-width: 34em; margin-inline: auto; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 8px; padding: 0; list-style: none; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  font-weight: 600; font-size: .95rem; color: #fff;
}
.badge svg { width: 18px; height: 18px; flex: none; }
.store-note {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 12px 22px; border-radius: 14px;
  background: #fff; color: var(--emerald-deep); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.store-note svg { width: 22px; height: 22px; }

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 300px; }
.hero-art img { width: min(64vw, 300px); margin-bottom: -34%; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.hero-art .back { position: absolute; width: min(50vw, 240px); inset-inline-end: max(18px, calc(50% - 200px)); bottom: 0; margin-bottom: -40%; opacity: .96; transform: rotate(4deg); }
.hero-art .front { position: relative; z-index: 1; transform: translateX(14%); }
.hero-spacer { height: clamp(90px, 22vw, 150px); background: var(--bg); }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; padding-block: 64px 0; }
  .hero-copy { text-align: start; }
  .hero-icon { margin-inline: 0; }
  .hero .lead { margin-inline: 0; }
  .badges { justify-content: flex-start; }
  .hero-art { min-height: 520px; }
  .hero-art img { width: 300px; margin-bottom: -120px; }
  .hero-art .back { width: 260px; inset-inline-end: auto; inset-inline-start: 40px; bottom: 30px; margin-bottom: -120px; }
  .hero-art .front { transform: translateX(-60px); }
  .hero-spacer { height: 150px; }
}

/* ---------------------------------------------------------- sections */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 40em; margin: 0 auto clamp(28px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .92rem; color: var(--accent-2);
  letter-spacing: 0; margin-bottom: 6px;
}
.eyebrow::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--accent-2); margin: 8px auto 0; }
.eyebrow.start { display: block; text-align: start; }
.eyebrow.start::after { margin-inline: 0; }

/* feature cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--chip); color: var(--accent); margin-bottom: 14px;
}
.icon svg { width: 24px; height: 24px; }

/* what you can make up */
.items { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .items { grid-template-columns: repeat(4, 1fr); } }
.items .card h3 { color: var(--accent); display: flex; align-items: center; gap: 8px; }
.items ul { list-style: none; margin: 10px 0 0; padding: 0; }
.items li { position: relative; padding-inline-start: 22px; margin-bottom: 4px; color: var(--ink); }
.items li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .72em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2);
}

/* split rows (text + device) */
.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
.split + .split { margin-top: clamp(48px, 7vw, 80px); }
.split .device { display: flex; justify-content: center; }
.split .device img { width: min(78vw, 320px); filter: drop-shadow(0 18px 36px rgba(20,40,34,.18)); }
.split .device.wide img { width: min(100%, 620px); }
.split ul { padding-inline-start: 1.1em; margin: 0; }
.split li { margin-bottom: .4em; }
.split li::marker { color: var(--accent-2); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.reverse .device { order: -1; }
}

/* screenshot gallery */
.gallery {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px; margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: thin;
}
.gallery figure { margin: 0; flex: 0 0 auto; width: clamp(190px, 58vw, 250px); scroll-snap-align: center; }
.gallery img { border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.gallery-hint { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 4px; }
@media (min-width: 1100px) { .gallery-hint { display: none; } }

/* privacy band */
.band {
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, var(--hero-a), var(--hero-b));
  color: #fff; padding: clamp(28px, 5vw, 48px);
  display: grid; gap: 20px; align-items: center; grid-template-columns: 1fr;
}
.band h2 { color: #fff; }
.band p { color: #D3EAE0; margin: 0; }
.band .btn { justify-self: start; }
@media (min-width: 820px) { .band { grid-template-columns: 1fr auto; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 12px 22px; border-radius: 14px; font-weight: 800;
  background: #fff; color: var(--emerald-deep);
}
.btn:hover { background: var(--gold-pale); }
.btn svg { width: 20px; height: 20px; }

/* FAQ */
.faq { max-width: 780px; margin-inline: auto; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 18px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; padding: 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--accent);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* important notice */
.section.tight { padding-block: 0 clamp(40px, 6vw, 72px); }
.notice {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  background: var(--notice-bg); color: var(--ink);
  border: 1px solid var(--notice-line); border-inline-start: 6px solid var(--accent-2);
  border-radius: var(--radius); padding: clamp(20px, 3.5vw, 32px);
}
.notice h2 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); margin-bottom: .45em; }
.notice ul { margin: 0 0 1em; padding-inline-start: 1.2em; }
.notice li { margin-bottom: .35em; }
.notice li::marker { color: var(--accent-2); }
.notice-foot { font-weight: 700; margin: 0; }
.notice-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-2); color: #fff;
}
.notice-icon svg { width: 28px; height: 28px; }
@media (min-width: 720px) { .notice { grid-template-columns: auto 1fr; gap: 22px; } }

/* support */
.support {
  max-width: 720px; margin-inline: auto; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow);
}
.support .icon { margin: 0 auto 14px; }
.support p { color: var(--muted); }
.support-hint { font-size: .94rem; margin: 16px 0 0; }
.btn-accent { background: var(--accent); color: var(--accent-ink); font-size: 1.08rem; }
.btn-accent:hover { background: var(--emerald-deep); color: #fff; }
.mail { font-weight: 800; font-size: 1.15rem; }

/* ------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--ink); }
.footer-note { flex-basis: 100%; margin: 0; font-size: .88rem; }

/* ---------------------------------------------------- document pages */

.doc-hero {
  background: linear-gradient(180deg, var(--hero-a), var(--hero-b)); color: #fff;
  padding-block: clamp(36px, 6vw, 64px);
}
.doc-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem); margin-bottom: .2em; }
.doc-hero p { color: #D3EAE0; margin: 0; }

.doc { padding-block: clamp(32px, 5vw, 56px); }
.doc .wrap { max-width: 820px; }
.summary {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 32px;
  border-inline-start: 5px solid var(--accent-2);
}
.summary h2 { font-size: 1.25rem; margin-bottom: .6em; }
.summary ul { margin: 0; padding-inline-start: 1.1em; }
.summary li { margin-bottom: .3em; }
.doc h2 { font-size: 1.4rem; margin-top: 1.8em; padding-top: .2em; }
.doc h2:first-of-type { margin-top: 0; }
.doc ul { padding-inline-start: 1.2em; }
.doc li { margin-bottom: .45em; }
.doc li::marker { color: var(--accent-2); }
.doc .meta { color: var(--muted); font-size: .95rem; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--chip);
  color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 600;
}
.toc a:hover { background: var(--line); }

/* print: plain document */
@media print {
  .site-header, .site-footer, .toc, .skip { display: none !important; }
  .doc-hero { background: none; color: #000; }
  .doc-hero p { color: #333; }
  body { background: #fff; color: #000; }
}
