* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: "Plus Jakarta Sans", sans-serif;
    background: #f3f3f1;
    color: #111;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.project-header {
    width: 100%;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    text-decoration: none;
    color: #111;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

.back-link:hover {
    color: #4c5eff;
}

.project-logo {
    width: 52px;
    height: auto;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.project-page {
    width: 100%;
    padding: 10px 40px 120px;
}

/* ============================================
   HERO
   ============================================ */
.project-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 80px;
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.project-hero-image video {
    width: 100%;
    height: 590px;
    object-fit: cover;
    border-radius: 20px;
}

.project-hero-content {
    padding-top: 10px;
}

.project-kicker {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 16px;
    font-weight: 700;
}

.project-hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
    max-width: 700px;
    margin-bottom: 30px;
}

.project-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 34px;
}

.project-meta div span {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.project-meta div strong {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.project-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 54px;
    padding: 0 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s ease;
}

.primary-btn {
    background: #111;
    color: #fff;
}

.primary-btn:hover {
    background: #4c5eff;
}

.secondary-btn {
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #111;
    background: transparent;
}

.secondary-btn:hover {
    border-color: #4c5eff;
    color: #4c5eff;
}

/* ============================================
   GALLERY — 3-COLUMN SPOTLIGHT
   ============================================ */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 64px;
}

/* Each gallery card */
.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #e8e8e6;
    /* subtle lift shadow */
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.16);
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* Hover overlay with "View" label */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.35s ease;
}

.gallery-overlay span {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(17,17,17,0.7);
    padding: 10px 22px;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.85) translateY(6px);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
    backdrop-filter: blur(4px);
}

.gallery-item:hover .gallery-overlay {
    background: rgba(17, 17, 17, 0.18);
}

.gallery-item:hover .gallery-overlay span {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-label {
    margin-bottom: 32px;
}

/* ============================================
   MASONRY IMAGE GRID
   ============================================ */
.project-pdf-section {
    margin-top: 0;
}

.masonry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.masonry-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Each masonry card */
.masonry-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #e8e8e6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition:
        box-shadow 0.4s ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.masonry-item:hover {
    box-shadow: 0 14px 44px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.masonry-item:hover img {
    transform: scale(1.03);
}

.masonry-item .gallery-overlay span {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(17,17,17,0.7);
    padding: 9px 20px;
    border-radius: 999px;
    opacity: 0;
    transform: scale(0.85) translateY(6px);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
    backdrop-filter: blur(4px);
}

.masonry-item:hover .gallery-overlay {
    background: rgba(17, 17, 17, 0.15);
}

.masonry-item:hover .gallery-overlay span {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lb-img-wrap {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-img-wrap img {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: opacity 0.2s ease;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lb-img-wrap img.lb-swap {
    opacity: 0;
}

/* Close button */
.lb-close {
    position: fixed;
    top: 24px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.lb-close:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

/* Prev / Next arrows */
.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.lb-prev { left: 24px; }
.lb-next { right: 24px; }

.lb-prev:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.08);
}
.lb-next:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.08);
}

/* Counter label */
.lb-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
[data-anim] {
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-duration: 0.75s;
    transition-delay: var(--delay, 0s);
}

[data-anim="fade-up"] {
    opacity: 0;
    transform: translateY(36px);
}
[data-anim="fade-in"] {
    opacity: 0;
}
[data-anim="slide-left"] {
    opacity: 0;
    transform: translateX(-28px);
}
[data-anim="scale-up"] {
    opacity: 0;
    transform: scale(0.93) translateY(20px);
}
[data-anim="pop"] {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
}

[data-anim].is-visible {
    opacity: 1;
    transform: none;
}

/* ── Hero entrance animations (CSS, fires on load) ── */
.hero-anim-kicker  { opacity: 0; transform: translateY(18px); animation: heroIn 0.6s cubic-bezier(0.22,1,0.36,1) 0.10s forwards; }
.hero-anim-h1      { opacity: 0; transform: translateY(24px); animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.22s forwards; }
.hero-anim-desc    { opacity: 0; transform: translateY(20px); animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.36s forwards; }
.hero-anim-meta    { opacity: 0; transform: translateY(16px); animation: heroIn 0.6s cubic-bezier(0.22,1,0.36,1) var(--delay, 0.50s) forwards; }
.hero-anim-img     { opacity: 0; transform: scale(0.97) translateY(16px); animation: heroIn 0.85s cubic-bezier(0.22,1,0.36,1) 0.05s forwards; }

@keyframes heroIn {
    to { opacity: 1; transform: none; }
}

/* ── Border-top reveal on .cs-section / .cs-pull-quote / .cs-cta ── */
.cs-section,
.cs-pull-quote,
.cs-cta {
    position: relative;
}
.cs-section::before,
.cs-pull-quote::before,
.cs-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 1px;
    width: 100%;
    background: #e0dedd;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--line-delay, 0s);
}
.cs-section.is-visible::before,
.cs-pull-quote.is-visible::before,
.cs-cta.is-visible::before {
    transform: scaleX(1);
}
.cs-section,
.cs-pull-quote,
.cs-cta {
    border-top: none;
}

/* ============================================
   CASE STUDY SECTIONS (unchanged from original)
   ============================================ */
.case-study {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cs-section {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 56px 0;
}

.cs-section .section-head {
    margin-bottom: 0;
}

.cs-section .section-head p {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
    margin-bottom: 10px;
}

.cs-section .section-head h2 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #111;
    position: sticky;
    top: 30px;
}

.cs-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 18px;
}

