/* ═══════════════════════════════════════════════════════════
   LYRA — MODERN GROTESQUE DESIGN SYSTEM (web edition)
   ═══════════════════════════════════════════════════════════
   Bone-палитра, лаймовый акцент, гротескные дисплейные начертания.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..125,200..800&family=Inter+Tight:ital,wght@0,300..800;1,300..800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ── Шрифты ──────────────────────────────────────────── */
    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Inter Tight', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Menlo', monospace;

    /* ── Радиусы — теперь крупнее, в духе модерна ────────── */
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;
    --r-full: 999px;

    --ease-out: cubic-bezier(0.2, 0.8, 0.25, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --t-fast: 150ms;
    --t-norm: 280ms;
    --t-slow: 500ms;

    /* ── Палитра модерна ────────────────────────────────── */
    --bone:        #EBE7DC;
    --bone-deep:   #DDD7C5;
    --ink:         #0E0E12;
    --ink-soft:    #2A2A33;
    --ink-faint:   #6B6B76;
    --line:        #C9C2AD;
    --lime:        #D6FF3F;
    --lime-deep:   #BDE82C;
    --coral:       #FF6042;
    --lavender:    #C9B8E6;
    --plum:        #1A1626;
    --cream:       #F4F0E5;

    /* ── Совместимость со старым именованием ─────────────── */
    --bg-base: var(--bone);
    --bg-elev: var(--cream);
    --bg-overlay: rgba(235, 231, 220, 0.85);
    --bg-subtle: var(--bone-deep);
    --bg-muted: var(--bone-deep);
    --bg-hover: rgba(14, 14, 18, 0.04);
    --bg-active: rgba(14, 14, 18, 0.08);

    --border: rgba(14, 14, 18, 0.12);
    --border-subtle: rgba(14, 14, 18, 0.06);
    --border-strong: rgba(14, 14, 18, 0.28);
    --rule: var(--line);

    --text: var(--ink);
    --text-2: var(--ink-soft);
    --text-3: var(--ink-faint);
    --text-4: rgba(14, 14, 18, 0.30);
    --text-inv: var(--bone);

    /* Акцент теперь — глубокий ink (для primary) и lime (для подсветки) */
    --accent: var(--ink);
    --accent-hover: var(--plum);
    --accent-soft: rgba(214, 255, 63, 0.20);
    --accent-glow: rgba(214, 255, 63, 0.30);
    --accent-bg: var(--lime);
    --accent-fg: var(--ink);

    --amber: #C26A2C;
    --amber-soft: rgba(194, 106, 44, 0.14);
    --amber-bg: #F4E2C9;

    --success: #4A6B2C;
    --success-bg: rgba(214, 255, 63, 0.30);
    --error: var(--coral);
    --error-bg: rgba(255, 96, 66, 0.14);
    --warning: #C26A2C;
    --warning-bg: rgba(194, 106, 44, 0.14);

    --shadow-sm: 0 1px 2px rgba(14, 14, 18, 0.06);
    --shadow-md: 0 8px 24px -8px rgba(14, 14, 18, 0.12);
    --shadow-lg: 0 40px 80px -20px rgba(14, 14, 18, 0.25),
                 0 12px 24px -8px rgba(14, 14, 18, 0.15);

    --gradient-accent: linear-gradient(135deg, var(--lime) 0%, var(--lime-deep) 100%);
}

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

html, body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--text);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11";
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button { cursor: pointer; }
button:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--accent-hover); }

::selection { background: var(--amber-soft); color: var(--text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--r-full);
    opacity: 0.4;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ═══════════════ ТИПОГРАФИКА ═══════════════ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.05;
    font-variation-settings: "wdth" 115, "wght" 700, "opsz" 96;
    letter-spacing: -0.03em;
}

