/* Оформлення сайту Linum: чорне тло, хмара частинок і тонкий моноширинний текст поверх.
   Синій акцент той самий, що в повзунку рівня міркувань у програмі (src/frontend/theme.py). */

:root {
    --accent: #5AA9DA;
    --text: #DDDDDD;
    --muted: #8A8A8A;
    --chip: #1C1C1C;
    --line: #2A2A2A;
    --mono: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    overflow-x: hidden;
    background: #000;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

h1,
h2,
p,
ul,
ol {
    margin: 0;
}

a {
    color: inherit;
}

/* Полотно з частинками на весь екран, під текстом */
#bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

/* Якщо браузер не вміє WebGL2, замість хмари просто показуємо іконку */
.no-webgl #bg {
    background: #000 url("images/linum-icon.jpg") center / 42vmin no-repeat;
}

/* Шар з текстом. Сам він не ловить мишу, щоб курсор ворушив частинки;
   посилання, кнопки і список карток ловлять її знову. */
.ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
}

/* Підказка внизу першого екрана: там є ще одна частина */
.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    mix-blend-mode: plus-lighter;
    animation: hint 2.4s ease-in-out infinite;
}

.scroll-hint::after {
    content: "";
    display: block;
    width: 1px;
    height: 28px;
    margin: 8px auto 0;
    background: var(--muted);
}

@keyframes hint {
    0%, 100% { opacity: 0.4; transform: translate(-50%, 0); }
    50% { opacity: 1; transform: translate(-50%, 6px); }
}

/* Друга частина сторінки: починається одразу під першим екраном */
.more {
    position: relative;
    z-index: 1;
    margin-top: 100vh;
    padding: 18vh 24px 0;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    text-transform: uppercase;
}

.part {
    margin-bottom: 22vh;
}

.more h2 {
    font-size: 13px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 24px;
    mix-blend-mode: plus-lighter;
}

.more p {
    text-transform: none;
    color: var(--text);
    line-height: 1.6;
}

/* Чотири кроки: як Linum відповідає */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.step,
.panel {
    padding: 22px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
}

.step-number {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 18px;
}

.step h3 {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 10px;
}

.step p {
    font-size: 12px;
    color: var(--muted);
}

/* Приватність, оновлення, вимоги */
.columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.specs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specs li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    border-top: 1px solid var(--line);
}

.specs li span:first-child {
    color: #fff;
}

.specs li span:last-child {
    color: var(--muted);
    text-align: right;
}

/* Що можна попросити: запит і що з ним робить Linum */
.examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.example {
    padding: 18px 20px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
    transition: border-color 0.3s;
}

.example:hover {
    border-color: var(--accent);
}

.more .ask {
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
}

.more .does {
    color: var(--muted);
    font-size: 12px;
}

.more .does::before {
    content: "-> ";
    color: var(--accent);
}

/* Цифри: великі числа з підписами */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.5);
}

.stat {
    padding: 28px 18px;
}

.stat + .stat {
    border-left: 1px solid var(--line);
}

.stat-value {
    display: block;
    font-size: clamp(34px, 4vw, 52px);
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    text-transform: none;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
}

/* Агенти, які вчать Linum */
.more .lead-text {
    max-width: 640px;
    margin-bottom: 24px;
    font-size: 15px;
}

.more .dev-note {
    display: inline-block;
    max-width: 640px;
    margin-bottom: 24px;
    padding: 10px 14px;
    border-left: 2px solid var(--accent);
    background: rgba(0, 0, 0, 0.6);
    color: var(--muted);
    font-size: 12px;
}

.agents {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.agent {
    padding: 22px;
    background: rgba(0, 0, 0, 0.82);
}

.agent h3 {
    font-size: 14px;
    font-weight: 400;
    color: var(--accent);
    margin: 0 0 10px;
}

.agent p {
    font-size: 12px;
    color: var(--muted);
}

/* Стилі: хмара міток */
.style-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-cloud span {
    padding: 8px 14px;
    background: var(--chip);
    color: #CFCFCF;
    font-size: 12px;
}

.style-cloud .own {
    background: transparent;
    border: 1px dashed var(--muted);
    color: var(--text);
    text-transform: none;
}

/* Питання і відповіді: відкриваються по кліку */
.faq {
    max-width: 820px;
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.5);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 4px;
    color: #fff;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    color: var(--accent);
}

