/* ═══ Case Studies / Process — luxury construction editorial ═══ */

/* ── Shared typography & patterns ── */
.case-studies-page .cs-section-title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.cs-pattern {
    position: relative;
    isolation: isolate;
}

.cs-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cs-pattern > * {
    position: relative;
    z-index: 1;
}

.cs-pattern--blueprint::before {
    opacity: .028;
    background-image:
        linear-gradient(rgba(7, 31, 58, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 31, 58, .55) 1px, transparent 1px);
    background-size: 56px 56px;
}

.cs-pattern--roofline::before {
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 120' fill='none'%3E%3Cpath d='M0 92 L96 48 L192 68 L288 32 L384 58 L480 24 L480 120 L0 120 Z' stroke='%23071F3A' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 480px 120px;
    background-repeat: repeat-x;
    background-position: center top;
}

/* ── Section dividers ── */
.cs-divider {
    height: 1px;
    border: 0;
    margin: 0;
}

.cs-divider--navy {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12) 50%, transparent);
}

.cs-divider--soft {
    background: linear-gradient(90deg, transparent, var(--warm-mid) 50%, transparent);
}

.cs-divider--fade {
    height: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(to bottom, var(--white) 0%, var(--warm) 100%);
}

.cs-gallery + .cs-divider--fade {
    background: linear-gradient(to bottom, var(--warm) 0%, var(--white) 100%);
}

/* ── Process timeline ── */
.process-journey {
    padding: clamp(4rem, 8vw, 6rem) 0;
    background: var(--white);
}

.process-journey__head {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.process-journey__intro {
    margin: 1rem 0 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.process-journey__track {
    position: relative;
    max-width: 1080px;
    margin-inline: auto;
}

.process-journey__line {
    position: absolute;
    left: 50%;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--warm-mid) 8%,
        rgba(196, 30, 58, .35) 50%,
        var(--warm-mid) 92%,
        transparent 100%
    );
    pointer-events: none;
}

.process-journey__steps,
.process-journey__track {
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 6vw, 5rem);
}

.process-journey__step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
    transition: transform .45s ease;
}

.process-journey__step:hover {
    transform: translateY(-2px);
}

.process-journey__marker {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.process-journey__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: var(--navy);
    border: 3px solid var(--brand-red);
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 1),
        0 12px 32px rgba(7, 31, 58, .14);
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--white);
    transition: transform .35s ease, box-shadow .35s ease;
}

.process-journey__step:hover .process-journey__circle {
    transform: scale(1.06);
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 1),
        0 16px 40px rgba(7, 31, 58, .2);
}

.process-journey__step:nth-child(odd) .process-journey__media {
    grid-column: 1;
    grid-row: 1;
}

.process-journey__step:nth-child(odd) .process-journey__copy {
    grid-column: 3;
    grid-row: 1;
}

.process-journey__step:nth-child(even) .process-journey__copy {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
}

.process-journey__step:nth-child(even) .process-journey__media {
    grid-column: 3;
    grid-row: 1;
}

.process-journey__step:nth-child(even) .process-journey__body {
    margin-inline: auto 0;
}

.process-journey__media {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: var(--navy);
    box-shadow:
        0 4px 6px rgba(7, 31, 58, .04),
        0 20px 48px rgba(7, 31, 58, .12);
    transition: box-shadow .45s ease;
}

.process-journey__step:hover .process-journey__media {
    box-shadow:
        0 8px 12px rgba(7, 31, 58, .06),
        0 28px 56px rgba(7, 31, 58, .16);
}

.process-journey__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.25, .46, .45, .94);
}

.process-journey__step:hover .process-journey__media img {
    transform: scale(1.045);
}

.process-journey__title {
    margin: 0 0 1.125rem;
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 2.4vw, 1.75rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--heading);
}

.process-journey__body {
    margin: 0;
    max-width: 28rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text);
}

/* ── Gallery — luxury bento ── */
.cs-gallery {
    padding: clamp(4rem, 8vw, 6rem) 0 clamp(3.5rem, 6vw, 5rem);
    background: var(--warm);
}

.cs-gallery__head {
    text-align: center;
    max-width: 38rem;
    margin: 0 auto 2.5rem;
}

.cs-gallery__intro {
    margin: 1rem 0 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.cs-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(240px, 1fr);
    gap: 1.125rem;
}

.cs-gallery__tile {
    position: relative;
    display: block;
    min-height: 240px;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    background: var(--navy);
    box-shadow:
        0 2px 4px rgba(7, 31, 58, .04),
        0 16px 40px rgba(7, 31, 58, .1);
    transition: box-shadow .45s ease, transform .45s ease;
}

.cs-gallery__tile:hover {
    transform: translateY(-3px);
    box-shadow:
        0 4px 8px rgba(7, 31, 58, .06),
        0 24px 52px rgba(7, 31, 58, .14);
}

.cs-gallery__tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.25, .46, .45, .94);
}

.cs-gallery__tile:hover img {
    transform: scale(1.055);
}

.cs-gallery__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(7, 31, 58, .76) 0%,
        rgba(7, 31, 58, .22) 45%,
        rgba(7, 31, 58, .04) 100%
    );
    transition: background .4s ease;
    pointer-events: none;
}

.cs-gallery__tile:hover .cs-gallery__shade {
    background: rgba(7, 31, 58, .72);
}

