/*
 * «О нас» в стиле Bulvar Mall — те же данные, другая подача:
 * первый экран с фото в косом срезе 22,5°, бегущая лента фото в рамках-параллелограммах,
 * цифры с полосками четырёх фирменных цветов, преимущества — нумерованный список с закреплённым заголовком.
 * Подключается только на этой странице (block extra_css), после общих стилей.
 */

.about-page {
    --muted: #6B6C72;
    --line: #DCDCE0;

    overflow-x: clip; /* не hidden — иначе ломается sticky у заголовка преимуществ */
}

/* цвета по порядку: зелёный, голубой, оранжевый, фиолетовый */
.about-facts__item:nth-child(4n+1),
.about-numbers__item:nth-child(4n+1),
.about-adv__item:nth-child(4n+1) { --c: var(--brand-green); }
.about-facts__item:nth-child(4n+2),
.about-numbers__item:nth-child(4n+2),
.about-adv__item:nth-child(4n+2) { --c: var(--brand-blue); }
.about-facts__item:nth-child(4n+3),
.about-numbers__item:nth-child(4n+3),
.about-adv__item:nth-child(4n+3) { --c: var(--brand-orange); }
.about-facts__item:nth-child(4n+4),
.about-numbers__item:nth-child(4n+4),
.about-adv__item:nth-child(4n+4) { --c: var(--brand-purple); }

/* ---------- первый экран ---------- */
.about-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 64px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 72px;
}

.about-hero .page-title {
    margin: 0;
}

.about-hero__lead {
    max-width: 560px;
    margin-top: 20px;
    font-size: 19px;
    line-height: 1.55;
    color: var(--brand-graphite);
}

.about-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
    margin: 40px 0 0;
}

.about-facts__item {
    position: relative;
}

/* иконка факта — в квадрате с лёгкой заливкой цвета факта */
.about-facts__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 13%, #FFFFFF);
    border-radius: var(--radius);
}

.about-facts__icon svg {
    width: 24px;
    height: 24px;
}

.about-facts dt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    color: var(--brand-graphite);
}

.about-facts dd {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--muted);
}

/* фото в срезе «\», за ним фиолетовая плоскость, слева параллельная зелёная полоса */
.about-hero__visual {
    position: relative;
    aspect-ratio: 9 / 7;
}

.about-hero__photo,
.about-hero__plane {
    position: absolute;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 32.2% 100%);
}

.about-hero__photo {
    inset: 0;
    z-index: 2;
}

.about-hero__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-hero__plane {
    top: 8%;
    right: -5%;
    bottom: -8%;
    left: 5%;
    z-index: 1;
    background: var(--brand-purple);
}

.about-hero__stripe {
    position: absolute;
    top: 0;
    left: -30px;
    z-index: 3;
    width: 12px;
    height: 100%;
    background: var(--brand-green);
    transform-origin: 0 0;
    transform: skewX(22.5deg);
}

/* ---------- лента фотографий ---------- */
.about-strip {
    padding: 8px 0 var(--section-y);
}

.about-strip__track {
    display: flex;
    width: max-content;
}

.about-strip__set {
    display: flex;
    gap: 20px;
    padding-right: 20px;
}

.about-strip__item {
    position: relative;
    flex: none;
    display: block;
    width: 380px;
    height: 280px;
    overflow: hidden;
    transform: skewX(22.5deg);
}

.about-strip__item picture,
.about-strip__item img {
    display: block;
    height: 100%;
}

.about-strip__item img {
    width: calc(100% + 130px);
    margin-left: -65px;
    object-fit: cover;
    transform: skewX(-22.5deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-strip__item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(53, 54, 58, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.about-strip__item:hover img {
    transform: skewX(-22.5deg) scale(1.06);
}

.about-strip__item:hover::after {
    opacity: 1;
}

/* ---------- цифры ---------- */
.about-numbers {
    padding: var(--section-y) 0;
    background: #FFFFFF;
}

.about-numbers__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
}

.about-numbers__head .page-title {
    margin: 0;
}

.about-numbers__head p {
    justify-self: end;
    max-width: 520px;
    font-size: var(--lead);
    line-height: 1.5;
    color: var(--muted);
}

.about-numbers__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.about-numbers__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 24px;
    border-top: 4px solid var(--c);
}

.about-numbers__value {
    font-size: 64px;
    font-weight: 300;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--brand-graphite);
}

.about-numbers__label {
    font-size: 16px;
    color: var(--muted);
}

