/* =============================================
   Parser Landing — Design Tokens & Base Styles
   Namespace: .parser-landing
   ============================================= */

/* --- CSS-переменные (дизайн-токены из Figma) --- */
.parser-landing {
    /* Цвета */
    --cl-bg-page:      #EBF3FF;
    --cl-white:        #FFFFFF;
    --cl-headline:     #262A30;
    --cl-headline-dark:#292E36;
    --cl-body:         #404651;
    --cl-brand:        #226EE0;
    --cl-orange:       #FC9722;
    --cl-tool-bg:      #DFECFF;
    --cl-border:       #DDE2EB;
    --cl-border-light: #D1E0F7;
    --cl-icon-bg:      rgba(34, 110, 224, 0.1);
    --cl-light-gray:   #F5F5F5;
    --cl-dark:         #2A2C38;
    --cl-btn-text:     #FFFFFF;

    /* Градиенты */
    --grad-whatis:  radial-gradient(circle at 112% 110%, rgba(195, 216, 248, 1) 0%, rgba(255, 255, 255, 1) 100%);
    --grad-promo:   radial-gradient(circle at 91% 12%, rgba(34, 110, 224, 1) 4%, rgba(64, 140, 255, 1) 100%);
    --grad-cta:     radial-gradient(circle at 100% 0%, rgba(34, 110, 224, 1) 4%, rgba(64, 140, 255, 1) 100%);
    --grad-usecase: radial-gradient(circle at 100% 100%, rgba(226, 237, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

/* --- Убрать стандартный padding OneUI и скрыть dev/support панели --- */
.parser-landing-page .content.page-content {
    padding: 0 !important;
}

.parser-landing-page .dev-panel,
.parser-landing-page .support-panel,
.parser-landing-page .widget-vk2 {
    display: none !important;
}

/* --- Базовый контейнер --- */
.parser-landing {
    background: var(--cl-bg-page);
    font-family: 'Inter', sans-serif;
    color: var(--cl-body);
    box-sizing: border-box;
    min-height: 100%;
}

.parser-landing *,
.parser-landing *::before,
.parser-landing *::after {
    box-sizing: border-box;
}

.parser-landing img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Сброс margin от OneUI --- */
.parser-landing p,
.parser-landing h1,
.parser-landing h2,
.parser-landing h3 {
    margin: 0;
}

/* --- Главный контейнер --- */
.pl-blocks {
    display: flex;
    flex-direction: column;
    gap: 80px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Общий заголовок секции --- */
.pl-section-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.1em;
    text-align: center;
    color: var(--cl-headline-dark);
    margin: 0;
    width: 100%;
}

/* --- Кнопки --- */
.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.pl-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.pl-btn--primary {
    background: var(--cl-brand);
    color: var(--cl-btn-text);
    padding: 24px 32px;
    border-radius: 16px;
}

.pl-btn--orange {
    background: var(--cl-orange);
    color: var(--cl-btn-text);
    font-size: 16px;
    line-height: 1.2em;
    padding: 12px 16px;
    border-radius: 16px;
}

/* =============================================
   SECTION 1 — HERO
   ============================================= */

.pl-hero {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(20px, 6%, 78px);
    padding-top: 42px;
}

.pl-hero__text {
    flex: 1 1 0;
    min-width: 0;
    padding-top: 34px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pl-hero__title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 3vw, 40px);
    line-height: 1.1em;
    color: var(--cl-headline-dark);
    margin: 0;
    overflow-wrap: break-word;
}

.pl-hero__title-accent {
    color: var(--cl-brand);
}

.pl-hero__subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4em;
    color: var(--cl-body);
    margin: 0;
}

.pl-hero__text .pl-btn--primary {
    align-self: flex-start;
}

.pl-hero__img {
    flex: 1 1 0;
    max-width: 509px;
    aspect-ratio: 509 / 484;
}

.pl-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =============================================
   SECTION 2 — «Что такое Поиск ЦА»
   ============================================= */

.pl-whatis {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 348px;
    background: var(--grad-whatis);
    border-radius: 64px;
    overflow: hidden;
}

.pl-whatis__text {
    flex: 6 1 0;
    min-width: 0;
    padding: 64px 0 64px 64px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.pl-whatis__title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.1em;
    color: var(--cl-headline-dark);
    margin: 0;
}

.pl-whatis__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4em;
    color: var(--cl-body);
    margin: 0;
}