h1 { font-size: 56px; line-height: 1.0; letter-spacing: -0.04em; }
h2 { font-size: 38px; letter-spacing: -0.035em; }
h3 { font-size: 26px; letter-spacing: -0.025em; }
h4 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; }
h5 { font-size: 17px; line-height: 1.3; font-variation-settings: "wdth" 110, "wght" 600, "opsz" 32; }

/* Курсивные em внутри заголовков — узкие, тонкие, как в макете */
h1 em, h2 em, h3 em, h4 em,
.display em, .display-italic {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 75, "wght" 350, "opsz" 96;
    font-style: italic;
    color: var(--text-2);
    letter-spacing: -0.02em;
}

p { margin: 0; }

.display {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 750, "opsz" 96;
    letter-spacing: -0.04em;
    line-height: 0.88;
}
.display-italic {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 75, "wght" 400, "opsz" 96;
    font-style: italic;
    letter-spacing: -0.025em;
    color: var(--text-2);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
/* Лаймовая точка перед eyebrow — фирменный приём макета */
.eyebrow::before {
    content: "";
    width: 8px; height: 8px;
    background: var(--lime);
    display: inline-block;
    border-radius: 50%;
}
/* Если eyebrow стоит как одиночная подпись (например в page-eyebrow) — без точки */
.eyebrow.no-dot::before { display: none; }

.smallcaps {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 600, "opsz" 32;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85em;
}

.accent-italic {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 75, "wght" 350, "opsz" 96;
    font-style: italic;
    color: var(--text-2);
}
.italic { font-style: italic; }

/* Лаймовый маркер — для подсветки слова в заголовке (.lime-mark) */
.lime-mark {
    background: var(--lime);
    padding: 0 0.18em 0.06em;
    display: inline-block;
    transform: rotate(-1.2deg);
    color: var(--ink);
}

/* Коралловое подчёркивание */
.coral-underline {
    text-decoration: underline;
    text-decoration-color: var(--coral);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.08em;
}

.text-muted { color: var(--text-2); }
.text-subtle { color: var(--text-3); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.rule {
    height: 1px;
    background: var(--rule);
    margin: 24px 0;
    border: none;
}

.rule-ornament {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-3);
    font-family: var(--font-display);
    font-size: 14px;
    font-style: italic;
}
.rule-ornament::before,
.rule-ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.dropcap::first-letter {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 125, "wght" 800, "opsz" 96;
    font-size: 4.5em;
    line-height: 0.85;
    float: left;
    margin: 0.05em 0.08em 0 0;
    color: var(--ink);
    letter-spacing: -0.05em;
}

/* ═══════════════ ЛЕЙАУТ ═══════════════ */

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

.site-header {
    padding: 16px 0;
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: color-mix(in srgb, var(--bone) 85%, transparent);
    transition: border-color var(--t-fast);
}
.site-header.scrolled { border-bottom-color: var(--line); }

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-family: var(--font-display);
    font-variation-settings: "wdth" 125, "wght" 800, "opsz" 96;
    font-size: 26px;
    letter-spacing: -0.05em;
    line-height: 1;
    text-decoration: none;
}
.brand:hover { color: var(--text); }

.brand-mark {
    width: 10px;
    height: 10px;
    background: var(--lime);
    border-radius: 50%;
    display: inline-block;
    animation: lyra-pulse 2s ease-in-out infinite;
}
.brand-mark::before { content: none; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--t-fast);
    text-decoration: none;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }

.site-footer {
    margin-top: 96px;
    padding: 48px 0;
    border-top: 1px solid var(--rule);
    color: var(--text-3);
    font-size: 14px;
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* ═══════════════ КНОПКИ ═══════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    padding: 12px 22px;
    border-radius: var(--r-full);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-out);
    white-space: nowrap;
    color: var(--text);
    text-decoration: none;
}