/* ---------- преимущества ---------- */
.about-adv {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 64px;
    align-items: start;
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.about-adv__head {
    position: sticky;
    top: 120px;
}

.about-adv__head .page-title {
    margin: 0;
}

.about-adv__head p {
    max-width: 420px;
    margin-top: 16px;
    font-size: var(--lead);
    line-height: 1.5;
    color: var(--muted);
}

.about-adv__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.about-adv__item {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 24px;
    padding: 26px 24px 26px 0;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s, padding-left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* цветная полоса слева вырастает при наведении */
.about-adv__item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--c);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-adv__item:hover {
    padding-left: 24px;
    background: #FFFFFF;
}

.about-adv__item:hover::before {
    transform: scaleY(1);
}

.about-adv__num {
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    color: var(--brand-graphite);
    transition: color 0.3s;
}

.about-adv__item:hover .about-adv__num {
    color: var(--c);
}

.about-adv__item h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--brand-graphite);
}

.about-adv__item p {
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- адаптив ---------- */
@media screen and (max-width: 1280px) {
    .about-hero {
        gap: 40px;
    }

    .about-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-numbers__value {
        font-size: 52px;
    }

    .about-adv {
        gap: 40px;
    }
}

@media screen and (max-width: 992px) {
    .about-hero {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 32px;
        padding-bottom: 48px;
    }

    .about-hero__visual {
        margin: 0 5% 8% 30px;
    }

    .about-numbers__head,
    .about-adv {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-numbers__head p {
        justify-self: start;
    }

    .about-numbers__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
    }

    .about-adv__head {
        position: static;
    }
}

@media screen and (max-width: 768px) {
    .about-hero,
    .about-adv {
        padding-left: 16px;
        padding-right: 16px;
    }

    .about-hero__lead {
        font-size: 16px;
    }

    .about-facts {
        gap: 20px 16px;
        margin-top: 28px;
    }

    .about-facts dt {
        gap: 10px;
        font-size: 22px;
    }

    .about-facts__icon {
        width: 38px;
        height: 38px;
    }

    .about-facts__icon svg {
        width: 21px;
        height: 21px;
    }

    .about-strip__item {
        width: 260px;
        height: 190px;
    }

    .about-strip__item img {
        width: calc(100% + 90px);
        margin-left: -45px;
    }

    .about-numbers__grid {
        margin-top: 32px;
    }

    .about-numbers__value {
        font-size: 40px;
    }

    .about-adv__item {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px;
        padding: 20px 0;
    }

    .about-adv__item:hover {
        padding-left: 16px;
    }

    .about-adv__num {
        font-size: 24px;
    }

    .about-adv__item h3 {
        font-size: 18px;
    }
}

/* ---------- анимации ---------- */
@keyframes about-wipe {
    from { clip-path: polygon(0 0, 0 0, 32.2% 100%, 32.2% 100%); }
}

@keyframes about-plane {
    from { opacity: 0; translate: 48px 24px; }
}

@keyframes about-stripe {
    from { transform: skewX(22.5deg) scaleY(0); }
}

@keyframes about-marquee {
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: no-preference) {
    .about-hero__photo {
        animation: about-wipe 1s 0.15s cubic-bezier(0.6, 0, 0.2, 1) both;
    }

    .about-hero__plane {
        animation: about-plane 0.9s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .about-hero__stripe {
        animation: about-stripe 0.6s 0.85s cubic-bezier(0.6, 0, 0.3, 1) both;
    }

    .about-hero__text > .page-title,
    .about-hero__lead {
        animation: bm-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .about-hero__lead {
        animation-delay: 0.1s;
    }

    .about-facts__item {
        animation: bm-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    .about-facts__item:nth-child(1) { animation-delay: 0.25s; }
    .about-facts__item:nth-child(2) { animation-delay: 0.32s; }
    .about-facts__item:nth-child(3) { animation-delay: 0.39s; }
    .about-facts__item:nth-child(4) { animation-delay: 0.46s; }
    .about-facts__item:nth-child(n+5) { animation-delay: 0.53s; }

    /* лента едет по кругу (два одинаковых набора), на наведении останавливается */
    .about-strip__track {
        animation: about-marquee 50s linear infinite;
    }

    .about-strip:hover .about-strip__track {
        animation-play-state: paused;
    }
}

/* без анимаций ленту можно прокрутить вручную */
@media (prefers-reduced-motion: reduce) {
    .about-strip {
        overflow-x: auto;
    }

    .about-strip__set[aria-hidden="true"] {
        display: none;
    }
}
