:root {
    /* ===== Drug Gate brand system v2 =====
       Core: Night / Lapis / Pulse (teal) / Gold / Ice.
       Light mode uses darkened teal (#159C89) + darkened gold (#C7912E) for WCAG contrast. */
    --night: #081A45;
    --lapis: #1A3E8C;
    --pulse: #22CDB4;

    /* Light-mode tokens */
    --bg: #F3F7FC;
    --panel: #FFFFFF;
    --line: #D8E2F0;
    --txt: #081A45;
    --muted: #5A6C96;
    --dim: #8A9BC4;
    --accent: #159C89;         /* teal — CTAs & links (dark enough for light bg) */
    --accent-strong: #22CDB4;  /* bright pulse for glows/gradients */
    --gold: #C7912E;
    --danger: #D64545;

    /* Legacy aliases remapped onto the brand system (keep old rules working) */
    --green: #159C89;
    --green-600: #0f8577;
    --green-700: #0b6a5e;
    --green-050: #e4f5f1;
    --green-100: #c8ebe4;
    --accent-600: #0f8577;     /* teal hover (legacy CTA) */
    --accent-050: #e4f5f1;     /* soft teal tint */
    --accent-ink: #ffffff;     /* text on teal CTA */
    --ink: #081A45;
    --ink-2: #3a4d7a;
    --bg-soft: #eef3fb;
    --blue: #1A3E8C;           /* lapis (secondary) */
    --blue-050: #e7ecf8;
    --gold-ink: #C7912E;

    --grad-brand: linear-gradient(150deg, #1A3E8C, #081A45);

    --radius: 18px;
    --shadow-xs: 0 1px 2px rgba(8, 26, 69, .05);
    --shadow-sm: 0 2px 6px rgba(8, 26, 69, .06), 0 1px 2px rgba(8, 26, 69, .05);
    --shadow-md: 0 12px 28px rgba(8, 26, 69, .10);
    --shadow-lg: 0 28px 64px rgba(8, 26, 69, .18);
    --shadow-primary: 0 10px 24px rgba(21, 156, 137, .30);
    --shadow-accent: 0 10px 24px rgba(21, 156, 137, .30);
    --container: 1180px;
    color-scheme: light;
}

/* ===== Dark mode (marketing/splash) ===== */
html[data-theme="dark"] {
    --bg: #060F2E;
    --panel: rgba(26, 62, 140, .15);
    --line: #1E3A78;
    --txt: #E8EEF9;
    --muted: #9FB2DE;
    --dim: #5F7BC0;
    --accent: #22CDB4;
    --accent-strong: #22CDB4;
    --gold: #E8B54A;
    --danger: #E36A6A;

    --green: #22CDB4;
    --green-600: #1fb8a2;
    --green-700: #159C89;
    --green-050: rgba(34, 205, 180, .12);
    --green-100: rgba(34, 205, 180, .22);
    --accent-600: #1fb8a2;
    --accent-050: rgba(34, 205, 180, .12);
    --accent-ink: #04211c;
    --ink: #E8EEF9;
    --ink-2: #C6D3EE;
    --bg-soft: rgba(255, 255, 255, .03);
    --blue: #7E9BE0;
    --blue-050: rgba(26, 62, 140, .28);
    --gold-ink: #E8B54A;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
    margin: 0;
    font-family: 'Cairo', system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ Icons ============ */
.ic { width: 24px; height: 24px; display: block; }

/* ============ Buttons ============ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease, background .2s ease, color .2s ease, border-color .2s;
    white-space: nowrap;
    overflow: hidden;
}
.btn .btn-ic { width: 19px; height: 19px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Primary CTA = accent yellow (high contrast dark text) */
.btn-primary {
    background: linear-gradient(135deg, #ffe14d 0%, var(--accent) 55%, var(--accent-600) 100%);
    color: var(--accent-ink);
    box-shadow: var(--shadow-accent);
}
.btn-primary::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 45%);
    opacity: .7;
}
.btn-primary:hover { box-shadow: 0 14px 32px rgba(255, 215, 0, .55); }

/* Turquoise button variant */
.btn-turquoise {
    background: linear-gradient(135deg, #12d3dc 0%, var(--green) 55%, var(--green-600) 100%);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-turquoise:hover { box-shadow: 0 14px 30px rgba(0, 194, 203, .45); }

.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--bg-soft); border-color: #cfd8e3; }
.btn-white { background: #fff; color: var(--green-700); box-shadow: var(--shadow-md); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 12px; }
.btn-sm .btn-ic { width: 17px; height: 17px; }
.btn-block { width: 100%; }

/* ============ Store buttons ============ */
.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
    display: inline-flex; align-items: center; gap: 12px;
    background: linear-gradient(160deg, #1e293b, #0b1220);
    color: #fff;
    padding: 11px 20px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, background .2s;
    box-shadow: 0 10px 26px rgba(11, 18, 32, .28);
    min-width: 195px;
}
.store-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(11, 18, 32, .36); }
.store-logo {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
}
.store-logo svg { width: 22px; height: 22px; }
.store-btn .st-text { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.store-btn .st-small { font-size: 11px; opacity: .82; font-weight: 500; }
.store-btn .st-big { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.store-buttons.light .store-btn {
    background: #fff; color: #081A45; border-color: transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.store-buttons.light .store-logo { background: var(--bg-soft); }
.store-buttons.compact .store-btn { min-width: 0; width: 100%; padding: 9px 16px; }

/* ============ Header ============ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(228, 235, 235, .9);
}
.site-header .bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
    width: 44px; height: 44px; display: grid; place-items: center;
    background: linear-gradient(135deg, #12d3dc, var(--green-700));
    color: #fff; border-radius: 13px;
    box-shadow: var(--shadow-primary);
}
.brand .logo svg { width: 24px; height: 24px; }
.brand-name { font-weight: 800; font-size: 18px; display: block; line-height: 1.2; letter-spacing: .3px; }
.brand-tag { font-size: 12px; color: var(--muted); display: block; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a.navlink {
    padding: 8px 14px; border-radius: 10px; color: var(--ink-2);
    font-weight: 600; font-size: 15px; transition: background .2s, color .2s;
}
.nav a.navlink:hover { background: var(--green-050); color: var(--green-700); }
.nav .btn { margin-inline-start: 6px; }

/* Header actions (login + download) */
.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: 8px; }
.nav-actions .btn { margin-inline-start: 0; }
.nav-login {
    color: var(--green-700);
    border-color: var(--green-100);
    background: var(--green-050);
    box-shadow: none;
}
.nav-login:hover {
    background: var(--panel);
    border-color: var(--green);
    color: var(--green-700);
    box-shadow: var(--shadow-primary);
}

.nav-toggle {
    display: none; background: var(--panel); border: 1px solid var(--line);
    border-radius: 12px; width: 46px; height: 46px; cursor: pointer;
    align-items: center; justify-content: center; box-shadow: var(--shadow-xs);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ============ Hero ============ */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1100px 560px at 88% -12%, rgba(0, 194, 203, .15), transparent 60%),
        radial-gradient(760px 420px at -5% 25%, rgba(255, 215, 0, .12), transparent 55%),
        var(--bg);
    padding: 78px 0 88px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--panel); color: var(--green-700);
    border: 1px solid rgba(0, 194, 203, .28);
    padding: 7px 15px; border-radius: 999px; font-weight: 700; font-size: 13px;
    margin-bottom: 22px; box-shadow: var(--shadow-xs);
}
.pill .pill-ic { width: 16px; height: 16px; color: var(--accent-600); }
.hero h1 {
    font-size: clamp(31px, 4.6vw, 54px); line-height: 1.18; margin: 0 0 18px;
    font-weight: 800; letter-spacing: -.6px;
}
.grad-text {
    background: linear-gradient(90deg, var(--green), var(--green-700));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; max-width: 570px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-trust .trust-item { display: inline-flex; align-items: center; gap: 7px; }
.trust-ic { width: 17px; height: 17px; color: var(--green); }

/* ============ Hero app screenshot ============ */
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-app-shot {
    width: min(100%, 320px);
    height: auto;
    display: block;
    border-radius: 36px;
    box-shadow: var(--shadow-lg);
    filter: drop-shadow(0 24px 48px rgba(0, 194, 203, .18));
}

/* ============ Icon tiles (theme tints) ============ */
.ic-green { background: linear-gradient(140deg, #ccf5f7, var(--green-050)); color: var(--green-600); }
.ic-blue { background: linear-gradient(140deg, #d3f2f8, var(--blue-050)); color: var(--blue); }
.ic-amber { background: linear-gradient(140deg, #fff0a8, var(--accent-050)); color: var(--gold-ink); }
.ic-purple { background: linear-gradient(140deg, #ccf5f7, var(--green-050)); color: var(--green-600); }
.pc-green { background: var(--green-050); color: var(--green-600); }
.pc-blue { background: var(--blue-050); color: var(--blue); }
.pc-amber { background: var(--accent-050); color: var(--gold-ink); }
.pc-purple { background: var(--green-050); color: var(--green-600); }

/* ============ Stats ============ */
.stats-band {
    background: linear-gradient(120deg, var(--green-700), var(--green));
    color: #fff; padding: 38px 0; position: relative; overflow: hidden;
}
.stats-band::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(600px 200px at 20% 0%, rgba(255,255,255,.14), transparent 60%);
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; position: relative; }
.stat-num { font-size: 40px; font-weight: 800; }
.stat-num span { color: var(--accent); }
.stat-label { opacity: .95; font-size: 15px; }

/* ============ Sections ============ */
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 50px; text-align: center; }
.eyebrow {
    display: inline-block; color: var(--green-700); font-weight: 800; font-size: 13px;
    letter-spacing: .6px; background: var(--green-050); border: 1px solid rgba(0,194,203,.2);
    padding: 5px 13px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 3.3vw, 39px); margin: 6px 0 12px; font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.sec-title { font-size: clamp(24px, 3vw, 35px); margin: 12px 0 14px; font-weight: 800; letter-spacing: -.5px; }
.sec-sub { color: var(--muted); font-size: 17px; margin: 0; }
.section-cta { text-align: center; margin-top: 38px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Feature cards */
.feature-card {
    position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 24px; box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform .22s ease, box-shadow .25s ease, border-color .25s;
}
.feature-card::before {
    content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--green), var(--accent)); opacity: 0; transition: opacity .25s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(0, 194, 203, .35); }
.feature-card:hover::before { opacity: 1; }
.feature-ic {
    width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
    margin-bottom: 18px; transition: transform .25s ease;
}
.feature-ic svg { width: 28px; height: 28px; }
.feature-card:hover .feature-ic { transform: scale(1.08) rotate(-3deg); }
.feature-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.feature-card p { color: var(--muted); margin: 0; font-size: 15px; }

/* ============ Consultation section ============ */
.consult-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.consult-visual {
    background: linear-gradient(160deg, var(--green-050), var(--bg-soft));
    border: 1px solid var(--line); border-radius: 24px; padding: 30px;
    box-shadow: var(--shadow-sm);
}
.chat-bubble {
    background: var(--panel); border-radius: 16px; padding: 13px 16px; margin-bottom: 14px;
    box-shadow: var(--shadow-xs); max-width: 84%; font-size: 14px;
    animation: bubbleIn .5s ease both;
}
.chat-bubble.me { margin-inline-start: auto; background: linear-gradient(135deg, var(--green), var(--green-700)); color: #fff; }
.chat-bubble:nth-child(2) { animation-delay: .1s; }
.chat-bubble:nth-child(3) { animation-delay: .2s; }
.chat-bubble:nth-child(4) { animation-delay: .3s; }
.chat-bubble .cb-name { font-size: 12px; font-weight: 800; margin-bottom: 4px; opacity: .8; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.consult-list { list-style: none; padding: 0; margin: 24px 0 30px; display: grid; gap: 16px; }
.consult-list li { display: flex; gap: 14px; align-items: flex-start; }
.consult-list .step-n {
    flex: none; width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(140deg, var(--green), var(--green-700)); color: #fff; font-weight: 800;
    display: grid; place-items: center; font-size: 15px; box-shadow: var(--shadow-primary);
}
.consult-list .step-t { font-weight: 800; margin-bottom: 2px; }
.consult-list .step-d { color: var(--muted); font-size: 14px; }

/* ============ For business ============ */
.biz-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 22px; box-shadow: var(--shadow-sm); text-align: center;
    transition: transform .22s, box-shadow .25s;
}
.biz-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.biz-card .biz-ic {
    width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 14px;
    display: grid; place-items: center;
}
.biz-card .biz-ic svg { width: 29px; height: 29px; }
.biz-card h3 { margin: 0 0 6px; font-size: 18px; }
.biz-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.about-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.about-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.about-points .chk {
    flex: none; width: 28px; height: 28px; border-radius: 9px;
    background: linear-gradient(140deg, #ccf5f7, var(--green-050));
    color: var(--green-600); display: grid; place-items: center;
}
.about-points .chk svg { width: 16px; height: 16px; }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.value-box {
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
    box-shadow: var(--shadow-xs); transition: transform .2s, box-shadow .2s;
}
.value-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-box .vb-ic {
    width: 48px; height: 48px; border-radius: 13px; margin-bottom: 12px;
    display: grid; place-items: center;
}
.value-box .vb-ic svg { width: 24px; height: 24px; }
.value-box h4 { margin: 0 0 4px; font-size: 16px; }
.value-box p { margin: 0; color: var(--muted); font-size: 14px; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-info { display: grid; gap: 18px; }
.contact-item { display: flex; gap: 14px; align-items: center; }
.contact-item .ci-ic {
    flex: none; width: 48px; height: 48px; border-radius: 13px;
    background: linear-gradient(140deg, #ccf5f7, var(--green-050));
    color: var(--green-600); display: grid; place-items: center;
}
.contact-item .ci-ic svg { width: 22px; height: 22px; }
.contact-item .ci-t { font-weight: 800; margin-bottom: 2px; }
.contact-item .ci-d { color: var(--muted); font-size: 14px; }
.social-row { display: flex; gap: 10px; margin-top: 6px; }
.social-row a {
    width: 44px; height: 44px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line);
    display: grid; place-items: center; transition: background .2s, transform .18s, color .2s, border-color .2s;
    color: var(--ink-2);
}
.social-row a svg { width: 20px; height: 20px; }
.social-row a:hover { background: var(--green); color: #fff; transform: translateY(-3px); border-color: var(--green); }

.contact-form {
    background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
    padding: 30px; box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field label .req { color: #dc2626; }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
    font-family: inherit; font-size: 15px; background: var(--bg-soft); color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--green); background: var(--panel);
    box-shadow: 0 0 0 4px rgba(0, 194, 203, .16);
}
.field textarea { resize: vertical; min-height: 122px; }

/* ============ CTA ============ */
.cta-section { padding-top: 0; }
.cta {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--green-700), var(--green) 70%, #12d3dc);
    color: #fff; border-radius: 28px; padding: 54px; text-align: center;
    box-shadow: var(--shadow-lg);
}
.cta-glow {
    position: absolute; width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.24), transparent 65%);
    top: -160px; inset-inline-end: -120px; pointer-events: none;
}
.cta h2 { font-size: clamp(24px, 3vw, 35px); margin: 0 0 10px; position: relative; }
.cta p { opacity: .95; margin: 0 0 26px; font-size: 17px; position: relative; }
.cta .store-buttons { justify-content: center; position: relative; }

/* ============ Alerts ============ */
.alert {
    border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
}
.alert .alert-ic { width: 20px; height: 20px; flex: none; }
.alert-success { background: var(--green-050); color: var(--green-700); border: 1px solid var(--green-100); }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; display: block; }
.alert ul { margin: 0; padding-inline-start: 18px; }

/* ============ Footer ============ */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 32px; }
.footer-brand .brand .logo {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #12d3dc, var(--green-700)); color: #fff;
}
.footer-brand .brand .logo svg { width: 22px; height: 22px; }
.footer-brand p { color: #94a3b8; font-size: 14px; margin: 14px 0 16px; max-width: 330px; }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-col a, .footer-col span { display: block; color: #94a3b8; font-size: 14px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-store { display: grid; gap: 10px; }
.footer-store .store-btn { min-width: 0; }
.footer-bottom {
    border-top: 1px solid #1e293b; margin-top: 38px; padding-top: 22px;
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: #94a3b8; font-size: 13px;
}
.footer-bottom a { color: #cbd5e1; }
.footer-bottom a:hover { color: #fff; }

/* ============ Legal pages ============ */
.legal-hero { background: linear-gradient(135deg, var(--green-700), var(--green)); color: #fff; padding: 64px 0; }
.legal-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 40px); }
.legal-hero p { margin: 0; opacity: .9; }
.legal-body { padding: 56px 0 80px; }
.legal-content { max-width: 860px; margin: 0 auto; }
.legal-note {
    background: var(--accent-050); border: 1px solid #fde68a; color: #92400e;
    border-radius: 14px; padding: 15px 18px; margin-bottom: 30px; font-size: 14px;
}
.legal-content h2 { font-size: 22px; margin: 34px 0 12px; color: var(--green-700); }
.legal-content h3 { font-size: 18px; margin: 22px 0 8px; }
.legal-content p { color: var(--ink-2); margin: 0 0 14px; }
.legal-content ul { color: var(--ink-2); padding-inline-start: 22px; margin: 0 0 16px; }
.legal-content li { margin-bottom: 8px; }
.legal-toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin-bottom: 30px; }
.legal-toc h4 { margin: 0 0 10px; }
.legal-toc a { color: var(--green-700); font-weight: 600; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
    .hero-grid, .consult-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .nav {
        position: fixed; inset: 74px 0 auto 0; background: var(--panel); border-bottom: 1px solid var(--line);
        flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px;
        box-shadow: var(--shadow-md); display: none;
    }
    .nav.open { display: flex; }
    .nav a.navlink { padding: 12px 14px; }
    .nav .btn { margin: 6px 0 0; justify-content: center; }
    .nav-actions { flex-direction: column; align-items: stretch; gap: 8px; margin: 8px 0 0; }
    .nav-actions .btn { width: 100%; margin: 0; }
    .nav-toggle { display: inline-flex; }
    .stats-grid { grid-template-columns: 1fr; gap: 20px; }
    .grid-3, .grid-4, .grid-2, .values-grid, .form-row { grid-template-columns: 1fr; }
    .section { padding: 62px 0; }
    .cta { padding: 36px 22px; }
    .footer-grid { grid-template-columns: 1fr; }
    .store-btn { flex: 1; }
}

/* =========================================================
   Brand system v2 — typography, CTAs, dark-mode surfaces
   ========================================================= */

/* Fonts: Noto Kufi (headings), IBM Plex Sans Arabic (body), Space Grotesk (numbers/latin) */
body {
    font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
h1, h2, h3, h4, .brand-name, .section-head h2, .sec-title, .hero h1, .cta h2, .legal-hero h1 {
    font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
.stat-num, .brand-name { font-family: 'Space Grotesk', 'Noto Kufi Arabic', system-ui, sans-serif; }

/* Rule 1: primary CTA = teal (accent), never the gold/yellow */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 60%, var(--accent-600) 100%);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 14px 32px rgba(21, 156, 137, .45); }

/* Brand logo tile + app icon = sanctioned lapis→night gradient */
.brand .logo, .footer-brand .brand .logo { background: var(--grad-brand); }

/* Gold appears only as rare "moments" (highlighted stat number) */
.stat-num span { color: var(--gold); }

/* Footer = brand night in both modes */
.site-footer { background: var(--night); }

/* ===== Theme toggle button ===== */
.theme-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--line);
    color: var(--txt); cursor: pointer; box-shadow: var(--shadow-xs);
    transition: background .2s, color .2s, border-color .2s, transform .18s;
}
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
.btn-sm.theme-toggle { width: 40px; height: 40px; }

/* ===== Dark-mode surface fixes for elements that used fixed light values ===== */
html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] .hero {
    background:
        radial-gradient(1100px 560px at 88% -12%, rgba(34, 205, 180, .16), transparent 60%),
        radial-gradient(760px 420px at -5% 25%, rgba(26, 62, 140, .38), transparent 55%),
        var(--bg);
}
html[data-theme="dark"] .site-header {
    background: rgba(6, 15, 46, .72);
    border-bottom-color: var(--line);
}
html[data-theme="dark"] .nav a.navlink { color: var(--ink-2); }
html[data-theme="dark"] .pill { border-color: rgba(34, 205, 180, .35); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea { background: rgba(255, 255, 255, .04); color: var(--txt); }
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .field textarea:focus { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .alert-error { background: rgba(214, 69, 69, .14); color: #f7c4c4; border-color: rgba(214, 69, 69, .4); }
html[data-theme="dark"] .alert-success { background: var(--green-050); color: var(--accent-strong); border-color: var(--green-100); }
html[data-theme="dark"] .nav {
    background: var(--bg);
}
@media (max-width: 720px) {
    html[data-theme="dark"] .nav { background: var(--bg); }
}
