/*
 * Главная страница, редизайн v2 (ветка redesign/home).
 * Подключается только в home.blade.php через @push('styles').
 * Стиль: «воздушный», в духе apple.com — системный шрифт SF, много воздуха,
 * чередование белого и #f5f5f7 вместо линий, кнопки-«таблетки» из landing.css.
 * Шапку и подвал не переопределяем, кроме цвета «QR» в логотипе.
 */

.ld-home {
    --ld-bg: #fbfbfd;
    --ld-white: #ffffff;
    --ld-alt: #f5f5f7;
    --ld-ink: #1d1d1f;
    --ld-muted: #6e6e73;
    --ld-soft-line: rgba(0, 0, 0, 0.06);
    --ld-sky: #7ec8e3;
    --ld-sky-dark: var(--sky-dark); /* общий цвет из landing-v2.css */
    --ld-sky-soft: #e8f6fc;
    --ld-max: 980px;
    --ld-gutter: 22px;

    font-family: var(--font-sans);
    color: var(--ld-ink);
    background: var(--ld-bg);
}

/* «QR» в логотипе окрашивается в landing-v2.css — для всех страниц */

/* ---------- Основа ---------- */
/* Сброс отступов — с нулевой специфичностью (:where), чтобы не перебивать отступы блоков ниже */
:where(.ld-home) :where(h1, h2, h3, p, figure, ul) {
    margin: 0;
}
.ld-home h1,
.ld-home h2,
.ld-home h3 {
    font-weight: 600;
    text-wrap: balance;
}
.ld-home :focus-visible {
    outline: 2px solid var(--ld-sky-dark);
    outline-offset: 3px;
    border-radius: 8px;
}
.ld-wrap {
    max-width: var(--ld-max);
    margin-inline: auto;
    padding-inline: var(--ld-gutter);
}
.ld-sec {
    padding-block: 72px;
    text-align: center;
}
.ld-sec--alt {
    background: var(--ld-alt);
}
.ld-h2 {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -0.003em;
    max-width: 16em;
    margin-inline: auto;
}
.ld-lead {
    margin: 20px auto 0;
    max-width: 36em;
    font-size: 21px;
    line-height: 1.38;
    letter-spacing: 0.011em;
    color: var(--ld-muted);
}
.ld-eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ld-muted);
}

/* Кнопки: прежние «таблетки» из landing.css, крупнее */
.ld-home .landing-btn.ld-btn-lg {
    padding: 14px 28px;
    font-size: 17px;
}
.ld-more {
    font-size: 17px;
    color: var(--ld-sky-dark);
}
.ld-home a.ld-more:hover {
    text-decoration: underline;
}
.ld-more::after {
    content: " ›";
}

/* Лист под иллюстрацию: белый, мягкие углы, почти невидимая граница */
.ld-sheet {
    display: block;
    background: var(--ld-white);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--ld-soft-line);
    overflow: hidden;
}
.ld-sheet img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- Первый экран ---------- */
.ld-hero {
    background: var(--ld-white);
    padding-top: 72px;
    text-align: center;
}
.ld-hero h1 {
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: -0.005em;
    max-width: 15em;
    margin-inline: auto;
}
.ld-points {
    list-style: none;
    margin: 24px auto 0;
    padding: 0;
    max-width: 34em;
    font-size: 21px;
    line-height: 1.38;
    letter-spacing: 0.011em;
    color: var(--ld-muted);
}
.ld-points li + li {
    margin-top: 6px;
}
.ld-ctas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin-top: 36px;
}
.ld-home .ld-figure {
    margin-top: 52px;
    background: var(--ld-white);
}
.ld-figure__scroll {
    overflow-x: auto;
    scrollbar-width: none;
}
.ld-figure__scroll::-webkit-scrollbar {
    display: none;
}
.ld-figure__zoom {
    all: unset;
    display: block;
    width: 100%;
    cursor: zoom-in;
}
.ld-figure__zoom:focus-visible {
    outline: 2px solid var(--ld-sky-dark);
    outline-offset: -4px;
}
.ld-figure img {
    display: block;
    width: 100%;
    max-width: 1240px;
    height: auto;
    margin-inline: auto;
}
.ld-figcap {
    padding: 16px var(--ld-gutter) 48px;
    font-size: 14px;
    color: var(--ld-muted);
}
.ld-figcap__m {
    display: none;
}

/* ---------- Карточки: заголовок сверху, картинка, текст снизу — как на прежнем сайте ---------- */
.ld-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--ld-white);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--ld-soft-line);
}
.ld-card img {
    display: block;
    width: 100%;
    object-fit: contain;
}

/* Преимущества */
.ld-benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 44px;
}
.ld-benefit {
    padding: 28px 22px 30px;
}
/* Заголовки, картинки и тексты соседних карточек стоят на одних уровнях */
@supports (grid-template-rows: subgrid) {
    .ld-benefits {
        grid-template-rows: auto auto auto;
    }
    .ld-benefit {
        display: grid;
        grid-row: span 3;
        grid-template-rows: subgrid;
        justify-items: center;
        align-items: start;
        row-gap: 0;
    }
}
.ld-home .ld-benefit h3 {
    font-size: 19px;
    line-height: 1.26;
    letter-spacing: 0.012em;
}
.ld-benefit img {
    height: 190px;
    margin-top: 20px;
}
.ld-home .ld-benefit p {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ld-muted);
}

