.case-page {
    background: #f7f4ed;
    color: #171717;
    overflow: hidden;
}

.case-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.case-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 48px;
    color: #171717;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.case-back:hover {
    text-decoration: underline;
}


/* HERO */

.case-hero {
    padding: 70px 0 110px;
}

.case-hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 70px;
    align-items: center;
}

.case-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border: 2px solid #171717;
    border-radius: 999px;
    background: #c8ff00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.case-hero h1 {
    margin: 22px 0 10px;
    font-size: clamp(64px, 9vw, 120px);
    line-height: 0.85;
    letter-spacing: -0.07em;
}

.case-hero-title {
    max-width: 650px;
    margin: 30px 0 20px;
    font-size: clamp(25px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.case-hero-text {
    max-width: 620px;
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}

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


/* BUTTONS */

.case-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border: 2px solid #171717;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.case-button:hover {
    transform: translate(-3px, -3px);
    box-shadow: 5px 5px 0 #171717;
}

.case-button-primary {
    background: #c8ff00;
    color: #171717;
}

.case-button-secondary {
    background: #ffffff;
    color: #171717;
}

.case-button-dark {
    background: #171717;
    color: #ffffff;
}


/* HERO CARD */

.case-hero-card {
    position: relative;
}

.case-window {
    padding: 18px;
    border: 3px solid #171717;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 14px 14px 0 #7c3aed;
    transform: rotate(1.5deg);
}

.case-window-top {
    display: flex;
    gap: 7px;
    padding-bottom: 18px;
    border-bottom: 2px solid #171717;
}

.case-window-top span {
    width: 10px;
    height: 10px;
    border: 2px solid #171717;
    border-radius: 50%;
}

.case-flow-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 35px 10px;
}

.flow-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 85px;
    padding: 13px;
    border: 2px solid #171717;
    border-radius: 10px;
    background: #f7f4ed;
}

.flow-item strong {
    font-size: 11px;
}

.flow-item span {
    font-size: 13px;
    font-weight: 800;
}

.flow-ai {
    background: #c8ff00;
}

.flow-telegram {
    background: #ff4fa3;
}

.flow-admin {
    background: #7c3aed;
    color: #ffffff;
}

.flow-arrow {
    font-size: 22px;
    font-weight: 900;
}

.case-mini-card {
    padding: 18px;
    border: 2px solid #171717;
    border-radius: 12px;
    background: #f7f4ed;
}

.mini-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
}

.mini-status {
    padding: 5px 8px;
    border: 1px solid #171717;
    border-radius: 999px;
    background: #c8ff00;
}

.mini-card-title {
    margin-top: 18px;
    font-size: 22px;
    font-weight: 800;
}

.mini-features {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.mini-features span {
    padding: 6px 9px;
    border: 1px solid #171717;
    border-radius: 7px;
    background: #ffffff;
    font-size: 11px;
    font-weight: 700;
}


/* SECTIONS */

.case-section {
    padding: 110px 0;
}

.case-section-dark {
    background: #171717;
    color: #ffffff;
}

.case-section-accent {
    background: #c8ff00;
}

.case-section-heading {
    max-width: 800px;
    margin-bottom: 65px;
}

.case-section-heading h2,
.case-ai-grid h2,
.case-error-grid h2,
.case-result h2,
.case-cta h2 {
    margin: 22px 0 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.case-section-heading h2 {
    max-width: 780px;
}

.case-label-light {
    border-color: #ffffff;
}


/* TWO COLUMNS */

.case-two-columns {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 80px;
    align-items: start;
}

.case-two-columns p,
.case-ai-grid p,
.case-error-grid p,
.case-result-text p,
.case-cta p {
    max-width: 650px;
    margin: 0 0 20px;
    font-size: 18px;
    line-height: 1.65;
}

.case-highlight {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border: 3px solid #171717;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 9px 9px 0 #ff4fa3;
}

.highlight-number {
    font-size: 13px;
    font-weight: 900;
}

.case-highlight strong {
    font-size: 24px;
}


/* PROCESS */

.case-process {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
    gap: 18px;
    align-items: stretch;
}

.process-step {
    padding: 22px;
    border: 2px solid #ffffff;
    border-radius: 14px;
}

.process-step-ai {
    background: #c8ff00;
    color: #171717;
    border-color: #c8ff00;
}

.process-number {
    margin-bottom: 35px;
    font-size: 12px;
    font-weight: 900;
}

.process-step h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.process-step p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.8;
}

.process-step-ai p {
    opacity: 1;
}

.process-line {
    width: 25px;
    height: 2px;
    margin-top: 32px;
    background: #ffffff;
}


/* AI */

.case-ai-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.ai-result-card {
    padding: 24px;
    border: 3px solid #171717;
    border-radius: 16px;
    background: #171717;
    color: #ffffff;
    box-shadow: 10px 10px 0 #c8ff00;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid #555;
    font-size: 13px;
    font-weight: 800;
}

.ai-done {
    color: #c8ff00;
}

.ai-result-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 0;
    border-bottom: 1px solid #555;
    font-size: 14px;
}

