
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
    /* PALETTE: Nocturne */
    --bg-ink: #0B0C11;          /* Чернильный, теплый черный */
    --surface-slate: #14161F;   /* Сланец (секции) */
    --surface-ceramic: #1C1F2B; /* Керамика (карточки) */
    --border-hairline: rgba(255, 255, 255, 0.06);
    
    /* ACCENT: Azure Privacy */
    --accent-azure: #0EA5E9;
    --accent-dim: rgba(14, 165, 233, 0.15);
    
    /* STATUS */
    --status-amber: #D97706;
    --status-green: #10B981;
    
    /* TYPOGRAPHY */
    --text-primary: #F1F5F9;   /* Off-white */
    --text-secondary: #94A3B8; /* Muted cool gray */
    --text-tertiary: #64748B;
    
    /* SPACING */
    --space-unit: 20px;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-ink);
    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    margin: 0; padding: 0;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 1rem 0; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
h1 { font-size: 3rem; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 2rem; margin-top: 3rem; color: var(--text-primary); }
h3 { font-size: 1.25rem; margin-top: 2rem; }
p { margin-bottom: 1.5rem; color: var(--text-secondary); max-width: 70ch; }
a { color: var(--text-primary); text-decoration: none; transition: 0.2s; border-bottom: 1px solid var(--accent-azure); }
a:hover { color: var(--accent-azure); border-color: transparent; }

/* UTILS */
.micro-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

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

/* HEADER */
.nav-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 32px 0; border-bottom: 1px solid var(--border-hairline);
    margin-bottom: 60px;
}
.brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; border: none; }
.brand span { color: var(--accent-azure); }
.nav-links { display: flex; gap: 40px; }
.nav-item { font-size: 0.9rem; color: var(--text-secondary); border: none; font-weight: 500; }
.nav-item:hover, .nav-item.active { color: var(--text-primary); }

/* HERO PANEL (Ceramic + Spotlight) */
.hero-panel {
    background: var(--surface-ceramic);
    border: 1px solid var(--border-hairline);
    padding: 100px 80px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 80px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
/* Soft Spotlight Top Right */
.hero-panel::before {
    content: ''; position: absolute; top: -150px; right: -150px; width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
    pointer-events: none;
}

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 18px 36px;
    background: var(--text-primary); color: var(--bg-ink);
    font-weight: 700; border-radius: 2px; border: none;
    transition: 0.2s; cursor: pointer; letter-spacing: 0.02em;
    font-size: 0.95rem;
}
.btn-primary:hover { background: var(--accent-azure); color: #fff; }

/* SECTIONS */
.section-header { margin-bottom: 50px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--border-hairline); padding-bottom: 20px; }

/* CARDS (Air) */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }

.nocturne-card {
    background: var(--surface-slate);
    border: 1px solid var(--border-hairline);
    padding: 40px;
    transition: transform 0.3s, border-color 0.3s;
    display: flex; flex-direction: column; height: 100%;
    border-radius: 2px;
}
.nocturne-card:hover {
    transform: translateY(-4px);
    border-color: var(--text-tertiary);
    background: linear-gradient(180deg, var(--surface-slate) 0%, var(--surface-ceramic) 100%);
}
.card-meta { display: flex; gap: 10px; margin-bottom: 25px; }
.chip {
    font-size: 0.7rem; padding: 6px 12px;
    border: 1px solid var(--border-hairline);
    border-radius: 100px; color: var(--text-secondary);
    font-weight: 600; letter-spacing: 0.05em;
}

/* PATH BLOCKS */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 100px; }
.path-card {
    padding: 30px; border-top: 1px solid var(--border-hairline);
    background: linear-gradient(180deg, var(--surface-slate) 0%, transparent 100%);
    transition: 0.3s;
}
.path-card:hover { border-color: var(--accent-azure); }
.path-step { font-size: 2.5rem; font-weight: 200; color: var(--accent-azure); opacity: 0.5; margin-bottom: 15px; }

/* LESSON LAYOUT (ToC Rail) */
.lesson-layout { display: grid; grid-template-columns: 280px 1fr; gap: 80px; margin-bottom: 120px; }
.toc-rail { position: sticky; top: 40px; height: fit-content; }
.toc-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border-hairline); }
.toc-item a {
    display: block; padding: 12px 0 12px 24px; color: var(--text-tertiary);
    font-size: 0.95rem; border: none; position: relative; transition: 0.2s;
}
.toc-item a:hover { color: var(--text-primary); padding-left: 28px; }
.toc-item.active a { color: var(--accent-azure); font-weight: 600; background: linear-gradient(90deg, var(--surface-slate) 0%, transparent 100%); border-left: 2px solid var(--accent-azure); padding-left: 22px; }


/* CALLOUTS (Quiet) */
.callout {
    padding: 30px; margin: 40px 0;
    background: var(--surface-slate);
    border: 1px solid var(--border-hairline);
    display: flex; gap: 25px; align-items: flex-start;
}
.callout.type-warning { border-left: 3px solid var(--status-amber); }
.callout.type-info { border-left: 3px solid var(--accent-azure); }
.callout.type-check { border-left: 3px solid var(--status-green); }

/* DATABASE ROWS */
.db-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 0; border-bottom: 1px solid var(--border-hairline);
    transition: 0.2s;
}
.db-row:hover { background: var(--surface-slate); padding-left: 20px; padding-right: 20px; border-color: transparent; }
.db-label { color: var(--text-secondary); font-size: 0.9rem; width: 200px; font-weight: 600; }
.db-val { color: var(--text-primary); font-family: 'Manrope'; font-weight: 500; flex-grow: 1; text-align: right; }

/* FOOTER */
.footer { border-top: 1px solid var(--border-hairline); padding: 100px 0; margin-top: 120px; color: var(--text-tertiary); background: var(--surface-slate); }

@media (max-width: 900px) {
    .path-grid, .lesson-layout { grid-template-columns: 1fr; }
    .toc-rail { display: none; }
    .hero-panel { padding: 40px 24px; }
    h1 { font-size: 2rem; }
}
