/* ═══════════════════════════════════════════════════════════════
   CINEMATIC MAGAZINE LAYOUT - Project Detail Page
   ═══════════════════════════════════════════════════════════════ */

/* ─── CINEMATIC PAGE CONTAINER ─── */
#project-page {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    pointer-events: none;
    opacity: 0;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    background: #0a0a0a;
}

#project-page::-webkit-scrollbar {
    display: none;
}

/* Film grain overlay */
#project-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 151;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ─── CINEMATIC HERO SECTION ─── */
.project-cinematic-hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    overflow: hidden;
}

/* Full-bleed hero image with cinematic treatment */
.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(0.85) contrast(1.15) brightness(0.7);
    transform: scale(1.05);
    transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#project-page.is-active .hero-backdrop {
    transform: scale(1);
}

/* Cinematic vignette */
.hero-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.85) 100%);
}

/* Bottom gradient for text readability */
.hero-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.6) 35%,
            rgba(0, 0, 0, 0.2) 55%,
            transparent 70%);
}

/* ─── HERO CONTENT LAYER ─── */
.hero-content-layer {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto auto;
    padding: 8vh 6vw;
    gap: 2rem;
    align-self: end;
    width: 100%;
}

/* Magazine-style eyebrow text */
.cinematic-eyebrow {
    grid-column: 1 / -1;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cinematic-eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: rgba(255, 95, 74, 0.8);
}

/* Dramatic cinematic title */
.cinematic-title {
    grid-column: 1 / -1;
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3.5rem, 10vw, 9rem);
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: -0.03em;
    /* text-transform: uppercase; */
    color: #fff;
    margin: 0 0 3vh 0;
    max-width: 16ch;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

/* Split meta layout */
.hero-meta-left {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-meta-right {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
}

/* Lead paragraph - magazine pull quote style */
.cinematic-lead {
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.25rem, 2.2vw, 1.9rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    max-width: 36ch;
    margin: 0;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(255, 95, 74, 0.6);
}

/* Cinematic stats grid */
.cinematic-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 3rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-label {
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.stat-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.4rem;
}

.hero-tag {
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.hero-link {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(10, 10, 10, 0.35);
}

.hero-link:hover {
    border-color: rgba(255, 95, 74, 0.6);
    color: #fff;
    background: rgba(255, 95, 74, 0.12);
}

.hero-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* ─── EDITORIAL CONTENT SECTIONS ─── */
.project-editorial {
    position: relative;
    z-index: 5;
    background: #0a0a0a;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
}

/* Full-bleed section for dramatic images */
.editorial-fullbleed {
    grid-column: 1 / -1;
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    margin: 0;
}

.editorial-fullbleed img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.78) contrast(1.18) brightness(0.72);
}

.editorial-fullbleed::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 36%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.42) 58%, rgba(0, 0, 0, 0.82) 100%),
        linear-gradient(90deg, rgba(5, 5, 5, 0.82) 0%, rgba(5, 5, 5, 0.48) 32%, rgba(5, 5, 5, 0.12) 62%, rgba(5, 5, 5, 0.5) 100%),
        linear-gradient(to bottom, rgba(10, 10, 10, 1) 0%, transparent 15%, transparent 78%, rgba(10, 10, 10, 1) 100%);
}

/* Text overlay on fullbleed images */
.fullbleed-text {
    position: absolute;
    z-index: 10;
    max-width: min(520px, 42vw);
    padding: 0 0 0 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

.fullbleed-text::after {
    content: '';
    position: absolute;
    inset: -3rem -5rem -3rem -2rem;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.34) 48%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.fullbleed-text.bottom-left {
    bottom: 15%;
    left: 6vw;
}

.fullbleed-text.top-right {
    top: 20%;
    right: 6vw;
    text-align: right;
}

.fullbleed-text h3 {
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.92), 0 1px 1px rgba(0, 0, 0, 0.85);
}

.fullbleed-text p {
    font-size: clamp(0.92rem, 1vw, 1.02rem);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.84);
    margin: 0;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.95), 0 1px 1px rgba(0, 0, 0, 0.75);
}

/* Magazine article body */
.editorial-body {
    grid-column: 3 / 11;
    padding: 10vh 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1.1rem;
}

/* Drop cap first paragraph */
.editorial-body>.body-text:first-of-type::first-letter {
    float: left;
    font-family: 'Fraunces', 'Playfair Display', 'Georgia', serif;
    font-size: 5.5rem;
    line-height: 0.8;
    padding-right: 0.75rem;
    padding-top: 0.5rem;
    color: rgba(255, 95, 74, 0.9);
}

