/* Public landing page.
 *
 * Deliberately separate from app.css: the marketing page and the application
 * share fonts and nothing else, and loading 6000 lines of dashboard styling on
 * the first paid visit would be waste.
 *
 * Fonts come from fonts.css (self-hosted), so this file only sets the palette,
 * rhythm and motion.
 */

:root {
    /* Mirrors the app's own default theme (app.css :root) so a visitor who
       registers doesn't land in a visually different product. */
    --lp-ink: #15156b;
    --lp-ink-2: #5d6072;
    --lp-ink-3: #8c8fa0;
    --lp-ground: #f4f4f8;
    --lp-surface: #ffffff;
    --lp-surface-2: #f8f8fb;
    --lp-rule: #dcdde6;
    --lp-accent: #6257e8;
    --lp-accent-soft: #efeeff;
    --lp-accent-ink: #ffffff;
    --lp-warm: #c0392b;
    --lp-radius: 14px;
    --lp-sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --lp-display: "Lora", Georgia, "Times New Roman", serif;
    --lp-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    /* Matches the app's "Obsidian" theme family rather than inventing a new
       dark palette, for the same reason as above. */
    :root:not([data-theme="light"]) {
        --lp-ink: #f2f3f5;
        --lp-ink-2: #9299a6;
        --lp-ink-3: #6c7280;
        --lp-ground: #0d0f14;
        --lp-surface: #151820;
        --lp-surface-2: #171a22;
        --lp-rule: #272c37;
        --lp-accent: #8b7cff;
        --lp-accent-soft: #211d3b;
        --lp-accent-ink: #0d0f14;
        --lp-warm: #ff6b6b;
    }
}

:root[data-theme="dark"] {
    --lp-ink: #f2f3f5;
    --lp-ink-2: #9299a6;
    --lp-ink-3: #6c7280;
    --lp-ground: #0d0f14;
    --lp-surface: #151820;
    --lp-surface-2: #171a22;
    --lp-rule: #272c37;
    --lp-accent: #8b7cff;
    --lp-accent-soft: #211d3b;
    --lp-accent-ink: #0d0f14;
    --lp-warm: #ff6b6b;
}

* { box-sizing: border-box; }

body.lp {
    margin: 0;
    background: var(--lp-ground);
    color: var(--lp-ink);
    font-family: var(--lp-sans);
    font-size: 17px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.lp h1, .lp h2, .lp h3 { font-family: var(--lp-display); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
.lp h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); line-height: 1.08; }
.lp h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.18; }
.lp h3 { font-size: 1.16rem; line-height: 1.32; }
.lp p { margin: 0; }

.lp-eyebrow {
    font-family: var(--lp-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lp-accent);
    margin: 0 0 0.9rem;
}

/* ---------------- buttons ---------------- */

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.66rem 1.25rem;
    border-radius: 999px;
    font-weight: 650;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.lp-btn-primary { background: var(--lp-accent); color: var(--lp-accent-ink); }
.lp-btn-primary:hover { transform: translateY(-1px); }
.lp-btn-ghost { border-color: var(--lp-rule); color: var(--lp-ink); background: transparent; }
.lp-btn-ghost:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.lp-btn-lg { padding: 0.85rem 1.7rem; font-size: 1.02rem; }
.lp a:focus-visible, .lp button:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 3px; }

/* ---------------- nav ---------------- */

.lp-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.9rem clamp(1rem, 5vw, 3.5rem);
    background: color-mix(in srgb, var(--lp-ground) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lp-rule);
}

.lp-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.lp-brand-glyph {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--lp-accent);
    color: var(--lp-accent-ink);
    font-weight: 800;
    font-size: 1rem;
}
.lp-brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.lp-brand-copy strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.lp-brand-copy small { font-size: 0.66rem; color: var(--lp-ink-3); letter-spacing: 0.07em; }

.lp-nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.lp-nav-links a { color: var(--lp-ink-2); text-decoration: none; font-size: 0.92rem; }
.lp-nav-links a:hover { color: var(--lp-accent); }
.lp-nav-actions { display: flex; gap: 0.6rem; }

/* ---------------- hero ---------------- */

