/* pages/static/pages/css/shop_frontend/introduction.css */
/* Уникальные стили страницы «Предисловие».
   Всё общее (.hero, section, .callout, .lead, .feature-list) — в shop_general.css. */

/* ============================================================
   LAYERS GRID — «Из чего состоит визуализация»
   ============================================================ */
.layers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.layer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 20px 18px;
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    transition: transform 0.25s ease, box-shadow 0.25s ease,
                background-color 0.35s ease, border-color 0.35s ease;
}

.layer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--accent);
}

.layer-card__icon {
    grid-row: 1 / 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.layer-card__title {
    grid-column: 2;
    font-weight: 700;
    color: var(--text-heading);
    font-size: 1.02rem;
    align-self: end;
    transition: color 0.35s ease;
}

.layer-card__text {
    grid-column: 2;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted);
    transition: color 0.35s ease;
}

/* ============================================================
   FUNNEL BLOCK
   ============================================================ */
.funnel-block {
    margin: 28px 0;
    padding: 28px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.funnel-block h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: var(--text-heading);
    transition: color 0.35s ease;
}

.funnel-block > p {
    margin: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
    transition: color 0.35s ease;
}

/* ============================================================
   FUNNEL — визуальная воронка
   ============================================================ */
.funnel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 8px 0 24px;
}

.funnel__step {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.funnel__bar {
    position: relative;
    height: 64px;
    background: var(--bg-elevated);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
    transition: background-color 0.35s ease;
    cursor: default;
}

/* Ширина каждой полосы — форма воронки */
.funnel__step--1 .funnel__bar { width: 100%; }
.funnel__step--2 .funnel__bar { width: 82%; }
.funnel__step--3 .funnel__bar { width: 64%; }
.funnel__step--4 .funnel__bar { width: 46%; }
.funnel__step--5 .funnel__bar { width: 30%; }

.funnel__bar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

/* Градиенты — от синего к зелёному */
.funnel__step--1 .funnel__bar::before {
    background: linear-gradient(90deg, #6c8cff 0%, #8aa6ff 100%);
}

.funnel__step--2 .funnel__bar::before {
    background: linear-gradient(90deg, #5ba6e0 0%, #6c8cff 100%);
}

.funnel__step--3 .funnel__bar::before {
    background: linear-gradient(90deg, #4ac0b8 0%, #5ba6e0 100%);
}

.funnel__step--4 .funnel__bar::before {
    background: linear-gradient(90deg, #3dd68c 0%, #4ac0b8 100%);
}

.funnel__step--5 .funnel__bar::before {
    background: linear-gradient(90deg, #22c55e 0%, #3dd68c 100%);
}

/* Hover — подсветка и лёгкий подъём */
.funnel__step:hover .funnel__bar {
    transform: translateY(-2px);
}

.funnel__step:hover .funnel__bar::before {
    filter: brightness(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Внутренний layout полосы — контент по центру */
.funnel__label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    padding: 0 20px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.funnel__icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.funnel__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.funnel__percent {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 4px;
}

.funnel__hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    transition: color 0.35s ease;
    font-style: italic;
    padding: 0 10px;
}

/* Анимация появления */
@keyframes funnel-fill {
    from {
        transform: scaleX(0);
        transform-origin: left;
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
        opacity: 1;
    }
}

.funnel__bar::before {
    animation: funnel-fill 0.8s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
}

.funnel__step--1 .funnel__bar::before { animation-delay: 0.10s; }
.funnel__step--2 .funnel__bar::before { animation-delay: 0.25s; }
.funnel__step--3 .funnel__bar::before { animation-delay: 0.40s; }
.funnel__step--4 .funnel__bar::before { animation-delay: 0.55s; }
.funnel__step--5 .funnel__bar::before { animation-delay: 0.70s; }

/* ============================================================
   GUIDE BLOCK
   ============================================================ */
.guide-block {
    margin: 32px 0 8px;
    padding: 26px 24px;
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
    border: 1px dashed var(--border-strong);
    border-radius: 16px;
    transition: background 0.35s ease, border-color 0.35s ease;
}

.guide-block h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: var(--text-heading);
    transition: color 0.35s ease;
}

.guide-block > p {
    margin: 0 0 16px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-primary);
    transition: color 0.35s ease;
}

.guide-block .feature-list {
    margin-bottom: 18px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 900px) {
    .layers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .funnel-block,
    .guide-block {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .funnel__bar {
        height: 52px;
    }

    .funnel__label {
        padding: 0 12px;
        gap: 8px;
        font-size: 0.86rem;
    }

    .funnel__icon {
        font-size: 1.05rem;
    }

    .funnel__percent {
        font-size: 0.72rem;
        padding: 3px 8px;
        margin-left: 0;
    }

    .funnel__hint {
        font-size: 0.75rem;
    }

    /* На мобильных пропорции мягче */
    .funnel__step--1 .funnel__bar { width: 100%; }
    .funnel__step--2 .funnel__bar { width: 88%; }
    .funnel__step--3 .funnel__bar { width: 74%; }
    .funnel__step--4 .funnel__bar { width: 60%; }
    .funnel__step--5 .funnel__bar { width: 46%; }

    .layer-card {
        grid-template-columns: 40px 1fr;
        column-gap: 12px;
        padding: 16px;
    }

    .layer-card__icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}