/* Dalilna — marketing site. Plain CSS, mobile-first, RTL-aware via logical properties. */
:root {
  --emerald: #0B7A5E;
  --emerald-dark: #0E5C49;
  --deep: #06392D;
  --gold: #E8B44C;
  --gold-light: #F6D27E;
  --gold-ink: #8A5E0F; /* gold-family colour with AA contrast on cream */
  --cream: #FFF8EC;
  --cream-2: #F7EBD3;
  --ink: #10241E;
  --muted: #4A5D57;
  --line: rgba(14, 92, 73, 0.14);
  --card: #FFFFFF;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(6, 57, 45, 0.12), 0 4px 12px rgba(6, 57, 45, 0.06);
  --f-display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-text: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pattern-light: url('../img/khatam-light.svg');
  --pattern-emerald: url('../img/khatam-emerald.svg');
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
html[lang='ar'] body { font-size: 1.125rem; line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--emerald-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.3; margin: 0 0 0.5em; color: var(--deep); letter-spacing: -0.01em; }
html[lang='ar'] :is(h1, h2, h3) { line-height: 1.6; letter-spacing: 0; }
p { margin: 0 0 1em; }
bdi { unicode-bidi: isolate; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 820px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--deep); color: var(--cream); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 236, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { flex: none; display: flex; }
.brand img { height: 40px; width: auto; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; font-size: 0.95rem; }
.main-nav a:hover { background: rgba(11, 122, 94, 0.08); }
.lang-switch { display: flex; background: rgba(14, 92, 73, 0.08); border-radius: 999px; padding: 3px; }
.lang-switch a { text-decoration: none; color: var(--emerald-dark); font-weight: 600; font-size: 0.82rem; padding: 5px 10px; border-radius: 999px; line-height: 1.4; white-space: nowrap; }
.lang-switch a[lang='ar'] { font-size: 0.9rem; }
.lang-switch a[aria-current] { background: var(--emerald-dark); color: var(--cream); }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .brand img { height: 34px; }
  .lang-switch a { padding: 5px 8px; }
  .main-nav a { padding: 8px 6px; }
}
@media (max-width: 380px) { .header-inner { flex-wrap: wrap; padding-block: 8px; } .lang-switch { margin-inline-start: auto; } }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.3;
  transition: transform 0.15s ease, box-shadow 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(180deg, var(--gold-light), var(--gold)); color: var(--deep); box-shadow: 0 10px 24px rgba(232, 180, 76, 0.35); }
.btn-gold:hover { color: var(--deep); box-shadow: 0 14px 30px rgba(232, 180, 76, 0.45); }
.btn-ghost { color: var(--cream); border: 2px solid rgba(255, 248, 236, 0.45); }
.btn-ghost:hover { color: var(--cream); border-color: var(--cream); background: rgba(255, 248, 236, 0.08); }
.btn-dark { background: var(--deep); color: var(--cream); }
.btn-dark:hover { color: var(--cream); background: var(--emerald-dark); }
.btn-outline { color: var(--deep); border: 2px solid var(--deep); }
.btn-outline:hover { color: var(--deep); background: rgba(6, 57, 45, 0.06); }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden; color: var(--cream);
  background:
    radial-gradient(60% 50% at 70% 40%, rgba(246, 210, 126, 0.16), rgba(246, 210, 126, 0) 70%),
    var(--pattern-light) center / 180px 180px,
    radial-gradient(120% 90% at 50% 20%, var(--emerald) 0%, var(--emerald-dark) 55%, var(--deep) 100%);
}
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.6; }
.hero-inner { display: grid; gap: 40px; padding-block: 48px 0; align-items: center; }
.hero-logo { width: 120px; margin-bottom: 18px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25)); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  background: rgba(6, 57, 45, 0.55); border: 1.5px solid rgba(246, 210, 126, 0.7); color: var(--gold-light);
}
.eyebrow svg { width: 16px; height: 16px; }
.hero h1 { color: var(--cream); font-size: clamp(2rem, 6.2vw, 3.6rem); font-weight: 800; margin-bottom: 0.35em; text-wrap: balance; }
.hero h1 .gold { color: var(--gold-light); }
.hero .lead { font-size: 1.15rem; color: rgba(255, 248, 236, 0.86); max-width: 36em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 420px; margin-bottom: -2px; }
.hero-visual .phone { width: min(300px, 64vw); position: relative; z-index: 2; margin-bottom: -90px; }
.hero-visual .phone.back { position: relative; order: -1; width: min(250px, 52vw); z-index: 1; margin-inline-end: -110px; margin-bottom: 0; align-self: center; transform: translateY(-10px) rotate(var(--tilt, -6deg)); filter: brightness(0.9); }
html[dir='rtl'] .hero-visual .phone.back { --tilt: 6deg; }
.hero-visual .halo { position: absolute; width: 520px; height: 520px; border-radius: 50%; bottom: -120px; left: 50%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(246, 210, 126, 0.3), rgba(246, 210, 126, 0)); }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; padding-block: 72px 0; min-height: 600px; }
  .hero-text { padding-bottom: 80px; }
  .hero-visual { min-height: 560px; }
  .hero-visual .phone { width: 300px; }
  .hero-visual .phone.back { width: 250px; }
}
@media (max-width: 899px) { .hero-visual .phone.back { display: none; } .hero-logo { width: 96px; } .hero-text { text-align: center; } .hero-text .cta-row { justify-content: center; } .hero-logo { margin-inline: auto; } .hero .lead { margin-inline: auto; } }

