/* Public site of منصة حافظ — the app itself lives under /app/. Colors follow assets/brand/design-09. */
:root {
  --petrol-900: #0b2e2b;
  --petrol-800: #0f3a36;
  --petrol-700: #184f46;
  --petrol-600: #2a7a7a;
  --petrol-100: #e6f1ee;
  --ivory: #fcf8ef;
  --ivory-2: #f6efdf;
  --paper: #ffffff;
  --gold: #e0bb6f;
  --gold-deep: #a87c2e;
  --gold-soft: #f7ecd2;
  --ink: #17302d;
  --muted: #5c6f6b;
  --line: #e7dfcc;
  --whatsapp: #1fa855;
  --radius: 20px;
  --shadow: 0 18px 50px -20px rgba(15, 58, 54, .35);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.75;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; z-index: 99; background: var(--paper); padding: 8px 14px; border-radius: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.5em; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: linear-gradient(180deg, #ecc97f, #d9ad57); color: var(--petrol-900); box-shadow: 0 10px 24px -12px rgba(168, 124, 46, .8); }
.btn-petrol { background: var(--petrol-800); color: var(--ivory); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-light { background: rgba(255, 255, 255, .1); color: var(--ivory); border-color: rgba(255, 255, 255, .35); }
.btn-gold-line { background: rgba(236, 201, 127, .14); color: #ecc97f; border-color: #d9ad57; }
.btn-wa { background: var(--whatsapp); color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 248, 239, .88);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.2rem; color: var(--petrol-800); }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand span { white-space: nowrap; }
.brand small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--muted); font-size: .96rem; }
.nav-links a:hover { color: var(--petrol-800); }
.nav-actions { display: flex; gap: 10px; }
.nav-actions .btn { padding: .55em 1.2em; font-size: .95rem; }
.menu-toggle { display: none; margin-inline-start: auto; background: none; border: 0; padding: 8px; color: var(--petrol-800); cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: var(--ivory);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(224, 187, 111, .22), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(42, 122, 122, .45), transparent 60%),
    linear-gradient(160deg, var(--petrol-800), var(--petrol-900));
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e0bb6f' stroke-width='1.2'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 72px 0 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(224, 187, 111, .14); color: var(--gold); font-weight: 700; font-size: .9rem;
  border: 1px solid rgba(224, 187, 111, .3);
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; margin: 18px 0 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: rgba(252, 248, 239, .82); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; }
.hero-cta .btn { padding: .95em 1.8em; font-size: 1.05rem; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: rgba(252, 248, 239, .85); font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 20px; height: 20px; color: var(--gold); flex: none; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: min(300px, 72vw); aspect-ratio: 540 / 1110; border-radius: 40px; padding: 10px;
  background: linear-gradient(145deg, #1f3533, #0a1a19); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; }
.phone.back { position: absolute; width: min(240px, 56vw); transform: translate(-62%, 10%) rotate(-7deg); opacity: .9; z-index: 0; }
.hero-visual .phone.front { z-index: 1; transform: translateX(14%); }
.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  background: var(--paper); color: var(--ink); border-radius: 16px; padding: 10px 14px;
  box-shadow: var(--shadow); font-weight: 700; font-size: .9rem;
}
.float-card span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-deep); }
.float-card small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; }
.float-card.one { top: 12%; inset-inline-start: -2%; }
.float-card.two { bottom: 10%; inset-inline-end: 0; }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section.alt { background: var(--paper); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.kicker { color: var(--gold-deep); font-weight: 800; font-size: .92rem; letter-spacing: .02em; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; color: var(--petrol-800); margin-top: 6px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.ayah {
  text-align: center; padding: 44px 16px; background: var(--ivory-2);
  border-block: 1px solid var(--line);
}
.ayah p { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--petrol-800); margin: 0; line-height: 1.8; }
.ayah small { color: var(--gold-deep); font-weight: 700; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.section.alt .card { background: var(--ivory); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; margin-bottom: 18px;
  background: linear-gradient(160deg, var(--petrol-700), var(--petrol-800)); color: var(--gold);
}
.icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; color: var(--petrol-800); }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Paths */
.paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.path { border-radius: var(--radius); padding: 26px 22px; background: var(--paper); border: 1px solid var(--line); }
.path h3 { font-size: 1.12rem; color: var(--petrol-800); display: flex; align-items: center; gap: 10px; }
.path h3 svg { width: 24px; height: 24px; color: var(--gold-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.chips li { background: var(--petrol-100); color: var(--petrol-700); border-radius: 999px; padding: 2px 12px; font-size: .86rem; font-weight: 600; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 26px; border-radius: var(--radius); background: var(--ivory); border: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step, arabic-indic);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px;
  background: var(--gold-soft); color: var(--gold-deep); font-weight: 800; font-size: 1.2rem; border: 1.5px solid var(--gold);
}
.steps h3 { font-size: 1.1rem; color: var(--petrol-800); }
.steps p { color: var(--muted); margin: 0; font-size: .97rem; }

/* Gallery */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 22px; overflow-x: auto;
  padding: 8px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 100%; border-radius: 32px; padding: 8px; }
.gallery .phone img { border-radius: 25px; }
.gallery figcaption { margin-top: 12px; font-weight: 700; color: var(--petrol-800); font-size: .95rem; }

/* Audience */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.list li { display: flex; gap: 14px; align-items: flex-start; }
.list .icon { width: 44px; height: 44px; border-radius: 12px; margin: 0; flex: none; }
.list .icon svg { width: 22px; height: 22px; }
.list strong { display: block; color: var(--petrol-800); font-size: 1.05rem; }
.list span { color: var(--muted); font-size: .97rem; }
.split .phone { margin-inline: auto; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { display: flex; flex-direction: column; border-radius: var(--radius); padding: 30px; background: var(--paper); border: 1px solid var(--line); }
.plan.featured { background: linear-gradient(165deg, var(--petrol-700), var(--petrol-900)); color: var(--ivory); border-color: transparent; box-shadow: var(--shadow); }
.plan h3 { font-size: 1.3rem; color: var(--petrol-800); }
.plan.featured h3 { color: var(--gold); }
.plan p { color: var(--muted); }
.plan.featured p, .plan.featured li { color: rgba(252, 248, 239, .85); }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; }
.plan li svg { width: 20px; height: 20px; color: var(--gold-deep); flex: none; margin-top: 4px; }
.plan.featured li svg { color: var(--gold); }
.badge { align-self: flex-start; background: var(--gold); color: var(--petrol-900); border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 800; margin-bottom: 12px; }
.note { text-align: center; color: var(--muted); margin-top: 26px; font-size: .97rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--petrol-800); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold-deep); font-size: 1.4rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* CTA band */
.cta-band {
  border-radius: 28px; padding: 56px 40px; text-align: center; color: var(--ivory); position: relative; overflow: hidden;
  background: radial-gradient(700px 300px at 50% -20%, rgba(224, 187, 111, .3), transparent 70%), linear-gradient(160deg, var(--petrol-700), var(--petrol-900));
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.cta-band p { color: rgba(252, 248, 239, .82); max-width: 40em; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }

/* Footer */
.site-footer { background: var(--petrol-900); color: rgba(252, 248, 239, .75); padding: 56px 0 28px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .brand { color: var(--ivory); }
.site-footer h3 { color: var(--gold); font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.social { margin-top: 18px; }
.social-fb { display: inline-flex; align-items: center; gap: 10px; padding: .55em 1.1em .55em .7em; border-radius: 999px; background: #1877f2; color: #fff; font-weight: 700; }
.site-footer .social-fb:hover { color: #fff; background: #0f63d6; }
.social-fb svg { width: 1.6em; height: 1.6em; flex: none; }
.copy { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; font-size: .9rem; text-align: center; }

.wa-float-wrap { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60; }
.wa-float {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--whatsapp); color: #fff; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45);
}
.wa-menu {
  position: absolute; bottom: 70px; inset-inline-start: 0; width: 250px; padding: 14px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px;
}
.wa-menu[hidden] { display: none; }
.wa-menu strong { color: var(--petrol-800); font-size: .95rem; padding: 0 4px 4px; }
.wa-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; background: var(--ivory); font-weight: 700; color: var(--ink); }
.wa-menu a:hover { background: var(--petrol-100); }
.wa-menu a svg { width: 26px; height: 26px; color: var(--whatsapp); flex: none; }
.wa-menu small { display: block; color: var(--muted); font-weight: 600; font-size: .8rem; text-align: start; }
.wa-pair { display: flex; gap: 10px; }
.wa-pair .btn { flex: 1; padding-inline: 1em; }
.plan-ask { margin: 0 0 10px; font-weight: 700; }
.wa-float svg { width: 30px; height: 30px; }

/* Document pages (privacy, delete account) */
.doc { max-width: 820px; margin: 0 auto; padding: 56px 0 24px; }
.doc h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); color: var(--petrol-800); font-weight: 800; }
.doc h2 { font-size: 1.3rem; color: var(--petrol-800); margin-top: 1.8em; }
.doc .updated { color: var(--gold-deep); font-weight: 700; }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc li { margin-bottom: .5em; }
.doc .box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 24px 0; }
.lang-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.lang-switch a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: .9rem; background: var(--paper); }
.lang-switch a[aria-current] { background: var(--petrol-800); color: var(--ivory); border-color: var(--petrol-800); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* Responsive */
@media (max-width: 1020px) {
  .cards, .plans { grid-template-columns: repeat(2, 1fr); }
  .paths, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links, .nav-actions { display: none; }
  .site-header.open .nav { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .site-header.open .nav-links, .site-header.open .nav-actions { display: flex; width: 100%; }
  .site-header.open .nav-links { flex-direction: column; gap: 4px; order: 3; margin: 8px 0 0; }
  .site-header.open .nav-links a { display: block; padding: 10px 4px; font-size: 1.05rem; }
  .site-header.open .nav-actions { order: 4; padding: 8px 0 6px; }
  .site-header.open .nav-actions .btn { flex: 1; }
  .hero-grid { grid-template-columns: 1fr; padding: 44px 0 64px; gap: 40px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .trust { justify-content: center; }
  .split { grid-template-columns: 1fr; }
  .split .phone { order: -1; width: min(260px, 70vw); }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .doc-home { display: none; }
  .cards, .plans, .paths, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .float-card { font-size: .8rem; padding: 8px 10px; }
  .float-card.one { inset-inline-start: 0; }
  .phone.back { display: none; }
  .hero-visual .phone.front { transform: none; }
  .cta-band { padding: 40px 20px; }
  .card, .plan { padding: 24px; }
}
