.case-top {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(253, 115, 4, 0.14), transparent 60%),
        radial-gradient(50% 60% at 0% 100%, rgba(84, 204, 6, 0.06), transparent 70%),
        var(--panel);
}

.case-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 56px;
    align-items: center;
}
.case-hero__host {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}
.case-hero__host::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(84, 204, 6, 0.15);
}
.case-hero__title {
    margin-top: 18px;
    font-size: clamp(36px, 3.6vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.025em;
}
.case-hero__lead {
    max-width: 520px;
    margin-top: 18px;
    color: var(--body);
    font-size: 18px;
    line-height: 1.65;
}
.case-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}
.case-hero__visit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.case-hero__arrow {
    width: 18px;
    height: 18px;
}

.case-hero__devices {
    position: relative;
    padding: 0 0 6% 0;
}
.case-hero__devices--duo {
    padding-right: 13%;
    padding-bottom: 10%;
}
.case-browser {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
    transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
    transform-origin: 30% 50%;
}
.case-browser__bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    height: 38px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
}
.case-browser__dots {
    display: flex;
    gap: 6px;
}
.case-browser__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}
.case-browser__dots span:first-child {
    background: #ff5f57;
}
.case-browser__dots span:nth-child(2) {
    background: #febc2e;
}
.case-browser__dots span:nth-child(3) {
    background: #28c840;
}
.case-browser__address {
    justify-self: center;
    width: min(320px, 100%);
    overflow: hidden;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--panel);
    color: var(--body);
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.case-browser__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9.4;
    object-fit: cover;
    object-position: top;
}
.case-phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 27%;
    overflow: hidden;
    padding: 7px;
    border-radius: 30px;
    background: #0b0b0d;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.case-phone__notch {
    position: absolute;
    top: 13px;
    left: 50%;
    z-index: 1;
    width: 34%;
    height: 14px;
    border-radius: 10px;
    background: #0b0b0d;
    transform: translateX(-50%);
}
.case-phone__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 19;
    border-radius: 23px;
    object-fit: cover;
    object-position: top;
}

.case-top__facts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}
.case-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 0;
}
.case-facts__item {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}
.case-facts__label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}
.case-facts__value {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.case-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 760px);
    column-gap: 64px;
    justify-content: center;
    align-items: start;
}
.case-layout__nav {
    position: sticky;
    top: 24px;
    align-self: start;
}
.case-nav {
    padding-left: 2px;
}
.case-nav__title {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}
.case-layout__text {
    min-width: 0;
}

.case-others {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.case-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.case-card:hover,
.case-card:focus-within {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.case-card__browser {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.case-card__body {
    padding: 22px 24px 24px;
}
.case-card__title {
    font-size: 21px;
    line-height: 1.3;
}
.case-card__link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.case-card__text {
    margin-top: 8px;
    color: var(--body);
    font-size: 15px;
    line-height: 1.6;
}
.case-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--orange);
    font-size: 15px;
    font-weight: 600;
}
.case-card__arrow {
    width: 18px;
    height: 18px;
}

@media (max-width: 1199.98px) {
    .case-hero {
        column-gap: 40px;
    }
    .case-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        column-gap: 40px;
    }
}

@media (max-width: 991.98px) {
    .case-hero {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 40px;
    }
    .case-browser {
        transform: none;
    }
    .case-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .case-layout__nav {
        position: static;
        margin-bottom: 32px;
    }
    .case-nav__list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }
    .case-nav__list .toc__link {
        padding: 8px 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        white-space: nowrap;
    }
    .case-nav__list .toc__link::before {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .case-hero__title {
        font-size: 34px;
        line-height: 1.12;
    }
    .case-hero__lead {
        font-size: 16px;
    }
    .case-hero__actions .button {
        flex: 1 1 100%;
        justify-content: center;
    }
    .case-phone {
        width: 30%;
        padding: 5px;
        border-radius: 22px;
    }
    .case-phone__img {
        border-radius: 17px;
    }
    .case-top__facts {
        margin-top: 32px;
        padding-top: 24px;
    }
    .case-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .case-facts__item {
        padding: 14px 16px;
    }
    .case-facts__value {
        font-size: 15px;
    }
    .case-others {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-card {
        transition: none;
    }
    .case-card:hover,
    .case-card:focus-within {
        transform: none;
    }
}
