/* ============================================================
   Torkzt · guest_home.css — главная для гостя.

   ЧТО ИЗМЕНЕНО В ЭТОЙ ВЕРСИИ

   1. Выравнивание заголовков. Все h3 на странице приходили по центру —
      «Смотреть сразу», «Регистрация», подписи «ФИЛЬМЫ»/«СЕРИАЛЫ» — при
      том что текст под ними шёл слева. В этом файле text-align у них не
      задавался вовсе, значит центрирование прилетало из глобальных стилей
      сайта. Теперь заголовки наследуют выравнивание родителя, и контейнер
      решает сам: карточки и шаги слева, цифры и блок «Готовы?» по центру.

   2. Шкала отступов. Раньше значения были произвольными: 54, 46, 40, 28,
      26, 22, 18, 14, 12... Между заголовком hero и лидом 18px, между
      секциями 56px — ритм не читался. Теперь шесть ступеней (8 / 16 / 24 /
      40 / 64 / 96) и только они.

   3. Шкала шрифтов. Целый пласт текста жил на 13–14px: описания карточек
      (.89rem), шаги (.86rem), подписи под цифрами (.84rem). На десктопе в
      колонке 340px это мелко. Тело поднято до 16px, вспомогательное — до
      15px, подписи оставлены на 13px как подписи.
   ============================================================ */

.gh {
    /* ── цвет ── */
    --gh-accent: #0d6efd;
    --gh-accent-dark: #0a58ca;
    --gh-ink: #16181c;
    --gh-muted: #6b7280;
    --gh-line: #e6e9ef;
    --gh-bg-soft: #f4f6fb;

    /* ── отступы: одна шкала на весь файл ──
       Произвольные значения между этими ступенями не используются:
       именно разнобой создавал ощущение, что «отступов мало» —
       на деле их было не мало, а непоследовательно. */
    --gh-s1: 8px;
    --gh-s2: 16px;
    --gh-s3: 24px;
    --gh-s4: 40px;
    --gh-s5: 64px;
    --gh-s6: 96px;

    /* ── шрифты ── */
    --gh-fs-hero:    3rem;      /* 48 */
    --gh-fs-h2:      1.75rem;   /* 28 */
    --gh-fs-lead:    1.125rem;  /* 18 */
    --gh-fs-body:    1rem;      /* 16 — было .89rem, отсюда «мелко» */
    --gh-fs-small:   .9375rem;  /* 15 */
    --gh-fs-caption: .8125rem;  /* 13 */

    /* ── размер постера ──
       Одна переменная на коллаж и на ленты: раньше 128 и 132 стояли
       в разных местах и разъезжались при правках. */
    --gh-poster: 170px;

    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--gh-s3) var(--gh-s5);
    color: var(--gh-ink);
}

/* Заголовки наследуют выравнивание родителя вместо глобального center.
   Без этого «Смотреть сразу» стояло по центру карточки, а текст под ним —
   слева, и каждая карточка читалась как две несвязанные части. */
.gh h1,
.gh h2,
.gh h3,
.gh h4 {
    margin: 0;
    text-align: inherit;
}

/* ─────────────────────────── hero ─────────────────────────── */

.gh-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: var(--gh-s5);
    align-items: center;
    padding: var(--gh-s5) 0;
    overflow: hidden;
}

.gh-badge {
    display: inline-block;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(13, 110, 253, .1);
    color: var(--gh-accent);
    font-size: var(--gh-fs-caption);
    font-weight: 700;
    letter-spacing: .02em;
    margin-bottom: var(--gh-s3);
}

.gh-title {
    font-size: var(--gh-fs-hero);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    /* было 18px — заголовок и лид слипались в один блок */
    margin: 0 0 var(--gh-s3);
}

.gh-title-accent {
    background: linear-gradient(135deg, #0d6efd 0%, #7048c4 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gh-lead {
    font-size: var(--gh-fs-lead);
    line-height: 1.6;
    color: var(--gh-muted);
    max-width: 540px;
    margin: 0 0 var(--gh-s4);
}

.gh-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding: 0 32px;
    border-radius: 12px;
    font-size: var(--gh-fs-body);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .14s, box-shadow .14s, background .14s, color .14s;
}

