/* Invoice Organizer — site styles
   Mirrors the iOS app design tokens (Voltage Blue accent, ink/secondary,
   surface/background) and respects prefers-color-scheme. */

:root {
    --accent: #1E5BFF;
    --accent-deep: #0E3CC9;
    --accent-flash: #3D7BFF;
    --accent-aurora: #7AA8FF;
    --accent-soft: rgba(30, 91, 255, 0.10);

    --ink: #0D0D12;
    --secondary: #6B7180;
    --tertiary: #9CA3AF;
    --hairline: #E5E7EB;

    --surface: #FFFFFF;
    --surface-alt: #F0F1F5;
    --bg: #F2F3F5;

    --success: #22C56B;
    --warning: #FFB020;
    --danger: #FF4757;

    --shadow-soft: 0 1px 2px rgba(13, 13, 18, 0.04), 0 8px 24px rgba(13, 13, 18, 0.06);
    --shadow-glow: 0 12px 36px rgba(30, 91, 255, 0.22);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --max-w: 980px;
    --max-w-prose: 720px;
    --gutter: clamp(1.25rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #FAFBFC;
        --secondary: #9AA0AB;
        --tertiary: #6B7180;
        --hairline: #22252B;

        --surface: #16181C;
        --surface-alt: #22252B;
        --bg: #0A0B0D;

        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-glow: 0 12px 36px rgba(30, 91, 255, 0.35);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { color: var(--accent-deep); text-decoration: underline; }

@media (prefers-color-scheme: dark) {
    a:hover { color: var(--accent-flash); }
}

strong { font-weight: 600; }
code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
    padding: 0.1em 0.35em;
    background: var(--surface-alt);
    border-radius: 6px;
}

/* ── Layout ──────────────────────────────────────────────────────── */

.shell {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.prose {
    max-width: var(--max-w-prose);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ── Top bar ─────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.topbar nav { display: flex; gap: 1.5rem; align-items: center; }
.topbar nav a {
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
}
.topbar nav a:hover { color: var(--ink); text-decoration: none; }

/* ── Brand mark + wordmark ───────────────────────────────────────── */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .mark {
    width: 28px;
    height: 28px;
    display: block;
}
.brand .word {
    font-size: 16px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.brand .word .accent { color: var(--accent); }
.brand .word .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    margin-left: 2px;
    transform: translateY(-1px);
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 4.5rem);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -20% auto -20%;
    height: 80%;
    background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    color: var(--ink);
}
.hero h1 .accent {
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-flash));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p.lede {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--secondary);
    max-width: 36rem;
    margin: 0 auto 2rem;
    line-height: 1.55;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 1.4rem;
    height: 50px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: transform 120ms ease, box-shadow 200ms ease, background 120ms ease;
    cursor: pointer;
    border: 0;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    background: var(--accent-deep);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--hairline);
}
.btn-ghost:hover {
    background: var(--surface-alt);
    color: var(--ink);
    text-decoration: none;
}

.coming-soon {
    margin-top: 1rem;
    font-size: 13px;
    color: var(--tertiary);
}

.app-store-badge {
    display: inline-flex;
    align-items: center;
    height: 50px;
    border-radius: 8px;
    transition: transform 120ms ease, box-shadow 200ms ease;
    text-decoration: none;
}
.app-store-badge svg {
    height: 50px;
    width: auto;
    display: block;
    border-radius: 8px;
}
.app-store-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}
.app-store-badge:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* ── Section ─────────────────────────────────────────────────────── */

section { padding: clamp(2.5rem, 6vw, 4rem) 0; }

.section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--ink);
}
.section-head p {
    color: var(--secondary);
    max-width: 32rem;
    margin: 0 auto;
}

/* ── Feature grid ────────────────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--hairline));
}
.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.feature p {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.55;
}

/* ── Page header (privacy/support) ───────────────────────────────── */

.page-header {
    padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
    text-align: center;
}
.page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--ink);
}
.page-header .meta {
    color: var(--tertiary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ── Document content ────────────────────────────────────────────── */

.doc {
    padding: 1rem 0 4rem;
}
.doc h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2.25rem 0 0.6rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li {
    font-size: 0.97rem;
    color: var(--ink);
    margin-bottom: 0.85rem;
    line-height: 1.65;
}
.doc ul { padding-left: 1.25rem; }
.doc ul li { padding-left: 0.25rem; }

.doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.88rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--hairline);
}
.doc th, .doc td {
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
}
.doc tr:last-child td { border-bottom: 0; }
.doc th {
    font-weight: 600;
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.doc td { color: var(--ink); }

@media (max-width: 640px) {
    .doc table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .doc th, .doc td { white-space: nowrap; }
}

/* ── Contact card ────────────────────────────────────────────────── */

.contact-card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
}
.contact-card h2 { margin-top: 0; }
.contact-card p { margin-bottom: 0.5rem; }
.contact-card .email {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ── FAQ ─────────────────────────────────────────────────────────── */

.faq {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}
.faq details {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 0;
    overflow: hidden;
    transition: border-color 150ms ease;
}
.faq details[open] {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--hairline));
}
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.97rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--secondary);
    border-bottom: 2px solid var(--secondary);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 150ms ease;
    flex-shrink: 0;
}
.faq details[open] summary::after {
    transform: rotate(-135deg) translateY(-2px);
}
.faq .answer {
    padding: 0 1.25rem 1.1rem;
    color: var(--secondary);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────────────── */

footer.site-footer {
    border-top: 1px solid var(--hairline);
    padding: 2rem 0 3rem;
    margin-top: 2rem;
    color: var(--tertiary);
    font-size: 0.88rem;
}
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.footer-links a {
    color: var(--secondary);
    font-weight: 500;
}
.footer-links a:hover { color: var(--ink); text-decoration: none; }
