/* =============================================================================
   АйСтория — стили лендинга (BEM, mobile-first).
   Палитра «Midnight Aurora».
   ========================================================================== */

/* --- Универсальные эффекты на скролле (доп. к AOS) --- */
.section-divider {
    position: relative;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 100, 248, 0.45), transparent);
    margin: 0;
}

/* =============================== HERO =============================== */
.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 0;
}

/* Картинка-баннер.
   Mobile (< 980px): встаёт в обычный поток отдельной карточкой над текстом.
   Desktop (>= 980px): растягивается фоном на всю секцию, текст лежит поверх. */
.hero__picture {
    position: relative;
    display: block;
    z-index: 0;
    line-height: 0;
}
.hero__picture img {
    display: block;
    width: 100%;
    height: auto;
}

.hero__container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin-inline: auto;
    padding: 32px 20px 48px;
    display: grid;
    /* minmax(0, 1fr) важен: у grid-item по умолчанию min-width: auto,
       и колонка раздувается под intrinsic min-content (под nowrap-кнопку
       «Попробовать 3 дня бесплатно»), вытягивая весь блок за пределы
       экрана на узких устройствах (~320–360px). */
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}
.hero__content { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(168, 100, 248, 0.14);
    border: 1px solid rgba(168, 100, 248, 0.35);
    color: #E2C3FF;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    backdrop-filter: blur(8px);
    font-family: var(--font-display);
}
.hero__eyebrow-dot {
    width: 8px; height: 8px;
    background: var(--c-violet);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--c-violet);
    animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.35); opacity: 0.7; }
}

.hero__title {
    font-size: clamp(36px, 6.8vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-weight: 800;
    color: var(--c-cream);
}
.hero__title-accent {
    background: linear-gradient(120deg, #A864F8 0%, #FF6BC1 60%, #F4C36B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero__subtitle {
    font-size: clamp(16px, 1.8vw, 19px);
    color: var(--c-text-dim);
    max-width: 560px;
    line-height: 1.55;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Соц-доказательство в hero (счётчик + рейтинг) */
.hero__proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    padding: 16px 20px;
    background: rgba(24, 28, 66, 0.6);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    margin-top: 10px;
}
.hero__proof-item { display: flex; flex-direction: column; gap: 2px; }
.hero__proof-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    color: var(--c-cream);
    letter-spacing: -0.02em;
    line-height: 1;
}
.hero__proof-label { font-size: 12.5px; color: var(--c-text-muted); font-weight: 500; }
.hero__proof-stars { color: var(--c-gold); letter-spacing: 2px; font-size: 17px; line-height: 1; }
.hero__proof-divider { width: 1px; height: 28px; background: rgba(245,239,224,0.12); }

/* --- Mobile / tablet (< 980px): картинка как красивая карточка над контентом --- */
@media (max-width: 979px) {
    .hero { padding: 0 0 24px; }
    .hero__picture {
        margin: 16px 16px 0;
        border-radius: var(--r-xl);
        overflow: hidden;
        border: 1px solid rgba(168, 100, 248, 0.22);
        box-shadow: var(--sh-card);
        /* Лёгкое затемнение нижней части карточки — чтобы переход к тексту был мягким */
        position: relative;
    }
    .hero__picture::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg,
            transparent 60%,
            rgba(7, 9, 30, 0.45) 100%);
        pointer-events: none;
    }
}

