/*
   Minimal shared stylesheet for weavevault.app.
   System fonts only. No web fonts, no third-party scripts, no analytics —
   keeps the site's behavior consistent with the privacy policy's claim
   that we do not track visitors.
   Light/dark via prefers-color-scheme. Mobile-first.
*/

:root {
    --bg: #ffffff;
    --surface: #f7f7f8;
    --content: #1a1a1c;
    --content-muted: #5e5e64;
    --accent: #2f5af0;
    --border: #e2e2e6;
    --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d0d10;
        --surface: #16161a;
        --content: #f3f3f5;
        --content-muted: #9999a1;
        --accent: #6f8fff;
        --border: #2a2a30;
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--content);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 17px;
    line-height: 1.55;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Header */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 24px 0;
}

.brand {
    font-weight: 600;
    color: var(--content);
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand[aria-current="page"] { color: var(--content); }

.brand-mark {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.site-header nav {
    display: flex;
    gap: 20px;
    font-size: 15px;
}

.site-header nav a {
    color: var(--content-muted);
}
.site-header nav a[aria-current="page"] {
    color: var(--content);
    font-weight: 500;
}

/* Footer */

.site-footer {
    max-width: var(--max-width);
    margin: 64px auto 32px;
    padding: 24px;
    border-top: 1px solid var(--border);
    color: var(--content-muted);
    font-size: 14px;
    text-align: center;
}

/* Section primitives */

main { display: block; }

.section-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 32px;
    text-align: center;
}

/* Hero */

.hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 72px 24px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    align-items: center;
}

.hero-text h1 {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 20px;
}

.hero-text .tagline {
    color: var(--content-muted);
    font-size: 19px;
    line-height: 1.5;
    margin: 0 0 32px;
    max-width: 520px;
}

.cta { margin: 0; }

.cta-note {
    color: var(--content-muted);
    font-size: 14px;
    margin: 12px 0 0;
}

.store-badge {
    display: inline-block;
    padding: 12px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--content);
    font-weight: 500;
    background: var(--surface);
}
.store-badge:hover {
    text-decoration: none;
    border-color: var(--content-muted);
}

.hero-device {
    display: flex;
    justify-content: center;
}

/* Device frame — holds the dark App Store screenshots.
   Aspect ratio approximates a modern iPhone (9 : 19.5). The bezel is a
   fixed graphite tone (not theme-driven) so the dark screenshots read as
   a black-phone product shot on both light and dark pages — in light mode
   a white bezel made the black screen look like a harsh slab. */

.device-frame {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9 / 19.5;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 22px 55px -22px rgba(0, 0, 0, 0.5);
}

.device-frame-sm {
    max-width: 200px;
    border-radius: 28px;
    padding: 8px;
}

.device-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    background: #000;
    overflow: hidden;
}

img.device-screen {
    display: block;
    object-fit: cover;
}

.device-frame-sm .device-screen { border-radius: 22px; }

/* Features grid */

.features {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding: 48px 24px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

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

.feature h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
}

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

/* How-it-works steps */

.steps {
    max-width: 960px;
    margin: 24px auto 0;
    padding: 48px 24px;
}

.step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.step-list > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    align-items: center;
}

.step-list > li:nth-child(even) {
    grid-template-columns: auto minmax(0, 1fr);
}

.step-list > li:nth-child(even) .step-text {
    order: 2;
}

.step-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.step-text p {
    margin: 0;
    color: var(--content-muted);
    font-size: 16px;
    line-height: 1.55;
    max-width: 440px;
}

/* FAQ — uses native <details> so no JS is needed */

.faq {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding: 48px 24px;
}

.faq details {
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.faq details:last-of-type {
    border-bottom: 1px solid var(--border);
}

.faq summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    list-style: none;
    padding-right: 28px;
    position: relative;
    color: var(--content);
}

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

.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--content-muted);
    line-height: 1;
}

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

.faq details p {
    margin: 12px 0 4px;
    color: var(--content-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Closing */

.closing {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding: 48px 24px 16px;
    text-align: center;
}

.closing p {
    color: var(--content-muted);
    font-size: 15px;
    margin: 0 auto;
    max-width: 520px;
}

/* Prose (privacy + terms) */

.prose {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 32px;
}

.prose h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.prose .updated {
    color: var(--content-muted);
    font-size: 14px;
    margin: 0 0 32px;
}

.prose h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 40px 0 12px;
}

.prose p, .prose ul {
    margin: 0 0 16px;
}

.prose ul {
    padding-left: 22px;
}

.prose li { margin-bottom: 8px; }

.prose strong { font-weight: 600; }

/* Tablet — stack hero, single-column features */

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 56px 24px 48px;
    }
    .hero-text .tagline { margin-left: auto; margin-right: auto; }
    .hero-device { order: -1; }
    .device-frame { max-width: 240px; }

    .feature-grid { grid-template-columns: 1fr; }

    .step-list > li,
    .step-list > li:nth-child(even) {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    .step-list > li:nth-child(even) .step-text { order: 0; }
    .step-text p { margin-left: auto; margin-right: auto; }
    .step-device { display: flex; justify-content: center; }
}

/* Phone */

@media (max-width: 480px) {
    .hero { padding: 40px 20px 40px; }
    .hero-text h1 { font-size: 32px; }
    .hero-text .tagline { font-size: 17px; }

    .section-title { font-size: 22px; margin-bottom: 24px; }
    .features, .steps, .faq, .closing { padding: 32px 20px; }

    .prose { padding: 32px 20px 24px; }
    .prose h1 { font-size: 26px; }
    .site-header { padding: 20px 20px 0; }

    .device-frame { max-width: 220px; }
    .device-frame-sm { max-width: 180px; }
}