.btn-primary {
    background: var(--ink);
    color: var(--bone);
    border-color: var(--ink);
}
.btn-primary:hover {
    background: var(--plum);
    border-color: var(--plum);
    color: var(--bone);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--lime);
    color: var(--ink);
    border-color: var(--lime);
}
.btn-accent:hover {
    background: var(--lime-deep);
    border-color: var(--lime-deep);
    color: var(--ink);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--cream);
    color: var(--text);
    border-color: var(--line);
}
.btn-secondary:hover {
    background: var(--bone-deep);
    border-color: var(--ink);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-hover); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--ink);
}
.btn-outline:hover {
    background: var(--ink);
    color: var(--bone);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--ink);
    padding: 0;
    text-transform: none;
    letter-spacing: -0.01em;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
}
.btn-link:hover { color: var(--coral); }

.btn-danger {
    background: transparent;
    color: var(--coral);
    border-color: var(--coral);
}
.btn-danger:hover { background: var(--coral); color: var(--bone); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* Стрелочка в кнопке (как в макете) */
.btn .arr,
.btn::after { transition: transform var(--t-fast); }
.btn-primary::after,
.btn-accent::after { content: "→"; transition: transform var(--t-fast); }
.btn-primary:hover::after,
.btn-accent:hover::after { transform: translateX(3px); }


/* ═══════════════ ФОРМЫ ═══════════════ */

.form-group { margin-bottom: 22px; }

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-3);
    margin-bottom: 8px;
}

.form-control,
.form-input,
input.form-control,
textarea.form-control,
select.form-control {
    display: block;
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background: var(--cream);
    padding: 12px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color var(--t-fast), background var(--t-fast);
}

.form-control:focus,
.form-input:focus,
input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
    outline: none;
    border-color: var(--ink);
    background: #fff;
}

.form-control::placeholder {
    color: var(--text-3);
}

textarea.form-control {
    resize: vertical;
    min-height: 88px;
    line-height: 1.5;
}

/* ── Поле пароля с кнопкой показать/скрыть ── */
.password-wrap {
    position: relative;
    display: block;
}
.password-wrap .form-control {
    padding-right: 32px;
}
.password-toggle {
    position: absolute;
    right: 0;
    bottom: 8px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color var(--t-fast), background var(--t-fast);
    padding: 0;
}
.password-toggle:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a4630' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 24px;
    font-style: normal;
    font-family: var(--font-body);
    font-size: 16px;
}

input[readonly], textarea[readonly] {
    color: var(--text-3);
    border-bottom-color: var(--border);
}

.row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ═══════════════ КАРТОЧКИ ═══════════════ */

.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    position: relative;
    z-index: 2;
    transition: border-color var(--t-fast);
}
.card-bordered { background: transparent; border: 1px solid var(--rule); }
.card-flush { padding: 0; }
.card h3 + p, .card h4 + p { margin-top: 8px; color: var(--text-2); }

/* ═══════════════ BADGES ═══════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: var(--r-full);
    background: var(--bone-deep);
    color: var(--text-2);
    border: 1px solid var(--line);
}
.badge-accent  { background: var(--lime); color: var(--ink); border-color: var(--lime-deep); }
.badge-amber   { background: var(--amber-soft); color: var(--amber); border-color: rgba(194, 106, 44, 0.30); }
.badge-success { background: var(--lime); color: var(--ink); border-color: var(--lime-deep); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(194, 106, 44, 0.30); }
.badge-warn    { background: var(--warning-bg); color: var(--warning); border-color: rgba(194, 106, 44, 0.30); }
.badge-danger  { background: rgba(255, 96, 66, 0.14); color: var(--coral); border-color: rgba(255, 96, 66, 0.30); }
.badge-primary { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.badge-soft    { background: var(--bone-deep); color: var(--text-2); border-color: var(--line); }

/* ═══════════════ ALERT ═══════════════ */

.alert {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--r-md);
    border-left: 3px solid var(--ink);
    background: var(--cream);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.alert-error,
