/* ===========================================================================
 * landing.css — стили лендинга (Home/Index)
 * Извлечено из cs2trainer-template/landing.html (inline <style>).
 * Inline style="..." из шаблона переписаны в классы-модификаторы ниже,
 * чтобы в .cshtml не оставалось ни одного inline-стиля
 * (см. spec §"Inline styles — рефакторинг").
 * =========================================================================== */

body { background: var(--bg-base); }

.ico {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----- NAV ----- */
.lp-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg-base) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.lp-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.lp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.lp-brand__icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.lp-brand__wordmark {
    height: 22px;
    width: auto;
    object-fit: contain;
}
/* Ребренд 2026-07-15: wordmark текстом (медиа-правила по базовому классу продолжают
   скейлить/прятать). display:flex центрирует глифы в 18-22px контейнере. */
.lp-brand__wordmark--text {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}
.lp-nav__links { display: flex; gap: 24px; flex: 1; }
.lp-nav__links a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}
.lp-nav__links a:hover { color: var(--text-primary); }
.lp-nav__actions { display: flex; gap: 8px; }

.lp-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ----- HERO ----- */
.lp-hero {
    padding: 80px 32px 96px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.lp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at 50% 0%, #000, transparent 75%);
}
.lp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    background: var(--accent-soft);
    border-radius: 24px;
    position: relative;
    z-index: 1;
}
.lp-hero__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.lp-hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 24px auto 20px;
    max-width: 880px;
    position: relative;
    z-index: 1;
}
.lp-hero h1 em { font-style: normal; color: var(--accent); }
.lp-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 640px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 1;
}
.lp-hero__cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
}
.btn--steam {
    background: #1B2838;
    color: #A8C7E9;
    border: 1px solid #2A475E;
    font-size: 15px;
    padding: 12px 20px;
}
.btn--steam:hover { background: #2A3F5F; color: #fff; }
.lp-hero__trust {
    display: flex;
    gap: 32px;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.lp-hero__trust strong { color: var(--text-primary); }

/* ----- DASHBOARD PREVIEW ----- */
.lp-preview {
    max-width: 1100px;
    margin: 64px auto 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    overflow: hidden;
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
    position: relative;
    z-index: 1;
}
.lp-preview__chrome {
    height: 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 6px;
    background: var(--bg-raised);
}
.lp-preview__chrome .dot { width: 10px; height: 10px; border-radius: 50%; }
.lp-preview__chrome .dot:nth-child(1) { background: #FF5F57; }
.lp-preview__chrome .dot:nth-child(2) { background: #FEBC2E; }
.lp-preview__chrome .dot:nth-child(3) { background: #28C840; }
.lp-preview__chrome .url {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}
.lp-preview__body {
    padding: 24px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
}
.preview-sidebar { display: flex; flex-direction: column; gap: 6px; }
.preview-sidebar .item {
    padding: 8px 10px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.preview-sidebar .item.active { background: var(--accent-soft); color: var(--accent); }
.preview-sidebar .item::before {
    content: "";
    width: 12px;
    height: 12px;
    background: currentColor;
    opacity: 0.5;
    border-radius: 2px;
}
.preview-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.preview-stat {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.preview-stat .l {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.preview-stat .v {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
}
/* Color modifiers for .preview-stat .v (заменяют inline style="color:var(--...)") */
.preview-stat .v--good { color: var(--good); }
.preview-stat .v--accent { color: var(--accent); }

.preview-stat .s {
    height: 24px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}
.preview-stat .s span {
    flex: 1;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0.7;
}
.preview-block {
    grid-column: 1 / -1;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.preview-block .l {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.preview-block .bars {
    display: flex;
    gap: 4px;
    height: 64px;
    align-items: flex-end;
}
.preview-block .bars span {
    flex: 1;
    background: var(--accent);
    opacity: 0.5;
    border-radius: 2px 2px 0 0;
}

/* Bar height modifiers — заменяют inline style="height:NN%".
   Шаг 5% от 30% до 90% покрывает все случаи в landing.html. */
.bar-h-30 { height: 30%; }
.bar-h-35 { height: 35%; }
.bar-h-40 { height: 40%; }
.bar-h-45 { height: 45%; }
.bar-h-50 { height: 50%; }
.bar-h-55 { height: 55%; }
.bar-h-60 { height: 60%; }
.bar-h-65 { height: 65%; }
.bar-h-70 { height: 70%; }
.bar-h-75 { height: 75%; }
.bar-h-80 { height: 80%; }
.bar-h-85 { height: 85%; }
.bar-h-90 { height: 90%; }

/* ----- SECTIONS ----- */
.lp-section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.lp-section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.lp-section__head .eyebrow { color: var(--accent); }
.lp-section__head h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 12px 0 16px;
}
.lp-section__head p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ----- FEATURES ----- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 800px) {
    .feature-grid { grid-template-columns: 1fr; }
}
.feature {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 260px;
    transition: border-color 0.2s;
    position: relative;
    overflow: hidden;
}
.feature:hover { border-color: var(--accent); }
.feature__num {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.12em;
}
.feature__icon {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 6px;
    display: grid;
    place-items: center;
}
.feature__icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feature h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.feature p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.feature__demo {
    margin-top: auto;
    padding: 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-muted);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* ----- FLOW ----- */
.flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 900px) {
    .flow-grid { grid-template-columns: repeat(2, 1fr); }
}
.flow-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
}
.flow-step__num {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.04em;
}
.flow-step h4 { font-size: 16px; font-weight: 600; }
.flow-step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ----- CTA ----- */
.lp-cta {
    padding: 96px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(
        ellipse at 50% 50%,
        color-mix(in srgb, var(--accent) 12%, transparent),
        transparent 60%
    );
}
.lp-cta h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    max-width: 720px;
    margin-inline: auto;
}
.lp-cta p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ----- FOOTER ----- */
.lp-footer { padding: 48px 32px; font-size: 12px; color: var(--text-muted); }
.lp-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.lp-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 16px;
}

/* ===========================================================================
 * RESPONSIVE — мобильная адаптация лендинга.
 * Раньше были только точечные брейкпоинты feature-grid(800)/flow-grid(900) —
 * навбар, превью-дашборд и паддинги на телефонах разъезжались.
 * =========================================================================== */
@media (max-width: 768px) {
    /* Навбар: бургера нет → прячем in-page якоря, оставляем бренд + кнопки.
       Кнопки прижимаем вправо (links больше не толкают их через flex:1). */
    .lp-nav__inner { padding: 12px 16px; gap: 12px; }
    .lp-nav__links { display: none; }
    .lp-nav__actions { margin-left: auto; }
    .lp-brand__wordmark { height: 18px; }

    /* Паддинги секций — компактнее на мобиле. */
    .lp-hero { padding: 48px 16px 56px; }
    .lp-container { padding: 0 16px; }
    .lp-section { padding: 56px 0; }
    .lp-cta { padding: 56px 16px; }
    .lp-section__head { margin-bottom: 36px; }

    /* Hero: заголовок масштабируется ниже (был min 40px → оверфлоу на 320px). */
    .lp-hero h1 { font-size: clamp(28px, 8vw, 48px); margin-top: 18px; }
    .lp-hero p { font-size: 16px; }

    /* Превью-дашборд: фейковый сайдбар скрываем (декор), статы в 2 колонки —
       иначе grid 200px + repeat(4,1fr) даёт горизонтальный оверфлоу. */
    .lp-preview { margin-top: 40px; border-radius: 10px; }
    .lp-preview__body { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
    .preview-sidebar { display: none; }
    .preview-content { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .flow-grid { grid-template-columns: 1fr; }
    .lp-hero__trust { flex-direction: column; gap: 10px; }
    .feature { padding: 24px; min-height: 0; }
    .lp-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
    /* Совсем узкие экраны: бренд = только иконка, статы превью в 1 колонку,
       hero-CTA на всю ширину для удобного тапа. */
    .lp-brand__wordmark { display: none; }
    .preview-content { grid-template-columns: 1fr; }
    .lp-hero__cta { flex-direction: column; }
    .lp-hero__cta .btn { width: 100%; }
}

/* SEO-пакет §6.5: лендинг — открытые разделы + FAQ. */
.lp-open-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.lp-open-card { display: block; padding: 20px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.lp-open-card:hover { border-color: var(--accent); }
.lp-open-card h4 { margin: 0 0 8px; color: var(--text-primary); }
.lp-open-card p { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.lp-faq { max-width: 760px; }
.lp-faq__item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.lp-faq__item summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--text-primary); list-style-position: outside; }
.lp-faq__item summary:hover { color: var(--accent); }
.lp-faq__item p { margin: 0 0 14px; color: var(--text-secondary); line-height: 1.6; }
.lp-faq__item a { color: var(--accent); }
