/* ==========================================================================
   reklama.css — страница «Реклама на портале».

   Сделано по design-taste-frontend (tasteskill 2.5), тип страницы service:

     · одна система: один радиус, одна кнопка, одно начертание заголовков;
     · равные левые и правые края (.wrap = 1200);
     · цвета клиента — синий портала, красный берём только из логотипа;
       фиолетового нет;
     · движение: вход героя один раз + отклик на курсор; ни наклонов,
       ни появления секций по скроллу, ни бегущих строк;
     · prefers-reduced-motion: всё стоит на месте, ничего не спрятано.
   ========================================================================== */

main.rl-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.rl-page {
    --rl-ink: var(--text-main, #0F172A);
    --rl-muted: var(--text-muted, #5A6473);
    --rl-bg: var(--bg-primary, #F8FAFC);
    --rl-surface: var(--bg-card, #FFFFFF);
    --rl-line: var(--border-color, #E2E8F0);

    --rl-accent: #2563EB;
    --rl-accent-hover: #1D4ED8;

    --rl-r-sm: 10px;
    --rl-r-md: 16px;
    --rl-r-lg: 24px;

    --rl-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --rl-dur: 320ms;

    --rl-wrap: 1200px;

    display: block;
    background: var(--rl-bg);
    color: var(--rl-ink);
    font-family: "Red Hat Text", var(--font-family, "Inter", system-ui, sans-serif);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.rl-page *,
.rl-page *::before,
.rl-page *::after {
    box-sizing: border-box;
}

.rl-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    width: min(var(--rl-wrap), 100% - 96px);
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Типографика
   -------------------------------------------------------------------------- */

.rl-page h1,
.rl-page h2,
.rl-page h3 {
    font-family: "Red Hat Display", var(--font-family, "Inter", system-ui, sans-serif);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--rl-ink);
    margin: 0;
}

.rl-page h1 {
    font-size: clamp(2.35rem, 4.1vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.rl-page h2 {
    font-size: clamp(1.9rem, 3vw, 2.75rem);
    line-height: 1.06;
    margin-bottom: 18px;
}

.rl-page h3 {
    font-size: 1.15rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

/* Сброс без веса: :where() даёт нулевую специфичность, поэтому отступы,
   заданные классами ниже, не перебиваются этим правилом. */
:where(.rl-page) p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Кнопки и ссылки: одна кнопка, одна ссылка
   -------------------------------------------------------------------------- */

.rl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: var(--rl-r-sm);
    background: var(--rl-accent);
    color: #FFFFFF;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--rl-dur) var(--rl-ease), transform var(--rl-dur) var(--rl-ease), box-shadow var(--rl-dur) var(--rl-ease);
}

.rl-btn:hover {
    background: var(--rl-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -8px rgba(37, 99, 235, 0.55);
}

.rl-btn:active {
    transform: translateY(0);
}

.rl-btn:focus-visible {
    outline: 2px solid var(--rl-accent);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Пропуск к содержанию
   -------------------------------------------------------------------------- */

.rl-skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 12px 20px;
    border-radius: var(--rl-r-sm);
    background: var(--rl-accent);
    color: #fff;
    text-decoration: none;
    transition: top var(--rl-dur) var(--rl-ease);
}

.rl-skip:focus {
    top: 12px;
}

/* --------------------------------------------------------------------------
   1. Первый экран
   -------------------------------------------------------------------------- */

.rl-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: clamp(48px, 6vw, 80px) 0 clamp(48px, 6vw, 72px);
}

.rl-hero-inner {
    align-self: center;
    max-width: 1000px;
    margin-inline: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rl-nowrap {
    white-space: nowrap;
}

.rl-hero-inner h1 {
    margin-inline: auto;
}

.rl-hero-lead {
    max-width: 54ch;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--rl-muted);
    text-wrap: pretty;
}

/* Полоса фактов: часть композиции, а не подвал экрана */
.rl-hero-stats {
    width: min(880px, 100% - 96px);
    margin: clamp(44px, 5vw, 76px) auto 0;
    padding-top: 26px;
    border-top: 1px solid var(--rl-line);
}

.rl-hero-stats ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.rl-hero-stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 0 18px;
    text-align: center;
    border-left: 1px solid var(--rl-line);
}

.rl-hero-stats li:first-child {
    border-left: 0;
}

.rl-hero-stats b {
    font-family: "Red Hat Display", var(--font-family, "Inter", system-ui, sans-serif);
    font-size: clamp(1.35rem, 1.7vw, 1.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--rl-ink);
    font-variant-numeric: tabular-nums;
}

.rl-hero-stats span {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rl-muted);
}

/* Вход героя: один раз при загрузке, ничего не появляется по скроллу */
@keyframes rl-enter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

[data-enter] h1,
[data-enter] .rl-hero-lead,
[data-enter] .rl-hero-stats {
    animation: rl-enter 620ms var(--rl-ease) both;
}

[data-enter] h1 { animation-delay: 60ms; }
[data-enter] .rl-hero-lead { animation-delay: 120ms; }
[data-enter] .rl-hero-stats { animation-delay: 200ms; }

/* --------------------------------------------------------------------------
   Секции
   -------------------------------------------------------------------------- */

.rl-section {
    padding: clamp(64px, 7vw, 104px) 0;
    border-top: 1px solid var(--rl-line);
    scroll-margin-top: 80px;
}

.rl-section-lead {
    max-width: 72ch;
    margin-bottom: 40px;
    color: var(--rl-muted);
    font-size: 1.0625rem;
}

.rl-section-foot {
    max-width: 62ch;
    margin-top: 36px;
    color: var(--rl-muted);
}

/* --------------------------------------------------------------------------
   2. Позиции
   -------------------------------------------------------------------------- */

.rl-position-groups {
    display: grid;
    gap: 38px;
}

.rl-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--rl-line);
}

.rl-group-title {
    font-size: 1.25rem;
    margin: 0 !important;
}

.rl-group-count {
    font-size: 0.875rem;
    color: var(--rl-muted);
    font-variant-numeric: tabular-nums;
}

.rl-position-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-top: 16px;
}

.rl-slot-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--rl-line);
    border-radius: 8px;
    background: var(--rl-surface);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
    transition: border-color var(--rl-dur) var(--rl-ease), transform var(--rl-dur) var(--rl-ease), box-shadow var(--rl-dur) var(--rl-ease);
}