.alert-danger {
    background: rgba(255, 96, 66, 0.12);
    border-left-color: var(--coral);
    color: var(--ink);
}
.alert-success {
    background: rgba(214, 255, 63, 0.30);
    border-left-color: var(--lime-deep);
    color: var(--ink);
}
.alert-warning {
    background: var(--warning-bg);
    border-left-color: var(--warning);
    color: var(--ink);
}

/* ═══════════════ TOAST ═══════════════ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: var(--ink);
    color: var(--bone);
    padding: 14px 20px;
    border-radius: var(--r-full);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-in 280ms var(--ease-out);
    max-width: 380px;
}
.toast.success { background: var(--lime); color: var(--ink); }
.toast.danger,
.toast.error { background: var(--coral); color: #fff; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════ MODAL ═══════════════ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 18, 0.55);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fade-in 180ms var(--ease-out);
}
.modal-backdrop.show { display: flex; }
.modal {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 36px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modal-in 220ms var(--ease-out);
    position: relative;
    z-index: 2;
}
.modal-wide { max-width: 720px; }
.modal h3 { margin-top: 0; }
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
}
.modal-header h3 { margin: 0; }
.btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    flex-shrink: 0;
    transition: all var(--t-fast);
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}
.btn-close::before {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%230E0E12' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.btn-close:hover { background: var(--ink); border-color: var(--ink); }
.btn-close:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23EBE7DC' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════ ЛЕНДИНГ ═══════════════ */

.hero {
    padding: 96px 0 80px;
    position: relative;
}
.hero-eyebrow {
    margin-bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.hero-eyebrow::after {
    content: '';
    width: 56px;
    height: 1px;
    background: var(--rule);
}
.hero-title {
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    max-width: 14ch;
    margin-bottom: 24px;
}
.hero-title .accent-italic {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}
.hero-lead {
    font-family: var(--font-body);
    font-size: 21px;
    line-height: 1.5;
    color: var(--text-2);
    max-width: 56ch;
    margin-bottom: 36px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.hero-meta {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
}
.hero-meta-item .eyebrow { margin-bottom: 8px; display: block; }
.hero-meta-item p {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 380;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.2;
}
.hero-meta-item p .italic { color: var(--accent); }

.section { padding: 88px 0; position: relative; }
.section-eyebrow { margin-bottom: 12px; display: inline-block; }
.section-title {
    font-size: clamp(34px, 4.6vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.022em;
    margin-bottom: 18px;
    max-width: 22ch;
}
.section-lead {
    font-size: 19px;
    color: var(--text-2);
    max-width: 60ch;
    margin-bottom: 56px;
    line-height: 1.55;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule);
}
.feature {
    padding: 36px 28px 36px 0;
    border-bottom: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    transition: background var(--t-norm);
}
.feature:nth-child(3n) { border-right: none; padding-right: 0; }
.feature:hover { background: var(--bg-elev); }
.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    color: var(--accent);
}
.feature-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feature-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.16em;
    margin-bottom: 14px;
    display: block;
}
.feature h4 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--text);
}
.feature p {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.55;
}

@media (max-width: 880px) {
    .features-grid { grid-template-columns: 1fr; }
    .feature { padding-right: 0; border-right: none; }
}

/* Roadmap — журнальный contents page */
.roadmap { display: grid; grid-template-columns: 1fr; gap: 0; }
.roadmap-row {
    display: grid;
    grid-template-columns: 100px 220px 1fr;
    gap: 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
    align-items: baseline;
}
.roadmap-row:last-child { border-bottom: none; }
.roadmap-row .stage {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-3);
}
.roadmap-row.done .stage { color: var(--success); }
.roadmap-row.current .stage { color: var(--accent); }
.roadmap-row .name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text);
}
.roadmap-row.upcoming .name { color: var(--text-3); font-style: italic; }
.roadmap-row .desc {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .roadmap-row { grid-template-columns: 1fr; gap: 6px; }
}