.cs-body p:last-child {
    margin-bottom: 0;
}

.cs-barriers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.cs-barrier-card {
    background: #fff;
    border: 1px solid #e0dedd;
    border-radius: 14px;
    padding: 20px 18px;
    transition: border-color 0.25s ease;
}

.cs-barrier-card:hover { border-color: #bbb; }

.cs-barrier-num {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b04040;
    margin-bottom: 10px;
}

.cs-barrier-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    font-weight: 500;
}

.cs-pull-quote {
    padding: 56px 0;
}

.cs-pull-quote blockquote {
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.5px;
    color: #111;
    max-width: 720px;
    padding-left: 28px;
    border-left: 3px solid #111;
}

.cs-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.cs-pillar {
    background: #fff;
    border: 1px solid #e0dedd;
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.25s ease;
}

.cs-pillar:hover { border-color: #bbb; }

.cs-pillar-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 6px;
}

.cs-pillar-sub {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.55;
}

.cs-ai-box {
    background: #fff;
    border: 1px solid #e0dedd;
    border-radius: 14px;
    padding: 24px 22px;
    margin: 24px 0;
}

.cs-ai-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 14px;
}

.cs-ai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-ai-tag {
    font-size: 0.85rem;
    font-weight: 600;
    background: #f3f3f1;
    border: 1px solid #e0dedd;
    border-radius: 999px;
    padding: 6px 16px;
    color: #333;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cs-ai-tag:hover {
    background: #eeecea;
    border-color: #bbb;
}

.cs-cta {
    padding: 56px 0 0;
}

.cs-cta-inner {
    background: #111;
    border-radius: 20px;
    padding: 48px 52px;
}

.cs-cta-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin-bottom: 14px;
}

.cs-cta-heading {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.cs-cta-text {
    font-size: 1rem;
    line-height: 1.75;
    color: #888;
    max-width: 540px;
    margin-bottom: 28px;
}

.cs-cta-inner .primary-btn {
    background: #fff;
    color: #111;
    font-size: 0.9rem;
}

.cs-cta-inner .primary-btn:hover {
    background: #4c5eff;
    color: #fff;
}

/* ============================================
   SECTION HEAD (standalone use)
   ============================================ */
.section-head {
    margin-bottom: 24px;
}

.section-head p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
    letter-spacing: -1px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .project-hero {
        grid-template-columns: 1fr;
    }

    .project-hero-image img {
        height: 480px;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 280px;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .cs-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cs-section .section-head h2 {
        position: static;
    }

    .cs-barriers {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .project-header,
    .project-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .project-hero-image img {
        height: 320px;
        border-radius: 16px;
    }

    .project-description {
        font-size: 0.98rem;
    }

    .cs-pillars {
        grid-template-columns: 1fr;
    }

    .cs-cta-inner {
        padding: 32px 28px;
    }

    .project-meta {
        flex-wrap: wrap;
        gap: 20px;
    }

    .lb-prev { left: 12px; }
    .lb-next { right: 12px; }

    .lb-nav {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }

    .lb-img-wrap img {
        max-width: 94vw;
        max-height: 80vh;
    }
}

/* ============================================
   FEATURED VIDEO SECTION
   ============================================ */
.project-video-section {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.project-video-label {
    margin-bottom: 18px;
}

/* 16:9 responsive wrapper */
.project-video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.10),
        0 24px 64px rgba(0, 0, 0, 0.12);
}

.project-video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}

@media (max-width: 700px) {
    .project-video-section {
        padding: 0 20px;
        margin-bottom: 56px;
    }

    .project-video-frame {
        border-radius: 14px;
    }
}