.faq details[open] summary::after {
    content: "-";
}

.faq details p {
    padding: 0 4px 20px;
    color: var(--muted);
    max-width: 680px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 0 40px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
}

.site-footer .back-top {
    margin: 0;
}

@media (max-width: 760px) {
    .stat + .stat {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

.ui a,
.ui button,
.list,
.about {
    pointer-events: auto;
}

/* Текст світиться поверх частинок */
.brand,
.tags,
.meta,
.card p,
.about {
    mix-blend-mode: plus-lighter;
}

/* Логотип і назва */
.brand {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.6px solid #fff;
}

.name {
    font-size: 20px;
    font-weight: 400;
    color: #fff;
}

.sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

/* Кружечок з версією вгорі праворуч */
.counter {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #0A0A0A;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопки-фільтри */
.tags {
    position: absolute;
    top: 120px;
    left: 24px;
    width: 320px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    border: 0;
    background: var(--chip);
    color: #CFCFCF;
    padding: 5px 9px;
    font: inherit;
    font-size: 11px;
    letter-spacing: inherit;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.chip:hover {
    background: #2A2A2A;
}

.chip.active {
    background: #E6E6E6;
    color: #000;
}

/* Список карток зліва, гортається сам, без смуги прокрутки */
.list {
    position: absolute;
    top: 200px;
    left: 24px;
    bottom: 0;
    width: 320px;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 40px;
}

.list::-webkit-scrollbar {
    display: none;
}

.card {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.card[hidden] {
    display: none;
}

.meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
}

.meta span:first-child {
    color: #fff;
}

.meta span:last-child {
    color: var(--muted);
    text-align: right;
}

.card p {
    margin-top: 10px;
    color: var(--muted);
    text-transform: none;
}

/* Права колонка з текстом */
.about {
    position: absolute;
    right: 90px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    max-height: calc(100% - 140px);
    overflow-y: auto;
    scrollbar-width: none;
}

.about::-webkit-scrollbar {
    display: none;
}

.block + .block {
    margin-top: 2.2em;
}

.about h2 {
    font-size: 13px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 1em;
}

.about p {
    text-align: justify;
    text-transform: none;
}

.about ol {
    padding-left: 1.6em;
}

.about li + li {
    margin-top: 4px;
}

/* Моделі: назва зліва, для чого вона справа */
.models {
    list-style: none;
    padding: 0;
}

.models li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.models li span:first-child {
    color: #fff;
}

.models li span:last-child {
    color: var(--muted);
}

/* Головна кнопка: завантажити */
.download {
    display: inline-block;
    padding: 10px 14px;
    background: #E6E6E6;
    color: #000;
    text-decoration: none;
    mix-blend-mode: normal;
    transition: opacity 0.3s;
}

.about .small {
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted);
    text-align: left;
}

.link {
    display: block;
    margin: 10px 0 4px;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.download:hover,
.link:hover {
    opacity: 0.7;
}

/* Вузький екран: текст ближче до краю */
@media (max-width: 1100px) {
    .about {
        right: 24px;
        width: 320px;
    }
}

/* Між ноутбуком і телефоном: картки не влазять поруч із текстом */
@media (max-width: 1000px) {
    .list {
        display: none;
    }
}

/* Телефон: хмара зверху, текст під нею, сторінка гортається */
@media (max-width: 760px) {
    html,
    body {
        overflow: auto;
        height: auto;
    }

    .ui {
        position: relative;
        inset: auto;
        height: auto;
        padding: 72vh 24px 24px;
    }

    .tags,
    .scroll-hint {
        display: none;
    }

    /* На телефоні перший екран і так гортається, тож друга частина йде одразу за ним */
    .more {
        margin-top: 0;
        padding-top: 30vh;
    }

    .part {
        margin-bottom: 12vh;
    }

    .about {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: auto;
        max-height: none;
        padding: 20px;
        background: rgba(0, 0, 0, 0.55);
        mix-blend-mode: normal;
    }

    .about p {
        text-align: left;
    }
}