.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding: clamp(3rem, 8vw, 6.5rem) clamp(1rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5.5rem);
    max-width: 1240px;
    margin: 0 auto;
}

.lp-lede { font-size: 1.12rem; color: var(--lp-ink-2); max-width: 54ch; margin-top: 1.1rem; }
.lp-hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.9rem; }
.lp-hero-note { margin-top: 0.9rem; font-size: 0.86rem; color: var(--lp-ink-3); }

/* ---------------- hero visual ---------------- */

.lp-hero-visual { position: relative; }
.lp-card-stack { display: flex; flex-direction: column; gap: 0.9rem; }

.lp-prompt {
    background: var(--lp-surface);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    padding: 0.9rem 1.1rem;
    font-family: var(--lp-mono);
    font-size: 0.86rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.lp-prompt-label {
    display: block;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-ink-3);
    margin-bottom: 0.4rem;
}

.lp-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--lp-accent);
    vertical-align: -0.15em;
    animation: lp-blink 1s step-end infinite;
}

@keyframes lp-blink { 50% { opacity: 0; } }

.lp-course {
    background: var(--lp-surface);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    padding: 1.1rem 1.2rem 1.3rem;
    box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

.is-assembled .lp-course { opacity: 1; transform: none; }

.lp-course-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem; }
.lp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lp-surface-2); border: 1px solid var(--lp-rule); }
.lp-course-title { margin-left: 0.6rem; font-weight: 700; font-size: 0.94rem; }

.lp-modules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

.lp-modules li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 9px;
    background: var(--lp-surface-2);
    font-size: 0.88rem;
    opacity: 0;
    transform: translateX(-10px);
}

.is-assembled .lp-modules li {
    animation: lp-slide-in .42s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: calc(var(--i) * 130ms);
}

.lp-modules b { font-family: var(--lp-mono); font-size: 0.74rem; color: var(--lp-accent); }
.lp-check { margin-left: auto; color: var(--lp-accent); font-weight: 700; }

@keyframes lp-slide-in { to { opacity: 1; transform: none; } }

.lp-progress {
    margin-top: 1rem;
    height: 6px;
    border-radius: 99px;
    background: var(--lp-surface-2);
    overflow: hidden;
}

.lp-progress span { display: block; height: 100%; width: 0; background: var(--lp-accent); border-radius: inherit; }
.is-assembled .lp-progress span { animation: lp-fill 1.4s .75s cubic-bezier(.22, 1, .36, 1) forwards; }

@keyframes lp-fill { to { width: 72%; } }

/* ---------------- sections ---------------- */

.lp-section { padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 5vw, 3.5rem); }
.lp-section-inner { max-width: 1120px; margin: 0 auto; }
.lp-problem { background: var(--lp-surface); border-block: 1px solid var(--lp-rule); }
.lp-problem .lp-section-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.lp-story p + p { margin-top: 1rem; }
.lp-story p { color: var(--lp-ink-2); }
.lp-story h2 { margin-bottom: 1.1rem; }

.lp-pains { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.lp-pains li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 11px; background: var(--lp-ground); border: 1px solid var(--lp-rule); }
.lp-pains div { display: flex; flex-direction: column; font-size: 0.92rem; color: var(--lp-ink-2); }
.lp-pains b { font-family: var(--lp-mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--lp-ink-3); margin-bottom: 0.18rem; }
.lp-pain-mark { font-weight: 700; color: var(--lp-warm); line-height: 1.5; }
.lp-pain-good { border-color: var(--lp-accent); background: var(--lp-accent-soft); }
.lp-pain-good .lp-pain-mark { color: var(--lp-accent); }
.lp-pain-good b { color: var(--lp-accent); }

/* ---------------- steps ---------------- */

.lp-steps { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; counter-reset: step; }
.lp-steps li { background: var(--lp-surface); border: 1px solid var(--lp-rule); border-radius: var(--lp-radius); padding: 1.3rem 1.25rem 1.4rem; }
.lp-step-num { font-family: var(--lp-mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--lp-accent); display: block; margin-bottom: 0.7rem; }
.lp-steps h3 { margin-bottom: 0.45rem; }
.lp-steps p { color: var(--lp-ink-2); font-size: 0.93rem; }

