/* =====================================
   ОСНОВНАЯ КАРТОЧКА
===================================== */

.card {
    width: 100%;
    max-width: 960px;
    margin: 40px auto;
    padding: 20px;
    background-color: white;
}

/* ============================================
   COLOR DATA - ИНДИВИДУАЛЬНЫЕ НАСТРОЙКИ КЕЙСОВ
============================================ */

body[data-case="isell"] {
    --case-page-bg: #3c4333;
    --case-hero-bg: #3c4333;
    --case-footer-bg: #2e3427;
}

body[data-case="telecom"] {
    --case-page-bg: #001133;
    --case-hero-bg: #001133;
    --case-footer-bg: #000B1B;
}

body[data-case="watches"] {
    --case-page-bg: #0A0E11;
    --case-hero-bg: #0A0E11;
    --case-footer-bg: #000000;
}

body[data-case="uwalls-aw"] {
    --case-page-bg: #BDA184;
    --case-hero-bg: #BDA184;
    --case-footer-bg: #67533e;
}

body[data-case="uwalls-mc"] {
    --case-page-bg: #2A3C21;
    --case-hero-bg: #2A3C21;
    --case-footer-bg: #192413;
}

body[data-case="plumbing"] {
    --case-page-bg: #180807;
    --case-hero-bg: #180807;
    --case-footer-bg: #0F0403;
}

/* =====================================
   CASE NOTE — СЛУЖБОВА ПОМІТКА
===================================== */

.case-note {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;

    margin: 40px 0;
    padding: 18px 22px;

    border: 1px solid #59d874;
    border-radius: 6px;

    break-inside: avoid;
}

.case-note-icon {
    width: 20px;
    height: 20px;

    color: #59d874;

    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.case-note-label {
    margin-bottom: 4px;

    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: .12em;
    text-transform: uppercase;

    color: #59d874;
}

.case-note-text {
    font-size: 13px;
    line-height: 1.5;
    word-spacing: 2px;

    color: var(--text-color);
}

/* ============================================
   НАСТРОЙКА ССЫЛОК
============================================ */

.case-section a {
    color: #A8C7FA;
}

/* =====================================
   ШАПКА - накладається на case-hero
===================================== */

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
}

/* ============================================
   CASE HERO - повноекранна «обкладинка» кейсу
============================================ */

