/* Страница редактора /editor (посадочная для разработчиков, B-271) и
   уроки /editor/<урок> (B-248): views/editor_landing.ejs,
   views/editor_guide.ejs. Плитки игр и колонка секций — из
   css/index/style.css (.tiles, .home). Классы lp-* — только посадочная;
   landing-* и guide-* — общие с уроком. */

.landing-lead {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-mute);
}

.landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.landing-card {
    padding: 20px 22px;
}

.landing-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
}

.landing-card p {
    margin: 0;
    line-height: 1.55;
}

.landing-guide {
    color: var(--text-light);
    text-decoration: none;
    transition: background-color 0.15s;
}

.landing-guide:hover {
    background-color: var(--layer-2);
}

.landing-faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 860px;
    margin-top: 16px;
}

.landing-faq-item {
    padding: 16px 20px;
}

.landing-faq-item summary {
    font-weight: 700;
    cursor: pointer;
}

.landing-faq-item p {
    margin: 10px 0 0;
    line-height: 1.55;
}

/* ===================== ПОСАДОЧНАЯ ===================== */

/* Цвета блоков: шаг, инструмент — свой градиент --c1 → --c2. */
.lp-violet { --c1: #9013fe; --c2: #cd317c; }
.lp-green  { --c1: #3ebd41; --c2: #27e087; }
.lp-orange { --c1: #e88021; --c2: #f3ad38; }
.lp-pink   { --c1: #cd317c; --c2: #fc4d64; }
.lp-blue   { --c1: #2264e3; --c2: #27b4e0; }
.lp-aqua   { --c1: #27b4e0; --c2: #27e087; }

.lp {
    gap: 96px;
    overflow-x: clip;
}

.lp-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    border: 1px solid rgba(144, 19, 254, 0.45);
    border-radius: 999px;
    background-color: rgba(144, 19, 254, 0.14);
    color: #d6b6ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lp-grad {
    background: linear-gradient(90deg, #ffd34e, #fc4d64 45%, #b45cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lp-lead {
    max-width: 640px;
    margin: 18px 0 0;
    color: var(--text-mute);
    font-size: 19px;
    line-height: 1.6;
}

.lp-note {
    margin: 14px 0 0;
    font-size: 13px;
}

.lp-btn-big {
    min-height: 52px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 16px;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.lp-btn-big:hover {
    transform: translateY(-2px);
}

.btn-primary.lp-btn-big {
    background: var(--gradient-brand);
    box-shadow: 0 10px 30px rgba(144, 19, 254, 0.45);
}

.btn-primary.lp-btn-big:hover {
    box-shadow: 0 14px 40px rgba(144, 19, 254, 0.6);
}

.lp-h2 {
    font-size: 38px;
    letter-spacing: -0.02em;
}

/* Свечение за блоком: цветные пятна и сетка тайлов, гаснущая к краям. */
.lp-glow {
    position: absolute;
    inset: -80px -40px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(520px 380px at 78% 30%, rgba(144, 19, 254, 0.38), transparent 65%),
        radial-gradient(460px 340px at 12% 75%, rgba(0, 143, 236, 0.22), transparent 65%),
        radial-gradient(380px 280px at 55% 95%, rgba(205, 49, 124, 0.28), transparent 65%);
}

.lp-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
    mask-image: radial-gradient(closest-side, #000, transparent);
}

/* ----- Первый экран ----- */

/* Текст по центру, под ним — окно редактора во всю ширину. */
.lp-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 32px;
    text-align: center;
}

.lp-hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lp-hero .landing-cta {
    justify-content: center;
}

.lp-title {
    max-width: 980px;
    margin: 0;
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.lp-hero-shot {
    position: relative;
    width: min(100%, 1040px);
    margin-top: 48px;
    perspective: 1800px;
    animation-delay: 0.12s;
    text-align: left;
}

.lp-window {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background-color: var(--layer-1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(144, 19, 254, 0.3), 0 0 90px rgba(144, 19, 254, 0.28);
    transform: rotateX(10deg);
    transform-origin: center bottom;
}

.lp-window img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top left;
}

.lp-window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background-color: var(--layer-basement);
}

.lp-window-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fc4d64;
}

.lp-window-bar i:nth-child(2) { background-color: #f3ad38; }
.lp-window-bar i:nth-child(3) { background-color: #3ebd41; }

.lp-window-bar small {
    margin-left: 8px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
}

.lp-float {
    position: absolute;
    animation: lp-float 5s ease-in-out infinite alternate;
}

.lp-float-chat {
    left: -64px;
    bottom: 12%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 270px;
}

.lp-float-nodes {
    right: -56px;
    top: 14%;
    display: flex;
    align-items: center;
    animation-delay: -2.5s;
}

.lp-play {
    right: 18%;
    bottom: -22px;
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 24px;
    animation: lp-pulse 2.2s ease-out infinite;
}

.lp-bubble {
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lp-bubble-you {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background-color: var(--color-xp);
    color: #fff;
}

.lp-bubble-ai {
    align-self: flex-start;
    border: 1px solid var(--layer-5);
    border-bottom-left-radius: 4px;
    background-color: var(--layer-3);
}

/* Две ноды со «связью», по которой бежит сигнал. */
.lp-node {
    display: flex;
    flex-direction: column;
    min-width: 128px;
    overflow: hidden;
    border: 1px solid var(--layer-5);
    border-radius: 8px;
    background-color: var(--layer-2);
    font-size: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.lp-node b {
    padding: 6px 10px;
    color: #fff;
}

.lp-node em {
    padding: 8px 10px;
    color: var(--text-mute);
    font-style: normal;
}

.lp-node-yellow b { background: repeating-linear-gradient(135deg, #e8a22f 0 8px, #f3ad38 8px 16px); }
.lp-node-green b  { background-color: #13b47b; }

.lp-wire {
    position: relative;
    width: 38px;
    height: 2px;
    background: linear-gradient(90deg, #f3ad38, #27e087);
}

.lp-wire::after {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 10px #27e087;
    animation: lp-signal 1.6s linear infinite;
}

.lp-clients {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    font-size: 14px;
}

.lp-chip {
    padding: 7px 14px;
    border: 1px solid var(--layer-4);
    border-radius: 999px;
    background-color: var(--layer-1);
    font-size: 13px;
    font-weight: 700;
}

/* ----- Три шага на кадрах ----- */

.lp-steps {
    display: flex;
    flex-direction: column;
    gap: 56px;
    margin-top: 36px;
}

.lp-step {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: center;
}

/* Чётный шаг — кадр слева, и широкая колонка тоже слева. */
.lp-step:nth-child(even) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.lp-step:nth-child(even) .lp-step-text {
    order: 2;
}

.lp-step h3 {
    margin: 14px 0 10px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.lp-step p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
}

.lp-step-num {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--c1) 45%, transparent);
}

.lp-step-shot {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--layer-1);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c1) 45%, transparent), 0 24px 70px color-mix(in srgb, var(--c1) 28%, transparent);
}

.lp-step-shot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
}

/* Пиксель-арт при увеличении — чёткими квадратами; скриншот нод — нет. */
.lp-pixel {
    image-rendering: pixelated;
}

/* Шаг «выпустите»: три настоящие игры из каталога веером. */
.lp-stack {
    min-height: 320px;
    overflow: visible;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 30%, transparent), transparent);
    box-shadow: none;
}

.lp-stack-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58%;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--layer-2);
    color: var(--text-light);
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.lp-stack-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.lp-stack-card span {
    display: block;
    padding: 10px 14px;
}

.lp-stack-0 { z-index: 3; transform: translate(-50%, -50%); }
.lp-stack-1 { z-index: 2; transform: translate(-88%, -60%) rotate(-8deg) scale(0.86); }
.lp-stack-2 { z-index: 1; transform: translate(-12%, -40%) rotate(8deg) scale(0.86); }

.lp-stack-0:hover { transform: translate(-50%, -54%); }

.lp-stack-badge {
    position: absolute;
    z-index: 4;
    right: 6%;
    bottom: 8%;
    padding: 9px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ----- Ставка: своя нейросеть по MCP ----- */

.lp-bet {
    position: relative;
    isolation: isolate;
    padding: 56px;
    border: 1px solid rgba(144, 19, 254, 0.35);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(98, 39, 224, 0.28), rgba(20, 24, 32, 0.6) 55%, rgba(0, 143, 236, 0.18));
}

.lp-glow-bet {
    inset: 0;
    overflow: hidden;
    border-radius: 28px;
}

.lp-bet-title {
    max-width: 900px;
    margin: 0;
    font-size: clamp(32px, 3.8vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.lp-bet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    margin-top: 36px;
}

.lp-terminal {
    overflow: hidden;
    border: 1px solid var(--layer-4);
    border-radius: 14px;
    background-color: #0b0e14;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lp-terminal ol {
    margin: 0;
    padding: 18px 20px 22px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
}

/* --i — номер строки, задаётся в разметке: строки появляются по очереди. */
.lp-terminal li {
    --i: 0;
    padding: 3px 0;
    color: var(--text-mute);
    animation: portal-rise 0.4s ease-out backwards;
    animation-delay: calc(var(--i) * 0.35s + 0.3s);
}

.lp-terminal li::before {
    content: "● ";
    color: #27e087;
}

.lp-t-tool b {
    color: #b98cff;
    font-weight: 700;
}

.lp-t-you {
    margin-bottom: 8px;
    color: var(--text-light);
}

.lp-t-you::before {
    content: "> " !important;
    color: #f3ad38 !important;
}

.lp-t-done {
    margin-top: 8px;
    color: #27e087;
    font-weight: 700;
}

.lp-proof {
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    background-color: var(--layer-1);
    box-shadow: 0 0 0 1px rgba(39, 224, 135, 0.35), 0 24px 60px rgba(39, 224, 135, 0.18);
}

.lp-proof img {
    display: block;
    width: 100%;
    height: auto;
}

.lp-proof figcaption {
    padding: 14px 18px 16px;
    color: var(--text-mute);
    font-size: 14px;
    line-height: 1.5;
}

.lp-proof figcaption b {
    color: var(--text-light);
}

.lp-bet-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.lp-bet-point {
    padding: 18px 20px;
    border-top: 3px solid;
    border-image: var(--gradient-brand) 1;
    background-color: rgba(20, 24, 32, 0.55);
}

.lp-bet-point h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.lp-bet-point p {
    margin: 0;
    line-height: 1.55;
}

/* ----- Помощник в чате ----- */

.lp-assist {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.lp-assist-text p.muted {
    margin: 16px 0 0;
    font-size: 17px;
    line-height: 1.6;
}

.lp-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--layer-4);
    border-radius: 18px;
    background-color: var(--layer-1);
}

.lp-chat .lp-bubble {
    max-width: 82%;
    font-size: 14px;
    box-shadow: none;
}

.lp-typing {
    display: flex;
    gap: 5px;
    padding: 12px 14px;
}

.lp-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--text-dim);
    animation: lp-dot 1.2s ease-in-out infinite;
}

.lp-typing i:nth-child(2) { animation-delay: 0.15s; }
.lp-typing i:nth-child(3) { animation-delay: 0.3s; }

/* ----- Инструменты ----- */

.lp-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.lp-tool {
    padding: 22px 24px;
    border: 1px solid transparent;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.lp-tool:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--c1) 60%, transparent);
    box-shadow: 0 18px 50px color-mix(in srgb, var(--c1) 25%, transparent);
}

