/* Salamly website — shared design system
   Emerald + gold, glass surfaces, dark by default with a light option. */

:root {
    --bg: #06120f;
    --bg-2: #0a1c17;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-hover: rgba(255, 255, 255, 0.075);
    --surface-solid: #0d201a;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #eef6f2;
    --text-2: rgba(238, 246, 242, 0.68);
    --text-3: rgba(238, 246, 242, 0.42);
    --brand: #2dd4a0;
    --brand-2: #14b8a6;
    --brand-ink: #04211a;
    --gold: #e8c26b;
    --gold-2: #d4a853;
    --glow-a: rgba(45, 212, 160, 0.16);
    --glow-b: rgba(232, 194, 107, 0.09);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --badge-green-bg: rgba(34, 197, 94, 0.14);
    --badge-green-fg: #4ade80;
    --badge-yellow-bg: rgba(234, 179, 8, 0.14);
    --badge-yellow-fg: #facc15;
    --badge-red-bg: rgba(239, 68, 68, 0.14);
    --badge-red-fg: #f87171;
    --radius: 20px;
    --radius-sm: 12px;
    --maxw: 1180px;
    --pad: clamp(20px, 5vw, 56px);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ar: 'Amiri', 'Noto Naskh Arabic', serif;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f6faf8;
    --bg-2: #ecf4f0;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-hover: #ffffff;
    --surface-solid: #ffffff;
    --border: rgba(10, 40, 30, 0.1);
    --border-strong: rgba(10, 40, 30, 0.2);
    --text: #0b1f19;
    --text-2: rgba(11, 31, 25, 0.7);
    --text-3: rgba(11, 31, 25, 0.45);
    --brand: #0f9d77;
    --brand-2: #0d8a8a;
    --brand-ink: #ffffff;
    --gold: #a97c18;
    --gold-2: #b8891f;
    --glow-a: rgba(15, 157, 119, 0.12);
    --glow-b: rgba(184, 137, 31, 0.08);
    --shadow-lg: 0 30px 70px rgba(10, 40, 30, 0.14);
    --shadow-md: 0 8px 24px rgba(10, 40, 30, 0.08);
    --badge-green-bg: rgba(34, 197, 94, 0.12);
    --badge-green-fg: #15803d;
    --badge-yellow-bg: rgba(234, 179, 8, 0.14);
    --badge-yellow-fg: #a16207;
    --badge-red-bg: rgba(239, 68, 68, 0.1);
    --badge-red-fg: #b91c1c;
    color-scheme: light;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ── Ambient background ── */
.glow-orb { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.glow-orb-1 { width: 720px; height: 720px; top: -280px; right: -200px; background: radial-gradient(circle, var(--glow-a), transparent 70%); }
.glow-orb-2 { width: 640px; height: 640px; bottom: -200px; left: -200px; background: radial-gradient(circle, var(--glow-b), transparent 70%); }
body::before {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
    background-image:
        radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
}

.wrapper { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ── Header ── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-bottom: 1px solid var(--border);
}
.site-header .wrapper, nav.page-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px;
}
nav.page-nav { padding: 0; }
.nav-brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-actions, .nav-right { display: flex; align-items: center; gap: 10px; }
.nav-back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--text-2); padding: 8px 14px; border-radius: 999px; }
.nav-back:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-back svg { width: 16px; height: 16px; }
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }
.menu-btn { display: none; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; font-family: inherit;
    border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); box-shadow: 0 10px 30px -8px var(--brand); }
.btn-primary:hover { box-shadow: 0 14px 36px -8px var(--brand); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-sm { padding: 9px 18px; font-size: 14px; white-space: nowrap; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 90px); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; margin: 22px 0 22px; }
.grad { background: linear-gradient(120deg, var(--brand), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.accent { background: linear-gradient(120deg, var(--brand), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; color: var(--text-3); font-size: 13.5px; font-weight: 500; }
.trust span::before { content: '✓'; color: var(--brand); margin-right: 7px; font-weight: 700; }

/* Phone mockup */
.phone-stage { position: relative; display: grid; place-items: center; min-height: 560px; }
.phone-stage::before {
    content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, var(--glow-a), transparent 68%); filter: blur(30px);
}
.phone {
    position: relative; width: min(300px, 64vw); aspect-ratio: 1125 / 2436; border-radius: 28px; overflow: hidden;
    background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
}
.phone .screen { width: 100%; height: 100%; position: relative; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#heroPhone .screen img { opacity: 0; transition: opacity .7s; }
#heroPhone .screen img.on { opacity: 1; }
.phone.sm { width: min(240px, 56vw); }
.phone.back { position: absolute; opacity: .85; transform: translateX(-64%) rotate(-7deg) scale(.86); z-index: 0; filter: saturate(.9); }
.phone.front { z-index: 1; }
.phone.back2 { position: absolute; opacity: .85; transform: translateX(64%) rotate(7deg) scale(.86); z-index: 0; }

/* ── Sections ── */
section.block { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.03em; line-height: 1.12; margin: 12px 0 14px; }
.section-head p { color: var(--text-2); font-size: 17px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
    grid-column: span 2; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
    position: relative; overflow: hidden; transition: transform .3s, border-color .3s, background .3s;
}
.tile:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-hover); }
.tile.wide { grid-column: span 3; }
.tile.hero-tile { grid-column: span 4; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface)); }
.tile .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; background: color-mix(in srgb, var(--brand) 14%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.tile h3 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 8px; }
.tile p { color: var(--text-2); font-size: 15px; }
.tile .arabic { font-family: var(--font-ar); font-size: 34px; line-height: 1.7; color: var(--gold); direction: rtl; margin-top: 14px; }