/* --- Desktop (>= 980px): картинка — фоновый баннер, текст слева поверх --- */
@media (min-width: 980px) {
    .hero {
        min-height: clamp(580px, 64vh, 760px);
    }
    .hero__picture {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        /* Плавное растворение баннера в фон сайта (#07091E) сверху и снизу.
           Сверху — короткий fade (под прозрачный header).
           Снизу — длинный fade (~200px), чтобы переход к следующей секции был незаметным. */
        -webkit-mask-image: linear-gradient(
            180deg,
            transparent 0,
            #000 90px,
            #000 calc(100% - 200px),
            transparent 100%
        );
                mask-image: linear-gradient(
            180deg,
            transparent 0,
            #000 90px,
            #000 calc(100% - 200px),
            transparent 100%
        );
    }
    .hero__picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 60% center;
    }
    /* Затемнение левой зоны под текст + мягкое усиление верхнего/нижнего перехода.
       Лежит ВНУТРИ .hero__picture, поэтому подхватывает ту же mask-image. */
    .hero__picture::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(90deg,
                rgba(7, 9, 30, 0.92) 0%,
                rgba(7, 9, 30, 0.78) 28%,
                rgba(7, 9, 30, 0.35) 52%,
                rgba(7, 9, 30, 0)    72%),
            linear-gradient(180deg,
                rgba(7, 9, 30, 0.35) 0%,
                rgba(7, 9, 30, 0)    18%,
                rgba(7, 9, 30, 0)    72%,
                rgba(7, 9, 30, 0.70) 100%);
        pointer-events: none;
    }
    .hero__container {
        grid-template-columns: minmax(0, 580px) 1fr;
        gap: 72px;
        padding: 110px 20px 150px;
        min-height: clamp(580px, 64vh, 760px);
    }
    /* Дополнительная читаемость на ярких участках картинки */
    .hero__title,
    .hero__subtitle {
        text-shadow: 0 2px 24px rgba(7, 9, 30, 0.55);
    }
}

/* =============================== WHY (bento) =============================== */
/*
   Без иконок. Визуальный ритм держится на:
   - цветной акцент-полоске сверху каждой карточки (по палитре «Midnight Aurora»);
   - крупной типографике заголовков;
   - CSS-«авроре» внутри первой featured-карточки (градиентные орбы + звёзды).

   Сетка:
   - mobile (<720px): 1 колонка
   - tablet (720–1023px): 2 колонки, featured = обычный размер
   - desktop (>=1024px): 3 колонки, featured занимает 2×2
*/
.why { padding: 70px 0; position: relative; }
.why__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.why-card {
    /* Каждый модификатор задаёт свои --accent-from / --accent-to */
    --accent-from: var(--c-violet);
    --accent-to:   var(--c-rose);

    position: relative;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 26px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        background var(--t-base) var(--ease);
}

/* Цветная акцент-полоска сверху */
.why-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
    opacity: 0.85;
    transition: opacity var(--t-base) var(--ease), height var(--t-base) var(--ease);
    z-index: 2;
}

/* Мягкое цветное свечение на ховере */
.why-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 0%,
        color-mix(in srgb, var(--accent-from) 28%, transparent),
        transparent 60%);
    opacity: 0;
    transition: opacity var(--t-slow) var(--ease);
    pointer-events: none;
    z-index: 1;
}

/* Контентные элементы — поверх авроры и водяного знака.
   На mobile сюда попадает и .why-card__num--watermark (она выглядит как
   обычная цифра). На >=720px её отменяет более специфичное правило ниже. */
.why-card > .why-card__num,
.why-card > .why-card__title,
.why-card > .why-card__text,
.why-card > .why-card__content {
    position: relative;
    z-index: 3;
}

.why-card:hover {
    background: var(--c-card-2);
    border-color: color-mix(in srgb, var(--accent-from) 55%, transparent);
    transform: translateY(-6px);
    box-shadow:
        var(--sh-card),
        0 16px 50px color-mix(in srgb, var(--accent-from) 28%, transparent);
}
.why-card:hover::before { height: 5px; opacity: 1; }
.why-card:hover::after  { opacity: 1; }

.why-card__num {
    display: inline-block;
    margin: 0 0 2px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 36px;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-variant-numeric: tabular-nums;
}

.why-card__title {
    margin: 0;
    font-size: 21px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--c-cream);
    line-height: 1.25;
}
.why-card__text {
    margin: 0;
    color: var(--c-text-soft);
    font-size: 15px;
    line-height: 1.6;
}

/* Цветовые модификаторы: задают пару цветов для полоски, свечения и цифры */
.why-card--rose  { --accent-from: var(--c-rose);  --accent-to: var(--c-violet); }
.why-card--teal  { --accent-from: var(--c-teal);  --accent-to: var(--c-violet); }
.why-card--gold  { --accent-from: var(--c-gold);  --accent-to: var(--c-rose);   }
.why-card--peach { --accent-from: var(--c-peach); --accent-to: var(--c-gold);   }
.why-card--cream { --accent-from: var(--c-cream); --accent-to: var(--c-violet); }

