/* ─── Tokens ───────────────────────────────────────────────── */
:root {
    --c-primary:   #6366f1;
    --c-primary-d: #4f46e5;
    --c-accent:    #8b5cf6;
    --c-success:   #10b981;
    --c-text-1:    #0f172a;
    --c-text-2:    #475569;
    --c-text-3:    #64748b;
    --c-bg:        #f8fafc;
    --c-surface:   #ffffff;
    --c-border:    #e2e8f0;
    --c-faint:     #ede9fe;
    --c-focus:     #6366f1;
    --max-w:       1080px;
}

/* ─── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-text-1);
    background: var(--c-bg);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

img {
    max-width: 100%;
    display: block;
}

/* Visually hidden utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ─── Skip link ─────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: top .15s;
}

.skip-link:focus {
    top: 0;
}

/* ─── Global focus style ────────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 3px;
    border-radius: 4px;
}

a {
    color: var(--c-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Nav ───────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

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

.nav-brand:hover {
    text-decoration: none;
}

.nav-brand svg {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--c-text-2);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--c-text-1);
    text-decoration: none;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--c-primary-d);
    text-decoration: none;
    color: #fff;
}

/* Mobile hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--c-text-1);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
    padding: 80px 0 72px;
    text-align: center;
    background: linear-gradient(160deg, #f0f0ff 0%, #f8fafc 60%);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: var(--c-faint);
    color: var(--c-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.12;
    color: var(--c-text-1);
    max-width: 780px;
    margin: 0 auto 20px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 18px;
    color: var(--c-text-2);
    max-width: 560px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--c-primary);
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, .3);
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--c-primary-d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, .4);
    text-decoration: none;
    color: #fff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    border: 1.5px solid var(--c-border);
    color: var(--c-text-1);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    background: var(--c-surface);
    transition: border-color .15s;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--c-primary);
    text-decoration: none;
}

/* Hero trust list */
.hero-trust {
    list-style: none;
    margin-top: 32px;
    font-size: 13px;
    color: var(--c-text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-trust li::before {
    content: '✓ ';
    color: var(--c-success);
    font-weight: 700;
}

/* Popup mockup */
.hero-demo {
    margin: 60px auto 0;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
    overflow: hidden;
    border: 1px solid var(--c-border);
}

.demo-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-dots {
    display: flex;
    gap: 6px;
}

.demo-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
}

.demo-title {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-left: 4px;
}

.demo-body {
    padding: 20px;
}

.demo-dropzone {
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    color: #6366f1;
    font-size: 13px;
    margin-bottom: 14px;
    background: #eef2ff;
}

.demo-dropzone .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.demo-hint {
    color: #6366f1;
}

.demo-format {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.demo-fmt-btn {
    flex: 1;
    padding: 7px;
    border-radius: 7px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.demo-fmt-btn.active {
    background: #6366f1;
    color: white;
}

.demo-fmt-btn:not(.active) {
    background: #f1f5f9;
    color: #64748b;
}

.demo-btn {
    width: 100%;
    padding: 11px;
    background: #6366f1;
    color: white;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

/* ─── Section shared ────────────────────────────────────────── */
section {
    padding: 80px 0;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-primary);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.7px;
    margin-bottom: 14px;
}

.section-sub {
    font-size: 17px;
    color: var(--c-text-2);
    max-width: 520px;
}

.section-header {
    margin-bottom: 52px;
}

/* ─── Features grid ─────────────────────────────────────────── */
.features {
    background: var(--c-surface);
}

.features-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 28px;
    background: var(--c-bg);
    border-radius: 16px;
    border: 1px solid var(--c-border);
    transition: box-shadow .2s, border-color .2s;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
    border-color: #c7d2fe;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--c-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.feature-body {
    font-size: 14px;
    color: var(--c-text-2);
    line-height: 1.6;
}

/* ─── How it works ──────────────────────────────────────────── */
.how {
    background: var(--c-bg);
}

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    counter-reset: step;
}

.step {
    padding: 28px;
    background: var(--c-surface);
    border-radius: 16px;
    border: 1px solid var(--c-border);
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 22px;
    right: 22px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-faint);
    color: var(--c-primary);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.step-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-body {
    font-size: 13.5px;
    color: var(--c-text-2);
}

/* ─── Privacy ───────────────────────────────────────────────── */
.privacy {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: #e0e7ff;
}

.privacy .section-label {
    color: #a5b4fc;
}

.privacy .section-title {
    color: #fff;
}

.privacy .section-sub {
    color: #a5b4fc;
}

.privacy-cards {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.privacy-card {
    padding: 24px;
    background: rgba(255, 255, 255, .08);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
}

.privacy-card-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.privacy-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.privacy-card-body {
    font-size: 13.5px;
    color: #a5b4fc;
    line-height: 1.6;
}

/* ─── FAQ ───────────────────────────────────────────────────── */
.faq {
    background: var(--c-surface);
}

.faq-list {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

details {
    border-bottom: 1px solid var(--c-border);
    padding: 20px 0;
}

summary {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 20px;
    color: var(--c-primary);
    flex-shrink: 0;
    transition: transform .2s;
    line-height: 1;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    font-size: 14.5px;
    color: var(--c-text-2);
    margin-top: 12px;
    line-height: 1.7;
}

/* ─── CTA ───────────────────────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 100%);
}

.cta-section h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -.7px;
    margin-bottom: 14px;
}

.cta-sub {
    font-size: 17px;
    color: var(--c-text-2);
    margin-bottom: 36px;
}

.cta-btn {
    display: inline-flex;
    margin: 0 auto;
}

.cta-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--c-text-3);
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
    background: var(--c-text-1);
    color: var(--c-text-3);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.footer-brand:hover {
    text-decoration: none;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--c-text-3);
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-copy {
    font-size: 13px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: none;
        border-bottom: 1px solid var(--c-border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
        z-index: 99;
        padding: 8px 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 24px;
        font-size: 15px;
    }

    .nav-links a:hover {
        background: var(--c-bg);
    }

    .hero {
        padding: 52px 0 48px;
    }
}

/* ─── Dark mode ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --c-text-1: #f1f5f9;
        --c-text-2: #94a3b8;
        --c-text-3: #64748b;
        --c-bg:      #0f172a;
        --c-surface: #1e293b;
        --c-border:  #334155;
        --c-faint:   #1e1b4b;
        --c-focus:   #818cf8;
    }

    .nav {
        background: rgba(15, 23, 42, .92);
    }

    .hero {
        background: linear-gradient(160deg, #1a1740 0%, #0f172a 60%);
    }

    .hero-demo {
        background: #1e293b;
        box-shadow: 0 24px 64px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
    }

    .demo-dropzone {
        border-color: #3730a3;
        background: #1e1b4b;
        color: #a5b4fc;
    }

    .demo-hint {
        color: #a5b4fc;
    }

    .demo-fmt-btn:not(.active) {
        background: #334155;
        color: #94a3b8;
    }

    .feature-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
        border-color: #4338ca;
    }

    .cta-section {
        background: linear-gradient(160deg, #1a1740 0%, #0f172a 100%);
    }

    footer {
        background: #020617;
    }

    .nav-links a:hover {
        background: #0f172a;
    }

    .nav-toggle span {
        background: var(--c-text-1);
    }
}

@media (prefers-color-scheme: dark) and (max-width: 640px) {
    .nav-links {
        background: #1e293b;
    }
}