.cta-section {
    padding: 88px 0;
    text-align: center;
    border-top: 1px solid var(--rule);
}
.cta-section h2 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: 18px;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════ AUTH ═══════════════ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    position: relative;
    z-index: 2;
    background: var(--bone);
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 48px 44px;
    box-shadow: var(--shadow-md);
}
.auth-card-wide { max-width: 620px; padding: 48px 56px; }
.auth-eyebrow { margin-bottom: 18px; display: inline-flex; }
.auth-title {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 720, "opsz" 96;
    font-size: clamp(34px, 4.5vw, 48px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}
.auth-lead {
    color: var(--text-2);
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.5;
}
.auth-divider {
    margin: 28px 0 24px;
    border: none;
    border-top: 1px solid var(--rule);
}
.auth-bottom {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    color: var(--text-2);
    font-size: 14.5px;
    text-align: center;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 28px;
    gap: 0;
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--t-fast);
}
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ═══════════════ APP-SHELL ═══════════════ */

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.app-sidebar {
    background: var(--cream);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--rule);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}
.sidebar-brand .brand-mark {
    width: 10px; height: 10px;
    background: var(--lime);
    border-radius: 50%;
    animation: lyra-pulse 2s ease-in-out infinite;
}
@keyframes lyra-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}
.sidebar-brand-name {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 125, "wght" 800, "opsz" 96;
    font-size: 24px;
    letter-spacing: -0.05em;
    color: var(--text);
}

.toc-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-3);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule);
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 -12px;
    color: var(--text-2);
    font-size: 14.5px;
    font-weight: 500;
    transition: all var(--t-fast);
    text-decoration: none;
    line-height: 1.3;
    border-radius: var(--r-sm);
}
.toc-item:hover { color: var(--ink); background: rgba(14, 14, 18, 0.04); }
.toc-item.active {
    background: rgba(214, 255, 63, 0.20);
    color: var(--ink);
    font-weight: 600;
}
.toc-item-icon {
    width: 18px;
    height: 18px;
    color: currentColor;
    flex-shrink: 0;
}
.toc-item-icon svg {
    width: 100%; height: 100%;
    stroke: currentColor; stroke-width: 1.5; fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}
.toc-item-name { flex: 1; }
.toc-item-num {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 0.06em;
    font-weight: 600;
}
.toc-item.active .toc-item-num { color: var(--ink); }

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.04em;
}

.app-main {
    padding: 48px 56px 80px;
    background: var(--bg-base);
    min-height: 100vh;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 44px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule);
}
.page-head h1 {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 720, "opsz" 96;
    font-size: clamp(36px, 4.5vw, 56px);
    margin: 0;
    line-height: 0.95;
    letter-spacing: -0.04em;
}
.page-head .subtitle {
    color: var(--text-2);
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.45;
    max-width: 60ch;
}
.page-eyebrow { margin-bottom: 14px; display: inline-flex; }

/* Stat tile */
.stat {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 22px 24px;
    transition: transform var(--t-fast), border-color var(--t-fast);
}
.stat:hover { transform: translateY(-2px); border-color: var(--ink); }
.stat-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-3);
    margin-bottom: 12px;
}
.stat-value {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 700, "opsz" 64;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.018em;
    color: var(--text);
    line-height: 1;
}

/* Member-item — записи в реестре */
.member-list { display: flex; flex-direction: column; gap: 0; }
.member-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.member-item:last-child { border-bottom: none; }

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 18px;
    color: var(--text);
    flex-shrink: 0;
}

.member-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.member-name {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text);
    font-size: 19px;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.member-sub {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.4;
}
.member-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--rule);
}
.timeline-item { position: relative; padding: 8px 0 24px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 1px solid var(--text-2);
}
.timeline-item.done::before { background: var(--success); border-color: var(--success); }
.timeline-item.current::before { background: var(--accent); border-color: var(--accent); }
.timeline-item.upcoming::before { background: var(--bg-elev); border-color: var(--text-3); }
.timeline-item h4 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 20px;
    margin-bottom: 4px;
}
.timeline-item p { color: var(--text-2); font-size: 15px; }
.timeline-item .stage-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-3);
    margin-bottom: 6px;
    display: block;
}

