/* ==========================================================================
   Flowmark — landing.css
   Узкие SEO-страницы под конкретные боли (lp-* = landing page).
   Подключается ПОСЛЕ site.css. Переиспользует токены и .btn / .cta-panel.
   ========================================================================== */

/* -- Promo CTA (главная кнопка перехода в бота с промо-доступом) -- */
.btn-promo {
    background: var(--accent);
    color: var(--accent-ink);
    border: 1px solid transparent;
    font-weight: 600;
}
.btn-promo:hover,
.btn-promo:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px color-mix(in oklch, var(--accent) 38%, transparent);
}
.btn-promo .arr { color: inherit; }

/* -- Hero -- */
.lp-hero {
    padding: 80px 0 28px;
    position: relative;
    overflow: hidden;
}
.lp-hero > .frame { position: relative; z-index: 1; }

/* мягкое свечение акцентом — «яркость» без шума */
.lp-hero .lp-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 100% 0%, #000 25%, transparent 80%);
            mask-image: radial-gradient(ellipse 90% 90% at 100% 0%, #000 25%, transparent 80%);
}
.lp-hero .lp-ambient::before,
.lp-hero .lp-ambient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
}
.lp-hero .lp-ambient::before {
    top: -180px; right: -6%;
    width: 760px; height: 560px;
    background: radial-gradient(ellipse at 50% 50%, color-mix(in oklch, var(--accent) 22%, transparent) 0%, transparent 66%);
    opacity: 0.5;
    animation: lp-drift-a 24s ease-in-out infinite alternate;
}
.lp-hero .lp-ambient::after {
    top: -60px; right: 18%;
    width: 520px; height: 420px;
    background: radial-gradient(circle at 50% 50%, color-mix(in oklch, var(--accent) 16%, transparent) 0%, transparent 60%);
    opacity: 0.4;
    animation: lp-drift-b 30s ease-in-out infinite alternate;
}
:root[data-theme="light"] .lp-hero .lp-ambient::before { opacity: 0.32; }
:root[data-theme="light"] .lp-hero .lp-ambient::after  { opacity: 0.24; }

@keyframes lp-drift-a { from { transform: translate3d(0,0,0); } to { transform: translate3d(-20px,16px,0) scale(1.05); } }
@keyframes lp-drift-b { from { transform: translate3d(0,0,0); } to { transform: translate3d(14px,12px,0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
    .lp-hero .lp-ambient::before,
    .lp-hero .lp-ambient::after { animation: none !important; }
}

.lp-breadcrumb {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ink-4);
    margin: 0 0 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.lp-breadcrumb a { color: var(--ink-3); }
.lp-breadcrumb a:hover { color: var(--accent); }
.lp-breadcrumb .sep { color: var(--ink-4); }

.lp-hero h1 {
    font-family: var(--f-display);
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.03;
    letter-spacing: -0.026em;
    font-weight: 500;
    margin: 14px 0 0;
    max-width: 18ch;
    color: var(--ink);
    text-wrap: balance;
}
.lp-hero h1 .soft { color: var(--ink-3); }
.lp-hero .lead {
    margin: 24px 0 0;
    max-width: 600px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-2);
    text-wrap: pretty;
}
.lp-hero .lead strong { color: var(--ink); font-weight: 500; }

.lp-cta { margin-top: 30px; }
.lp-cta .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.lp-cta .cta-sub {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-4);
    max-width: 520px;
}
@media (max-width: 720px) {
    .lp-cta .cta-row { width: 100%; }
    .lp-cta .btn { justify-content: center; width: 100%; }
}

/* -- Sections -- */
.lp-sec {
    padding: 64px 0;
    border-top: 1px solid var(--line-soft);
}
.lp-sec-head {
    max-width: 720px;
    margin: 0 0 32px;
}
.lp-sec-head .num {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--ink-4);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}
.lp-sec-head h2 {
    font-family: var(--f-display);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}
.lp-sec-head p {
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-2);
    text-wrap: pretty;
}
.lp-sec-head p a {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-soft);
    transition: border-color .15s ease;
}
.lp-sec-head p a:hover { border-bottom-color: var(--accent); }

/* -- HowTo steps -- */
.lp-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    counter-reset: step;
}
@media (min-width: 720px) {
    .lp-steps.cols-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
}
.lp-step {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    background: var(--bg);
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lp-step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.08em;
}
.lp-step h3 {
    font-family: var(--f-display);
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: -0.008em;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}
.lp-step p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-2);
}
.lp-step .mono { color: var(--ink); font-family: var(--f-mono); font-size: 13px; }