/* phone mockup */
.phone {
  aspect-ratio: 1206 / 2622; border-radius: 15% / 7%; padding: 3.2%;
  background: linear-gradient(140deg, #6b6f73 0%, #2a2c2f 18%, #121315 50%, #2b2d30 82%, #8a8e92 100%);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35), 0 12px 24px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 12.5% / 5.8%; background: #000; }

/* ---------------- facts strip ---------------- */
.facts { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.facts ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
.facts li { display: flex; align-items: center; gap: 12px; }
.facts .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: rgba(11, 122, 94, 0.09); display: grid; place-items: center; color: var(--emerald); }
.facts .ic svg { width: 24px; height: 24px; }
.facts strong { display: block; font-family: var(--f-display); color: var(--deep); font-size: 1.1rem; line-height: 1.3; }
.facts span { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
@media (min-width: 820px) { .facts ul { grid-template-columns: repeat(4, 1fr); padding: 28px 0; } }

/* ---------------- sections ---------------- */
.section { padding-block: 72px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.kicker { display: inline-block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px; }
html[lang='ar'] .kicker { letter-spacing: 0; font-size: 0.95rem; }
.section-head h2 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); text-wrap: balance; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px auto 0; color: var(--gold); }
.divider::before, .divider::after { content: ''; width: 64px; height: 2px; background: currentColor; opacity: 0.7; }
.divider svg { width: 18px; height: 18px; }

.features { display: grid; gap: 64px; }
.feature { display: grid; gap: 28px; align-items: center; }
.feature .media { position: relative; display: flex; justify-content: center; padding: 34px 0; border-radius: 32px; background: var(--pattern-emerald) center / 150px 150px, linear-gradient(160deg, #FFFDF8, var(--cream-2)); border: 1px solid var(--line); overflow: hidden; }
.feature .media .phone { width: min(260px, 66vw); }
.feature .num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--deep); font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; }
.feature h3 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.feature p { color: var(--muted); font-size: 1.1rem; max-width: 32em; }
.feature .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.feature .tags li { padding: 4px 12px; border-radius: 999px; background: rgba(11, 122, 94, 0.08); color: var(--emerald-dark); font-weight: 600; font-size: 0.9rem; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature:nth-child(even) .media { order: 2; }
  .feature .media { padding: 48px 0; }
}

/* ---------------- business + values ---------------- */
.band-deep {
  color: var(--cream);
  background: var(--pattern-light) center / 160px 160px, radial-gradient(120% 120% at 50% 0%, var(--emerald-dark), var(--deep));
}
.band-deep h2, .band-deep h3 { color: var(--cream); }
.biz { display: grid; gap: 28px; align-items: center; }
.biz p { color: rgba(255, 248, 236, 0.85); font-size: 1.1rem; }
.biz .checks { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.biz .checks li { display: flex; gap: 10px; align-items: flex-start; }
.biz .checks svg { flex: none; width: 24px; height: 24px; color: var(--gold-light); margin-top: 3px; }
.biz .card-gold { border: 1.5px solid rgba(246, 210, 126, 0.6); border-radius: var(--radius); padding: 26px; background: rgba(255, 248, 236, 0.06); }
.biz .card-gold h3 { font-size: 1.2rem; color: var(--gold-light); }
.biz .card-gold ol { margin: 0; padding-inline-start: 1.3em; color: rgba(255, 248, 236, 0.9); }
.biz .card-gold li { margin-bottom: 6px; }
@media (min-width: 860px) { .biz { grid-template-columns: 1.2fr 1fr; gap: 56px; } }

.values { display: grid; gap: 16px; }
.value { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.value .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--emerald); color: var(--cream); margin-bottom: 14px; }
.value .ic svg { width: 28px; height: 28px; }
.value h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.value p { color: var(--muted); margin: 0; }
@media (min-width: 760px) { .values { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- early access ---------------- */
.early {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 32px; padding: 48px 22px;
  background: var(--pattern-emerald) center / 150px 150px, radial-gradient(120% 120% at 50% 0%, var(--gold-light), var(--gold) 70%, #D9A23C);
  color: var(--deep); box-shadow: var(--shadow);
}
.early h2 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); color: var(--deep); }
.early p { max-width: 34em; margin-inline: auto; font-size: 1.1rem; color: #3A2A08; }
.early .cta-row { justify-content: center; }
.early .mark { width: 56px; margin: 0 auto 12px; }
.early .small { font-size: 0.92rem; margin-top: 18px; color: #4B3A12; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--deep); color: rgba(255, 248, 236, 0.82); margin-top: 0; padding-top: 56px; font-size: 0.97rem; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 150px; margin-bottom: 14px; }
.footer-brand p { max-width: 30em; }
.site-footer h2 { color: var(--gold-light); font-size: 0.95rem; font-family: var(--f-text); font-weight: 700; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.soon-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; border: 1.5px solid rgba(246, 210, 126, 0.6); color: var(--gold-light); font-weight: 600; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255, 248, 236, 0.12); margin-top: 40px; padding-block: 20px; font-size: 0.88rem; color: rgba(255, 248, 236, 0.6); }
.footer-bottom p { margin: 0; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } .footer-brand { grid-column: auto; } }

/* ---------------- inner pages ---------------- */
.page-hero {
  color: var(--cream); padding-block: 44px 40px;
  background: var(--pattern-light) center / 160px 160px, radial-gradient(120% 140% at 50% 0%, var(--emerald), var(--emerald-dark) 60%, var(--deep));
}
.page-hero h1 { color: var(--cream); font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0; }
.page-hero p { color: rgba(255, 248, 236, 0.85); margin: 8px 0 0; font-size: 1.1rem; }
.legal, .content { padding-block: 32px 72px; }
.summary-card { background: var(--card); border: 1px solid var(--line); border-inline-start: 5px solid var(--gold); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 28px; }
.summary-card h2 { font-size: 1.1rem; margin-bottom: 6px; color: var(--emerald-dark); }
.summary-card p { margin: 0; }
.toc { background: rgba(11, 122, 94, 0.05); border-radius: 18px; padding: 18px 22px; margin-bottom: 36px; }
.toc h2 { font-size: 1.05rem; margin-bottom: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 1; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 32px; } }
.legal-body section { scroll-margin-top: 84px; padding-top: 8px; }
.legal-body h2 { font-size: 1.35rem; margin-top: 1.6em; color: var(--deep); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.legal-body ul { padding-inline-start: 1.3em; margin: 0 0 1em; }
.legal-body li { margin-bottom: 0.5em; }
.legal-body li::marker { color: var(--gold-ink); }
mark.todo { background: #FFE58A; color: #3D2E00; padding: 0 4px; border-radius: 4px; outline: 1.5px dashed #C9961E; outline-offset: 1px; }
mark.todo a { color: inherit; }
.draft-note { background: #FFF4CC; border: 1.5px dashed #C9961E; color: #3D2E00; border-radius: 14px; padding: 12px 16px; font-size: 0.95rem; }
.also { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 20px; }
.also h2 { font-size: 1rem; }
.also ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.also a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(11, 122, 94, 0.08); text-decoration: none; font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 8px rgba(6, 57, 45, 0.04); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: center; padding: 18px 20px; font-weight: 700; font-size: 1.08rem; color: var(--deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-inline-start: auto; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 122, 94, 0.09); color: var(--emerald); font-size: 1.3rem; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 20px 18px; }
.faq .ans > :last-child { margin-bottom: 0; }
.faq h2.group { font-size: 1.15rem; margin: 28px 0 4px; color: var(--emerald-dark); }
.path { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; font-weight: 700; }
.path span { background: rgba(11, 122, 94, 0.09); color: var(--emerald-dark); padding: 1px 10px; border-radius: 8px; white-space: nowrap; }
.path i { font-style: normal; color: var(--gold-ink); }

ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.2em; display: grid; gap: 14px; }
ol.steps > li { counter-increment: s; position: relative; padding-inline-start: 52px; min-height: 38px; }
ol.steps > li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--deep); font-weight: 800; font-family: var(--f-display); }
html[lang='ar'] ol.steps > li::before { content: counter(s, arabic-indic); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.card h2 { font-size: 1.35rem; }
.card ul { padding-inline-start: 1.3em; }
.contact-card { background: linear-gradient(160deg, #FFFDF8, var(--cream-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; margin-top: 32px; }
.contact-card h2 { font-size: 1.3rem; }
.contact-card .cta-row { justify-content: center; margin-top: 12px; }

/* 404 */
.notfound { text-align: center; padding-block: 80px; }
.notfound img { width: 90px; margin: 0 auto 18px; }
.notfound .langs { display: grid; gap: 28px; max-width: 520px; margin: 0 auto; }
.notfound h1 { font-size: 1.6rem; }
