/* ========================================
   KURSACH AI - стили
   ======================================== */

/* === Палитра по умолчанию: тёмная тема (фоллбэк) === */
:root {
    --bg: #0e1116;
    --bg-elevated: #161b22;
    --bg-card: #1c2230;
    --border: #2a3140;
    --text: #e6edf3;
    --text-muted: #8b95a7;
    --primary: #ffb347;
    --primary-dark: #ff9020;
    --accent: #5ad1c5;
    --success: #58d96b;
    --danger: #ff6b6b;
    --radius: 14px;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* === Тёмная тема — явно === */
:root[data-theme="dark"] {
    --bg: #0e1116;
    --bg-elevated: #161b22;
    --bg-card: #1c2230;
    --border: #2a3140;
    --text: #e6edf3;
    --text-muted: #8b95a7;
    --primary: #ffb347;
    --primary-dark: #ff9020;
    --accent: #5ad1c5;
    --success: #58d96b;
    --danger: #ff6b6b;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* === Светлая тема === */
:root[data-theme="light"] {
    --bg: #f7f8fa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --text: #1a1d29;
    --text-muted: #5f6573;
    --primary: #ff8a3d;
    --primary-dark: #ff7a25;
    --accent: #4f5dff;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: 0 6px 18px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* === Авто-тема: следуем системе === */
:root[data-theme="auto"] {
    --bg: #0e1116;
    --bg-elevated: #161b22;
    --bg-card: #1c2230;
    --border: #2a3140;
    --text: #e6edf3;
    --text-muted: #8b95a7;
    --primary: #ffb347;
    --primary-dark: #ff9020;
    --accent: #5ad1c5;
    --success: #58d96b;
    --danger: #ff6b6b;
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) {
    :root[data-theme="auto"] {
        --bg: #f7f8fa;
        --bg-elevated: #ffffff;
        --bg-card: #ffffff;
        --border: #e5e7eb;
        --text: #1a1d29;
        --text-muted: #5f6573;
        --primary: #ff8a3d;
        --primary-dark: #ff7a25;
        --accent: #4f5dff;
        --success: #10b981;
        --danger: #ef4444;
        --shadow: 0 6px 18px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--text); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary); }

/* ===== Header ===== */
.header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}
.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}
.nav a:not(.btn) {
    font-size: 15px;
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
    text-align: center;
    border: 1px solid transparent;
}
.btn--primary {
    background: var(--primary);
    color: #1a1a1a;
}
.btn--primary:hover {
    background: var(--primary-dark);
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 179, 71, 0.35);
}
.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn--ghost:hover {
    background: var(--bg-card);
    color: var(--primary);
}
.btn--large {
    padding: 16px 32px;
    font-size: 17px;
}

/* ===== Hero ===== */
.hero {
    padding: 90px 0 70px;
    background: radial-gradient(ellipse at top, rgba(255, 179, 71, 0.08), transparent 60%);
}
.hero__title {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 920px;
}
.hero__accent {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__lead {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: 36px;
}
.hero__cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.hero__note {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Section titles ===== */
.section-title {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 16px;
}
.section-lead {
    color: var(--text-muted);
    text-align: center;
    max-width: 680px;
    margin: 0 auto 50px;
    font-size: 17px;
}

/* ===== Levels ===== */
.levels {
    padding: 80px 0;
}
.levels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.level-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    position: relative;
    transition: transform 0.15s, border-color 0.15s;
}
.level-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}
.level-card--free {
    border-color: var(--accent);
}
.level-card--featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(255, 179, 71, 0.08), var(--bg-card));
}
.level-card__badge {
    position: absolute;
    top: -12px;
    left: 22px;
    background: var(--primary);
    color: #1a1a1a;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
}
.level-card--free .level-card__badge {
    background: var(--accent);
}
.level-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
    margin-top: 8px;
}
.level-card__price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
}
.level-card--free .level-card__price {
    color: var(--accent);
}
.level-card ul {
    list-style: none;
    margin-bottom: 18px;
}
.level-card li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14.5px;
    color: var(--text);
}
.level-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
.level-card__hint {
    color: var(--text-muted);
    font-size: 13.5px;
    font-style: italic;
}

/* ===== Packages ===== */
.packages {
    padding: 80px 0;
    background: var(--bg-elevated);
}
.packages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.package {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    position: relative;
    transition: transform 0.15s, border-color 0.15s;
}
.package:hover {
    transform: translateY(-4px);
}
.package--featured {
    border-color: var(--primary);
    transform: scale(1.03);
}
.package--featured:hover {
    transform: scale(1.03) translateY(-4px);
}
.package__label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #1a1a1a;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.package h3 {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}
.package__energy {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}
.package__price {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}
.package__per {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.discount {
    color: var(--success);
    margin-left: 4px;
    font-weight: 700;
}
.package p {
    font-size: 14px;
    color: var(--text-muted);
    min-height: 60px;
    margin-bottom: 16px;
}

/* ===== Bonuses ===== */
.bonuses {
    padding: 80px 0;
}
.bonuses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.bonus-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
}
.bonus-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}
.bonus-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 15px;
}
.bonus-card ul {
    list-style: none;
}
.bonus-card li {
    padding: 6px 0;
    font-size: 14.5px;
    border-top: 1px solid var(--border);
}
.bonus-card li:first-child { border-top: none; }

/* ===== FAQ ===== */
.faq {
    padding: 80px 0;
    background: var(--bg-elevated);
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin-bottom: 12px;
    cursor: pointer;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
.faq-item summary {
    font-weight: 600;
    font-size: 17px;
    list-style: none;
    position: relative;
    padding-right: 32px;
}
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 24px;
    color: var(--primary);
    transition: transform 0.15s;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item p {
    margin-top: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 0 30px;
    margin-top: 40px;
}
.footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: center;
}
.footer__logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.footer__sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}
.footer__links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.footer__links a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer__copy {
    color: var(--text-muted);
    font-size: 13px;
    width: 100%;
    text-align: center;
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

/* ===== Адаптив ===== */
@media (max-width: 980px) {
    .levels-grid, .packages-grid { grid-template-columns: repeat(2, 1fr); }
    .bonuses-grid { grid-template-columns: 1fr; }
    .package--featured { transform: none; }
    .package--featured:hover { transform: translateY(-4px); }
}
@media (max-width: 560px) {
    .levels-grid, .packages-grid { grid-template-columns: 1fr; }
    .nav { gap: 14px; }
    .nav a:not(.btn) { display: none; }
    .hero { padding: 60px 0 50px; }
    .hero__cta { flex-direction: column; }
    .hero__cta .btn { width: 100%; }
}