.pl-whatis__img {
    flex: 5 1 0;
    padding: 40px 40px 0 29px;
    position: relative;
    overflow: hidden;
    /* Декоративный Union (node 649:1565, Figma) — геометрический паттерн с градиентом */
    background-image: url('/template/app/img/landing/whatis_union.svg');
    background-repeat: no-repeat;
    background-position: right 0 top 0;
    background-size: auto 100%;
}

.pl-whatis__img img {
    position: relative;
    z-index: 1;
    width: min(441px, 100%);
    aspect-ratio: 441 / 268;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0px 8px 16px 0px rgba(18, 42, 69, 0.25);
}

/* =============================================
   SECTION 3 — ПРЕИМУЩЕСТВА
   ============================================= */

.pl-advantages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.pl-adv-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.pl-adv-card {
    flex: 1 1 300px;
    min-width: 0;
    background: var(--cl-white);
    border-radius: 40px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Зазор иконка ↔ текст на всех ширинах (при auto-height без gap блоки слипаются) */
    gap: 16px;
}

.pl-adv-card__icon {
    width: 64px;
    height: 64px;
    background: var(--cl-icon-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pl-adv-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pl-adv-card__title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4em;
    color: var(--cl-body);
    margin: 0;
}

.pl-adv-card__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4em;
    color: var(--cl-body);
    margin: 0;
}

.pl-adv-card--promo {
    flex: 1 1 300px;
    min-width: 0;
    background: var(--grad-promo);
    border-radius: 40px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    container-type: inline-size;
    container-name: pl-adv-promo;
}

.pl-adv-card__icon--promo {
    background: #ffffff;
}


.pl-adv-card__promo-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
}

.pl-adv-card__promo-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2em;
    color: var(--cl-btn-text);
    margin: 0;
}

/* Обводка path.svg под словом «Бесплатный» */
.pl-promo-highlight {
    position: relative;
    display: inline-block;
}

.parser-landing .pl-promo-underline {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    width: 172px;
    max-width: none;
    height: auto;
    pointer-events: none;
}

.pl-adv-card__promo-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4em;
    color: var(--cl-btn-text);
    margin: 0;
}

.pl-adv-card--promo .pl-btn--orange {
    align-self: flex-start;
    margin-top: auto;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
}

.pl-adv-promo-btn__short {
    display: none;
}

/* Узкая карточка: убираем «бесплатно» в подписи кнопки, заголовок не меняем */
@container pl-adv-promo (max-width: 300px) {
    .pl-adv-promo-btn__full {
        display: none;
    }

    .pl-adv-promo-btn__short {
        display: inline;
    }
}

/* =============================================
   SECTION 4 — ЧЕМ ПОЛЕЗЕН БИЗНЕСУ
   ============================================= */

.pl-usecases {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.pl-uc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 24px;
    width: 100%;
}

.pl-uc-card {
    position: relative;
    overflow: hidden;
}

/* Строка 1: заголовок на всю ширину; строка 2: описание | превью */
.pl-uc-card:not(.pl-uc-card--cta) {
    height: auto;
    background: var(--grad-usecase);
    border: 2px solid var(--cl-border-light);
    border-radius: 40px;
    padding: 32px 16px 16px 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    /* Вторая строка забирает лишнюю высоту при выравнивании карточек в ряду — иначе растягивается и заголовок */
    grid-template-rows: auto 1fr;
    row-gap: 12px;
    column-gap: 0;
    align-items: stretch;
    container-type: inline-size;
    container-name: pl-uc;
}

.pl-uc-card__title {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: start;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.2;
    color: var(--cl-headline-dark);
}

.pl-uc-card__text {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    max-width: min(318px, 100%);
    align-self: start;
    padding: 0;
    box-sizing: border-box;
}

.pl-uc-card__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    color: var(--cl-body);
    margin: 0;
}

.pl-uc-card__img {
    grid-column: 2;
    grid-row: 2;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    align-self: end;
    justify-self: end;
}

.pl-uc-card__img img {
    display: block;
    width: 120px;
    height: 108px;
    object-fit: contain;
    object-position: center bottom;
}

/* Узкая карточка: текст и превью в одну колонку */
@container pl-uc (max-width: 431px) {
    .pl-uc-card:not(.pl-uc-card--cta) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        row-gap: 12px;
    }

    .pl-uc-card__title {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        padding: 0;
    }

    .pl-uc-card__text {
        grid-column: 1;
        grid-row: 2;
        max-width: 100%;
        padding: 0;
        margin-bottom: 0;
    }

    .pl-uc-card__img {
        grid-column: 1;
        grid-row: 3;
        width: max-content;
        max-width: 100%;
        justify-self: end;
        align-self: end;
        padding: 0;
    }

    .pl-uc-card__img img {
        width: 120px;
        height: 108px;
        object-fit: contain;
        object-position: center bottom;
    }
}