/* ── Featured: крупная карточка с CSS-«авророй» ── */
.why-card--featured {
    background: linear-gradient(160deg, #1A2055 0%, #221A52 55%, #2A1845 100%);
    border-color: rgba(168, 100, 248, 0.35);
    padding: 30px;
}
.why-card--featured::before {
    background: linear-gradient(90deg, var(--c-violet), var(--c-rose) 55%, var(--c-gold));
    height: 4px;
    opacity: 1;
}
.why-card--featured .why-card__title { font-size: 26px; }
.why-card--featured .why-card__text  { font-size: 16px; max-width: 46ch; }

/* Цифра «01» в featured-карточке.
   Mobile (<720px): обычная цифра в потоке (как в карточках 02–06).
   Tablet/Desktop (>=720px): превращается в декоративный водяной знак
   в правом верхнем углу — переопределение ниже в @media. */
.why-card__num--watermark {
    font-feature-settings: "tnum" 1, "lnum" 1;
}

.why-card__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

/* Группа «заголовок + текст» внутри featured-карточки — идут вплотную,
   как в обычных карточках. Между eyebrow / group / chips сохраняется
   крупный gap (14px) от .why-card__content. */
.why-card__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Декоративные чипы под текстом в featured-карточке */
.why-card__chips {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.why-card__chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 239, 224, 0.07);
    border: 1px solid rgba(245, 239, 224, 0.14);
    color: var(--c-text-soft);
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.why-card__chip::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-gold);
    box-shadow: 0 0 6px var(--c-gold);
    margin-right: 8px;
}
.why-card--featured:hover .why-card__chip {
    background: rgba(245, 239, 224, 0.12);
    border-color: rgba(245, 239, 224, 0.22);
}

.why-card__eyebrow {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(168, 100, 248, 0.18);
    border: 1px solid rgba(168, 100, 248, 0.4);
    color: #E2C3FF;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-family: var(--font-display);
    margin-bottom: 4px;
}
.why-card__eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--c-violet);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--c-violet);
}

/* Декоративный фон featured-карточки: мягкие градиентные орбы + звёзды */
.why-card__aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.why-card__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(38px);
    animation: why-orb-float 14s var(--ease) infinite alternate;
    will-change: transform;
}
.why-card__orb--violet {
    width: 240px; height: 240px;
    background: var(--c-violet);
    top: -50px; right: -60px;
    opacity: 0.55;
}
.why-card__orb--rose {
    width: 200px; height: 200px;
    background: var(--c-rose);
    bottom: -60px; right: 28%;
    opacity: 0.4;
    animation-delay: -5s;
}
.why-card__orb--gold {
    width: 160px; height: 160px;
    background: var(--c-gold);
    top: 42%; left: -50px;
    opacity: 0.32;
    animation-delay: -9s;
}
@keyframes why-orb-float {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(18px, -14px, 0) scale(1.08); }
    100% { transform: translate3d(-12px, 14px, 0) scale(0.96); }
}

.why-card__stars { position: absolute; inset: 0; pointer-events: none; }
.why-card__stars i {
    position: absolute;
    width: 3px; height: 3px;
    background: var(--c-cream);
    border-radius: 50%;
    opacity: 0.7;
    box-shadow: 0 0 6px var(--c-cream);
    animation: why-twinkle 3.6s ease-in-out infinite;
}
.why-card__stars i:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.why-card__stars i:nth-child(2) { top: 28%; left: 78%; width: 2px; height: 2px; animation-delay: -1s; }
.why-card__stars i:nth-child(3) { top: 62%; left: 22%; width: 2px; height: 2px; animation-delay: -2s; }
.why-card__stars i:nth-child(4) { top: 50%; left: 90%; animation-delay: -0.5s; }
.why-card__stars i:nth-child(5) { top: 78%; left: 60%; width: 2px; height: 2px; animation-delay: -1.8s; }
@keyframes why-twinkle {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50%      { opacity: 0.2;  transform: scale(0.6); }
}

@media (prefers-reduced-motion: reduce) {
    .why-card__orb,
    .why-card__stars i { animation: none; }
}