.ai-result-row span {
    opacity: 0.6;
}

.ai-result-functions {
    padding-top: 18px;
}

.ai-result-functions > span {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    opacity: 0.6;
}

.ai-result-functions div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-result-functions b {
    padding: 7px 9px;
    border-radius: 7px;
    background: #c8ff00;
    color: #171717;
    font-size: 11px;
}


/* ERROR */

.case-error-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 70px;
    align-items: center;
}

.case-error-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border: 4px solid #171717;
    border-radius: 50%;
    background: #ff4fa3;
    font-size: 42px;
    font-weight: 900;
    transform: rotate(-8deg);
}


/* ADMIN PREVIEW */

.case-admin-preview {
    overflow: hidden;
    border: 3px solid #171717;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 12px 12px 0 #7c3aed;
}

.admin-preview-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 2px solid #171717;
    font-size: 13px;
    font-weight: 800;
}

.admin-preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 2px solid #171717;
}

.admin-preview-stats div {
    padding: 22px;
    border-right: 1px solid #cccccc;
}

.admin-preview-stats div:last-child {
    border-right: 0;
}

.admin-preview-stats span {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    color: #666666;
}

.admin-preview-stats strong {
    font-size: 32px;
}

.admin-preview-list {
    padding: 8px 22px;
}

.admin-preview-row {
    display: grid;
    grid-template-columns: 1fr 150px 130px;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #dddddd;
    align-items: center;
}

.admin-preview-row:last-child {
    border-bottom: 0;
}

.admin-preview-row strong {
    font-size: 15px;
}

.admin-preview-row span,
.admin-preview-row b {
    font-size: 12px;
}

.admin-preview-row b {
    width: fit-content;
    padding: 6px 9px;
    border-radius: 999px;
    background: #c8ff00;
}


/* STACK */

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

.stack-item {
    min-height: 150px;
    padding: 20px;
    border: 2px solid #ffffff;
    border-radius: 14px;
}

.stack-item span {
    display: block;
    margin-bottom: 30px;
    font-size: 11px;
    opacity: 0.5;
}

.stack-item strong {
    display: block;
    font-size: 20px;
}

.stack-item small {
    display: block;
    margin-top: 5px;
    opacity: 0.55;
}


/* RESULT */

.case-result {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 80px;
    align-items: start;
}

.case-result-text {
    padding-top: 10px;
}


/* CTA */

.case-cta {
    padding: 40px 0 100px;
    background: #f7f4ed;
}

.case-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 55px;
    border: 3px solid #171717;
    border-radius: 20px;
    background: #ff4fa3;
    box-shadow: 12px 12px 0 #171717;
}

.case-cta-card h2 {
    max-width: 650px;
}

.case-cta-card p {
    max-width: 600px;
    margin-bottom: 0;
}


/* RESPONSIVE */

@media (max-width: 1050px) {

    .case-hero-grid,
    .case-ai-grid,
    .case-two-columns,
    .case-result {
        grid-template-columns: 1fr;
        gap: 45px;
    }

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

    .process-line {
        width: 2px;
        height: 25px;
        margin: 0 auto;
    }

    .case-stack {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-error-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .case-error-number {
        width: 130px;
        height: 130px;
    }

}


@media (max-width: 700px) {

    .case-container {
        width: min(100% - 28px, 1180px);
    }

    .case-hero {
        padding: 40px 0 75px;
    }

    .case-section {
        padding: 75px 0;
    }

    .case-hero h1 {
        font-size: 72px;
    }

    .case-hero-title {
        font-size: 28px;
    }

    .case-hero-text,
    .case-two-columns p,
    .case-ai-grid p,
    .case-error-grid p,
    .case-result-text p,
    .case-cta p {
        font-size: 16px;
    }

    .case-flow-preview {
        gap: 7px;
    }

    .flow-arrow {
        display: none;
    }

    .flow-item {
        min-width: calc(50% - 7px);
    }

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

    .admin-preview-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-preview-stats div:nth-child(2) {
        border-right: 0;
    }

    .admin-preview-stats div:nth-child(-n+2) {
        border-bottom: 1px solid #cccccc;
    }

    .admin-preview-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .case-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 35px 25px;
    }

    .case-button {
        width: 100%;
    }

}


@media (max-width: 420px) {

    .case-hero h1 {
        font-size: 60px;
    }

    .case-window {
        padding: 12px;
        box-shadow: 8px 8px 0 #7c3aed;
    }

    .admin-preview-top {
        flex-direction: column;
        gap: 6px;
    }

}