/* ---------------- audience ---------------- */

.lp-audience { background: var(--lp-surface); border-block: 1px solid var(--lp-rule); }
.lp-audience-grid { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.lp-audience-grid article { padding: 1.25rem 1.2rem; border-radius: var(--lp-radius); background: var(--lp-ground); border: 1px solid var(--lp-rule); }
.lp-audience-grid h3 { margin-bottom: 0.4rem; }
.lp-audience-grid p { color: var(--lp-ink-2); font-size: 0.93rem; }

/* ---------------- pricing ---------------- */

.lp-pricing-lede { margin-top: 1rem; color: var(--lp-ink-2); max-width: 62ch; }
.lp-plans { margin-top: 2.3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; align-items: start; }

.lp-plan {
    position: relative;
    background: var(--lp-surface);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    padding: 1.6rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
}

.lp-plan-accent { border-color: var(--lp-accent); box-shadow: 0 22px 48px -34px rgba(0, 0, 0, .5); }
.lp-plan-tag {
    position: absolute;
    top: -0.72rem;
    left: 1.4rem;
    background: var(--lp-accent);
    color: var(--lp-accent-ink);
    font-family: var(--lp-mono);
    font-size: 0.64rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: 99px;
}

.lp-price { display: flex; align-items: baseline; gap: 0.4rem; }
.lp-price b { font-family: var(--lp-display); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; }
.lp-price span { color: var(--lp-ink-3); font-size: 0.88rem; }

.lp-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.93rem; color: var(--lp-ink-2); }
.lp-plan li { padding-left: 1.4rem; position: relative; }
.lp-plan li::before { content: "→"; position: absolute; left: 0; color: var(--lp-accent); font-family: var(--lp-mono); }
.lp-plan-note { font-size: 0.84rem; color: var(--lp-ink-3); }
.lp-plan .lp-btn { margin-top: auto; align-self: flex-start; }
.lp-honest { margin-top: 2rem; padding: 1.1rem 1.3rem; border-left: 3px solid var(--lp-accent); background: var(--lp-accent-soft); border-radius: 0 11px 11px 0; color: var(--lp-ink-2); font-size: 0.95rem; max-width: 78ch; }

/* ---------------- cta ---------------- */

.lp-cta { padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 3.5rem); text-align: center; background: var(--lp-surface); border-top: 1px solid var(--lp-rule); }
.lp-cta p { margin: 0.9rem auto 1.9rem; color: var(--lp-ink-2); max-width: 46ch; }

/* ---------------- footer ---------------- */

.lp-footer { padding: 2.6rem clamp(1rem, 5vw, 3.5rem) 3rem; border-top: 1px solid var(--lp-rule); }
.lp-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 2rem; justify-content: space-between; flex-wrap: wrap; }
.lp-footer-brand { font-family: var(--lp-display); font-size: 1.2rem; font-weight: 600; }
.lp-footer-legal { margin-top: 0.5rem; font-size: 0.8rem; color: var(--lp-ink-3); line-height: 1.5; }
.lp-footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.lp-footer-links a { color: var(--lp-ink-2); text-decoration: none; font-size: 0.9rem; }
.lp-footer-links a:hover { color: var(--lp-accent); }
.lp-disclaimer { max-width: 1120px; margin: 2rem auto 0; font-size: 0.78rem; color: var(--lp-ink-3); line-height: 1.55; }

/* ---------------- reveal ---------------- */

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0ms); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .lp-course { opacity: 1; transform: none; }
    .lp-modules li { opacity: 1; transform: none; animation: none; }
    .lp-progress span { width: 72%; animation: none; }
    .lp-caret { animation: none; }
    .lp-btn:hover { transform: none; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 960px) {
    .lp-hero { grid-template-columns: 1fr; }
    .lp-problem .lp-section-inner { grid-template-columns: 1fr; }
    .lp-nav-links { display: none; }
}

@media (max-width: 560px) {
    body.lp { font-size: 16px; }
    .lp-nav { gap: 0.7rem; padding-inline: 1rem; }
    .lp-nav-actions .lp-btn-ghost { display: none; }
    .lp-hero-actions .lp-btn { width: 100%; }
}