.lp-tool h3 {
    margin: 14px 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.lp-tool p {
    margin: 0;
    line-height: 1.55;
}

.lp-tool-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
}

.lp-tool-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----- Что умеет игра / что даёт выпуск ----- */

.lp-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
}

.lp-feats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.lp-feats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-left: 3px solid #9013fe;
    border-radius: 0 10px 10px 0;
    background-color: var(--layer-1);
}

.lp-feats li:nth-child(4n + 2) { border-left-color: #27b4e0; }
.lp-feats li:nth-child(4n + 3) { border-left-color: #27e087; }
.lp-feats li:nth-child(4n + 4) { border-left-color: #f3ad38; }

.lp-feats-alt li { border-left-color: #cd317c; }
.lp-feats-alt li:nth-child(4n + 2) { border-left-color: #f3ad38; }
.lp-feats-alt li:nth-child(4n + 3) { border-left-color: #9013fe; }
.lp-feats-alt li:nth-child(4n + 4) { border-left-color: #27b4e0; }

.lp-feats b {
    font-weight: 800;
}

.lp-feats span {
    font-size: 14px;
    line-height: 1.5;
}

/* ----- Финал ----- */

.lp-end {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 32px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(144, 19, 254, 0.35), rgba(205, 49, 124, 0.25) 50%, rgba(0, 143, 236, 0.25));
    text-align: center;
}

.lp-glow-end {
    inset: 0;
    overflow: hidden;
    border-radius: 28px;
}

.lp-end-mark {
    margin-bottom: 22px;
    line-height: 1;
}

/* Знак сам задаёт себе 36px (main.css) — здесь крупнее, глаза следят за курсором. */
.lp-end-mark .logo-mark {
    font-size: 96px;
    box-shadow: inset 0 -0.08em 0 rgba(0, 0, 0, 0.22), 0 20px 60px rgba(144, 19, 254, 0.55);
}

.lp-end .landing-cta {
    justify-content: center;
}

@keyframes lp-float {
    from { transform: translateY(0); }
    to   { transform: translateY(-10px); }
}

@keyframes lp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(144, 19, 254, 0.6); }
    100% { box-shadow: 0 0 0 22px rgba(144, 19, 254, 0); }
}

@keyframes lp-signal {
    from { left: 0; }
    to   { left: calc(100% - 8px); }
}

@keyframes lp-dot {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-float,
    .lp-play,
    .lp-wire::after,
    .lp-typing i,
    .lp-terminal li {
        animation: none;
    }
}

/* ===================== УРОК ===================== */

.guide {
    max-width: 860px;
}

.guide-topic {
    margin-top: 36px;
}

.guide-topic .section-title {
    font-size: 22px;
}

.guide-list {
    margin: 12px 0 0;
    padding-left: 22px;
    line-height: 1.6;
}

.guide-list li + li {
    margin-top: 6px;
}

.guide-note {
    margin: 12px 0 0;
    line-height: 1.55;
}

.guide code {
    padding: 1px 6px;
    border-radius: 6px;
    background-color: var(--layer-2);
    font-family: var(--font-mono);
    font-size: 0.92em;
}

.guide-node {
    color: var(--color-xp);
}

/* ===================== ПЛАНШЕТ И ТЕЛЕФОН ===================== */

@media (max-width: 1100px) {
    .lp-hero,
    .lp-step,
    .lp-bet-grid,
    .lp-assist,
    .lp-two {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .lp-step:nth-child(even) {
        grid-template-columns: minmax(0, 1fr);
    }

    .lp-step:nth-child(even) .lp-step-text {
        order: 0;
    }

    .lp-window {
        transform: none;
    }

    .lp-float-chat {
        left: 12px;
    }

    .lp-float-nodes {
        right: 12px;
    }

    .lp-tools,
    .lp-bet-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .landing-lead {
        font-size: 16px;
    }

    .landing-grid {
        grid-template-columns: 1fr;
    }

    .guide-topic .section-title {
        font-size: 20px;
    }

    .lp {
        gap: 64px;
    }

    /* «программирования» — одно слово на всю строку телефона. */
    .lp-title {
        font-size: 30px;
    }

    .lp-lead {
        font-size: 17px;
    }

    .lp-h2 {
        font-size: 28px;
    }

    .lp-step h3 {
        font-size: 24px;
    }

    .lp-float-nodes,
    .lp-play {
        display: none;
    }

    .lp-float-chat {
        position: static;
        width: auto;
        margin-top: 14px;
        animation: none;
    }

    .lp-tools,
    .lp-bet-points {
        grid-template-columns: minmax(0, 1fr);
    }

    .lp-bet,
    .lp-end {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .lp-stack {
        min-height: 230px;
    }

    .lp-btn-big {
        flex: 1 1 100%;
    }
}
