/* Landing page (GET /) — see public/index.html */

:root {
    --bg: #0b0f14;
    --surface: #141b23;
    --border: #24303c;
    --text: #f2f6fa;
    --muted: #93a3b3;
    --accent: #22d3a6;
    --accent-soft: rgba(34, 211, 166, 0.16);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 20px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Soft accent wash behind the content. */
.glow {
    position: fixed;
    inset: auto 50% 40% auto;
    width: min(680px, 120vw);
    aspect-ratio: 1;
    transform: translate(50%, 0);
    background: radial-gradient(circle, var(--accent-soft), transparent 62%);
    pointer-events: none;
    z-index: 0;
}

.topbar,
.stage,
.footer {
    position: relative;
    z-index: 1;
}

/* ── Language toggle ───────────────────────────────────────────── */
.topbar {
    display: flex;
    justify-content: flex-end;
}

.lang-toggle {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Centre stage ──────────────────────────────────────────────── */
.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    text-align: center;
    padding: 32px 0;
}

.mark {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--surface);
    color: var(--accent);
}

.mark svg {
    width: 46px;
    height: 46px;
}

.title {
    margin: 0;
    font-size: clamp(30px, 7vw, 46px);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.tagline {
    margin: 0;
    max-width: 34ch;
    color: var(--muted);
    font-size: clamp(15px, 3.6vw, 18px);
    line-height: 1.7;
}

/* ── Store buttons ─────────────────────────────────────────────── */
.stores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
    width: 100%;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    padding: 12px 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.store-btn:hover,
.store-btn:focus-visible {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.store-icon {
    flex: none;
    width: 26px;
    height: 26px;
}

/* Text block always reads left-to-right — the store names are latin. */
.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.store-text small {
    font-size: 11px;
    color: var(--muted);
}

.store-text strong {
    font-size: 17px;
    font-weight: 700;
}

/* Small note under the store buttons (app-link.html only). */
.hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

.dot {
    opacity: 0.5;
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
    color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
    .store-btn {
        transition: none;
    }

    .store-btn:hover,
    .store-btn:focus-visible {
        transform: none;
    }
}

/* ══════════════════════════════════════════════════════════════════
 * Site pages (index sections, /privacy, /terms, /delete-account).
 * Everything below is additive — app-link.html keeps its old look.
 * ══════════════════════════════════════════════════════════════════ */

/* Long bilingual blocks: both languages ship in the HTML, the inactive one is hidden. */
html[lang="ar"] [data-lang="en"],
html[lang="en"] [data-lang="ar"] {
    display: none !important;
}

.topbar.nav {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    font-size: 17px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--accent);
}

.brand-mark svg {
    width: 20px;
    height: 20px;
}

.stage.hero {
    min-height: min(78dvh, 720px);
}

/* ── Feature grid ──────────────────────────────────────────────── */
.section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 0;
}

.section-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 800;
}

.section-sub {
    margin: 0 auto 32px;
    max-width: 52ch;
    text-align: center;
    color: var(--muted);
    line-height: 1.7;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.feature {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 13px;
    background: var(--accent-soft);
    color: var(--accent);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 18px;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-weight: 800;
}

.step h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 20px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface);
    text-align: center;
}

/* ── Footer with links ─────────────────────────────────────────── */
.footer.site-footer {
    flex-wrap: wrap;
    row-gap: 10px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    width: 100%;
}

/* ── Legal / document pages ────────────────────────────────────── */
.doc {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 0 24px;
    line-height: 1.85;
}

.doc h1 {
    margin: 0 0 6px;
    font-size: clamp(26px, 6vw, 36px);
    font-weight: 800;
}

.doc .updated {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 14px;
}

.doc h2 {
    margin: 34px 0 10px;
    font-size: 19px;
    color: var(--text);
}

.doc h3 {
    margin: 20px 0 6px;
    font-size: 16px;
}

.doc p,
.doc li {
    color: #c9d4de;
    font-size: 15.5px;
}

.doc ul,
.doc ol {
    padding-inline-start: 22px;
}

.doc li {
    margin: 4px 0;
}

.doc a {
    color: var(--accent);
}

.doc strong {
    color: var(--text);
}

.toc {
    margin: 0 0 8px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.toc ol {
    margin: 0;
    columns: 2 220px;
    column-gap: 28px;
}

.toc a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
}

.toc a:hover {
    color: var(--accent);
}

.callout {
    margin: 18px 0;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
}

.callout.warn {
    border-inline-start-color: #f5a524;
}

.callout p {
    margin: 0;
}

/* ── Delete-account form ───────────────────────────────────────── */
.card {
    margin: 18px 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field label {
    font-weight: 600;
    font-size: 14.5px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
}

.field textarea {
    min-height: 96px;
    resize: vertical;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 14.5px;
    color: #c9d4de;
}

.check input {
    margin-top: 5px;
    accent-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--bg);
    font: inherit;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.btn.danger {
    background: #ef4444;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.form-status {
    margin: 14px 0 0;
    font-size: 14.5px;
    color: var(--accent);
}

@media (max-width: 520px) {
    .topbar.nav .nav-links {
        display: none;
    }
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--accent);
}

.nav-end {
    display: flex;
    align-items: center;
    gap: 18px;
}

.section-sub.flush {
    margin-bottom: 0;
}