/* ── Адаптив ── */
@media (min-width: 720px) {
    .why__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .why-card { padding: 28px 30px 30px; }
    .why-card--featured {
        grid-column: 1 / -1;          /* на планшете featured растягивается на ширину */
        padding: 32px;
    }
    .why-card--featured .why-card__content { padding-right: 110px; }
    .why-card--featured .why-card__title { font-size: 28px; }

    /* Начиная с tablet превращаем цифру в декоративный водяной знак
       в правом верхнем углу featured-карточки.
       Селектор .why-card > … имеет specificity 0,2,0,0 — здесь нужно
       не меньше, поэтому используем .why-card .why-card__num--watermark. */
    .why-card .why-card__num--watermark {
        position: absolute;
        top: 18px;
        right: 26px;
        margin: 0;
        padding: 0;
        font-size: clamp(72px, 11vw, 132px);
        line-height: 1;
        background: linear-gradient(135deg, var(--c-rose) 0%, var(--c-violet) 55%, var(--c-gold) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        opacity: 0.22;
        pointer-events: none;
        user-select: none;
        z-index: 1;
    }
}

@media (min-width: 1024px) {
    .why { padding: 100px 0; }
    .why__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(180px, auto);
        gap: 22px;
    }
    .why-card--featured {
        grid-column: span 2;          /* bento: 2×2 ячейки */
        grid-row: span 2;
        padding: 40px;
    }
    /* Контент идёт сверху обычным потоком (eyebrow → group → chips),
       но чипы прижимаются к нижнему краю карточки через margin-top: auto.
       Так заголовок и текст остаются вплотную после eyebrow. */
    .why-card--featured .why-card__content { justify-content: flex-start; }
    .why-card--featured .why-card__chips   { margin-top: auto; }
    .why-card--featured .why-card__title   { font-size: 32px; }
    .why-card--featured .why-card__text    { font-size: 17px; line-height: 1.65; }
    .why-card--featured .why-card__num--watermark {
        top: 24px;
        right: 36px;
        font-size: clamp(120px, 10vw, 170px);
    }
    /* На большой карточке оставляем место под водяной знак справа,
       чтобы заголовок и текст не наезжали на цифру */
    .why-card--featured .why-card__content { padding-right: 120px; }
}

/* =============================== CATEGORIES =============================== */
.categories { padding: 70px 0; }
.categories__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.category-card {
    position: relative;
    border-radius: var(--r-lg);
    padding: 30px;
    overflow: hidden;
    isolation: isolate;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
    transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.55;
    transition: opacity var(--t-base) var(--ease);
}
.category-card::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    top: -40px; right: -40px;
    z-index: -1;
    opacity: 0.6;
    filter: blur(40px);
    transition: opacity var(--t-base) var(--ease);
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-card-hi);
    border-color: rgba(168, 100, 248, 0.5);
}
.category-card:hover::before { opacity: 0.8; }
.category-card:hover::after { opacity: 0.9; }

.category-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(7, 9, 30, 0.7);
    color: var(--c-cream);
    font-weight: 600;
    border: 1px solid rgba(245, 239, 224, 0.15);
    font-family: var(--font-display);
    backdrop-filter: blur(6px);
}
.category-card__title {
    font-size: 24px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--c-cream);
}
.category-card__text { color: var(--c-text-soft); font-size: 14.8px; line-height: 1.6; }

.category-card--cosy::before   { background: linear-gradient(135deg, rgba(168, 100, 248, 0.30), transparent 70%); }
.category-card--cosy::after    { background: var(--c-violet); }
.category-card--gold::before   { background: linear-gradient(135deg, rgba(244, 195, 107, 0.28), transparent 70%); }
.category-card--gold::after    { background: var(--c-gold); }
.category-card--peach::before  { background: linear-gradient(135deg, rgba(255, 107, 193, 0.28), transparent 70%); }
.category-card--peach::after   { background: var(--c-rose); }
.category-card--indigo::before { background: linear-gradient(135deg, rgba(92, 200, 230, 0.28), transparent 70%); }
.category-card--indigo::after  { background: var(--c-teal); }

@media (min-width: 720px) { .categories__grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1024px) { .categories__grid { grid-template-columns: repeat(4, 1fr); } .categories { padding: 100px 0; } }

