:root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-soft: #f3f7fd;
    --surface: #ffffff;
    --text: #0f1b2d;
    --muted: #5b6b82;
    --border: #dfe7f3;
    --primary: #1d63e0;
    --primary-hover: #1751bd;
    --on-primary: #ffffff;
    --accent-soft: #e6eefc;
    --line-a: #1d63e0;
    --line-b: #38b6ff;
    --line-c: #8aa4c8;
    --shadow: 0 10px 30px rgba(29, 99, 224, .10);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b111b;
        --bg-soft: #0f1826;
        --surface: #131d2d;
        --text: #e8eef8;
        --muted: #93a3bb;
        --border: #22304a;
        --primary: #4f8dff;
        --primary-hover: #74a5ff;
        --on-primary: #06101f;
        --accent-soft: #172641;
        --line-a: #4f8dff;
        --line-b: #4fd0ff;
        --line-c: #7a8fb0;
        --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b111b;
    --bg-soft: #0f1826;
    --surface: #131d2d;
    --text: #e8eef8;
    --muted: #93a3bb;
    --border: #22304a;
    --primary: #4f8dff;
    --primary-hover: #74a5ff;
    --on-primary: #06101f;
    --accent-soft: #172641;
    --line-a: #4f8dff;
    --line-b: #4fd0ff;
    --line-c: #7a8fb0;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

body.landing {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    margin: 0;
}

.lp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.lp-header { border-bottom: 1px solid var(--border); }
.lp-header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.lp-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.lp-logo svg { color: var(--primary); }
.lp-logo:hover { color: var(--text); text-decoration: none; }
.lp-link { color: var(--primary); font-weight: 600; text-decoration: none; cursor: pointer; }
.lp-link:hover { color: var(--primary-hover); text-decoration: none; }

/* buttons */
.lp-btn {
    display: inline-block; padding: 12px 26px; border-radius: 10px; background: var(--primary);
    color: var(--on-primary); font-weight: 600; text-decoration: none; cursor: pointer;
    border: 1px solid var(--primary); transition: background .15s;
}
.lp-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); text-decoration: none; }
.lp-btn-ghost { background: transparent; color: var(--primary); margin-left: 8px; }
.lp-btn-ghost:hover { background: var(--accent-soft); color: var(--primary); }

/* hero */
.lp-hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.lp-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.lp-hero h1 { font-size: 44px; line-height: 1.15; font-weight: 800; margin: 0 0 18px; letter-spacing: -.02em; }
.lp-accent { color: var(--primary); }
.lp-lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 480px; }

.lp-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.lp-preview-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.lp-chip { background: var(--accent-soft); color: var(--primary); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.lp-preview-chart { width: 100%; height: 170px; display: block; }
.lp-grid line { stroke: var(--border); stroke-width: 1; }
.lp-line { fill: none; stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lp-line-a { stroke: var(--line-a); }
.lp-line-b { stroke: var(--line-b); }
.lp-line-c { stroke: var(--line-c); stroke-dasharray: 5 5; }
.lp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.lp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.lp-dot-a { background: var(--line-a); }
.lp-dot-b { background: var(--line-b); }
.lp-dot-c { background: var(--line-c); }

/* features */
.lp-section { padding: 56px 0; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: box-shadow .15s, transform .15s; }
.lp-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.lp-card h3 { font-size: 18px; font-weight: 700; margin: 14px 0 8px; }
.lp-card p { color: var(--muted); margin: 0; }
.lp-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.lp-icon svg { width: 24px; height: 24px; }

/* cta + footer */
.lp-cta { text-align: center; background: var(--bg-soft); }
.lp-cta h2 { font-size: 28px; font-weight: 800; margin: 0 0 22px; }
.lp-footer { padding: 28px 0; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
.lp-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* переключатель темы */
.lp-theme { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.lp-theme button {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 7px;
    background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer;
}
.lp-theme button svg { width: 15px; height: 15px; }
.lp-theme button:hover { color: var(--text); }
.lp-theme button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* модалка входа (стили из user.css) в цветах темы */
.landing .user-auth-modal { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.landing .user-auth-tabs { border-bottom-color: var(--border); }
.landing .user-auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.landing .user-auth-form label { color: var(--text); }
.landing .user-auth-form .form-control { background: var(--bg); color: var(--text); border-color: var(--border); }
.landing .user-auth-form a { color: var(--primary); }
.landing .user-auth-form p { color: var(--muted) !important; }
.landing .user-auth-form .btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

@media (max-width: 800px) {
    .lp-hero { padding: 40px 0; }
    .lp-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .lp-hero h1 { font-size: 32px; }
}
