:root {
    --bg: #0b0e1c;
    --bg-2: #0f1327;
    --surface: #151a33;
    --surface-2: #1c2242;
    --line: rgba(255, 255, 255, 0.09);
    --text: #eef0fa;
    --muted: #9ea5c4;
    --amber: #ffc857;
    --amber-ink: #2a1f00;
    --violet: #8b7bff;
    --ok: #5be0a4;
    --radius: 18px;
    --font-head: 'Unbounded', 'Onest', sans-serif;
    --font-body: 'Onest', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }

.container { width: min(1160px, 100% - 40px); margin: 0 auto; }
.narrow { width: min(780px, 100% - 40px); }

.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.hl { color: var(--amber); }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.85rem 1.6rem; border-radius: 999px;
    background: var(--amber); color: var(--amber-ink);
    font-weight: 600; border: 1px solid transparent; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 200, 87, 0.28); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--amber); box-shadow: none; }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.92rem; }

/* ===== Навигация ===== */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 14, 28, 0.82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.nav-links { display: flex; gap: 1.6rem; color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

.logo-mark, .avatar {
    display: inline-flex; gap: 3px; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--line);
}
.logo-mark i, .avatar i {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--amber); box-shadow: 0 0 8px rgba(255, 200, 87, 0.7);
    position: relative;
}
.logo-mark i::after, .avatar i::after {
    content: ''; position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: var(--bg); top: 3px; left: 3px;
}

/* ===== Hero ===== */
.hero {
    padding: 5rem 0 4.5rem;
    background:
        radial-gradient(600px 300px at 85% 10%, rgba(139, 123, 255, 0.22), transparent 70%),
        radial-gradient(500px 260px at 10% 90%, rgba(255, 200, 87, 0.10), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; align-items: center; }
.eyebrow {
    display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
    background: rgba(255, 200, 87, 0.1); color: var(--amber);
    font-size: 0.85rem; font-weight: 500; margin-bottom: 1.4rem;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-bottom: 1.3rem; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.2rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 2rem; color: var(--muted); font-size: 0.95rem; }
.hero-facts b { color: var(--text); font-family: var(--font-head); font-size: 1.15rem; margin-right: 0.3rem; }

.night-chat {
    background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
    padding: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    animation: float 6s ease-in-out infinite;
}
.night-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.night-time { font-family: var(--font-head); font-size: 1.5rem; }
.night-pill { font-size: 0.78rem; color: var(--violet); background: rgba(139, 123, 255, 0.14); padding: 0.25rem 0.7rem; border-radius: 999px; }
.night-done {
    display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem;
    font-size: 0.85rem; color: var(--ok);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== Пузыри (общие для hero и чата) ===== */
.bubble {
    max-width: 82%; padding: 0.6rem 0.95rem; border-radius: 16px;
    font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere;
}
.bubble.bot { background: var(--surface-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.user { background: var(--amber); color: var(--amber-ink); border-bottom-right-radius: 4px; align-self: flex-end; font-weight: 500; }

/* ===== Секции ===== */
.section { padding: 5rem 0; }
.section-dark { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2.6rem; }
.section-head h2, .cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 0.9rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ===== Шаги ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; }
.step-num {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255, 200, 87, 0.12); color: var(--amber);
    font-family: var(--font-head); margin-bottom: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.step p { color: var(--muted); font-size: 0.97rem; }

/* ===== Демо ===== */
.demo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 1.4rem; align-items: stretch; }

.chat {
    display: flex; flex-direction: column; min-height: 640px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
}
.chat-head { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.chat-title { flex: 1; min-width: 0; line-height: 1.3; }
.chat-title b { display: block; }
.chat-title small { color: var(--muted); font-size: 0.8rem; }
.reset {
    background: transparent; border: 1px solid var(--line); border-radius: 999px;
    padding: 0.35rem 0.85rem; font-size: 0.82rem; color: var(--muted); cursor: pointer;
}
.reset:hover { color: var(--text); border-color: var(--amber); }

.messages { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; max-height: 480px; scroll-behavior: smooth; }
.messages .bubble { animation: pop 0.25s ease-out; }
.bubble time { display: block; font-size: 0.7rem; opacity: 0.55; margin-top: 0.15rem; }
.bubble.typing { display: flex; gap: 4px; padding: 0.8rem 1rem; }
.bubble.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.4rem 1.1rem 0.9rem; min-height: 54px; }
.chip {
    background: transparent; border: 1px solid rgba(255, 200, 87, 0.45); color: var(--amber);
    padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.88rem; cursor: pointer;
    transition: background 0.2s;
}
.chip:hover { background: rgba(255, 200, 87, 0.12); }

.composer { display: flex; gap: 0.6rem; padding: 0.8rem 1.1rem 1.1rem; border-top: 1px solid var(--line); }
.composer input {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line);
    border-radius: 999px; padding: 0.7rem 1.1rem; font-size: 16px;
}
.composer input::placeholder { color: #6b7396; }
.composer input:focus { outline: none; border-color: var(--amber); }
.send {
    width: 46px; height: 46px; flex: none; border-radius: 50%; border: none;
    background: var(--amber); color: var(--amber-ink); cursor: pointer;
    display: grid; place-items: center;
}
.send:disabled, .composer input:disabled { opacity: 0.5; cursor: not-allowed; }

.side { display: flex; flex-direction: column; gap: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.2rem; }
.panel h3 { font-size: 0.95rem; margin-bottom: 0.9rem; }
.panel h3 span { color: var(--amber); font-family: var(--font-body); font-weight: 600; }

.facts { display: grid; gap: 0.5rem; margin-bottom: 0.9rem; font-size: 0.9rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; font-weight: 500; }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.slots li {
    display: flex; flex-direction: column; padding: 0.55rem 0.75rem; border-radius: 12px;
    background: var(--bg); border: 1px dashed var(--line); font-size: 0.82rem;
    transition: border-color 0.3s, background 0.3s;
}
.slots li span { color: var(--muted); }
.slots li b { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.slots li.filled { border: 1px solid rgba(255, 200, 87, 0.5); background: rgba(255, 200, 87, 0.07); }
.slots li.filled b { color: var(--amber); }

.sched { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.cell {
    text-align: center; padding: 0.4rem 0; border-radius: 9px; font-size: 0.82rem;
    border: 1px solid var(--line); color: var(--text);
}
.cell.busy { color: #5f678c; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(255, 255, 255, 0.04) 5px 10px); text-decoration: line-through; }
.cell.mine { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); font-weight: 600; text-decoration: none; }
.cell.pick { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet) inset; }
.legend { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.8rem; font-size: 0.78rem; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; border: 1px solid var(--line); }
.lg.busy { background: #2a3052; }
.lg.mine { background: var(--amber); border-color: var(--amber); }

.journal { display: grid; gap: 0.6rem; max-height: 210px; overflow-y: auto; }
.journal li { font-size: 0.88rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); animation: pop 0.3s ease-out; }
.journal li b { display: block; font-weight: 600; }
.journal li small { color: var(--ok); font-size: 0.78rem; }
.journal li.empty { color: var(--muted); border-style: dashed; }
.journal li.handoff small { color: var(--violet); }

.demo-note { margin-top: 1.4rem; color: var(--muted); font-size: 0.88rem; max-width: 760px; }

/* ===== Карточки ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: transform 0.25s, border-color 0.25s; }
.card:hover { transform: translateY(-4px); border-color: rgba(255, 200, 87, 0.45); }
.card-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); font-size: 1.4rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.02rem; margin-bottom: 0.55rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ===== Калькулятор ===== */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.calc-inputs, .calc-result { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.8rem; }
.calc-inputs { display: grid; gap: 1.6rem; align-content: start; }
.field { display: grid; gap: 0.7rem; font-size: 0.95rem; color: var(--muted); }
.field b { color: var(--amber); font-family: var(--font-head); margin-left: 0.4rem; white-space: nowrap; }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: var(--surface-2); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--amber); cursor: pointer; }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--amber); border: 3px solid var(--bg); cursor: pointer; }