/* Плитка use_union — справа, через ::before с opacity (градиент и текст без изменений) */
.pl-uc-card--cta {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 32px 16px 16px 32px;
    container-type: inline-size;
    container-name: pl-uc;
    background-color: transparent;
    background-image:
        url('/template/app/img/landing/use_union.svg'),
        var(--grad-cta);
    background-repeat: no-repeat, no-repeat;
    background-size: auto 102%, 100% 100%;
    background-position: right center, 0 0;
    border: none;
    border-radius: 40px;
    justify-content: flex-start;
    gap: 12px;
}

.pl-uc-card__cta-title {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
    color: var(--cl-btn-text);
    max-width: 26em;
}

.pl-uc-card__cta-desc {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    color: var(--cl-btn-text);
    max-width: 22.5em;
}

.pl-uc-card--cta .pl-btn--orange {
    margin-top: auto;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: auto;
    align-self: flex-end;
    font-size: 16px;
    padding: 16px 20px;
}

/* Как у соседних карточек: картинка под текстом при ширине ячейки ≤431px */
@container pl-uc (max-width: 431px) {
    .pl-uc-card--cta .pl-btn--orange {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-self: stretch;
        margin-left: 0;
        justify-content: center;
    }
}

/* =============================================
   SECTION 5 — ПОПУЛЯРНЫЕ ИНСТРУМЕНТЫ
   ============================================= */

.pl-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.pl-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 246px), 1fr));
    grid-auto-rows: minmax(154px, auto);
    gap: 20px;
    width: 100%;
}

.pl-tool-card {
    min-width: 0;
    position: relative;
    background: var(--cl-tool-bg);
    border: 2px solid var(--cl-border-light);
    border-radius: 24px;
    padding: 20px 24px 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 0.2s;
}

.pl-tool-card__icon-go {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 14px;
    height: 14px;
    max-width: 14px;
    flex-shrink: 0;
    pointer-events: none;
}

.pl-tool-card:hover {
    border-color: var(--cl-brand);
    text-decoration: none;
    color: inherit;
}

.pl-tool-card__cat {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2em;
    color: var(--cl-headline);
    display: block;
    margin-bottom: 4px;
    padding-right: 22px;
}

.pl-tool-card__item {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2em;
    color: var(--cl-body);
    display: block;
    background: url('/template/app/img/landing/vector_level.svg') no-repeat 3px 0.35em;
    background-size: 14px 10px;
}

/* img, __cat, уровни: каждый следующий — на 1.5em правее, текст визуально под буквой строки выше */
.pl-tool-card > .pl-tool-card__item:nth-child(3) {
    padding-left: 1.5em;
    background-position: 2px 0.35em;
}

.pl-tool-card > .pl-tool-card__item:nth-child(4) {
    margin-top: 2px;
    padding-left: calc(1.5em + 1.5em);
    background-position: calc(2px + 1.5em) 0.35em;
}

.pl-tool-card > .pl-tool-card__item:nth-child(5) {
    margin-top: 2px;
    padding-left: calc(1.5em + 2 * 1.5em);
    background-position: calc(2px + 2 * 1.5em) 0.35em;
}

.pl-tool-card__url {
    margin-top: auto;
    padding-top: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.35em;
    color: var(--cl-brand);
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pl-tool-card--cta {
    align-items: center;
    justify-content: center;
    cursor: default;
}

.pl-tool-card--cta:hover {
    border-color: var(--cl-border-light);
}

.pl-tool-card--cta .pl-btn--primary {
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 8px;
}

/* =============================================
   SECTION 6 — FAQ
   ============================================= */

.pl-faq {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    padding-bottom: 80px;
}

.pl-faq__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pl-faq__item {
    background: var(--cl-white);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    cursor: pointer;
    user-select: none;
}

.pl-faq__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 24px 32px 24px 40px;
}

.pl-faq__question {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4em;
    color: var(--cl-headline);
    flex: 1;
}

.pl-faq__arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--cl-brand);
    border-radius: 50%;
}

.pl-faq__arrow::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--cl-white);
    border-bottom: 2px solid var(--cl-white);
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease, margin 0.2s ease;
}

.pl-faq__item.is-open .pl-faq__arrow::before {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.pl-faq__answer {
    display: none;
    padding: 0 40px 24px;
}

.pl-faq__answer p {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4em;
    color: var(--cl-body);
    margin: 0;
}
