/* ============================================================
   ANAMAKE site — Sage Mint
   Классы .btn, .btn-soft, .btn-ghost, .card, .badge, .input,
   .status-badge сознательно названы как в приложении (main.css),
   чтобы при переносе стилей ничего не разошлось.
   ============================================================ */

:root {
    --bg: #F3F8F4;
    --surface: #FFFFFF;
    --ink: #0F172A;
    --muted: #475569;
    --line: #E3EDE5;
    --line-strong: #CDE2D3;
    --mint: #10B981;
    --mint-bright: #4ADE80;
    --mint-deep: #047857;
    --mint-soft: #E9F6EE;
    --radius-l: 20px;
    --radius-m: 14px;
    --radius-s: 10px;
    --shadow-card: 0 12px 32px -14px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
    --container: 1140px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--mint-deep); }
a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
    border-radius: 4px;
}

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

.section {
    padding: 88px 0;
    scroll-margin-top: 92px;
}
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
    max-width: 640px;
    margin-bottom: 48px;
}
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 100;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line-strong);
    transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Кнопки и общие элементы ---------- */

.btn,
.btn-soft,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn { background: var(--mint-bright); color: var(--ink); }
.btn:hover { background: #22C55E; color: var(--ink); }
.btn-soft { background: var(--mint-soft); color: var(--mint-deep); border-color: #CBE9D6; }
.btn-soft:hover { background: #DCF2E3; color: var(--mint-deep); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--mint-soft); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--mint-soft);
    color: var(--mint-deep);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    font-style: normal;
    background: #EEF2F6;
    color: var(--muted);
}
.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status-badge.is-done { background: var(--mint-soft); color: var(--mint-deep); }
.status-badge.is-progress { background: #FFF4DE; color: #92600A; }
.status-badge.is-draft { background: #EEF2F6; color: var(--muted); }

.input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-m);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}
.input:focus {
    outline: none;
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    flex: none;
}

/* ---------- Шапка ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--mint);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav ul {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav ul a {
    display: block;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.site-nav ul a:hover { color: var(--ink); background: var(--mint-soft); }
.nav-cta { min-height: 42px; padding: 0 20px; margin-left: 8px; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    background: var(--surface);
    color: var(--ink);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    padding: 80px 0 96px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: -220px;
    right: -180px;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.14), rgba(74, 222, 128, 0) 65%);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 56px;
    align-items: center;
}
.hero-lead {
    font-size: 19px;
    color: var(--muted);
    max-width: 460px;
    margin-bottom: 28px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Макет интерфейса в hero */

.app-shot {
    padding: 10px;
    border-radius: 24px;
    box-shadow: 0 30px 60px -28px rgba(16, 185, 129, 0.35), var(--shadow-card);
}
.app-shot__inner {
    display: grid;
    grid-template-columns: 168px 1fr;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    min-width: 0;
}
.app-shot__side {
    background: #FBFDFB;
    border-right: 1px solid var(--line);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.app-shot__logo {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 13px;
}
.app-shot__newchat {
    background: var(--mint-bright);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 8px 10px;
    border-radius: 999px;
}
.app-shot__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}
.app-shot__nav span { padding: 6px 8px; border-radius: 8px; }
.app-shot__nav .is-active { background: var(--mint-soft); color: var(--mint-deep); font-weight: 600; }

.app-shot__main {
    background: var(--bg);
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.app-shot__topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}
.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}
.app-shot__welcome { text-align: center; padding: 6px 0 2px; }
.app-shot__spark {
    width: 38px;
    height: 38px;
    margin: 0 auto 8px;
    border-radius: 12px;
    background: var(--mint-soft);
    color: var(--mint-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-shot__title { font-weight: 700; font-size: 16px; margin: 0 0 4px; color: var(--ink); }
.app-shot__hint { font-size: 12px; color: var(--muted); margin: 0; max-width: 300px; margin-left: auto; margin-right: auto; }

.app-shot__chips { display: flex; flex-direction: column; gap: 6px; }
.app-shot__chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-shot__chip .badge { flex: none; text-transform: uppercase; }

.app-shot__input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 10px 10px 10px 14px;
    margin-top: auto;
}
.app-shot__placeholder {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.model-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    flex: none;
}
.send-dot {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--mint-bright);
    color: var(--ink);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

/* ---------- Возможности ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature { padding: 26px; }
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--mint-soft);
    color: var(--mint-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Демо ---------- */

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.demo-card { padding: 18px; }
.demo-card figcaption {
    padding: 12px 8px 4px;
    font-size: 14px;
    color: var(--muted);
}

.chat-mock {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-mock__msg {
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.chat-mock__msg.is-user {
    align-self: flex-end;
    background: var(--mint-soft);
    border-color: #CBE9D6;
    border-bottom-right-radius: 4px;
}
.chat-mock__msg:not(.is-user) { border-bottom-left-radius: 4px; }
.chat-mock__input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--muted);
}

.board-mock {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.board-mock__frame {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.board-mock__frame.t1 { background: #E9F6EE; }
.board-mock__frame.t2 { background: #F2F8F3; }
.board-mock__frame.t3 { background: #F6F8F7; }
.board-mock__frame span {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.board-mock__frame .status-badge { align-self: flex-start; font-size: 10px; padding: 3px 8px; }

/* ---------- Баланс ---------- */

.balance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.balance-card { padding: 26px; }
.balance-card h3 { margin-bottom: 8px; }
.balance-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Команды ---------- */

.teams-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 44px;
    align-items: center;
}
.teams-copy p { color: var(--muted); margin-bottom: 24px; }
.teams-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.teams-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 34px;
    position: relative;
}
.teams-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: var(--mint-soft);
}
.teams-list li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 10px;
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--mint-deep);
    border-bottom: 2px solid var(--mint-deep);
    transform: rotate(-45deg);
}
.teams-list strong { font-size: 15px; }
.teams-list span { font-size: 14px; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq-list { max-width: 760px; }
.faq-list details {
    border-bottom: 1px solid var(--line);
    padding: 4px 0;
}
.faq-list summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 40px 16px 0;
    font-size: 17px;
    font-weight: 600;
    position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: var(--mint-deep);
    transition: transform 0.15s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { color: var(--muted); padding: 0 0 16px; margin: 0; max-width: 640px; }

/* ---------- Финальный CTA ---------- */

.section-cta { padding-top: 0; }
.cta-card {
    background: var(--mint-soft);
    border: 1px solid #CBE9D6;
    border-radius: 24px;
    padding: 56px 32px;
    text-align: center;
}
.cta-card h2 { margin-bottom: 8px; }
.cta-card p { color: var(--muted); max-width: 480px; margin: 0 auto 28px; }

/* ---------- Каталог моделей ---------- */

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filter-chip:hover { color: var(--ink); background: var(--mint-soft); }
.filter-chip[aria-pressed="true"] {
    background: var(--mint-bright);
    border-color: var(--mint-bright);
    color: var(--ink);
}

.models-count {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 24px;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}
.model-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.model-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.model-card__top h3 {
    margin: 0;
    font-size: 17px;
    overflow-wrap: anywhere;
}
.model-card__top .badge { flex: none; }
.model-card__short {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.model-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.model-specs li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.model-specs li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint-bright);
    flex: none;
}
.model-card__bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.model-price {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.model-unit {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-top: 2px;
}
.model-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--mint-deep);
    text-decoration: none;
    white-space: nowrap;
}
.model-link:hover { color: var(--ink); }

.models-note {
    margin-top: 40px;
    padding: 24px 28px;
}
.models-note h3 { font-size: 17px; margin-bottom: 6px; }
.models-note p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Типовые страницы ---------- */

.page-head {
    padding: 72px 0 8px;
}
.page-head h1 { font-size: clamp(30px, 4vw, 42px); }
.page-head p { color: var(--muted); font-size: 17px; }
.page-head-404 { text-align: left; padding-bottom: 88px; }
.page-head-404 .btn { margin-top: 16px; }

.prose { max-width: 760px; }
.prose h2 { font-size: 21px; margin: 32px 0 8px; }
.prose p { color: var(--muted); }

/* ---------- Футер ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 56px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 40px;
}
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; margin-top: 12px; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--mint-deep); }
.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    padding-bottom: 20px;
}
.footer-bottom p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Адаптивность ---------- */

@media (max-width: 960px) {
    .section { padding: 64px 0; }

    .hero { padding: 48px 0 72px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-lead { max-width: none; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
        padding: 12px 20px 20px;
        display: none;
    }
    .site-header.nav-open .site-nav { display: flex; }
    .site-nav ul { flex-direction: column; gap: 2px; }
    .site-nav ul a { padding: 12px; font-size: 16px; }
    .nav-cta { margin: 8px 0 0; }
    .nav-toggle { display: inline-flex; }

    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .balance-grid { grid-template-columns: 1fr; }
    .demo-grid { grid-template-columns: 1fr; }
    .teams-card { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    .models-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .hero { padding: 36px 0 56px; }
    h1 br { display: none; }
    .hero-actions .btn,
    .hero-actions .btn-soft { width: 100%; }
    .app-shot__side { display: none; }
    .app-shot__inner { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .board-mock { grid-template-columns: 1fr; }
    .board-mock__frame { aspect-ratio: auto; min-height: 96px; }
    .cta-card { padding: 40px 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }

    .models-grid { grid-template-columns: 1fr; }
    .catalog-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-chip { flex: none; }
}

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