.res-main small, .res-row small { display: block; color: var(--muted); font-size: 0.88rem; }
.res-main b { display: block; font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--amber); line-height: 1.15; }
.res-main span { color: var(--muted); font-size: 0.95rem; }
.res-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.res-row b { font-family: var(--font-head); font-size: 1.3rem; }
.res-note { color: var(--muted); font-size: 0.85rem; }

/* ===== Цены ===== */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan {
    position: relative; display: flex; flex-direction: column; gap: 1.1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.9rem;
}
.plan-main { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset, 0 20px 60px rgba(255, 200, 87, 0.12); }
.badge { position: absolute; top: -12px; left: 1.6rem; background: var(--amber); color: var(--amber-ink); font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.8rem; border-radius: 999px; }
.plan h3 { font-size: 1.2rem; }
.price { font-family: var(--font-head); font-size: 1.7rem; }
.price small { display: block; font-family: var(--font-body); font-size: 0.82rem; color: var(--muted); font-weight: 400; margin-top: 0.2rem; }
.plan ul { display: grid; gap: 0.6rem; flex: 1; color: var(--muted); font-size: 0.95rem; }
.plan li { padding-left: 1.5rem; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

/* ===== FAQ ===== */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { padding: 1.2rem 2rem 1.2rem 0; cursor: pointer; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0.3rem; top: 1rem; font-size: 1.5rem; color: var(--amber); transition: transform 0.25s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding-bottom: 1.3rem; color: var(--muted); }

/* ===== CTA и футер ===== */
.cta { text-align: center; background: radial-gradient(500px 240px at 50% 100%, rgba(255, 200, 87, 0.14), transparent 70%); }
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto 2rem; }
.footer { padding: 1.8rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; }

/* ===== Адаптив ===== */
@media (max-width: 980px) {
    .hero-grid, .demo, .calc { grid-template-columns: 1fr; }
    .steps, .cards, .plans { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
    .hero-visual { max-width: 460px; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .section { padding: 3.5rem 0; }
    .hero { padding: 3rem 0; }
    .steps, .cards, .plans { grid-template-columns: 1fr; }
    .sched { grid-template-columns: repeat(3, 1fr); }
    .chat { min-height: 560px; }
    .messages { max-height: 380px; }
    .bubble { max-width: 90%; }
    .res-row { grid-template-columns: 1fr; }
    .calc-inputs, .calc-result { padding: 1.3rem; }
    .btn-small { padding: 0.5rem 0.9rem; }
    .chat-title small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