/* Заполняем последний ряд сетки: одиночная карточка занимает всю строку
   и раскладывается в строчку, чтобы не оставалось пустых клеток. */
@media (min-width: 1025px) {
.rl-slot-card:only-child,
.rl-slot-card:nth-child(3n + 1):last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
}

.rl-slot-card:only-child .rl-slot-head,
.rl-slot-card:nth-child(3n + 1):last-child .rl-slot-head {
    flex: 0 0 auto;
}

.rl-slot-card:only-child .rl-slot-place,
.rl-slot-card:nth-child(3n + 1):last-child .rl-slot-place {
    flex: 1 1 auto;
    margin: 0 !important;
}

.rl-slot-card:only-child .rl-slot-details,
.rl-slot-card:nth-child(3n + 1):last-child .rl-slot-details {
    flex: 0 0 auto;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    gap: 40px;
}

/* Пятая карточка группы (2 из 3 в последнем ряду) тянется на две колонки. */
.rl-slot-card:nth-child(3n + 2):last-child {
    grid-column: span 2;
}
}

.rl-slot-card:hover {
    border-color: #BFDBFE;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.rl-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rl-slot-preview {
    display: grid;
    place-items: center;
    width: 64px;
    height: 48px;
    flex: 0 0 auto;
    border: 1px solid var(--rl-line);
    border-radius: 6px;
    background: var(--rl-bg);
}

.rl-slot-preview span {
    display: block;
    border-radius: 3px;
}

.rl-slot-preview--wide span {
    width: 44px;
    height: 11px;
    background: var(--rl-accent);
}

.rl-slot-preview--rail span {
    width: 19px;
    height: 29px;
    background: #60A5FA;
}

.rl-slot-preview--card span {
    width: 27px;
    height: 23px;
    background: #93C5FD;
}

.rl-slot-type {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--rl-muted);
    background: var(--rl-bg);
    border: 1px solid var(--rl-line);
}

.rl-slot-place {
    margin: 18px 0 22px !important;
    font-family: "Red Hat Display", var(--font-family, "Inter", system-ui, sans-serif);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rl-ink);
}

