.case-detail-page {
    --case-bg: #020712;
    --case-panel: #0a0f1e;
    --case-violet: #8d55ff;
    width: 100vw;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    flex: 0 0 100vw;
    overflow-x: clip;
    overflow-y: visible;
    color: #fff;
    background: var(--case-bg);
}

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

.content:has(.case-detail-page), body:has(.case-detail-page) {
    background: var(--case-bg, #020712);
}

.content:has(.case-detail-page) > .container {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.content:has(.case-detail-page) > .container > .row {
    margin-right: 0;
    margin-left: 0;
}

.case-detail-hero {
    position: relative;
    isolation: isolate;
    min-height: min(850px, 88vh);
    padding: clamp(48px, 7vw, 92px) 0 clamp(85px, 10vw, 140px);
    background: radial-gradient(circle at 82% 16%, rgba(103, 8, 199, .48), transparent 31%),
    radial-gradient(circle at 12% 90%, rgba(216, 66, 101, .23), transparent 30%),
    linear-gradient(180deg, #070c1a, #020712);
}

.case-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, #000, transparent 95%);
}

.case-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
    font-weight: 600;
}

.case-detail-back:hover {
    color: #fff;
    text-decoration: none;
}

.case-detail-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
    gap: clamp(45px, 7vw, 105px);
    align-items: center;
}