/* Screens strip */
.strip { display: flex; gap: 22px; overflow-x: auto; padding: 8px var(--pad) 40px; margin: 0 calc(var(--pad) * -1); scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.shot { flex: none; width: 240px; scroll-snap-align: center; text-align: center; }
.shot .phone { width: 100%; }
.shot figcaption { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--text-2); }

/* Steps / deep link showcase */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.link-demo { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.url-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.url-bar b { color: var(--brand); font-weight: 600; }
.verse-mini { margin-top: 20px; padding: 24px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, transparent), transparent); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); text-align: center; }
.verse-mini .ar { font-family: var(--font-ar); font-size: 30px; line-height: 1.9; color: var(--gold); }
.verse-mini small { color: var(--text-3); font-weight: 600; letter-spacing: .06em; }
.check-list { list-style: none; display: grid; gap: 14px; margin-top: 24px; }
.check-list li { display: flex; gap: 12px; color: var(--text-2); }
.check-list li::before { content: '✓'; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--brand-ink); background: var(--brand); margin-top: 2px; }

/* CTA */
.cta-card {
    text-align: center; padding: clamp(40px, 6vw, 72px) 28px; border-radius: 32px; border: 1px solid var(--border);
    background: radial-gradient(ellipse at 50% 0%, var(--glow-a), transparent 70%), var(--surface);
}
.cta-card h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; margin-bottom: 12px; }
.cta-card p { color: var(--text-2); max-width: 520px; margin: 0 auto 30px; }
.cta-card .hero-cta { justify-content: center; margin-top: 0; }

/* ── Footer ── */
.site-footer, .page-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); margin-top: 40px; padding: 36px 0 44px; text-align: center; color: var(--text-3); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-bottom: 16px; }
.footer-links a { color: var(--text-2); font-weight: 500; font-size: 14px; }
.footer-links a:hover { color: var(--brand); text-decoration: none; }
.page-footer p, .site-footer p { color: var(--text-3); }

/* ── Content pages (privacy, terms, faq, guide, data) ── */
.page-header { padding: clamp(44px, 7vw, 80px) 0 28px; max-width: 760px; }
.page-header h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.035em; line-height: 1.08; margin-bottom: 14px; }
.page-header p { color: var(--text-2); font-size: 18px; }
.page-header .updated { color: var(--text-3); font-size: 14px; margin-top: 14px; }
.content { max-width: 860px; padding-bottom: 40px; }
.content section { margin-top: 44px; }
.content h2 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 16px; }
.content h3 { font-size: 17px; margin-bottom: 6px; }
.content p { color: var(--text-2); margin-bottom: 14px; }
.content ul, .content ol { color: var(--text-2); padding-left: 22px; margin-bottom: 14px; }
.content li { margin-bottom: 7px; }
.content strong { color: var(--text); font-weight: 600; }
.highlight-box { padding: 22px 24px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); margin-bottom: 8px; }
.highlight-box p { margin: 0; color: var(--text); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.info-card { padding: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); transition: .25s; }
.info-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.info-card p { margin: 0; font-size: 15px; }

.steps-grid { display: grid; gap: 14px; }
.step-card { display: flex; gap: 18px; padding: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.step-number { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: var(--brand-ink); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.step-content p { margin: 0; font-size: 15px; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; overflow: hidden; transition: border-color .2s; }
.faq-item.open { border-color: var(--border-strong); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; font-size: 16px; text-align: left; cursor: pointer; }
.faq-question svg { width: 18px; height: 18px; flex: none; transition: transform .3s; color: var(--text-3); }
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--brand); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; padding: 0 22px; }
.faq-item.open .faq-answer-inner { padding-bottom: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-3); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td { color: var(--text-2); }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.badge-yellow { background: var(--badge-yellow-bg); color: var(--badge-yellow-fg); }
.badge-red { background: var(--badge-red-bg); color: var(--badge-red-fg); }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .btn, .tile { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero .lead { margin-inline: auto; }
    .hero-cta, .trust { justify-content: center; }
    .phone-stage { min-height: 500px; }
    .split { grid-template-columns: 1fr; }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile, .tile.wide, .tile.hero-tile { grid-column: span 2; }
    .nav-links { display: none; }
    .menu-btn { display: grid; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; padding: 14px var(--pad) 20px;
        background: var(--bg); border-bottom: 1px solid var(--border);
    }
}
@media (max-width: 560px) {
    .tile, .tile.wide, .tile.hero-tile { grid-column: span 6; }
    .bento { grid-template-columns: 1fr; }
    .tile { grid-column: auto !important; }
    .phone.back, .phone.back2 { display: none; }
    .phone-stage { min-height: 460px; }
    .nav-back { display: none; }
    .site-header .btn-sm { display: none; }
}