/* -- Demo media placeholder -- */
.demo {
    margin: 0;
}
.demo + .demo { margin-top: 20px; }
.demo-frame {
    position: relative;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    overflow: hidden;
    background: var(--bg-2);
}
.demo-frame[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.demo-frame[data-ratio="1:1"]  { aspect-ratio: 1 / 1; }
.demo-frame[data-ratio="9:16"] { aspect-ratio: 9 / 16; max-width: 320px; }
.demo-frame[data-ratio="4:3"]  { aspect-ratio: 4 / 3; }
.demo-frame video,
.demo-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Плейсхолдер — виден, пока не вставлено реальное медиа */
.demo-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 24px;
    background:
        repeating-linear-gradient(135deg, color-mix(in oklch, var(--ink) 3%, transparent) 0 12px, transparent 12px 24px),
        var(--bg-2);
}
.demo-ph .ico {
    width: 34px; height: 34px;
    color: var(--ink-4);
}
.demo-ph .demo-ph-label {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.demo-ph .demo-ph-spec {
    font-family: var(--f-mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--ink-4);
    letter-spacing: 0.02em;
    max-width: 80%;
}
.demo figcaption {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-3);
    text-wrap: pretty;
}

/* -- Crossfade slideshow inside a .demo-frame -- */
.demo-slides { position: absolute; inset: 0; }
.demo-slides .demo-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .6s ease;
}
.demo-slides .demo-slide.is-active { opacity: 1; }
.demo-dots {
    position: absolute;
    left: 0; right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}
.demo-dot {
    width: 8px; height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in oklch, white 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in oklch, black 25%, transparent);
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.demo-dot.is-active {
    width: 22px;
    background: var(--accent);
}

.lp-media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}
@media (min-width: 860px) {
    .lp-media-grid.cols-2 { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* -- Feature / capability cards -- */
.lp-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 32px;
}
@media (min-width: 640px)  { .lp-cards.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px)  { .lp-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.lp-card {
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    background: var(--bg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lp-card .ic {
    width: 28px; height: 28px;
    color: var(--accent);
    margin-bottom: 4px;
}
.lp-card h3 {
    font-family: var(--f-display);
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -0.006em;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
}
.lp-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-2);
}

/* -- Prose block (rich body copy) -- */
.lp-prose {
    max-width: 720px;
}
.lp-prose p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
    margin: 0 0 14px;
    text-wrap: pretty;
}
.lp-prose p:last-child { margin-bottom: 0; }
.lp-prose strong { color: var(--ink); font-weight: 500; }
.lp-prose .mono { font-family: var(--f-mono); color: var(--ink); }
.lp-prose a {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-soft);
    transition: border-color .15s ease;
}
.lp-prose a:hover { border-bottom-color: var(--accent); }

/* -- «Это часть Flowmark» cross-sell -- */
.lp-cross {
    border: 1px solid var(--line-soft);
    border-radius: var(--r-4);
    background: var(--bg-2);
    padding: 32px;
}
@media (min-width: 760px) { .lp-cross { padding: 40px; } }
.lp-cross h2 {
    font-family: var(--f-display);
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.1;
    letter-spacing: -0.018em;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 12px;
    max-width: 28ch;
    text-wrap: balance;
}
.lp-cross p {
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--ink-2);
    margin: 0 0 16px;
    max-width: 680px;
    text-wrap: pretty;
}
.lp-cross .lp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}
.lp-cross .lp-chips a {
    font-family: var(--f-sans);
    font-size: 13px;
    color: var(--ink-2);
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 7px 13px;
    border-radius: var(--r-pill);
    transition: color .15s, border-color .15s, background .15s;
}
.lp-cross .lp-chips a:hover {
    color: var(--ink);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* -- FAQ -- */
.lp-faq {
    max-width: 760px;
    border-top: 1px solid var(--line-soft);
}
.lp-faq details {
    border-bottom: 1px solid var(--line-soft);
    padding: 0;
}
.lp-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 36px 20px 0;
    position: relative;
    font-family: var(--f-display);
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.006em;
    color: var(--ink);
    font-weight: 500;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 18px;
    font-family: var(--f-mono);
    font-size: 20px;
    color: var(--ink-3);
    transition: transform .2s ease, color .2s ease;
}
.lp-faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.lp-faq .ans {
    padding: 0 36px 22px 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
    text-wrap: pretty;
}
.lp-faq .ans p { margin: 0 0 10px; }
.lp-faq .ans p:last-child { margin-bottom: 0; }
.lp-faq .ans a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* -- Final CTA (поверх .cta-panel из site.css) -- */
.lp-final {
    padding: 56px 0 8px;
}
.lp-final .lp-final-head {
    max-width: 640px;
    margin: 0 0 4px;
}
.lp-final h2 {
    font-family: var(--f-display);
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 12px;
    text-wrap: balance;
}
.lp-final p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-2);
    margin: 0;
    text-wrap: pretty;
}
