/* Shared stylesheet for the Naqdi legal pages hosted on GitHub Pages.
   One file for all 4 pages + the index, so changes apply everywhere.
   Matches Naqdi's in-app palette (teal primary, amber accents). */

:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --amber: #f59e0b;
    --ink: #0f172a;
    --ink-muted: #64748b;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --teal: #2dd4bf;
        --teal-dark: #14b8a6;
        --amber: #fbbf24;
        --ink: #f8fafc;
        --ink-muted: #94a3b8;
        --surface: #0f172a;
        --surface-soft: #1e293b;
        --border: #334155;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        system-ui, "Helvetica Neue", Arial, sans-serif;
    background: var(--surface-soft);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
    /* Tahoma renders Arabic better than most system fonts on macOS/iOS
       Safari — fall back gracefully on platforms that prefer Noto Kufi. */
    font-family: "SF Arabic", "Noto Kufi Arabic", "Tahoma", -apple-system,
        BlinkMacSystemFont, system-ui, sans-serif;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

header.site {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.brand-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
}

.lang-toggle {
    display: inline-flex;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    font-size: 13px;
}

.lang-toggle a {
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-muted);
    font-weight: 500;
}

.lang-toggle a.active {
    background: var(--teal);
    color: white;
}

h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0 4px;
    letter-spacing: -0.02em;
}

.last-updated {
    color: var(--ink-muted);
    font-size: 14px;
    margin-bottom: 32px;
    font-style: italic;
}

h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 32px 0 10px;
    color: var(--ink);
}

p, li {
    font-size: 16px;
    color: var(--ink);
}

ul {
    padding-inline-start: 22px;
    margin: 8px 0 12px;
}

li { margin: 6px 0; }

a { color: var(--teal-dark); }

strong { color: var(--ink); }

hr.divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

footer {
    text-align: center;
    color: var(--ink-muted);
    font-size: 13px;
    padding: 30px 24px 60px;
}

footer a {
    color: var(--ink-muted);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover { color: var(--teal); }

/* Landing page */

.hero {
    text-align: center;
    padding: 40px 20px 30px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.hero p {
    font-size: 17px;
    color: var(--ink-muted);
}

.card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 32px;
}

.doc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.doc-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    box-shadow: 0 8px 24px -12px rgba(13, 148, 136, 0.4);
}

.doc-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.doc-card p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 14px;
}

.doc-card .icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

/* Marketing page — full-width container + larger hero for the landing */

.container-wide {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-marketing {
    text-align: center;
    padding: 80px 20px 56px;
}

.hero-marketing h1 {
    font-size: 48px;
    letter-spacing: -0.03em;
    margin: 12px 0 16px;
    line-height: 1.1;
}

.hero-marketing p.lead {
    font-size: 19px;
    color: var(--ink-muted);
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.55;
}

/* Hero CTA — pinned teal gradient regardless of light/dark mode.
   The earlier version used var(--ink) which flips to white in dark mode,
   turning the button into white-on-white. Teal keeps the button on-brand
   and readable everywhere. */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff !important;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}

.hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -4px rgba(13, 148, 136, 0.55);
    color: #ffffff !important;
}

.hero-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.4);
}

.hero-chip {
    display: inline-block;
    background: rgba(245, 158, 11, 0.14);
    color: var(--amber);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* Features grid */

.features {
    padding: 40px 20px 60px;
}

.features h2 {
    text-align: center;
    font-size: 30px;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.features p.section-sub {
    text-align: center;
    color: var(--ink-muted);
    font-size: 16px;
    margin: 0 auto 40px;
    max-width: 540px;
}

.feature-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.feature .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

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

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

/* Pricing band */

.pricing {
    padding: 60px 20px;
    background: var(--surface);
    border-block: 1px solid var(--border);
    margin-top: 40px;
}

.pricing .container-wide {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}

.pricing-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

.pricing-card.featured {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: white;
    border-color: transparent;
}

.pricing-card h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.pricing-card .price {
    font-size: 34px;
    font-weight: 800;
    margin: 8px 0;
    letter-spacing: -0.02em;
}

.pricing-card .price small {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.pricing-card ul li {
    padding: 4px 0;
    font-size: 14.5px;
}

.pricing-card ul li::before {
    content: "✓";
    margin-inline-end: 8px;
    font-weight: 700;
}

.pricing-card.featured ul li::before { color: white; }

/* FAQ section (support page) */

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
}

.faq-item summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-inline-end: 28px;
    font-size: 15px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--ink-muted);
    font-weight: 400;
    transition: transform 0.2s;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
    margin: 10px 0 0;
    color: var(--ink-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.support-cta {
    text-align: center;
    margin-top: 40px;
    padding: 28px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.support-cta h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.support-cta p {
    margin: 0 0 14px;
    color: var(--ink-muted);
}

.support-cta a.email {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    background: var(--teal);
    color: white;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────
   Screenshots gallery — horizontal scroll with snap

   Laid out as a tilted-phone strip on a teal gradient backdrop. Each
   phone sits in a subtle "device" frame (border + shadow) and snaps
   as the user scrolls horizontally. Works equally well on touch +
   mouse; scroll indicators are hidden for a clean look.
   ──────────────────────────────────────────────────────────────── */

.screenshots {
    padding: 80px 0 100px;
    background:
        radial-gradient(ellipse at top, rgba(13, 148, 136, 0.12) 0%, transparent 60%),
        var(--surface);
    border-block: 1px solid var(--border);
    overflow: hidden; /* clip the glow gradient */
}

.screenshots h2 {
    text-align: center;
    font-size: 30px;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.screenshots p.section-sub {
    text-align: center;
    color: var(--ink-muted);
    font-size: 16px;
    margin: 0 auto 48px;
    max-width: 540px;
}

.screenshot-strip {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 20px 48px 40px;
    scroll-snap-type: x mandatory;
    scroll-padding: 48px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
}

.screenshot-strip::-webkit-scrollbar {
    display: none;  /* Safari / Chrome */
}

.shot {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 240px;
    text-align: center;
}

.shot .frame {
    position: relative;
    border-radius: 38px;
    padding: 6px;
    background: linear-gradient(140deg, #1e293b 0%, #0f172a 100%);
    box-shadow:
        0 30px 60px -20px rgba(15, 23, 42, 0.35),
        0 12px 24px -12px rgba(15, 23, 42, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shot:hover .frame {
    transform: translateY(-6px);
    box-shadow:
        0 40px 80px -24px rgba(13, 148, 136, 0.45),
        0 16px 32px -14px rgba(15, 23, 42, 0.3);
}

.shot .frame img {
    display: block;
    width: 100%;
    border-radius: 32px;
}

.shot .caption {
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.005em;
}

.shot .caption-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-muted);
    font-weight: 400;
}

/* Subtle scroll-hint chevrons at the edges on larger screens */
.screenshots-hint {
    text-align: center;
    color: var(--ink-muted);
    font-size: 12px;
    margin-top: -8px;
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .shot {
        width: 220px;
    }
    .screenshot-strip {
        padding: 16px 24px 32px;
        scroll-padding: 24px;
    }
}