.gh-btn-main,
.gh-btn-main:link,
.gh-btn-main:visited {
    background: var(--gh-accent);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(13, 110, 253, .3);
}

.gh-btn-main:hover,
.gh-btn-main:focus,
.gh-btn-main:active {
    background: var(--gh-accent-dark);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(13, 110, 253, .38);
}

.gh-btn-ghost {
    background: #fff;
    color: var(--gh-ink);
    border: 1px solid var(--gh-line);
}

.gh-btn-ghost:hover { background: var(--gh-bg-soft); color: var(--gh-ink); }

.gh-cta-note {
    margin-top: var(--gh-s2);
    font-size: var(--gh-fs-caption);
    color: var(--gh-muted);
}

/* ── коллаж постеров ── */

.gh-hero-art {
    position: relative;
    height: 440px;
    pointer-events: none;
}

.gh-art-item {
    position: absolute;
    width: calc(var(--gh-poster) - 20px);
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gh-bg-soft);
    box-shadow: 0 12px 34px rgba(16, 24, 40, .18);
    transition: transform .3s;
}

.gh-art-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gh-art-1 { top: 0;    left: 0;    transform: rotate(-6deg); z-index: 3; }
.gh-art-2 { top: 30px; left: 126px; transform: rotate(3deg);  z-index: 4; }
.gh-art-3 { top: 10px; left: 260px; transform: rotate(-3deg); z-index: 2; }
.gh-art-4 { top: 220px; left: 52px; transform: rotate(4deg);  z-index: 5; }
.gh-art-5 { top: 246px; left: 194px; transform: rotate(-5deg); z-index: 3; }
.gh-art-6 { top: 206px; left: 330px; transform: rotate(6deg);  z-index: 1; opacity: .85; }

/* ─────────────────────────── цифры ─────────────────────────── */

.gh-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--gh-s2);
    padding: var(--gh-s4) var(--gh-s3);
    border-radius: 18px;
    background: var(--gh-bg-soft);
    margin-bottom: var(--gh-s6);
    text-align: center;
}

.gh-stat-num {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.gh-stat-label {
    font-size: var(--gh-fs-small);
    color: var(--gh-muted);
    margin-top: 6px;
}

.gh-stat-live .gh-stat-num { color: #178a4c; }

/* ─────────────────────────── секции ─────────────────────────── */

.gh-section { margin-bottom: var(--gh-s6); }
.gh-section-slim { margin-bottom: var(--gh-s3); }

.gh-section-head { margin-bottom: var(--gh-s4); }

.gh-section-title {
    font-size: var(--gh-fs-h2);
    font-weight: 750;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0;
}

.gh-section-sub {
    font-size: var(--gh-fs-body);
    color: var(--gh-muted);
    margin-top: var(--gh-s1);
}

/* ─────────────────────────── ленты ─────────────────────────── */

.gh-marquee {
    position: relative;
    overflow: hidden;
    margin: 0 calc(var(--gh-s3) * -1);
    padding: 4px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.gh-marquee-track {
    display: flex;
    /* align-items обязателен: без него элементы растягиваются по высоте
       самого высокого и aspect-ratio перестаёт держать пропорцию */
    align-items: flex-start;
    gap: var(--gh-s2);
    width: max-content;
    animation: ghScroll 62s linear infinite;
}

.gh-marquee:hover .gh-marquee-track { animation-play-state: paused; }
.gh-marquee-rev .gh-marquee-track { animation-direction: reverse; animation-duration: 74s; }

.gh-row { margin-bottom: var(--gh-s4); }
.gh-row:last-child { margin-bottom: 0; }

.gh-row-label {
    font-size: var(--gh-fs-caption);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gh-muted);
    margin-bottom: var(--gh-s2);
    padding-left: 2px;
}

.gh-marquee-item {
    flex: 0 0 auto;
    width: var(--gh-poster);
    aspect-ratio: 2/3;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gh-bg-soft);
    box-shadow: 0 4px 16px rgba(16, 24, 40, .1);
    transition: transform .25s;
}

.gh-marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Заглушка при отсутствии постера — та же, что в каталоге. Её рисует
   release_poster_html(), стили лежат в catalog_poster.css; здесь только
   растягиваем обёртку на весь элемент ленты. */
.gh-marquee-item .poster-placeholder,
.gh-art-item .poster-placeholder {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

/* Музыка: обложка альбома квадратная, в ленте 2:3 её срезало бы сверху
   и снизу. Ряд получается ниже остальных — это нормально, ленты и так
   идут одна под другой и по высоте не связаны. */
.gh-marquee-square .gh-marquee-item { aspect-ratio: 1 / 1; }
.gh-marquee:hover .gh-marquee-item { transform: scale(.97); }

@keyframes ghScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .gh-marquee-track { animation: none; }
    .gh-marquee { overflow-x: auto; }
}

/* ─────────────────────────── «Почему здесь» ─────────────────────────── */

.gh-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gh-s3);
}

