.cases-page,
.case-page {
    color: #000;
    font-family: Inter, Arial, sans-serif;
}

.cases-page {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 56px;
}

.cases-page__top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin-bottom: 30px;
}

.cases-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    color: #6e6e6e;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .12);
    font-size: 15px;
    text-decoration: none;
}

.cases-page h1 {
    margin: 0 0 26px;
    font-family: Oswald, Montserrat, Arial, sans-serif;
    font-size: clamp(64px, 9vw, 120px);
    font-weight: 500;
    line-height: .95;
    letter-spacing: 0;
}

.cases-preview {
    position: relative;
    min-height: 0;
    aspect-ratio: 1536 / 948;
    overflow: hidden;
    border-radius: 48px;
    background: #f4f4f4;
    color: #000;
    font-family: Inter, Montserrat, Arial, sans-serif;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}

.cases-preview__tag {
    position: absolute;
    top: 10%;
    left: 7%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 164px;
    min-height: 42px;
    padding: 0 24px;
    border-radius: 999px;
    background: #fff;
    color: #6e6e6e;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .22);
    font-size: 20px;
    line-height: 1.1;
    text-transform: lowercase;
}

.cases-preview__title {
    position: absolute;
    top: 21.8%;
    left: 6.6%;
    z-index: 2;
    margin: 0;
    font-family: Oswald, Montserrat, Arial, sans-serif;
    font-size: clamp(90px, 8vw, 144px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: 0;
}

.cases-preview__text {
    position: absolute;
    top: 48.8%;
    left: 7%;
    z-index: 2;
    max-width: 47.5%;
    margin: 0;
    color: #6e6e6e;
    font-size: 26px;
    line-height: 1.12;
}

.cases-preview__button {
    position: absolute;
    left: 6.25%;
    bottom: 5.9%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(274px, 27.4%, 421px);
    height: clamp(78px, 16.5%, 156px);
    border-radius: 999px;
    background: #ff6a00;
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 106, 0, .34), 0 9px 12px rgba(0, 0, 0, .25);
    font-size: 31px;
    line-height: 1;
    text-decoration: none;
}

.cases-preview__glow {
    position: absolute;
    left: 5.8%;
    bottom: 5.9%;
    width: clamp(286px, 28.3%, 434px);
    height: clamp(86px, 17%, 161px);
    border-radius: 999px;
    background: rgba(255, 106, 0, .58);
    filter: blur(16px);
}

.cases-preview__phone {
    position: absolute;
    z-index: 1;
    width: 19.9%;
    height: 69.85%;
    border: 6px solid #515151;
    border-radius: 24px;
    background: #ff8a00;
    box-shadow: 0 9px 12px rgba(0, 0, 0, .25);
}

.cases-preview__phone img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.cases-preview__phone--main {
    right: 20.3%;
    top: 8.1%;
}

.cases-preview__phone--front {
    right: 3.9%;
    top: 24.8%;
    width: 19.9%;
}

.case-page {
    width: min(1180px, calc(100% - 48px));
    margin: 32px auto 56px;
    padding: 40px 42px 56px;
    border-radius: 56px;
    background: #fff;
}

.case-page__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.case-page__tag,
.case-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: #f4f4f4;
    color: #606060;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .16);
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    text-transform: lowercase;
}

.case-page__back {
    width: 48px;
    padding: 0;
    font-size: 28px;
}

.case-page h1,
.case-page h2 {
    margin: 0;
    color: #000;
    font-family: Oswald, Montserrat, Arial, sans-serif;
    font-weight: 500;
    line-height: .95;
    letter-spacing: 0;
}

.case-page h1 {
    font-size: clamp(82px, 9vw, 128px);
    text-transform: capitalize;
}

.case-page__lead {
    max-width: 100%;
    margin: 22px 0 28px;
    font-size: 26px;
    line-height: 1.16;
}