.body-text {
    grid-column: 1 / -1;
    font-family: 'Fraunces', 'Playfair Display', 'Georgia', serif;
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
    max-width: 72ch;
    margin: 0 auto;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.body-text p {
    margin: 0 0 0.8rem;
}

.body-text code,
.body-list code {
    font-family: var(--font-ui);
    font-size: 0.9em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.body-heading {
    grid-column: 1 / -1;
    font-family: 'Fraunces', 'Playfair Display', 'Georgia', serif;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
    max-width: 72ch;
    margin: 1.2rem auto 0.4rem;
}

.body-list {
    grid-column: 1 / -1;
    max-width: 72ch;
    margin: 0 auto 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

.body-list ul {
    margin: 0;
    padding-left: 1.2rem;
}

.body-list li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

/* Pull quote - magazine style */
.pull-quote {
    grid-column: 2 / 8;
    margin: 4rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.pull-quote::before {
    content: '"';
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: 8rem;
    line-height: 1;
    color: rgba(255, 95, 74, 0.2);
    position: absolute;
    top: -1rem;
    left: -1rem;
}

.pull-quote-text {
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    margin: 0 0 1rem 0;
}

.pull-quote-attribution {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* ─── CINEMATIC IMAGE GALLERY ─── */
.cinematic-gallery {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2px;
    margin: 6vh 0;
    background: rgba(255, 255, 255, 0.05);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    flex: 0 0 auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(0.75) contrast(1.15);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: saturate(0.9) contrast(1.2);
}

/* ─── MOBILE RIBBON GALLERY ─── */
.cinematic-ribbon {
    display: none;
    grid-column: 1 / -1;
    overflow: hidden;
    margin: 5vh 0;
    touch-action: pan-y;
}

.ribbon-track {
    display: flex;
    align-items: stretch;
    gap: 0;
    will-change: transform;
}

.ribbon-item {
    flex: 0 0 auto;
    height: var(--ribbon-height, 180px);
}

.ribbon-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

/* ─── HIGHLIGHTS STRIP ─── */
.cinematic-highlights {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 3rem;
    padding: 6vh 4vw;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: 4vh 0;
}

.highlight-pill {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.8rem 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.highlight-pill:hover {
    border-color: rgba(255, 95, 74, 0.5);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 95, 74, 0.08);
}

/* ─── CINEMATIC FOOTER ─── */
.cinematic-footer {
    grid-column: 1 / -1;
    padding: 8vh 6vw;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.footer-quote {
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 50ch;
    margin: 0 auto 3rem;
}

.blog-placeholder {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
}

/* ─── CINEMATIC RESPONSIVE ─── */
@media (max-width: 1024px) {
    .hero-content-layer {
        grid-template-columns: 1fr;
        padding: 6vh 5vw;
    }

    .hero-meta-right {
        grid-column: 1;
        align-items: flex-start;
        text-align: left;
    }

    .hero-tags,
    .hero-links {
        justify-content: flex-start;
    }

    .cinematic-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .editorial-body {
        grid-column: 2 / 12;
    }

    .gallery-item.large {
        grid-column: span 12;
    }

    .gallery-item.medium,
    .gallery-item.small {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .project-cinematic-hero {
        height: 100svh;
        min-height: 700px;
    }

    .hero-content-layer {
        padding: 4vh 5vw;
        gap: 1.5rem;
    }

    .cinematic-title {
        font-size: clamp(2rem, 11vw, 3.5rem);
        margin-bottom: 2vh;
    }

    .cinematic-lead {
        font-size: 1.1rem;
        padding-left: 1rem;
    }

    .cinematic-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-item {
        gap: 0.3rem;
    }

    .stat-label {
        font-size: 0.55rem;
    }

    .stat-value {
        font-size: 0.75rem;
    }

    .editorial-body {
        grid-column: 1 / -1;
        padding: 6vh 5vw;
    }

    .body-text {
        font-size: 1rem;
    }

    .editorial-fullbleed {
        height: 60vh;
        min-height: 400px;
    }

    .fullbleed-text {
        max-width: calc(100% - 10vw);
        padding: 0 0 0 1rem;
    }

    .fullbleed-text.bottom-left {
        bottom: 8%;
        left: 5vw;
    }

    .fullbleed-text::after {
        inset: -2rem -3rem -2rem -1.25rem;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 60%, rgba(0, 0, 0, 0) 100%);
    }

    .pull-quote {
        grid-column: 1 / -1;
        margin: 3rem 0;
    }

    .gallery-item.medium,
    .gallery-item.small {
        grid-column: span 12;
    }

    .cinematic-gallery {
        display: none;
    }

    .cinematic-ribbon {
        display: block;
        --ribbon-height: 180px;
    }
}

.gallery-item video,
.ribbon-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* <--- This stops the cropping */
    filter: saturate(0.75) contrast(1.15);
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.gallery-item:hover video {
    transform: scale(1.03);
    filter: saturate(0.9) contrast(1.2);
}