/* =============================== HOW IT WORKS =============================== */
/* overflow-x: clip — гасит горизонтальный скролл при первой отрисовке:
   внутри есть шаги с data-aos="fade-left/right", которые до инициализации
   AOS стоят с transform: translate3d(±n, 0, 0) и торчат за край вьюпорта.
   clip предпочтительнее hidden — не режет :hover-тени по вертикали и
   не создаёт лишний scroll-контейнер. */
.how { padding: 70px 0; position: relative; overflow-x: clip; }
.how__steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    counter-reset: stp;
    position: relative;
}
.how-step {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
    position: relative;
}
.how-step:hover {
    transform: translateY(-6px);
    background: var(--c-card-2);
    border-color: rgba(244, 195, 107, 0.35);
    box-shadow: var(--sh-card);
}
.how-step__num {
    font-family: var(--font-display);
    font-size: 46px;
    line-height: 1;
    background: linear-gradient(135deg, #F4C36B 0%, #FF6BC1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(244, 195, 107, 0.10);
    border-radius: 18px;
    border: 1px solid rgba(244, 195, 107, 0.25);
}
.how-step__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-cream);
    letter-spacing: -0.015em;
}
.how-step__text { color: var(--c-text-soft); font-size: 14.8px; line-height: 1.6; }

@media (min-width: 900px) { .how { padding: 100px 0; } .how__steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* =============================== EMOTIONAL =============================== */
.emotional {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}
.emotional__bg {
    position: absolute;
    /* выходим за границы секции, чтобы края радиальных градиентов
       не «отсекались» — иначе на стыке с соседними секциями видны полосы. */
    inset: -10% -10%;
    background:
        radial-gradient(800px 600px at 10% -10%,   rgba(244, 195, 107, 0.10), transparent 65%),
        radial-gradient(1000px 800px at 110% 110%, rgba(168, 100, 248, 0.30), transparent 65%);
    z-index: -1;
    mix-blend-mode: screen;
    pointer-events: none;
}
.emotional__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}
.emotional__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4.4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.022em;
    max-width: 620px;
    color: var(--c-cream);
}
.emotional__lead {
    color: var(--c-text-dim);
    margin-top: 22px;
    max-width: 560px;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.6;
}
.emotional__author {
    color: var(--c-gold);
    font-size: 12.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 18px;
    font-family: var(--font-display);
    font-weight: 700;
}
.emotional__figure {
    margin: 0;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid rgba(168, 100, 248, 0.22);
    box-shadow: var(--sh-card-hi), var(--sh-violet);
    transition: transform var(--t-slow) var(--ease);
}
.emotional__figure:hover { transform: translateY(-4px) scale(1.01); }
.emotional__illustration { width: 100%; display: block; }

@media (min-width: 980px) {
    .emotional { padding: 120px 0; }
    .emotional__container { grid-template-columns: 1.05fr 0.95fr; gap: 72px; }
}

/* =============================== EXAMPLES =============================== */
.examples { padding: 70px 0; }
.examples__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.story-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease);
    transform-style: preserve-3d;
    will-change: transform;
}
.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sh-card-hi), var(--sh-violet);
    border-color: rgba(168, 100, 248, 0.5);
}
.story-card__cover {
    margin: 0;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}
.story-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.story-card__cover-placeholder {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 26px;
    text-align: center;
    position: relative;
}
.story-card__cover-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 100%, rgba(7, 9, 30, 0.5), transparent 70%);
}
.story-card__cover-mark {
    color: var(--c-gold);
    opacity: 0.95;
    filter: drop-shadow(0 4px 12px rgba(244, 195, 107, 0.5));
    z-index: 1;
}
.story-card__cover-title {
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.25;
    color: var(--c-cream);
    font-weight: 700;
    z-index: 1;
    letter-spacing: -0.015em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}