.case-page__hero,
.case-page__gallery {
    min-height: 460px;
    border-radius: 42px;
    background:
        radial-gradient(circle at 70% 45%, rgba(255, 106, 0, .34), transparent 28%),
        linear-gradient(135deg, #d9d9d9, #eeeeee);
}

.case-page__section {
    padding: 64px 0;
    border-bottom: 1px solid #ff6a00;
}

.case-page__section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.case-page h2 {
    margin-bottom: 30px;
    font-size: clamp(58px, 7vw, 96px);
}

.case-page__title-right {
    text-align: right;
}

.case-page__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.case-page__stat {
    min-height: 132px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #ff6a00;
    color: #fff;
    box-shadow: 0 8px 12px rgba(0, 0, 0, .22);
}

.case-page__stat strong {
    display: block;
    font-family: Montserrat, Inter, Arial, sans-serif;
    font-size: 54px;
    font-weight: 500;
    line-height: 1;
}

.case-page__stat span {
    display: block;
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.1;
}

.case-page__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    justify-content: center;
}

.case-page__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 26px;
    border-radius: 999px;
    background: #f4f4f4;
    color: #000;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .16);
    font-size: 21px;
    line-height: 1;
    white-space: nowrap;
}

.case-page__chip--orange {
    min-height: 44px;
    padding: 0 18px;
    background: #ff6a00;
    color: #fff;
    font-size: 16px;
}

.case-page__architecture {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 44px;
    align-items: start;
}

.case-page__architecture h2 {
    margin: 0;
    text-align: right;
}

.case-page__arch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 54px 36px;
}

.case-page__arch-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 0 18px;
    border-radius: 16px;
    background: #f4f4f4;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .16);
    font-size: 20px;
    line-height: 1.1;
    text-align: center;
}

.case-page__arch-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -38px;
    width: 2px;
    height: 28px;
    background: #ff6a00;
    transform: translateX(-50%);
}

.case-page__arch-item:nth-last-child(-n + 2)::after {
    display: none;
}

.case-page__timeline {
    display: grid;
    gap: 26px;
    max-width: 720px;
    margin-left: auto;
}

.case-page__step-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 12px;
    background: #ff6a00;
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.case-page__step-text {
    margin-top: -8px;
    padding: 26px 28px;
    border-radius: 16px;
    background: #f4f4f4;
    box-shadow: 0 7px 10px rgba(0, 0, 0, .16);
    font-size: 21px;
    line-height: 1.16;
}

@media (max-width: 1020px) {
    .cases-preview { min-height: 500px; }
    .cases-preview__text { max-width: 440px; font-size: 22px; }
    .cases-preview__phone { width: 178px; }
    .cases-preview__phone--main { right: 176px; }
    .cases-preview__phone--front { right: 34px; width: 176px; }
}

@media (max-width: 900px) {
    .case-page {
        width: min(100% - 20px, 720px);
        margin: 10px auto 28px;
        padding: 24px 20px 34px;
        border-radius: 30px;
    }

    .case-page h1 { font-size: 58px; }
    .case-page h2 { font-size: 44px; }
    .case-page__lead { font-size: 17px; }
    .case-page__hero,
    .case-page__gallery { min-height: 240px; border-radius: 24px; }
    .case-page__stats,
    .case-page__architecture { grid-template-columns: 1fr; }
    .case-page__architecture h2,
    .case-page__title-right { text-align: left; }
    .case-page__arch-grid { grid-template-columns: 1fr 1fr; gap: 36px 14px; }
}

@media (max-width: 760px) {
    .cases-page { width: min(100% - 24px, 560px); padding-top: 26px; }
    .cases-page__top { margin-bottom: 22px; }
    .cases-page h1 { font-size: 56px; }
    .cases-preview { min-height: 480px; border-radius: 28px; }
    .cases-preview__tag,
    .cases-preview__title,
    .cases-preview__text,
    .cases-preview__button { left: 24px; }
    .cases-preview__tag { top: 28px; }
    .cases-preview__title { top: 92px; font-size: 68px; }
    .cases-preview__text { top: 186px; max-width: calc(100% - 48px); font-size: 18px; }
    .cases-preview__button { bottom: 30px; width: 210px; height: 60px; font-size: 24px; }
    .cases-preview__glow { left: 42px; bottom: 26px; width: 240px; height: 72px; }
    .cases-preview__phone { display: none; }
}