/* Для кого */
.ld-roles-lead {
    max-width: 22em;
    margin-inline: auto;
    font-size: 32px;
    line-height: 1.19;
    font-weight: 600;
    letter-spacing: 0.004em;
    text-wrap: balance;
}
.ld-roles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 44px;
}
.ld-role {
    padding: 26px 18px 28px;
}
.ld-home .ld-role p {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}
@supports (grid-template-rows: subgrid) {
    .ld-roles {
        grid-template-rows: auto auto;
    }
    .ld-role {
        display: grid;
        grid-row: span 2;
        grid-template-rows: subgrid;
        justify-items: center;
        align-items: center;
        row-gap: 0;
    }
}
.ld-role img {
    height: 130px;
    margin-top: 14px;
}
.ld-home .ld-roles-note {
    margin: 36px auto 0;
    max-width: 30em;
    font-size: 17px;
    color: var(--ld-muted);
}

/* ---------- Две ссылки ---------- */
.ld-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 56px;
    padding-block: 0 72px;
    background: var(--ld-bg);
}
.ld-links .ld-more {
    font-size: 21px;
}

/* ---------- Исследования ---------- */
.ld-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 44px;
    text-align: left;
}
.ld-stat {
    background: var(--ld-white);
    border-radius: 18px;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.ld-stat--big {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.ld-stat__num {
    font-size: 96px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.ld-stat--big p {
    font-size: 17px;
    line-height: 1.45;
    color: var(--ld-muted);
    max-width: 16em;
}
.ld-stat--big strong {
    color: var(--ld-ink);
    font-weight: 600;
}
.ld-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ld-row__top {
    display: flex;
    flex-direction: column-reverse; /* цифра над подписью, подпись на всю ширину */
    align-items: flex-start;
    gap: 6px;
}
.ld-row__top span {
    font-size: 15px;
    line-height: 1.4;
    color: var(--ld-muted);
}
.ld-row__top b {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ld-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--ld-alt);
    overflow: hidden;
}
.ld-bar i {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--ld-sky);
}
.ld-src {
    margin-top: auto;
    font-size: 12px;
    line-height: 1.45;
    color: var(--ld-muted);
}

/* ---------- Финальный призыв ---------- */
.ld-cta {
    background: var(--ld-bg);
}
.ld-cta .ld-lead {
    margin-top: 18px;
}
.ld-cta .ld-ctas {
    margin-top: 32px;
}

/* ---------- Просмотр иллюстрации целиком ---------- */
.ld-lb {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(29, 29, 31, 0.88);
    display: flex;
    flex-direction: column;
    padding: 12px;
}
.ld-lb[hidden] {
    display: none;
}
.ld-lb__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #f5f5f7;
    font-size: 13px;
    padding: 4px 4px 10px;
}
.ld-lb__bar button {
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 980px;
    padding: 7px 16px;
    cursor: pointer;
    font: inherit;
}
.ld-lb__pane {
    flex: 1;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
}
.ld-lb__pane img {
    display: block;
    width: 1526px;
    max-width: none;
    height: auto;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1068px) {
    .ld-hero h1 {
        font-size: 48px;
    }
    .ld-h2 {
        font-size: 40px;
    }
    .ld-benefits {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 24px;
    }
    .ld-stat__num {
        font-size: 80px;
    }
}
@media (max-width: 734px) {
    .ld-sec {
        padding-block: 52px;
    }
    .ld-hero {
        padding-top: 44px;
    }
    .ld-hero h1 {
        font-size: 34px;
        line-height: 1.12;
    }
    .ld-points,
    .ld-lead {
        font-size: 18px;
    }
    .ld-h2 {
        font-size: 30px;
        line-height: 1.12;
    }
    .ld-roles-lead {
        font-size: 24px;
    }
    .ld-home .ld-figure {
        margin-top: 48px;
    }
    .ld-figure img {
        width: 900px;
        max-width: none;
    }
    .ld-figcap {
        padding-bottom: 48px;
    }
    .ld-figcap__m {
        display: inline;
    }
    .ld-figcap__d {
        display: none;
    }
    .ld-benefits {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-inline: auto;
    }
    .ld-benefit img {
        height: 170px;
    }
    .ld-home .ld-benefit h3 {
        min-height: 0;
    }
    .ld-roles {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .ld-role img {
        height: 110px;
    }
    .ld-links {
        flex-direction: column;
        align-items: center;
        padding-bottom: 52px;
    }
    .ld-links .ld-more {
        font-size: 18px;
    }
    .ld-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ld-stat__num {
        font-size: 72px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ld-home * {
        transition: none !important;
    }
}