.story-card--cosy .story-card__cover   { background: linear-gradient(135deg, #2D1A5C 0%, #6B3FBB 100%); }
.story-card--gold .story-card__cover   { background: linear-gradient(135deg, #2A2D62 0%, #D69A4D 100%); }
.story-card--peach .story-card__cover  { background: linear-gradient(135deg, #361755 0%, #C75A8C 100%); }
.story-card--indigo .story-card__cover { background: linear-gradient(135deg, #0F1E3D 0%, #3C7C9A 100%); }

.story-card__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.story-card__meta {
    font-size: 11.5px;
    color: var(--c-text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    font-family: var(--font-display);
}
.story-card__title {
    font-size: 20px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--c-cream);
    letter-spacing: -0.018em;
    line-height: 1.2;
}
.story-card__summary { color: var(--c-text-soft); font-size: 14.5px; line-height: 1.6; }
.story-card__formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.story-card__format {
    font-size: 12px;
    font-weight: 700;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(168, 100, 248, 0.10);
    border: 1px solid rgba(168, 100, 248, 0.25);
    color: var(--c-cream);
    transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
    font-family: var(--font-display);
}
.story-card__format:hover {
    background: rgba(168, 100, 248, 0.25);
    border-color: var(--c-violet);
    transform: translateY(-1px);
}

@media (min-width: 700px)  { .examples__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .examples__grid { grid-template-columns: repeat(3, 1fr); } .examples { padding: 100px 0; } }

/* =============================== AGES =============================== */
.ages { padding: 70px 0; }
.ages__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.age-card {
    background: linear-gradient(180deg, var(--c-card) 0%, var(--c-card-2) 100%);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 32px;
    transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
    position: relative;
    overflow: hidden;
}
.age-card:hover {
    transform: translateY(-6px);
    border-color: rgba(244, 195, 107, 0.35);
    box-shadow: var(--sh-card), var(--sh-gold);
}
.age-card__num {
    font-family: var(--font-display);
    font-size: 60px;
    line-height: 1;
    background: linear-gradient(135deg, #F4C36B 0%, #FF6BC1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
}
.age-card__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--c-cream);
    letter-spacing: -0.015em;
}
.age-card__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--c-text-soft);
    font-size: 14.8px;
}
.age-card__list li { padding-left: 20px; position: relative; }
.age-card__list li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-gold);
    box-shadow: 0 0 12px rgba(244, 195, 107, 0.6);
}
@media (min-width: 720px) { .ages__grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } .ages { padding: 100px 0; } }

/* =============================== FORMATS =============================== */
.formats { padding: 70px 0; }
.formats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.format-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 170px;
    transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.format-card:hover {
    transform: translateY(-4px);
    background: var(--c-card-2);
    border-color: rgba(244, 195, 107, 0.4);
}
.format-card__badge {
    align-self: flex-start;
    background: rgba(244, 195, 107, 0.18);
    border: 1px solid rgba(244, 195, 107, 0.4);
    color: var(--c-gold);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 999px;
    font-family: var(--font-display);
}
.format-card__badge--accent {
    background: linear-gradient(135deg, #A864F8 0%, #FF6BC1 100%);
    color: var(--c-cream);
    border-color: transparent;
}
.format-card__text { color: var(--c-text-soft); font-size: 14.5px; line-height: 1.6; }
.format-card--accent {
    background: linear-gradient(135deg, rgba(168, 100, 248, 0.18), rgba(255, 107, 193, 0.08));
    border-color: rgba(168, 100, 248, 0.32);
}

@media (min-width: 720px)  { .formats__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .formats__grid { grid-template-columns: repeat(5, 1fr); } .formats { padding: 100px 0; } }

/* =============================== PRICING =============================== */
/* Адаптивная сетка тарифов (mobile-first):
   - < 640px : одна колонка, ужатые отступы;
   - >= 640px : две колонки, карточки сохраняют комфортную ширину;
   - >= 1024px: три колонки в один ряд;
   - размеры внутри карточки тянутся через clamp(), чтобы между брейкпоинтами
     не возникало «сжатого» состояния, как было раньше при прыжке 1 → 3. */
.pricing { padding: 56px 0; }
.pricing__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.plan-card {
    position: relative;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: clamp(22px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
    /* overflow: hidden НЕ ставим, иначе обрезается ribbon «Лучшая цена».
       Псевдо-::before получает border-radius: inherit, чтобы не торчать за углы. */
}
.plan-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(168, 100, 248, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
    pointer-events: none;
    border-radius: inherit;
}
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--sh-card-hi); border-color: rgba(168, 100, 248, 0.4); }
.plan-card:hover::before { opacity: 1; }

.plan-card--featured {
    background:
        radial-gradient(closest-side at 50% -10%, rgba(168, 100, 248, 0.3), transparent 70%),
        linear-gradient(180deg, var(--c-card-2) 0%, var(--c-card) 100%);
    border-color: rgba(168, 100, 248, 0.6);
    box-shadow: 0 18px 60px rgba(168, 100, 248, 0.25);
}

/* Ленточка центрируется относительно карточки — стабильно смотрится
   на любой ширине и не «уезжает» на узких колонках. */
.plan-card__ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #A864F8 0%, #FF6BC1 100%);
    color: var(--c-cream);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(168, 100, 248, 0.4);
    font-family: var(--font-display);
    white-space: nowrap;
}

.plan-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    row-gap: 8px;
}
.plan-card__name {
    font-size: clamp(20px, 2.2vw, 24px);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--c-cream);
    letter-spacing: -0.015em;
    margin: 0;
}
.plan-card__discount {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 107, 193, 0.22);
    color: #FFB3DC;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(255, 107, 193, 0.4);
    font-family: var(--font-display);
    white-space: nowrap;
}

