/* Zorlu PSM case study — page-scoped styles.
   Everything is under .zp (page) or .cv (image viewer), so no other page changes.
   Reuses the site's tokens and components (.container, .case-eyebrow, .case-title, .case-result,
   .case-facts, .case-related, .portfolio-cta, .btn). No new fonts or colours: the only extra
   values are the hairline #1a1a1a and the surface #0c0c0c from the brief. */

.zp {
    /* the fixed header is 100px tall: start the content 48px below it (32px on phones) */
    padding: calc(100px + 48px) 0 5rem;
}

.zp-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.zp-back:hover,
.zp-back:focus-visible {
    color: var(--text-color);
    opacity: 1;
}

.zp-intro {
    margin-top: 1.5rem;
}

.zp-intro .case-result {
    margin-bottom: 2.5rem;
}

/* ---- media ---- */
.zp-media {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
    background: #0c0c0c;
    cursor: zoom-in;
}

.zp-media:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
}

.zp-media:focus-visible,
.zp-jump:focus-visible,
.zp-back:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

/* full frame, never cropped: the image keeps its own 16:9 box */
.zp-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* small, always-visible "enlarge" mark (not hover-only) */
.zp-media::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(5, 5, 5, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 16px no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

.zp-fig {
    margin: 0;
}

.zp-fig figcaption {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--secondary-text);
}

.zp-cap-title {
    color: var(--text-color);
    font-weight: 500;
}

.zp-jump {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 4px;
}

.zp-jump:hover {
    opacity: 1;
    text-decoration-color: #fff;
}

.zp-covers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* ---- facts ---- */
.zp-facts {
    margin-top: 4.5rem;
    margin-bottom: 4.5rem;
    gap: 1.5rem 3.5rem;
}

.zp-facts-scope {
    flex: 1 1 280px;
}

/* ---- need / approach ---- */
.zp-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 4rem;
    margin-bottom: 4.5rem;
}

.zp-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary-text);
    margin-bottom: 0.75rem;
}

.zp-block p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 62ch;
    margin-bottom: 0;
}

/* ---- project sections ---- */
.zp-project {
    padding-top: 4.5rem;
    border-top: 1px solid #1a1a1a;
    margin-bottom: 4.5rem;
    scroll-margin-top: 96px;
}

.zp-project-head {
    margin-bottom: 1.5rem;
    max-width: 760px;
}

.zp-project-title {
    font-size: 1.875rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.zp-project-head p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.zp-award {
    margin-top: 1rem;
    color: var(--text-color) !important;
}

.zp-fig--full {
    margin-bottom: 24px;
}

.zp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.zp .case-related {
    margin-bottom: 0;
}

.zp-cta {
    margin-top: 4.5rem;
}

.zp-cta p {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .zp {
        padding-top: calc(100px + 32px);
    }

    .zp .case-title {
        font-size: 2.2rem;
    }

    .zp .case-result {
        font-size: 1.15rem;
    }

    .zp-covers,
    .zp-grid,
    .zp-pair {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .zp-covers .zp-fig + .zp-fig {
        margin-top: 16px;
    }

    .zp-pair {
        gap: 2rem;
    }

    .zp-grid .zp-fig + .zp-fig {
        margin-top: 8px;
    }

    .zp-fig--full {
        margin-bottom: 24px;
    }

    .zp-jump {
        display: flex;
        margin-left: 0;
    }

    .zp-facts,
    .zp-pair,
    .zp-project,
    .zp-cta {
        margin-bottom: 2.75rem;
    }

    .zp-facts {
        margin-top: 2.75rem;
        gap: 1.25rem 2rem;
    }

    .zp-facts > div:not(.zp-facts-scope):not(.case-facts-wide) {
        flex: 1 1 calc(50% - 1rem);
        min-width: 0;
    }

    .zp-facts-scope {
        flex-basis: 100%;
    }

    .zp-project {
        padding-top: 2.75rem;
    }

    .zp-project-title {
        font-size: clamp(1.5rem, 6.4vw, 1.75rem);
    }

    .zp-cta {
        margin-top: 2.75rem;
    }
}

/* ================= image viewer (dialog) ================= */
.cv {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #050505;
    color: var(--text-color);
    font-family: var(--font-main);
}

.cv::backdrop {
    background: rgba(5, 5, 5, 0.9);
}

.cv[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.cv-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 12px 10px 20px;
    border-bottom: 1px solid #1a1a1a;
}

.cv-info {
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cv-title {
    display: block;
    color: var(--text-color);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-count {
    color: var(--secondary-text);
    font-variant-numeric: tabular-nums;
}

.cv-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.cv-btn:hover {
    background: #fff;
    color: #050505;
    opacity: 1;
}

.cv-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.cv-btn[aria-pressed="true"] {
    background: #fff;
    color: #050505;
}

.cv-btn svg {
    width: 18px;
    height: 18px;
}

.cv-btn--icon {
    padding: 0;
    width: 44px;
}

.cv-stage {
    position: relative;
    overflow: auto;
    display: grid;
    place-items: center;
    padding: 16px;
    touch-action: pan-x pan-y pinch-zoom;
}

.cv-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 6px;
    cursor: zoom-in;
}

/* zoomed: the original 2048 px image at its natural size, panned by scrolling / touch */
/* zoomed: the 3840 px original, shown up to 2560 px wide; on phones about 3x the screen width,
   so slide text is readable. Panned by scrolling / touch. */
.cv-stage.is-zoomed {
    display: block;
}

.cv-stage.is-zoomed img {
    max-width: none;
    max-height: none;
    width: min(2560px, 320vw);
    cursor: zoom-out;
}

.cv-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #1a1a1a;
}

.cv-foot .cv-spacer {
    flex: 0 0 8px;
}

/* keep the WhatsApp button away from the viewer controls */
body.cv-is-open .whatsapp-float {
    display: none;
}

body.cv-is-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .cv-bar {
        padding-left: 14px;
    }

    .cv-foot .cv-spacer {
        display: none;
    }

    .cv-btn {
        padding: 0 10px;
        font-size: 0.8rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