.cs-gallery__label {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem 1.5rem 1.625rem;
    color: var(--white);
}

.cs-gallery__label strong {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.cs-gallery__label em {
    display: block;
    margin-top: .75rem;
    font-style: normal;
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--brand-red);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}

.cs-gallery__tile:hover .cs-gallery__label em {
    opacity: 1;
    transform: translateY(0);
}

.cs-gallery__tile--hero {
    grid-column: span 2;
    grid-row: span 2;
}

.cs-gallery__tile--wide {
    grid-column: span 2;
}

.cs-gallery__tile--tall {
    grid-row: span 2;
}

.cs-gallery__foot {
    margin-top: 2.5rem;
    text-align: center;
}

/* ── Trust — premium cards ── */
.cs-trust {
    padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 6vw, 5rem);
    background: var(--white);
}

.cs-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: var(--wrap-hero);
    margin-inline: auto;
}

.cs-trust__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    min-height: 148px;
    padding: 1.75rem 1.25rem;
    border-radius: 22px;
    background: linear-gradient(165deg, var(--white) 0%, #f8f9fb 100%);
    border: 1px solid rgba(7, 31, 58, .08);
    box-shadow:
        0 1px 2px rgba(7, 31, 58, .04),
        0 12px 36px rgba(7, 31, 58, .07);
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease;
}

.cs-trust__card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 2px 4px rgba(7, 31, 58, .05),
        0 18px 44px rgba(7, 31, 58, .1);
}

.cs-trust__card--rating {
    gap: .75rem;
}

.cs-trust__stars {
    display: inline-block;
    padding: .4rem .875rem;
    border-radius: 10px;
    background: var(--navy);
    color: var(--brand-red);
    font-size: 1.125rem;
    letter-spacing: 3px;
    line-height: 1;
}

.cs-trust__value {
    font-family: var(--font-head);
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.cs-trust__label {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-muted);
}

/* ── Compact premium footer (case studies page only) ── */
body:has(.case-studies-page) .site-footer__main {
    padding: clamp(2.75rem, 5vw, 3.5rem) min(32px, 4vw) clamp(2.25rem, 4vw, 3rem);
}

body:has(.case-studies-page) .site-footer__logo img {
    height: 80px;
}

body:has(.case-studies-page) .site-footer__desc {
    margin-bottom: 1.25rem;
    font-size: .9375rem;
    line-height: 1.65;
}

body:has(.case-studies-page) .site-footer__heading {
    margin-bottom: 1.125rem;
    font-size: .6875rem;
    letter-spacing: .14em;
}

body:has(.case-studies-page) .site-footer__links li {
    margin-bottom: .625rem;
}

body:has(.case-studies-page) .site-footer__links a {
    font-size: .9375rem;
}

body:has(.case-studies-page) .site-footer__address {
    font-size: .9375rem;
    line-height: 1.65;
    margin-bottom: 1.125rem;
}

body:has(.case-studies-page) .site-footer__contact-list a {
    font-size: .9375rem;
}

body:has(.case-studies-page) .site-footer__trust-bar {
    padding: .875rem min(32px, 4vw);
}

body:has(.case-studies-page) .site-footer__trust-bar-inner {
    font-size: .8125rem;
    letter-spacing: .04em;
}

body:has(.case-studies-page) .site-footer__legal {
    padding: 1rem min(32px, 4vw);
}

body:has(.case-studies-page) .site-footer__legal p {
    font-size: .8125rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .cs-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(220px, 1fr);
    }

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

@media (max-width: 900px) {
    .process-journey__line {
        left: 2.125rem;
        transform: none;
    }

    .process-journey__step,
    .process-journey__step--reverse {
        grid-template-columns: 4.25rem 1fr;
        gap: 1.25rem 1.5rem;
    }

    .process-journey__marker {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
        padding-top: .5rem;
    }

    .process-journey__circle {
        width: 3.5rem;
        height: 3.5rem;
        font-size: .875rem;
        box-shadow:
            0 0 0 4px rgba(255, 255, 255, 1),
            0 8px 24px rgba(7, 31, 58, .12);
    }

    .process-journey__step:nth-child(odd) .process-journey__media,
    .process-journey__step:nth-child(even) .process-journey__media {
        grid-column: 2;
        grid-row: 1;
    }

    .process-journey__step:nth-child(odd) .process-journey__copy,
    .process-journey__step:nth-child(even) .process-journey__copy {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
    }

    .process-journey__step:nth-child(even) .process-journey__body {
        margin-inline: 0;
    }
}

@media (max-width: 768px) {
    .process-journey__media img {
        aspect-ratio: 4 / 3;
    }

    .cs-gallery__grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        max-width: 520px;
        margin-inline: auto;
    }

    .cs-gallery__tile,
    .cs-gallery__tile--hero,
    .cs-gallery__tile--wide,
    .cs-gallery__tile--tall {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 300px;
    }

    .cs-gallery__label em {
        opacity: 1;
        transform: none;
    }

    .cs-trust__grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-studies-page .page-hero--parallax .page-hero__photo {
        transform: none !important;
    }

    .process-journey__step:hover,
    .cs-gallery__tile:hover,
    .cs-trust__card:hover {
        transform: none;
    }
}