.case-hero {
    --hero-accent: #59d874;
    --hero-text: #f4f4f4;
    --hero-text-dim: rgba(244, 244, 244, .62);
    --hero-border: rgba(244, 244, 244, .16);

    position: relative;
    overflow: hidden;
    isolation: isolate;

    min-height: 100vh;

    background-color: var(--case-hero-bg, #0b1626);
}

   .case-hero {
    width: 99.5vw;
    margin-left: calc(50% - 50vw);
}

.case-hero-inner {
    width: min(1200px, 90%);
    margin: 0 auto;

    position: relative;
    z-index: 2;

    padding-top: 190px;
    padding-bottom: 80px;
}

.case-hero-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.case-hero-badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 18px;

    border: 1px solid var(--hero-accent);
    border-radius: 999px;

    color: var(--hero-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1;
}

.print-controls {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-left: auto;
}

.print-all-button {
    background: none;
    border: none;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.print-all-button img {
    width: 18px;
    height: 18px;
    display: block;
}

.case-hero-title {
    margin: 26px 0 0;

    max-width: 680px;

    color: var(--hero-text);
    font-family: "Manrope", sans-serif;
    font-size: clamp(28px, 3.6vw, 60px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
}

blockquote.hero-hook.case-hero-quote {
    margin: 32px 0 0;
    padding-left: 22px;

    max-width: 580px;

    border-left: 3px solid var(--hero-accent);

    color: white;
    font-style: italic;
}

hr.case-hero-divider {
    margin: 34px 0 0;

    border: none;
    height: 2px;

    background: var(--hero-border);
}

.case-hero-meta {
    margin-top: 34px;

    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 50px;
}

.case-hero-label {
    margin-bottom: 16px;

    color: var(--hero-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.case-hero-glance-list {
    list-style: none;

    display: flex;
    flex-direction: column;
    gap: 11px;
}

.case-hero-glance-list li {
    display: grid;
    grid-template-columns: 20px 96px 1fr;
    align-items: center;
    gap: 12px;
}

.case-hero-icon {
    width: 20px;
    height: 20px;
    color: var(--hero-text-dim);
}

.case-hero-glance-key {
    font-size: 14px;
    color: var(--hero-text-dim);
}

.case-hero-glance-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--hero-text);
}

.case-hero-client {
    padding-left: 40px;
    border-left: 2px solid var(--hero-border);

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.case-hero-client-logo {
    display: block;

    height: 40px;
    width: auto;

    margin-top: auto;
}

.case-hero-client-name {
    margin: 4px 0 10px;

    color: var(--hero-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

/* =====================================
   CASE HERO - ФОТОГРАФИЯ КАК СРЕДА
===================================== */

.case-hero-scene {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 0;
    pointer-events: none;
}

.case-hero-scene img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    max-width: none;
}

/* =====================================
   CASE INTRO
===================================== */

.case-intro {
    width: min(760px, 90%);
    margin: 0 auto;
    padding: 70px 0 1px;

    position: relative;
}

.case-intro::before {
    content: "";
    position: absolute;

    top: 70px;
    bottom: 30px;
    left: 0;

    width: 3px;
    background: #59d874;
}

.case-intro-label,
.case-intro-text {
    margin-left: 28px;
}

.case-intro-label {
    display: block;
    margin-bottom: 18px;

    font-size: 19px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;

    color: #59d874;
}

.case-intro-text {
    margin-top: 0;
    margin-bottom: 0;

    max-width: 680px;

    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;

    color: inherit;
}

/* =====================================
   ВНУТРЕННИЕ ИЗОБРАЖЕНИЯ
===================================== */

.case-inline-figure {
    width: var(--figure-width, 75%);
    margin: 60px auto;
}

.case-inline-figure .case-result-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.case-inline-figure figcaption {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
}

/* =====================================
   НУМЕРАЦИЯ
===================================== */

.steps {
    padding-left: 1.5rem;
}

.step {
    padding-left: 0.4rem;
    margin-bottom: 1.5rem;
}

.step h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* =====================================
   БЛОКИ КЕЙСОВ
===================================== */

.case-section {
    text-align: left;
}

.case-section ul {
    margin: 5px 0 13px;
    padding-left: 30px;
    line-height: 1.42;
    font-size: 15px;
}

.case-section li {
    margin-bottom: 5px;
}

.case-section:not(:first-child) {
    margin-top: 60px;
}

.case-section p {
    margin-top: 5px;
    margin-bottom: 18px;
}

.case-section p.field-title {
    margin-top: 32px;
}

.case-section p:last-of-type {
    margin-bottom: 30px;
}

.case-section .section-title {
    margin-bottom: 4px;
}

.case-section p.field-title strong {
    display: block;
    margin-bottom: 6px;

    font-size: 20px;
}

.case-wrapper {
    margin-top: 20px;
}

/* =====================================
   ИКОНКИ РАЗДЕЛОВ КЕЙСОВ
===================================== */

/* Section headings with a small decorative icon */
.field-title--icon {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
}

.field-title--icon > .field-title-icon {
    grid-column: 1;
    grid-row: 1;

    width: 17px;
    height: 17px;
    margin-top: 0.4em;

    color: var(--text-color);
    opacity: 0.75;

    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;
}

.field-title--icon > strong {
    grid-column: 2;
    grid-row: 1;
}

.field-title--icon > span {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

.field-title--icon > .field-title-icon--filled {
    stroke: none;
}

/* =====================================
   ВСТУПНА ФРАЗА БЛОКУ (hero-hook)
===================================== */

.hero-hook {
    margin-top: 8px;
    margin-bottom: 24px;

    font-family: "Manrope", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 500;

    color: var(--text-color);
}

/* =====================================
   CASE PAGE - HERO БЕЗ КОНТЕЙНЕРА
===================================== */

.card:has(.case-hero) {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

/* =====================================
   ФОН СТРАНИЦЫ
===================================== */

body.dark-theme {
    background-color: var(--case-page-bg, #001133);
}

.logo-link {
    color: white;
}

/* =====================================
   KEEP EXPLORING
===================================== */

.case-explore {
    width: min(960px, 100%);
    margin: 90px auto 0;
    padding: 28px 0 54px;

    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.case-explore-heading {
    margin-bottom: 28px;
    text-align: center;
}

.case-explore-label {
    display: block;

    font-size: 19px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;

    color: #59d874;
}

.case-explore-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 24px;
    align-items: center;
}

.case-explore-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    width: fit-content;

    color: var(--text-color);
    text-decoration: none;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.case-explore-prev {
    justify-self: start;
}

.case-explore-all {
    justify-self: center;
}

.case-explore .case-explore-all {
    padding: 14px 28px;
    border-radius: 5px;

    background-color: #59d874;
    color: #0b1a10;

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.case-explore .case-explore-all:hover {
    background-color: #7ae892;
    color: #0b1a10;
}

.case-explore-next {
    justify-self: end;
}

/* ---- Prev / Next: картка з превʼю ---- */

.case-explore-prev,
.case-explore-next {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;

    width: 100%;
    max-width: 285px;
}

.case-explore-direction-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-explore-next .case-explore-direction-row {
    justify-content: flex-end;
}

.case-explore-thumb {
    display: block;
    overflow: hidden;
    border-radius: 6px;
}

.case-explore-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;

    transition: transform 0.35s ease;
}

.case-explore-card-title {
    color: var(--text-color);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;

    transition: color 0.25s ease;
}

.case-explore-direction {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.case-explore-arrow {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.case-explore-link:hover {
    color: #59d874;
}

.case-explore-prev:hover,
.case-explore-next:hover {
    transform: translateY(-2px);
}

.case-explore-prev:hover .case-explore-arrow {
    transform: translateX(-4px);
}

.case-explore-next:hover .case-explore-arrow {
    transform: translateX(4px);
}

.case-explore-prev:hover .case-explore-thumb img,
.case-explore-next:hover .case-explore-thumb img {
    transform: scale(1.025);
}

.case-explore-prev:hover .case-explore-card-title,
.case-explore-next:hover .case-explore-card-title {
    color: #59d874;
}

.case-explore-all:hover .case-explore-arrow {
    transform: translate(3px, -3px);
}

.case-explore-link:focus-visible {
    outline: 2px solid #59d874;
    outline-offset: 6px;
}

/* =====================================
THE IDEA - EDITORIAL STATEMENT
===================================== */

.case-idea {
    position: relative;
    width: min(1000px, 90%);
    margin: 110px auto 120px;
    text-align: center;
}

/* =====велика відкрита лапка ===== */

.case-idea-quote {
    position: absolute;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 180px;
    font-weight: 400;
    line-height: .7;
    color: #59d874;
    pointer-events: none;
    user-select: none;
}

.case-idea-quote-open {
    top: -10px;
    left: -20px;
}

/* ===== велика закрита лапка ===== */

.case-idea-quote-close {
    right: -20px;
    bottom: -26px;
}

/* ===== головна думка ===== */

.case-idea-statement {
    position: relative;
    margin: 0;
    padding: 35px 70px 50px;
    font-family: "Manrope", sans-serif;
    font-size: clamp(34px, 5vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
    color: var(--text-color);
    border: none;
}

/* ===== коротке пояснення ===== */

.case-idea-note {
    width: min(720px, 90%);
    margin: 35px auto 0;
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
}

/* =====================================================
   FOOTER
   ===================================================== */

body.dark-theme .site-footer {
    background-color: var(--case-footer-bg) !important;
    color: #FFFFFF;
}

/* =====================================
   МОБІЛЬНА ВЕРСІЯ
===================================== */

@media (max-width: 600px) {

    body[data-case="watches"] .case-hero-scene img {
    object-position: 79% top;
    }

    body[data-case="plumbing"] .case-hero-scene img {
    object-position: 61% top;
    }

    body[data-case="telecom"] .case-hero-scene img {
    object-position: 35% top;
    }

    body[data-case="uwalls-aw"] .case-hero-scene img {
    object-position: 25% top;
    }

    body[data-case="uwalls-mc"] .case-hero-scene img {
    object-position: 10% top;
    }

    .hero-hook {
        font-size: 18px;
        line-height: 1.25;
        margin-top: 6px;
        margin-bottom: 20px;
    }

    .case-intro {
        width: 100%;
        padding: 50px 0 1px;
    }

    .case-intro::before {
        top: 50px;
        bottom: 20px;
    }

    .case-intro-label,
    .case-intro-text {
        margin-left: 22px;
    }

    .case-intro-text {
        font-size: 19px;
        line-height: 1.4;
    }

    .case-note {
        margin: 30px 0;
        padding: 16px;
        column-gap: 12px;
    }

    .case-inline-figure {
        width: 100%;
        margin: 30px 0;
    }

    .case-inline-figure .case-result-image {
    width: 100%;
    }

    .case-hero-inner {
    padding-top: 220px;
    padding-bottom: 60px;
    }

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

    .case-hero-meta {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .case-hero-client {
        padding-left: 0;
        padding-top: 26px;

        border-left: none;
        border-top: 2px solid var(--hero-border);

        display: grid;
        grid-template-columns: 126px 1fr;
        align-items: center;
    }

    .case-hero-client .case-hero-label {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 4px;
    }

    .case-hero-client-name {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
    }

    .case-hero-client-logo {
        grid-column: 2;
        grid-row: 1 / 3;

        height: 34px;
        margin-top: 0;

        justify-self: start;
    }

    .case-hero-glance-list li {
        grid-template-columns: 18px 84px 1fr;
    }

    .case-hero-meta {
        margin-top: 260px;
}

    .case-explore {
        margin-top: 70px;
        padding: 24px 0 48px;
    }

    .case-explore-heading {
        margin-bottom: 24px;
    }

    .case-explore-nav {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .case-explore-direction-row,
    .case-explore-next .case-explore-direction-row {
        justify-content: center;
    }

    .case-explore-prev,
    .case-explore-all,
    .case-explore-next {
        justify-self: center;
    }

    .case-explore-link {
        gap: 10px;
    }

    .case-explore-direction {
        font-size: 11px;
        letter-spacing: .1em;
    }

    .case-explore-arrow {
        font-size: 18px;
    }

    .case-explore-prev,
    .case-explore-next {
        max-width: 360px;
    }

    .case-explore-prev:hover,
    .case-explore-next:hover {
        transform: none;
    }

    .case-explore-prev:hover .case-explore-thumb img,
    .case-explore-next:hover .case-explore-thumb img {
        transform: none;
    }

    .case-idea {
        width: 100%;
        margin: 80px auto 90px;
        padding: 0 22px;
    }
    
    .case-idea-statement {
        padding: 42px 30px 48px;
        font-size: 34px;
        line-height: 1.15;
    }
    
    .case-idea-quote {
        font-size: 120px;
    }
    
    .case-idea-quote-open {
        top: 20px; left: 0;
    }
    
    .case-idea-quote-close {
        right: 0;
        bottom: 62px;
    }
    
    .case-idea-note {
        width: 100%;
        margin-top: 28px;
        font-size: 16px;
        line-height: 1.45;
    }

}