/* ═══════════════ УТИЛИТЫ ═══════════════ */

.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }

.flex { display: flex; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

.fade-up { animation: fade-up 500ms var(--ease-out) backwards; }
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ink-in { animation: ink-bleed 500ms var(--ease-out) backwards; }
@keyframes ink-bleed {
    from { opacity: 0; filter: blur(2px); }
    to { opacity: 1; filter: blur(0); }
}

/* ═══════════════ АДАПТИВНОСТЬ ═══════════════ */

@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-shell::before { display: none; }
    .app-sidebar {
        position: relative;
        height: auto;
        padding: 24px 32px;
        border-bottom: 1px solid var(--rule);
        flex-direction: row;
        gap: 20px;
        align-items: center;
        overflow-x: auto;
        flex-wrap: wrap;
    }
    .toc-label { display: none; }
    .toc-item {
        border-bottom: none;
        padding: 6px 12px;
        border-radius: var(--r-full);
    }
    .toc-item.active { background: var(--accent-soft); }
    .toc-item-num { display: none; }
    .sidebar-footer { display: none; }
    .app-main { padding: 36px 32px 60px; }
}

@media (max-width: 720px) {
    .container, .container-narrow { padding: 0 22px; }
    .hero { padding: 56px 0 48px; }
    .section { padding: 56px 0; }
    .auth-card { padding: 36px 28px; }
    .auth-card-wide { padding: 36px 28px; }
    .modal { padding: 28px 24px; }
    h1 { font-size: 38px; }
    h2 { font-size: 30px; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head h1 { font-size: 34px; }
    .app-main { padding: 28px 22px 56px; }
    .site-nav { display: none; }
    .roadmap-row { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .row > * { flex: 1 1 100%; min-width: 0; }
    .member-item { grid-template-columns: auto 1fr; gap: 12px; }
    .member-meta { grid-column: 1 / -1; }
}

/* ═══════════════ Onboarding banner ═══════════════ */
.onboarding-banner {
    background: var(--ink);
    color: var(--bone);
    border-radius: var(--r-lg);
    padding: 28px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.onboarding-banner::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -50px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, var(--lime), transparent 70%);
    opacity: 0.12;
    filter: blur(40px);
    pointer-events: none;
}
.onb-banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.onb-banner-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lime);
    margin-bottom: 8px;
}
.onb-banner-title {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 115, "wght" 700, "opsz" 64;
    font-size: 26px;
    color: var(--bone);
    margin-bottom: 6px;
    letter-spacing: -0.025em;
}
.onb-banner-text {
    color: rgba(235, 231, 220, 0.7);
    font-size: 14.5px;
    line-height: 1.5;
    max-width: 56ch;
}

@media (max-width: 700px) {
    .onb-banner-inner { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════ Адаптивный сайдбар ═══════════════ */
.sidebar-group {
    margin-bottom: 4px;
}
.sidebar-divider {
    height: 1px;
    background: var(--rule);
    margin: 18px 0;
    opacity: 0.5;
}

/* Бейджи статусов в sidebar */
.toc-item-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.toc-item-badge.done {
    background: var(--lime);
    color: var(--ink);
    font-weight: 700;
}
.toc-item-badge.in-progress {
    background: var(--ink);
    color: var(--lime);
}
.toc-item-badge.available {
    color: var(--ink);
    font-weight: 700;
}
.toc-item-badge.locked {
    color: var(--text-3);
    opacity: 0.5;
}

/* Пройденный пункт — слегка тонированный */
.toc-item.completed {
    color: var(--text-2);
}
.toc-item.completed .toc-item-name {
    color: var(--text-2);
}

/* Заблокированный пункт */
.toc-item.locked {
    cursor: not-allowed;
    opacity: 0.45;
}
.toc-item.locked:hover {
    background: transparent;
}