.rl-slot-details {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--rl-line);
}

.rl-slot-format,
.rl-slot-price {
    display: grid;
    gap: 4px;
}

.rl-slot-format > span,
.rl-slot-price > span {
    color: var(--rl-muted);
    font-size: 0.75rem;
    line-height: 1.2;
}

.rl-slot-format strong {
    color: var(--rl-ink);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rl-slot-price {
    text-align: right;
}

.rl-slot-price strong {
    color: var(--rl-ink);
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   3. Цены
   -------------------------------------------------------------------------- */

.rl-prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.rl-price {
    display: flex;
    flex-direction: column;
    padding: 30px 28px 28px;
    border: 1px solid var(--rl-line);
    border-radius: var(--rl-r-md);
    background: var(--rl-surface);
    transition: border-color var(--rl-dur) var(--rl-ease), transform var(--rl-dur) var(--rl-ease);
}

.rl-price:hover {
    border-color: var(--rl-accent);
    transform: translateY(-2px);
}

.rl-price h3 {
    margin: 0 0 20px;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
}

.rl-price-value {
    margin: 0;
    font-family: "Red Hat Display", var(--font-family, "Inter", system-ui, sans-serif);
    font-size: clamp(2.05rem, 2.6vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--rl-ink);
    font-variant-numeric: tabular-nums;
}

.rl-price-alt {
    margin: 12px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--rl-muted);
}

.rl-price-alt b {
    font-weight: 600;
    color: var(--rl-ink);
    font-variant-numeric: tabular-nums;
}

.rl-price-list {
    margin: 26px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--rl-line);
    list-style: none;
    display: grid;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--rl-muted);
}

.rl-price-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.rl-price-list svg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--rl-accent);
}

/* --------------------------------------------------------------------------
   4. Шаги
   -------------------------------------------------------------------------- */

.rl-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rl-step;
}

.rl-steps li {
    padding-top: 20px;
    border-top: 1px solid var(--rl-line);
    counter-increment: rl-step;
}

.rl-steps li::before {
    content: counter(rl-step, decimal-leading-zero);
    display: block;
    margin-bottom: 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--rl-accent);
    font-variant-numeric: tabular-nums;
}

.rl-steps p {
    color: var(--rl-muted);
    font-size: 0.9375rem;
    max-width: 34ch;
}

/* --------------------------------------------------------------------------
   Тёмная тема портала
   -------------------------------------------------------------------------- */

[data-theme="dark"] .rl-page {
    --rl-ink: var(--text-main, #E9EAEF);
    --rl-muted: var(--text-muted, #9AA0AC);
    --rl-bg: var(--bg-primary, #101116);
    --rl-surface: var(--bg-card, #191A21);
    --rl-line: var(--border-color, #2A2C35);
}

/* --------------------------------------------------------------------------
   Адаптив: на телефоне одна колонка, кнопки во всю ширину
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .wrap {
        width: min(var(--rl-wrap), 100% - 64px);
    }

    .rl-position-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .rl-prices,
    .rl-steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Планшет: две колонки — «хвост» из одной карточки тоже занимает всю строку. */
@media (min-width: 721px) and (max-width: 1024px) {
    .rl-slot-card:only-child,
    .rl-slot-card:nth-child(2n + 1):last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .wrap {
        width: min(var(--rl-wrap), 100% - 32px);
    }

    .rl-page h1 {
        font-size: clamp(2rem, 8.6vw, 2.5rem);
    }

    .rl-page h2 {
        font-size: clamp(1.6rem, 6.4vw, 2rem);
    }

    .rl-hero {
        padding-top: 32px;
    }

    .rl-hero-stats ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 16px;
    }

    .rl-hero-stats li:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .rl-hero-stats b {
        font-size: 1.25rem;
    }

    .rl-position-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rl-slot-card {
        min-height: 0;
        padding: 18px;
    }
}

/* --------------------------------------------------------------------------
   Уменьшенное движение: контент на месте, ничего не исчезает
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .rl-page *,
    .rl-page *::before,
    .rl-page *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    [data-enter] h1,
    [data-enter] .rl-hero-lead,
    [data-enter] .rl-hero-stats {
        opacity: 1 !important;
        transform: none !important;
    }
}