.gh-feature {
    /* text-align задан явно: заголовок внутри наследует его и больше
       не встаёт по центру над левым текстом */
    text-align: left;
    padding: var(--gh-s4) var(--gh-s3);
    border: 1px solid var(--gh-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.gh-feature:hover {
    border-color: #c5dcff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .07);
    transform: translateY(-2px);
}

.gh-feature-ico {
    width: 48px; height: 48px;
    border-radius: 13px;
    background: rgba(13, 110, 253, .1);
    color: var(--gh-accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--gh-s3);
}

.gh-feature-ico svg { width: 25px; height: 25px; }

.gh-feature-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: var(--gh-s1);
}

.gh-feature-text {
    font-size: var(--gh-fs-body);
    line-height: 1.6;
    color: var(--gh-muted);
}

/* ─────────────────────────── шаги ─────────────────────────── */

.gh-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gh-s4) var(--gh-s3);
    margin-bottom: var(--gh-s4);
}

.gh-step {
    display: flex;
    gap: var(--gh-s2);
    align-items: flex-start;
    text-align: left;
}

.gh-step-num {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gh-accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: var(--gh-fs-small);
    font-weight: 700;
}

.gh-step-title {
    font-weight: 700;
    font-size: var(--gh-fs-body);
    margin-bottom: 5px;
}

.gh-step-text {
    font-size: var(--gh-fs-small);
    color: var(--gh-muted);
    line-height: 1.55;
}

/* ─────────────────────────── призыв ─────────────────────────── */

.gh-join {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gh-s3);
    padding: var(--gh-s4);
    border-radius: 18px;
    background: linear-gradient(135deg, #0d6efd 0%, #7048c4 100%);
    color: #fff;
    text-align: left;
}

.gh-join-title { font-size: 1.5rem; font-weight: 750; }
.gh-join-sub { font-size: var(--gh-fs-body); opacity: .9; margin-top: 5px; }

.gh-join .gh-btn-main,
.gh-join .gh-btn-main:link,
.gh-join .gh-btn-main:visited {
    background: #fff;
    color: var(--gh-accent) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}