.case-detail-eyebrow {
    margin-bottom: 17px;
    color: #bca6ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.case-detail-hero h1 {
    margin: 0;
    color: #fff;
    font-size: 60px;
    font-weight: 650;
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.case-detail-lead {
    max-width: 690px;
    margin-top: 27px;
    color: rgba(255, 255, 255, .68);
    font-size: clamp(17px, 1.7vw, 21px);
    line-height: 1.6;
}

.case-detail-labels {
    display: flex;
    max-width: 650px;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 25px;
}

.case-detail-labels--visual {
    margin: 0 0 18px;
}

.case-detail-labels .case-label {
    max-width: 100%;
    min-height: 28px;
    padding: 5px 9px;
    color: rgba(255, 255, 255, .74);
    background: rgba(255, 255, 255, .055);
    border-color: rgba(255, 255, 255, .14);
    border-radius: 6px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.case-detail-labels .case-label img.case-label__icon {
    opacity: .7;
}

.case-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 35px;
}

.case-detail-button {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 51px;
    padding: 12px 19px;
    border-radius: 11px;
    background: linear-gradient(110deg, #6417e9, #a329b9);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(94, 19, 239, .25);
    text-decoration: none;
}

.case-detail-button:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.case-detail-button--ghost {
    border: 1px solid rgba(255, 255, 255, .17);
    background: rgba(255, 255, 255, .055);
    box-shadow: none;
}

.case-detail-hero__visual {
    position: relative;
    transform: translateY(clamp(-100px, -7vw, -62px));
}

.case-detail-hero__visual::before {
    content: "";
    position: absolute;
    inset: 8% -8% -10% 14%;
    border-radius: 50%;
    background: rgba(103, 8, 199, .25);
    filter: blur(65px);
}

.case-detail-hero__frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 17px;
    background: #101625;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .52);
    transform: perspective(1300px) rotateY(-4deg) rotateX(1.5deg);
}

.case-detail-hero__frame img {
    display: block;
    width: 100%;
    max-height: 610px;
    object-fit: contain;
    object-position: top center;
    background: #0b1020;
}

.case-detail-slider {
    --swiper-theme-color: #fff;
}

.case-detail-slider .swiper-slide {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #0b1020;
}

.case-detail-slider__zoom {
    display: block;
    width: 100%;
    cursor: zoom-in;
}

.case-detail-slider__arrow {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #fff;
    background: rgba(2, 7, 18, .72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
}

.case-detail-slider__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.case-detail-slider__arrow--prev {
    left: 14px;
}

.case-detail-slider__arrow--next {
    right: 14px;
}

.case-detail-slider__arrow span {
    font-size: 20px;
    line-height: 1;
}

.case-detail-slider__arrow::after, .case-detail-slider__arrow svg {
    display: none;
}

.case-detail-slider__pagination {
    --swiper-pagination-bottom: 14px;
}

.case-detail-slider__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #fff;
    opacity: .48;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.case-detail-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

.case-detail-technologies {
    position: relative;
    margin-top: 18px;
}

.case-detail-technologies__title {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.case-detail-technologies__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.case-detail-technologies__item {
    display: flex;
    min-width: 92px;
    min-height: 76px;
    max-width: 132px;
    flex: 1 1 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 9px;
    border: 1px solid rgba(232, 227, 240, .92);
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

.case-detail-technologies__item img {
    display: block;
    width: auto;
    max-width: 64px;
    height: 28px;
    object-fit: contain;
}

.case-detail-technologies__item strong {
    color: #352c50;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
}

.case-detail-content {
    position: relative;
    padding: clamp(85px, 11vw, 150px) 0;
    background: radial-gradient(circle at 90% 15%, rgba(103, 8, 199, .16), transparent 30%), #020712;
}

.case-detail-content__layout {
    display: grid;
    grid-template-columns: minmax(230px, .35fr) minmax(0, .65fr);
    gap: clamp(50px, 9vw, 140px);
    align-items: start;
}

.case-detail-content__aside {
    position: sticky;
    top: calc(var(--main-header-height, 90px) + 30px);
}

.case-detail-content__aside h2 {
    margin: 0;
    font-size: clamp(30px, 3.3vw, 45px);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.case-detail-toc[hidden] {
    display: none;
}

.case-detail-toc__nav {
    display: grid;
    gap: 4px;
    margin-top: 25px;
    padding-left: 13px;
    border-left: 1px solid rgba(255, 255, 255, .13);
}

.case-detail-toc.is-scrollable .case-detail-toc__nav {
    max-height: var(--case-toc-max-height);
    padding-right: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.case-detail-toc__link {
    position: relative;
    display: block;
    padding: 7px 0 7px 11px;
    color: rgba(255, 255, 255, .54);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    transition: color .2s ease, transform .2s ease;
    text-decoration: none;
}

.case-detail-toc__link::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: -14px;
    width: 2px;
    border-radius: 2px;
    background: transparent;
    transition: background-color .2s ease;
}

.case-detail-toc__link:hover,
.case-detail-toc__link.is-active {
    color: #fff;
    text-decoration: none;
    transform: translateX(3px);
}

.case-detail-toc__link.is-active::before {
    background: #9a55ff;
}

.case-detail-content__aside > a {
    display: inline-flex;
    gap: 10px;
    margin-top: 28px;
    color: #c7b6ff;
    font-weight: 700;
}

.case-detail-rich {
    min-width: 0;
    color: #e1e3ed;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.78;
}

.case-detail-rich > :first-child {
    margin-top: 0;
}

.case-detail-rich h2, .case-detail-rich h3, .case-detail-rich h4 {
    margin: 1.65em 0 .65em;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.case-detail-rich h2 {
    font-size: clamp(30px, 3vw, 42px);
    scroll-margin-top: calc(var(--main-header-height, 90px) + 28px);
}

.case-detail-rich h3 {
    font-size: clamp(23px, 2.3vw, 31px);
}

.case-detail-rich p {
    margin: 0 0 1.35em;
}

.case-detail-rich ul, .case-detail-rich ol {
    margin: 0 0 1.5em;
    padding-left: 1.3em;
}

.case-detail-rich li {
    margin-bottom: .55em;
}

.case-detail-rich a {
    color: #d4c7ff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.case-detail-rich strong,
.case-detail-rich b {
    color: #fff;
    font-weight: 700;
}

.case-detail-rich img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 38px 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    box-shadow: 0 28px 75px rgba(0, 0, 0, .4);
}

.case-detail-rich .case-detail-image-zoom {
    display: block;
    margin: 38px 0;
    border-radius: 14px;
    cursor: zoom-in;
}

.case-detail-rich .case-detail-image-zoom img {
    margin: 0;
}

.case-detail-rich blockquote {
    margin: 38px 0;
    padding: 26px 30px;
    border-left: 3px solid #9a55ff;
    border-radius: 0 13px 13px 0;
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.case-detail-next {
    padding: 0 0 clamp(80px, 10vw, 135px);
    background: #020712;
}

@media (max-width: 991.98px) {
    .case-detail-hero {
        min-height: 0;
    }

    .case-detail-hero__grid {
        grid-template-columns: 1fr;
    }

    .case-detail-hero__visual {
        max-width: 800px;
        transform: none;
    }

    .case-detail-hero__frame {
        transform: none;
    }

    .case-detail-content__layout {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .case-detail-content__aside {
        position: static;
    }

    .case-detail-toc.is-scrollable .case-detail-toc__nav {
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .case-detail-hero {
        padding: 34px 0 80px;
    }

    .case-detail-back {
        margin-bottom: 45px;
    }

    .case-detail-hero h1 {
        font-size: clamp(39px, 11vw, 53px);
    }

    .case-detail-hero__grid {
        gap: 48px;
    }

    .case-detail-hero__frame {
        border-radius: 12px;
    }

    .case-detail-slider__arrow {
        width: 38px;
        height: 38px;
        margin-top: -19px;
    }

    .case-detail-slider__arrow--prev {
        left: 9px;
    }

    .case-detail-slider__arrow--next {
        right: 9px;
    }

    .case-detail-labels {
        margin-top: 22px;
    }

    .case-detail-labels--visual {
        margin: 0 0 16px;
    }

    .case-detail-labels .case-label {
        max-width: 100%;
    }

    .case-detail-content {
        padding: 75px 0;
    }

    .case-detail-rich {
        font-size: 16px;
        line-height: 1.72;
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-detail-page * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
