/* حفيظ — the website, in the app's own look: the night teal of its screens, the
   gold of its marks, Cairo for every word, and the cemetery grid as a quiet motif.
   One stylesheet for every page. Versioned file name (site-3): the domain is behind
   Cloudflare, which keeps CSS for hours — a new name is fetched at once. */

:root {
  --bg: #0c1a1a;
  --bg-2: #0f2323;
  --bg-3: #132c2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.04);
  --text: #e9f2f0;
  --muted: #a3bab5;
  --faint: #6f8a85;
  --teal: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --gold: #facc15;
  --gold-500: #d4a017;
  --gold-600: #b48a2c;
  --cream: #f3eee2;
  --red: #dc2626;
  --radius: 18px;
  --radius-sm: 12px;
  --shell: 1160px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.85 "Cairo", system-ui, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 800; }
p { margin: 0; }

.shell { width: min(var(--shell), 100% - 32px); margin-inline: auto; }

/* ── the cemetery grid: squares and lanes, faint, behind the night sections ── */
.grid-bg {
  position: relative;
  isolation: isolate;
}
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(20, 184, 166, 0.18), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(212, 160, 23, 0.10), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

/* ── header ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(12, 26, 26, 0.72);
  border-bottom: 1px solid var(--line);
}
.topbar .shell { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 22px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--glass); }
.nav a[aria-current="page"] { color: var(--bg); background: var(--teal); }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-500)); color: #1b1503; box-shadow: 0 8px 24px rgba(212, 160, 23, 0.25); }
.btn-gold:hover { color: #1b1503; }
.btn-glass { background: var(--glass); color: var(--text); border-color: var(--line-2); }
.btn-glass:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.btn[aria-disabled="true"] { opacity: 0.75; cursor: default; pointer-events: none; }
.btn small { font-weight: 600; opacity: 0.75; font-size: 12px; }

/* ── hero ── */
.hero { padding: 64px 0 40px; }
.hero .shell { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.medallion {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  background: var(--cream);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  margin-bottom: 22px;
}
.medallion img { width: 76px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; margin-bottom: 8px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 900; letter-spacing: -0.01em; }
.hero h1 + .tagline { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; color: var(--teal); margin-top: 6px; }
.hero .lede { color: var(--muted); font-size: 18px; margin-top: 18px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 34px; }
.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat b { display: block; font-size: 24px; font-weight: 900; color: var(--text); line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }

/* the phone: a real screen of the app */
.phone {
  position: relative;
  width: min(320px, 78vw);
  margin-inline: auto;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #23302f, #0a1212);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone img { border-radius: 33px; width: 100%; height: auto; aspect-ratio: 540 / 1094; object-fit: cover; background: #1a2b2a; }
.hero .phone { transform: rotate(-3deg); }
.glow { position: relative; }
.glow::before {
  content: "";
  position: absolute;
  inset: 8% 12%;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.45), transparent);
  filter: blur(30px);
  z-index: -1;
}

/* ── sections ── */
.band { padding: 84px 0; }
.band-flush { padding-top: 0; }
.band-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.head { max-width: 46em; margin-bottom: 40px; }
.kicker { color: var(--gold); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.head h2 { font-size: clamp(28px, 4vw, 40px); }
.head p { color: var(--muted); margin-top: 10px; font-size: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
}
.step::before {
  counter-increment: step;
  content: counter(step, arabic-indic);
  position: absolute;
  top: -16px;
  inset-inline-start: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1b1503;
  background: linear-gradient(135deg, var(--gold), var(--gold-500));
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.ic {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(20, 184, 166, 0.14);
  color: var(--teal);
  margin-bottom: 14px;
}
.ic svg { width: 24px; height: 24px; }
.ic.gold { background: rgba(250, 204, 21, 0.12); color: var(--gold); }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.8; }

/* screens: a row of phones that scrolls on narrow screens */
.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 2px 22px;
  scrollbar-width: thin;
}
.screens figure { margin: 0; scroll-snap-align: start; }
.screens .phone { width: 232px; border-radius: 34px; padding: 9px; }
.screens .phone img { border-radius: 26px; }
.screens figcaption { text-align: center; margin-top: 12px; font-weight: 700; }
.screens figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }

/* wide screens: all seven phones in one row, no sideways scrolling */
@media (min-width: 1100px) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; gap: 16px; padding-bottom: 0; }
  .screens .phone { width: 100%; border-radius: 26px; padding: 7px; }
  .screens .phone img { border-radius: 20px; }
  .screens figcaption { font-size: 15px; }
  .screens figcaption span { font-size: 13px; }
}

/* the map: from the cemetery's own plan */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split h2 { font-size: clamp(28px, 4vw, 40px); }
.split-lede { color: var(--muted); margin-top: 12px; font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.ticks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ticks b { color: var(--text); }
.code {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 800;
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 8px;
  padding: 0 10px;
  letter-spacing: 0.02em;
}

/* privacy: what it does not do */
.refusals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.refusal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--glass);
}
.refusal strong { display: block; font-size: 18px; color: var(--text); margin-bottom: 6px; }
.refusal strong::before { content: "✕"; color: var(--gold); margin-inline-end: 8px; font-size: 15px; }
.refusal span { color: var(--muted); font-size: 15px; }

/* download */
.cta {
  text-align: center;
  border-radius: 28px;
  padding: 56px 24px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(20, 184, 166, 0.28), transparent 70%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2);
}
.cta h2 { font-size: clamp(28px, 4vw, 40px); }
.cta p { color: var(--muted); margin-top: 10px; }
.cta .actions { justify-content: center; }
.fine { color: var(--faint); font-size: 14px; margin-top: 16px; }

/* ── inner pages ── */
.page-head { padding: 54px 0 34px; }
/* inner pages read as one centred column: the title lines up with the text under it */
.page-head .shell, .prose-wrap .shell { width: min(820px, 100% - 32px); }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); }
.page-head p { color: var(--muted); margin-top: 8px; }
.prose-wrap { padding: 8px 0 80px; }
.prose {
  max-width: 820px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 44px);
}
.prose h2 { font-size: 24px; margin: 30px 0 10px; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 22px 0 8px; color: var(--teal); }
.prose p, .prose li { color: #cddcd8; }
.prose p + p { margin-top: 10px; }
.prose ul { padding-inline-start: 22px; margin: 10px 0; }
.prose li { margin: 4px 0; }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 10px 12px; text-align: start; vertical-align: top; }
.prose th { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.prose .en { direction: ltr; text-align: left; font-family: "Inter", "Cairo", system-ui, sans-serif; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 40px 0; }
.prose .summary { padding: 0; }
.summary { display: grid; gap: 10px; margin: 6px 0 22px; padding: 0; list-style: none; }
.summary li {
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

/* faq */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq details {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
}
.faq details[open] { border-color: rgba(20, 184, 166, 0.4); background: rgba(20, 184, 166, 0.05); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .a { color: #cddcd8; padding: 0 0 16px; }
.faq .a p + p { margin-top: 8px; }
.contact {
  max-width: 820px;
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(212, 160, 23, 0.10));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.contact h2 { font-size: 22px; }
.contact p { color: var(--muted); }

/* ── footer ── */
.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--faint); font-size: 14px; }
.foot .shell { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--muted); }

/* ── smaller screens ── */
@media (max-width: 980px) {
  .hero .shell, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .features, .refusals { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .topbar .shell { flex-wrap: wrap; min-height: 0; padding: 10px 0; gap: 8px; }
  .nav { margin-inline-start: 0; width: 100%; }
  .nav a { padding: 4px 10px; font-size: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features, .refusals { grid-template-columns: 1fr; }
  .band { padding: 60px 0; }
  .hero .phone { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