.gh-join .gh-btn-main:hover { background: #f4f6fb; color: var(--gh-accent-dark) !important; }

/* ─────────────────────────── «Не только раздачи» ─────────────────────────── */

.gh-inside {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: var(--gh-s3);
    align-items: start;
}

.gh-mock {
    border: 1px solid var(--gh-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(16, 24, 40, .07);
    overflow: hidden;
    text-align: left;
}

.gh-mock-chat { display: flex; flex-direction: column; }

.gh-mock-head {
    display: flex; align-items: center; gap: 10px;
    padding: var(--gh-s2) var(--gh-s3);
    border-bottom: 1px solid var(--gh-line);
}

.gh-mock-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #178a4c;
    box-shadow: 0 0 0 0 rgba(23, 138, 76, .5);
    animation: ghPulse 2.4s infinite;
}

@keyframes ghPulse {
    0%   { box-shadow: 0 0 0 0 rgba(23, 138, 76, .5); }
    70%  { box-shadow: 0 0 0 7px rgba(23, 138, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(23, 138, 76, 0); }
}

.gh-mock-name { font-weight: 700; font-size: var(--gh-fs-body); }

.gh-mock-body {
    padding: var(--gh-s3);
    display: flex; flex-direction: column; gap: var(--gh-s2);
}

.gh-msg { display: flex; align-items: flex-end; gap: 10px; max-width: 82%; }

.gh-msg-ava {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: var(--gh-fs-caption); font-weight: 700;
}

.gh-msg-text {
    padding: 10px 15px; border-radius: 14px;
    background: var(--gh-bg-soft);
    font-size: var(--gh-fs-small);
    line-height: 1.45;
}

.gh-msg-out { margin-left: auto; }
.gh-msg-out .gh-msg-text { background: var(--gh-accent); color: #fff; border-bottom-right-radius: 5px; }
.gh-msg-in .gh-msg-text { border-bottom-left-radius: 5px; }

.gh-mock-foot {
    display: flex; align-items: center; gap: 10px;
    padding: var(--gh-s2) var(--gh-s3);
    border-top: 1px solid var(--gh-line);
}

.gh-mock-input {
    flex: 1; padding: 10px 15px; border-radius: 999px;
    background: var(--gh-bg-soft); color: #9aa0a6;
    font-size: var(--gh-fs-small);
}

.gh-mock-send {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
    background: var(--gh-accent); position: relative;
}

.gh-mock-send::after {
    content: ''; position: absolute; inset: 0;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M15.9.5 1 6.3l4.6 1.6L13 3.2 8.2 9.3l1.6 4.6z'/%3E%3C/svg%3E") center/16px no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M15.9.5 1 6.3l4.6 1.6L13 3.2 8.2 9.3l1.6 4.6z'/%3E%3C/svg%3E") center/16px no-repeat;
}

.gh-mock-profile { padding: var(--gh-s3); }

.gh-prof-top { display: flex; align-items: center; gap: var(--gh-s2); margin-bottom: var(--gh-s3); }

.gh-prof-ava {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #7048c4);
    color: #fff; font-size: 1.25rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.gh-prof-name { font-weight: 750; font-size: 1.0625rem; }
.gh-prof-role { font-size: var(--gh-fs-small); color: var(--gh-muted); }

.gh-prof-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gh-s1);
    padding: var(--gh-s3) 0; margin-bottom: var(--gh-s3);
    border-top: 1px solid var(--gh-line);
    border-bottom: 1px solid var(--gh-line);
    text-align: center;
}

.gh-prof-stat b { display: block; font-size: 1.25rem; font-weight: 750; }
.gh-prof-stat span { font-size: var(--gh-fs-caption); color: var(--gh-muted); }

.gh-prof-lists { display: flex; flex-direction: column; gap: 11px; }

.gh-prof-list {
    display: flex; align-items: center; gap: 10px;
    font-size: var(--gh-fs-small); color: var(--gh-muted);
}

.gh-prof-list b { margin-left: auto; color: var(--gh-ink); font-weight: 700; }
.gh-prof-chip { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.gh-chip-blue { background: #0d6efd; }
.gh-chip-orange { background: #e68a00; }
.gh-chip-green { background: #178a4c; }

.gh-hero-body { min-width: 0; }
.gh-join-text { min-width: 0; }
.gh-step-body { min-width: 0; }

/* ═══════════════════════ широкий экран ═══════════════════════ */

@media (min-width: 1400px) {
    /* На большом мониторе постеры по 170px снова выглядят мелко —
       контейнер шире, а элемент тот же. Одна переменная тянет за собой
       и ленты, и коллаж. */
    .gh { --gh-poster: 190px; }
    .gh-hero-art { height: 480px; }
}

/* ═══════════════════════ планшет ═══════════════════════ */

@media (max-width: 991px) {
    .gh-hero {
        grid-template-columns: 1fr;
        gap: var(--gh-s4);
        padding: var(--gh-s4) 0;
    }
    .gh-hero-art { height: 320px; transform: scale(.85); transform-origin: left top; }
    .gh-title { font-size: 2.5rem; }
    .gh-inside { grid-template-columns: 1fr; gap: var(--gh-s3); }
}

/* ═══════════════════════ телефон ═══════════════════════ */

@media (max-width: 767px) {
    .gh {
        /* На узком экране шкала сжимается вся целиком, а не каждое
           значение по отдельности — так пропорции между блоками
           сохраняются и ритм не рассыпается. */
        --gh-s3: 20px;
        --gh-s4: 32px;
        --gh-s5: 48px;
        --gh-s6: 64px;

        --gh-fs-hero: 2.125rem;
        --gh-fs-h2: 1.5rem;
        --gh-fs-lead: 1.0625rem;

        /* на телефоне важнее показать, что лента длинная,
           чем каждый постер крупно */
        --gh-poster: 116px;

        padding-left: var(--gh-s2);
        padding-right: var(--gh-s2);
    }

    .gh-hero { padding: var(--gh-s4) 0; gap: 0; }

    .gh-hero-art {
        display: block;
        position: relative;
        height: 200px;
        margin: var(--gh-s4) auto 0;
        width: 290px;
        transform: none;
    }
    .gh-art-item {
        /* коллаж на телефоне живёт по своей раскладке: она собрана под
           четыре карточки в ряд, и от --gh-poster не зависит */
        width: 90px;
        border-radius: 10px;
        box-shadow: 0 8px 22px rgba(16, 24, 40, .16);
    }
    .gh-art-1 { top: 14px; left: 0;    transform: rotate(-8deg); }
    .gh-art-2 { top: 0;    left: 70px; transform: rotate(-2deg); }
    .gh-art-3 { top: 8px;  left: 140px; transform: rotate(4deg); }
    .gh-art-4 { top: 22px; left: 208px; transform: rotate(9deg); opacity: .9; }
    .gh-art-5, .gh-art-6 { display: none; }

    .gh-badge { margin-bottom: var(--gh-s2); }

    .gh-title { line-height: 1.14; letter-spacing: -.028em; }
    .gh-title br { display: none; }
    .gh-title-accent { display: inline; }

    .gh-lead { line-height: 1.55; margin-bottom: var(--gh-s3); }

    .gh-cta { flex-direction: column; gap: 10px; }
    .gh-btn { height: 54px; width: 100%; }
    .gh-cta-note { text-align: center; }

    .gh-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gh-s3) var(--gh-s2);
        padding: var(--gh-s3) var(--gh-s2);
        border-radius: 16px;
    }
    /* третья цифра одна в ряду — растягиваем на всю ширину,
       иначе она прижимается к левому краю и ряд выглядит оборванным */
    .gh-stats .gh-stat:nth-child(3):last-child { grid-column: 1 / -1; }
    .gh-stat-num { font-size: 1.75rem; }

    .gh-section-head { margin-bottom: var(--gh-s3); }

    .gh-marquee { margin: 0 calc(var(--gh-s2) * -1); }
    .gh-marquee-item { border-radius: 10px; }
    .gh-marquee-track { gap: 10px; animation-duration: 45s; }
    .gh-marquee-rev .gh-marquee-track { animation-duration: 55s; }
    .gh-row { margin-bottom: var(--gh-s3); }

    .gh-features { gap: var(--gh-s2); }
    .gh-feature { padding: var(--gh-s3); border-radius: 14px; }
    .gh-feature-ico {
        width: 44px; height: 44px; border-radius: 11px;
        margin-bottom: var(--gh-s2);
    }
    .gh-feature-ico svg { width: 23px; height: 23px; }

    .gh-inside { grid-template-columns: 1fr; gap: var(--gh-s2); }
    .gh-mock-body { padding: var(--gh-s2); }
    .gh-msg { max-width: 90%; }

    .gh-steps { gap: var(--gh-s3); margin-bottom: var(--gh-s3); }
    .gh-step-num { width: 32px; height: 32px; }

    .gh-join {
        padding: var(--gh-s3);
        border-radius: 16px;
        text-align: center;
        justify-content: center;
    }
    .gh-join-text { width: 100%; }
    .gh-join-title { font-size: 1.3125rem; }
    .gh-join .gh-btn { width: 100%; }
}

@media (max-width: 380px) {
    .gh {
        --gh-fs-hero: 1.875rem;
        --gh-poster: 100px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .gh-marquee { margin: 0 -14px; }

    .gh-stat-num { font-size: 1.5rem; }
    .gh-hero-art { width: 248px; height: 176px; }
    .gh-art-item { width: 78px; }
    .gh-art-2 { left: 60px; }
    .gh-art-3 { left: 120px; }
    .gh-art-4 { left: 180px; }
}