.plan-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0;
}
.plan-card__amount {
    font-family: var(--font-display);
    font-size: clamp(32px, 5.2vw, 44px);
    color: var(--c-cream);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}
.plan-card__period { color: var(--c-text-muted); font-size: 14px; }
.plan-card__description {
    color: var(--c-text-soft);
    font-size: 14.8px;
    line-height: 1.6;
    margin: 0;
}
.plan-card__features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--c-text-dim);
    font-size: 14.8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.plan-card__features li { padding-left: 26px; position: relative; }
.plan-card__features li::before {
    content: '';
    position: absolute;
    left: 0; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(168, 100, 248, 0.18);
    border: 1px solid rgba(168, 100, 248, 0.45);
}
.plan-card__features li::after {
    content: '';
    position: absolute;
    left: 4px; top: 9px;
    width: 8px; height: 5px;
    border-left: 2px solid var(--c-violet);
    border-bottom: 2px solid var(--c-violet);
    transform: rotate(-45deg);
}

/* margin-top:auto прижимает CTA вниз — кнопки во всех карточках выровнены,
   даже если описания разной длины (вместо хрупкого min-height на тексте). */
.plan-card__cta {
    margin-top: auto;
    align-self: stretch;
    text-align: center;
    flex-wrap: wrap;
}
.plan-card__cta-text { white-space: normal; }

.pricing__note {
    margin: 28px auto 0;
    color: var(--c-text-muted);
    font-size: 13.5px;
    text-align: center;
    max-width: 820px;
    line-height: 1.7;
}

/* Планшеты: две колонки. minmax(0, 1fr) защищает от выпирания длинного
   контента за пределы колонки. */
