/* CFM Form Builder — landing page styles
 * Matches the app at app.cfmformbuilder.com:
 *   - #aa3bff purple accent
 *   - system-ui font
 *   - light/dark mode via prefers-color-scheme
 */

:root {
    --text: #08060d;
    --text-muted: #6b6375;
    --bg: #ffffff;
    --bg-alt: #fafafa;
    --bg-card: #ffffff;
    --border: #e5e4e7;
    --border-strong: #c4c0cb;
    --accent: #aa3bff;
    --accent-hover: #9128e5;
    --accent-bg: rgba(170, 59, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 10px 24px -8px rgba(0,0,0,.12), 0 4px 8px -4px rgba(0,0,0,.08);
    --radius: 10px;
    --radius-sm: 6px;
    --content-max: 1100px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #f3f4f6;
        --text-muted: #9ca3af;
        --bg: #0f1014;
        --bg-alt: #16171d;
        --bg-card: #1c1d24;
        --border: #2e303a;
        --border-strong: #3f414d;
        --accent: #c084fc;
        --accent-hover: #d4a4ff;
        --accent-bg: rgba(192, 132, 252, 0.12);
        --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
        --shadow-md: 0 10px 24px -8px rgba(0,0,0,.5);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

code {
    font-family: var(--mono);
    font-size: 0.92em;
    background: var(--accent-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent);
}

h1, h2, h3 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
}

/* ── Header ───────────────────────────────────────────── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(180%) blur(8px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.wordmark {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; color: var(--accent-hover); }

.signin-link {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text);
    border: 1px solid var(--border);
}
.signin-link:hover {
    text-decoration: none;
    border-color: var(--accent);
    color: var(--accent);
}

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

.hero {
    padding: 80px 0 96px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero h1 {
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.02em;
    max-width: 800px;
    margin: 0 auto 24px;
}

.hero .lede {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
}

.cta-primary {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.1s ease, background 0.15s ease;
}
.cta-primary:hover {
    background: var(--accent-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.lede-small {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── How it works ─────────────────────────────────────── */

.how {
    padding: 80px 0;
}

.how h2 {
    text-align: center;
    font-size: clamp(26px, 3.5vw, 36px);
    margin-bottom: 56px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.step-shot {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top center;
    margin-top: 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* ── Pricing ──────────────────────────────────────────── */

.pricing {
    padding: 80px 0;
    background: var(--bg-alt);
}

.pricing h2 {
    text-align: center;
    font-size: clamp(26px, 3.5vw, 36px);
    margin-bottom: 8px;
}

.pricing-lede {
    text-align: center;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 48px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card.popular {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card h3 {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.price .ccy {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 4px;
}

.price-sub {
    margin: 4px 0 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}

.card-list li {
    padding: 8px 0 8px 24px;
    font-size: 14px;
    color: var(--text);
    position: relative;
    border-top: 1px solid var(--border);
}
.card-list li:first-child { border-top: 0; }
.card-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.cta-secondary {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
}
.cta-secondary:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}

.cta-card { width: 100%; text-align: center; }

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

.faq {
    padding: 80px 0 96px;
}

.faq h2 {
    text-align: center;
    font-size: clamp(26px, 3.5vw, 36px);
    margin-bottom: 40px;
}

.faq details {
    max-width: 760px;
    margin: 0 auto 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 24px;
}

.faq summary {
    cursor: pointer;
    padding: 18px 0;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 22px;
    color: var(--accent);
    font-weight: 400;
    line-height: 1;
}
.faq details[open] summary::after { content: "−"; }

.faq details p {
    padding: 0 0 20px;
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

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

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 56px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 32px;
}

.footer-brand .wordmark { font-size: 16px; }
.footer-tagline {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

.footer-contact {
    text-align: right;
    font-size: 14px;
}
.footer-contact a { color: var(--text-muted); }

.copyright {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

/* ── Legal placeholder pages ──────────────────────────── */

.legal-page {
    padding: 64px 0 96px;
    max-width: 720px;
    margin: 0 auto;
}

.legal-banner {
    background: #fff7e6;
    border: 1px solid #ffcc4d;
    color: #7a4f00;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    font-weight: 600;
}
@media (prefers-color-scheme: dark) {
    .legal-banner {
        background: rgba(255, 204, 77, 0.15);
        border-color: #ffcc4d;
        color: #ffd76a;
    }
}

.legal-page h1 {
    font-size: 32px;
    margin-bottom: 24px;
}

.legal-page p { color: var(--text-muted); }

/* ── Mobile responsive ────────────────────────────────── */

@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .card.popular { transform: none; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-nav { align-items: center; }
    .footer-contact { text-align: center; }
}

@media (max-width: 540px) {
    .hero { padding: 56px 0 64px; }
    .how, .pricing, .faq { padding: 56px 0; }
    .container { padding: 0 18px; }
}