@media (min-width: 640px) {
    .pricing__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Десктоп: классические три колонки в одну линию. */
@media (min-width: 1024px) {
    .pricing { padding: 100px 0; }
    .pricing__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
    .pricing__note { margin-top: 36px; }
}

/* =============================== FAQ =============================== */
.faq { padding: 70px 0 90px; }
.faq__list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.faq-item[open] {
    background: var(--c-card-2);
    border-color: rgba(168, 100, 248, 0.45);
    box-shadow: 0 8px 30px rgba(168, 100, 248, 0.12);
}
.faq-item__question {
    list-style: none;
    cursor: pointer;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--c-cream);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item__icon {
    color: var(--c-violet);
    transition: transform var(--t-base) var(--ease);
    display: inline-flex;
    flex-shrink: 0;
    width: 32px; height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(168, 100, 248, 0.12);
    border: 1px solid rgba(168, 100, 248, 0.3);
}
.faq-item[open] .faq-item__icon { transform: rotate(180deg); }
.faq-item__answer {
    padding: 0 24px 22px;
    color: var(--c-text-soft);
    font-size: 15px;
    line-height: 1.65;
    animation: faq-fade-in 0.35s var(--ease);
}
@keyframes faq-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (min-width: 900px) { .faq { padding: 100px 0 110px; } }

/* =============================== FINAL CTA =============================== */
.final-cta {
    position: relative;
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
}
.final-cta__bg {
    position: absolute;
    /* центр градиентов уходит за пределы секции — края «купола» не обрываются */
    inset: -15% -10%;
    z-index: -1;
    background:
        radial-gradient(700px 500px at 50% -20%,  rgba(168, 100, 248, 0.32), transparent 70%),
        radial-gradient(900px 600px at 50% 120%,  rgba(255, 107, 193, 0.20), transparent 70%);
    mix-blend-mode: screen;
    pointer-events: none;
}
.final-cta__container { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 720px; }
.final-cta__title {
    font-size: clamp(30px, 4.6vw, 50px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.022em;
}
.final-cta__lead { color: var(--c-text-dim); font-size: clamp(16px, 1.7vw, 18px); line-height: 1.6; }
.final-cta__note { color: var(--c-text-muted); font-size: 13.5px; }

/* =============================== Coming-soon / errors =============================== */
.coming-soon { padding: 140px 0; text-align: center; position: relative; z-index: 1; }
.coming-soon__container { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 620px; }
.coming-soon__eyebrow {
    color: var(--c-violet);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.18em;
    font-weight: 800;
    font-family: var(--font-display);
}
.coming-soon__title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.022em;
}
.coming-soon__lead { color: var(--c-text-dim); font-size: 16px; line-height: 1.6; }

/* =============================== Очень узкие экраны (<= 380px) =============================== */
/*
   На ~320–360px (iPhone SE 1-го поколения, старые Android, Galaxy Fold в
   сложенном виде и т.п.) часть блоков переставала помещаться в ширину
   экрана:
   - Кнопки-CTA с длинным русским текстом («Попробовать 3 дня бесплатно»,
     «Начать бесплатный период») имеют `white-space: nowrap` от базового
     `.button` и были шире 290px → правый край с закругленным углом
     обрезался body { overflow-x: hidden }.
   - Сетки .formats__grid и .ages__grid сохраняли 2/3 колонки и текст
     рвался по одному слову на строку.
   - Контейнеры дышали 20px паддингом с каждого края — это съедало 40px
     и так дефицитной ширины.

   Здесь точечно ослабляем эти ограничения только для самых узких устройств.
*/
@media (max-width: 380px) {
    .container { padding-inline: 16px; }

    /* HERO */
    .hero__container { padding-left: 16px; padding-right: 16px; }
    .hero__actions { gap: 10px; }
    .hero__actions .button {
        /* Растягиваем кнопку на всю ширину колонки и разрешаем перенос
           длинного русского текста — клип «справа» исчезает. */
        width: 100%;
        white-space: normal;
        padding-left: 18px;
        padding-right: 18px;
        text-align: center;
        line-height: 1.2;
    }
    .hero__proof { gap: 14px; padding: 14px 16px; }
    .hero__proof-divider { display: none; }

    /* FORMATS — две колонки на 330px дают по 90px текстовой ширины,
       слова ломаются по одному на строку. На очень узких экранах
       логичнее 1 колонка. */
    .formats__grid { grid-template-columns: 1fr; }
    .format-card { min-height: 0; padding: 20px; }

    /* PLAN CARDS — ленточка «Лучшая цена» нет смысла менять, но
       внутренний паддинг ужмём, чтобы фичи не упирались в края. */
    .plan-card { padding: 20px; }

    /* FAQ — уменьшаем паддинги, чтобы длинные вопросы не упирались в иконку. */
    .faq-item__question { padding: 18px 18px; gap: 12px; font-size: 16px; }
    .faq-item__answer   { padding: 0 18px 18px; }

    /* FINAL CTA — та же история, что и в hero: длинная кнопка nowrap. */
    .final-cta { padding: 70px 0; }
    .final-cta .button--xl {
        width: 100%;
        white-space: normal;
        padding-left: 22px;
        padding-right: 22px;
        line-height: 1.2;
    }
}

/* =============================== AOS-кастомизация =============================== */
[data-aos] { will-change: transform, opacity; }

/* Лёгкая собственная анимация для блока, который должен «спокойно вплыть» */
@media (prefers-reduced-motion: reduce) {
    .float-soft { animation: none !important; }
    .hero__eyebrow-dot { animation: none !important; }
}
