/* ══════════════════════════════════════════════════════════════
   Project Case Study Page Styles
   Extends the base styles.css — uses same variables & font
   ══════════════════════════════════════════════════════════════ */

/* Override homepage body constraints so the project page scrolls */
body.project-page {
    height: auto;
    overflow: auto;
    overflow-x: hidden;
    --project-page-padding-x: clamp(1.25rem, 5vw, 2rem);
}

/* Fix the top bar to the top on project pages */
body.project-page .top-bar {
    position: sticky;
    top: 0;
}

/* Override homepage main styles — the homepage uses flex centring for
   the carousel, but the project page needs a normal block flow. */
body.project-page main {
    display: block;
    align-items: initial;
    justify-content: initial;
    padding: 0;
    overflow: visible;
    min-height: auto;
    flex: none;
}

/* ── Main container — single column width for every case study page ─────────── */
.project-main {
    max-width: var(--project-page-max-width);
    margin: 0 auto;
    box-sizing: border-box;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-left: var(--project-page-padding-x);
    padding-right: var(--project-page-padding-x);
}

/* ── Shared section styles ────────────────────────────────────── */
.project-section {
    padding: clamp(3rem, 8vh, 6rem) 0;
    border-bottom: 1px solid var(--card-border);
}

.project-section:last-of-type {
    border-bottom: none;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2rem);
}

/* Case study column: .project-main already provides max-width + horizontal padding */
.project-main .section-content {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Mobile: after padding:0 — earlier @media was overridden by that shorthand (same specificity, later wins) */
@media (max-width: 768px) {
    body.project-page {
        --project-page-padding-x: clamp(1.75rem, 6vw, 2.25rem);
    }

    .project-main {
        padding-left: max(var(--project-page-padding-x), env(safe-area-inset-left, 0px));
        padding-right: max(var(--project-page-padding-x), env(safe-area-inset-right, 0px));
    }

    .project-main .section-content {
        padding-left: clamp(1rem, 4vw, 1.5rem);
        padding-right: clamp(1rem, 4vw, 1.5rem);
    }

    /* Full-bleed blocks (not inside .section-content) — match text inset */
    .project-main .full-width-media,
    .project-main .media-split-grid,
    .project-main .before-after,
    .project-main .phone-screen-carousel,
    .project-main .laptop-screen-carousel,
    .project-main .process-media-carousel {
        padding-left: clamp(1rem, 4vw, 1.5rem);
        padding-right: clamp(1rem, 4vw, 1.5rem);
        box-sizing: border-box;
    }
}

/* Section numbering label */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

/* Section heading */
.section-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

/* Intro paragraph below heading */
.section-intro {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.85;
    max-width: none;
}

/* Sub-section headings */
.subsection-heading {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    opacity: 0.65;
}

/* Body text */
.section-body p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.85;
}

/* Override 72ch cap on .section-body p when copy should span the project column */
.section-body--full p {
    max-width: none;
}

/* Two-column layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ══════════════════════════════════════════════════════════════
   1. THE HOOK — Hero Section
   ══════════════════════════════════════════════════════════════ */
.hero-section {
    padding-top: 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 4.5vh, 2.75rem);
}

/* Fixed 16:9 frame so portrait vs landscape source assets get the same layout */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--card-border);
    border-top: none;
}

/* Optional: native-size hero (no fixed aspect). Add class on the wrapper in HTML. */
.hero-image-wrapper--constrain {
    aspect-ratio: auto;
    max-height: none;
    max-width: min(2752px, 100%);
    margin-left: auto;
    margin-right: auto;
    border-radius: 0 0 12px 12px;
}

.hero-image-wrapper--constrain .hero-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-content {
    /* Space after hero image: .hero-section gap */
    padding-top: 0;
    padding-bottom: clamp(1.25rem, 3vh, 2rem);
}

/* Discipline line — ties to playing-card motif, clearer than body opacity */
.project-category {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.58;
    margin: 0 0 0.5rem;
}

.project-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin: 0 0 1.35rem;
}

.project-summary {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    font-weight: 300;
    line-height: 1.75;
    opacity: 0.86;
    max-width: none;
    margin: 0;
}

/* Meta facts — card on all breakpoints; sidebar on wide hero */
.project-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.125rem 1.25rem;
    margin-top: 1.75rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
}

@media (min-width: 520px) {
    .project-details {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.detail-item dt {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.42;
}

.detail-item dd {
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

/* Wide hero: left stack (category, title, summary) | meta card; tops aligned */
@media (min-width: 880px) {
    .hero-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
        column-gap: clamp(1.75rem, 4vw, 3rem);
        row-gap: clamp(0.75rem, 2vw, 1.25rem);
        align-items: start;
    }

    .hero-content .project-category {
        grid-column: 1;
        grid-row: 1;
        margin: 0 0 0.5rem;
        align-self: start;
    }

    .hero-content .project-title {
        grid-column: 1;
        grid-row: 2;
        margin-bottom: 0;
        align-self: start;
    }

    .hero-content .project-summary {
        grid-column: 1;
        grid-row: 3;
        padding-top: 0.15rem;
        margin: 0;
        align-self: start;
    }

    .hero-content .project-details {
        grid-column: 2;
        grid-row: 1 / span 3;
        grid-template-columns: 1fr;
        margin-top: 0;
        gap: 1rem;
        align-self: start;
    }

}

/* ══════════════════════════════════════════════════════════════
   2. INSIGHT / STAT CARDS
   ══════════════════════════════════════════════════════════════ */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.insight-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.insight-stat {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.insight-label {
    font-size: 0.8125rem;
    font-weight: 300;
    opacity: 0.65;
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   3. PROCESS STEPS
   ══════════════════════════════════════════════════════════════ */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: none;
    margin: 2.5rem 0 0;
    padding: 0;
}

.process-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
}

.step-number {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.75rem;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.step-description {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.75;
}

/* ── Full-width media block ───────────────────────────────────── */
.full-width-media {
    margin-top: 3rem;
    padding: 0;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.media-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    display: block;
    background: var(--card-bg);
}

.media-caption {
    font-size: 0.8125rem;
    font-weight: 300;
    opacity: 0.5;
    text-align: center;
    margin-top: 0.75rem;
}

.media-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Dansense brand pair: shared frame matches 08 branding 1.png (1024×899) */
.media-split-grid > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.media-split-grid .media-split-frame {
    width: 100%;
    aspect-ratio: 1024 / 899;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-split-grid .media-split-frame .media-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    border-radius: 0;
    display: block;
}

@media (max-width: 640px) {
    .media-split-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════
   4. SOLUTION SHOWCASE
   ══════════════════════════════════════════════════════════════ */
.solution-showcase {
    max-width: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.showcase-item {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
}

.showcase-item--reverse {
    grid-template-columns: 1fr 1.2fr;
}

.showcase-item--reverse .showcase-image-wrapper {
    order: 2;
}

.showcase-item--reverse .showcase-annotation {
    order: 1;
}

.showcase-item--text-only {
    grid-template-columns: 1fr;
}

.showcase-item--text-only .showcase-annotation {
    max-width: none;
}

.showcase-image-wrapper {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.showcase-image {
    width: 100%;
    display: block;
}

/* Slightly shorter frame — crops top/bottom (object-fit cover) */
.showcase-image-wrapper--crop-y {
    aspect-ratio: 3 / 2;
}

.showcase-image-wrapper--crop-y .showcase-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.annotation-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
}

.showcase-annotation p {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .showcase-item,
    .showcase-item--reverse {
        grid-template-columns: 1fr;
    }

    .showcase-item--reverse .showcase-image-wrapper,
    .showcase-item--reverse .showcase-annotation {
        order: unset;
    }
}

/* Solution showcase — card modules (Beyond Bounds, Dansense) */
.solution-showcase--modules {
    margin-top: clamp(3rem, 6vw, 4rem);
    gap: clamp(2rem, 5vw, 3.5rem);
}

.solution-showcase--modules + .section-content {
    margin-top: clamp(2rem, 5vw, 3rem);
}

.solution-showcase--modules .showcase-item {
    align-items: start;
    gap: clamp(1.75rem, 3.5vw, 2.75rem);
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-sizing: border-box;
}

.solution-showcase--modules .showcase-image-wrapper {
    border: none;
    border-radius: 10px;
    background: transparent;
}

.solution-showcase--modules .annotation-title {
    font-size: clamp(1.2rem, 2.2vw, 1.35rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.solution-showcase--modules .showcase-annotation p {
    font-size: 0.9375rem;
    max-width: 42rem;
    opacity: 0.9;
}

.solution-feature-index {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.55;
}

/* ── Phone screen carousel (Tekenomie, etc.) ───────────────────────────────── */
.phone-screen-carousel {
    max-width: 520px;
    margin: 2.5rem auto 0;
    padding: 0;
    user-select: none;
}

.phone-carousel-stage {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Phone area only — arrows align to centre of this */
.phone-carousel-phone-area {
    outline: none;
}

.phone-carousel-phone-area:focus {
    outline: none;
}

.phone-carousel-phone-track {
    display: grid;
    grid-template-areas: "stack";
}

.phone-carousel-phone-slide {
    grid-area: stack;
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.phone-carousel-phone-slide.active {
    opacity: 1;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .phone-carousel-phone-slide { transition: none; }
}

/* Annotation track — stacked below phone */
.phone-carousel-annotation-track {
    display: grid;
    grid-template-areas: "stack";
    margin-top: 1.25rem;
}

.phone-carousel-annotation-slide {
    grid-area: stack;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.phone-carousel-annotation-slide.active {
    opacity: 1;
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .phone-carousel-annotation-slide { transition: none; }
}

.phone-carousel-image-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    border: 8px solid var(--card-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    background: var(--card-bg);
    cursor: grab;
}

.phone-carousel-image-wrap:active {
    cursor: grabbing;
}

.phone-carousel-image {
    width: 100%;
    display: block;
    vertical-align: top;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Let wrap handle drag; prevents image ghost */
}

.phone-carousel-annotation-slide .annotation-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.phone-carousel-annotation-slide p {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.85;
}

.phone-carousel-prev,
.phone-carousel-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.phone-carousel-prev:hover,
.phone-carousel-next:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.35);
}

.phone-carousel-prev:focus-visible,
.phone-carousel-next:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .phone-carousel-prev,
    .phone-carousel-next { transition: none; }
}

/* ── Laptop UI prototype carousel (Vindmolen) ───────────────────────────── */
.laptop-screen-carousel {
    /* Fill the case-study column (aligned with --project-page-max-width) */
    max-width: 100%;
    width: 100%;
    margin: 2.5rem auto 0;
    padding: 0 0 1rem;
    box-sizing: border-box;
    user-select: none;
}

/* Middle column must claim space between arrows; otherwise width:100% on the
   bezel can collapse to 0 before images contribute intrinsic size (thin line). */
.laptop-screen-carousel .phone-carousel-phone-area {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.laptop-screen-carousel .phone-carousel-phone-track {
    width: 100%;
}

.laptop-screen-carousel .phone-carousel-phone-slide {
    width: 100%;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
}

.laptop-screen-carousel .phone-carousel-image-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    aspect-ratio: 16 / 10;
    min-height: 0;
    container-type: size;
    border-radius: clamp(8px, 1.8vmin, 12px);
    border-style: solid;
    border-color: var(--card-border);
    /* Viewport fallback when container query units are unavailable */
    border-width: clamp(4px, 1.35vmin, 12px);
    border-width: clamp(4px, 2cqmin, 14px);
    box-shadow:
        0 4px 0 0 rgba(0, 0, 0, 0.5),
        0 24px 56px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    background: #0a0a0c;
    overflow: hidden;
}

.laptop-screen-carousel .phone-carousel-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: top center;
}

.laptop-screen-carousel .phone-carousel-annotation-slide {
    max-width: min(42rem, 100%);
}

/* Tablet / mobile: carousel arrows overlay the media so images stay full-width */
@media (max-width: 768px) {
    .process-media-carousel .phone-carousel-stage,
    .laptop-screen-carousel .phone-carousel-stage,
    .phone-screen-carousel .phone-carousel-stage {
        position: relative;
        gap: 0;
    }

    .process-media-carousel .phone-carousel-phone-area,
    .laptop-screen-carousel .phone-carousel-phone-area,
    .phone-screen-carousel .phone-carousel-phone-area {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        max-width: 100%;
    }

    .process-media-carousel .phone-carousel-prev,
    .process-media-carousel .phone-carousel-next,
    .laptop-screen-carousel .phone-carousel-prev,
    .laptop-screen-carousel .phone-carousel-next,
    .phone-screen-carousel .phone-carousel-prev,
    .phone-screen-carousel .phone-carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        width: 40px;
        height: 40px;
        margin: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-color: rgba(255, 255, 255, 0.25);
        opacity: 1;
    }

    .process-media-carousel .phone-carousel-prev,
    .laptop-screen-carousel .phone-carousel-prev,
    .phone-screen-carousel .phone-carousel-prev {
        left: max(0.5rem, env(safe-area-inset-left, 0px));
    }

    .process-media-carousel .phone-carousel-next,
    .laptop-screen-carousel .phone-carousel-next,
    .phone-screen-carousel .phone-carousel-next {
        right: max(0.5rem, env(safe-area-inset-right, 0px));
    }

}

/* ── Process / photo carousels: dots + autoplay progress (non-solution only; JS) ─ */
.phone-carousel--autoplay .phone-carousel-prev,
.phone-carousel--autoplay .phone-carousel-next {
    display: none !important;
}

.phone-carousel--autoplay {
    position: relative;
}

/* Phone-area hook for dots; autoplay progress lives inside .phone-carousel-image-wrap (clipped by its radius) */
.phone-carousel-phone-area--has-autoplay {
    position: relative;
}

.phone-carousel--autoplay .phone-carousel-stage {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.phone-carousel--autoplay .phone-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.phone-carousel--autoplay .phone-carousel-annotation-track {
    margin-top: 0.75rem;
}

.phone-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: var(--text-color, #fff);
    opacity: 0.28;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.phone-carousel-dot.is-active {
    opacity: 0.95;
    transform: scale(1.35);
}

.phone-carousel-dot:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 3px;
}

/* Progress bar: bottom of image frame; parent .phone-carousel-image-wrap overflow clips to border-radius */
.phone-carousel--autoplay .phone-carousel-autoplay-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    z-index: 3;
    pointer-events: none;
}

@keyframes phoneCarouselAutoplayProgress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.phone-carousel-autoplay-progress-fill {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: #fff;
    will-change: transform;
}

.phone-carousel-autoplay-progress-fill--animate {
    animation: phoneCarouselAutoplayProgress var(--phone-carousel-autoplay-ms, 12s) linear forwards;
}

.phone-carousel-autoplay-progress-fill.is-paused {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .phone-carousel-dot {
        transition: none;
    }

    .phone-carousel-autoplay-progress-fill--animate {
        animation: none !important;
    }
}

/* ── Process tab media carousel (multiple images in one panel) ───────────── */
.process-media-carousel {
    max-width: none;
    width: 100%;
    margin: 1.5rem 0 0;
    padding: 0;
    user-select: none;
}

.process-media-carousel .phone-carousel-phone-area {
    flex: 1;
    min-width: 0;
}

.process-media-carousel .phone-carousel-phone-track {
    width: 100%;
}

.process-media-carousel .phone-carousel-phone-slide {
    width: 100%;
}

.process-media-carousel .phone-carousel-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: none;
    cursor: grab;
}

.process-media-carousel .phone-carousel-image-wrap:active {
    cursor: grabbing;
}

.process-media-carousel .phone-carousel-image {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(85vh, 920px);
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.process-media-carousel .phone-carousel-annotation-slide {
    max-width: none;
    width: 100%;
}

.process-media-carousel .phone-carousel-annotation-slide .media-caption {
    margin-top: 0.75rem;
    margin-bottom: 0;
    text-align: center;
}

.process-media-carousel .phone-carousel-annotation-slide p {
    font-size: 0.8125rem;
    font-weight: 300;
    opacity: 0.55;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .process-media-carousel .phone-carousel-image {
        max-height: min(75vh, 560px);
    }
}

/* ── Before / After ───────────────────────────────────────────── */
.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ba-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    min-width: 0;
}

.ba-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.625rem;
    border-radius: 4px;
    z-index: 1;
}

.ba-image {
    width: 100%;
    display: block;
}

.ba-item .media-caption {
    margin: 0;
    padding: 0.875rem 1.125rem 1.125rem;
    text-align: center;
    line-height: 1.55;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .before-after {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* ══════════════════════════════════════════════════════════════
   5. IMPACT METRICS
   ══════════════════════════════════════════════════════════════ */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.impact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.impact-metric {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.impact-description {
    font-size: 0.8125rem;
    font-weight: 300;
    opacity: 0.65;
    line-height: 1.4;
}

/* User quote */
.user-quote {
    margin-top: 2.5rem;
    padding: 2rem;
    border-left: 3px solid var(--card-border);
    background: var(--card-bg);
    border-radius: 0 12px 12px 0;
}

.user-quote p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.user-quote cite {
    font-size: 0.8125rem;
    font-weight: 400;
    font-style: normal;
    opacity: 0.5;
}

/* ── Deliverables ─────────────────────────────────────────────── */
.deliverables-list {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.deliverable-item {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0.85;
}

.deliverable-item strong {
    font-weight: 600;
    opacity: 1;
}

.deliverable-link {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    transition: text-decoration-color 0.3s ease, opacity 0.3s ease;
}

.deliverable-link:hover,
.deliverable-link:focus-visible {
    text-decoration-color: var(--text-color);
    opacity: 1;
}

.deliverable-link:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Process stepper (Approach & Process) ──────────────────────── */
.process-tabs-section {
    margin-top: 1.5rem;
}

.process-tabs-wrapper.process-stepper {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    margin-bottom: 1.75rem;
}

.process-stepper__connector {
    flex: 1 1 0;
    min-width: 0.35rem;
    height: 2px;
    margin-top: calc(0.4rem + 1.125rem - 1px);
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 1px;
}

.process-tab.process-stepper__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 2.75rem;
    padding: 0.35rem;
    margin: 0;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.process-tab.process-stepper__btn:not(.active) {
    opacity: 0.72;
}

.process-tab.process-stepper__btn:hover,
.process-tab.process-stepper__btn:focus-visible {
    opacity: 1;
}

.process-tab.process-stepper__btn:hover:not(.active) .process-stepper__circle {
    border-color: rgba(255, 255, 255, 0.3);
}

.process-stepper__circle {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.process-tab.process-stepper__btn.active .process-stepper__circle {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.08);
}

.process-tab.process-stepper__btn:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .process-tab.process-stepper__btn {
        padding: 0.3rem;
        min-width: 2.5rem;
    }

    .process-stepper__circle {
        width: 2rem;
        height: 2rem;
        font-size: 0.82rem;
    }

    .process-stepper__connector {
        margin-top: calc(0.3rem + 1rem - 1px);
    }
}

.process-tab-panel {
    display: none;
}

.process-tab-panel.active {
    display: block;
}

.process-tab-panel[hidden] {
    display: none !important;
}

.process-tab-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: none;
}

.process-tabs-section .full-width-media {
    margin-top: 1.5rem;
}

.process-tabs-section .full-width-media + .full-width-media {
    margin-top: 2rem;
}

/* ── Video tabs & YouTube embed ───────────────────────────────── */
.video-section {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Allow nested horizontal scrollers to shrink instead of expanding the page width */
    min-width: 0;
    max-width: 100%;
}

.video-section > .video-tabs-wrapper,
.video-section > .video-player-wrapper {
    align-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.ing-solution-detail {
    margin-top: 2rem;
}

.ing-solution-detail__desc {
    margin-top: 0.75rem;
}

.ing-solution-impact {
    margin-top: 2.5rem;
}

.ing-solution-impact .impact-grid {
    margin-top: 1rem;
}

.video-tabs-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.video-tabs-wrapper[hidden] {
    display: none !important;
}

.video-tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.video-tab:hover {
    opacity: 0.9;
}

.video-tab.active {
    opacity: 1;
    border-bottom-color: var(--text-color);
}

.video-tab:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* Mobile pagers (ING workstream + process step) — hidden on desktop */
.ing-solution-workstream-pager,
.process-step-pager {
    display: none;
}

@media (max-width: 768px) {
    /* ING Private Banking workstream tabs only — other case studies may use .video-tabs-wrapper */
    #ing-solution-tablist {
        display: none !important;
    }

    /* Approach & Process: numbered stepper hidden on mobile; use injected pager */
    .process-tabs-section .process-tabs-wrapper.process-stepper {
        display: none !important;
    }

    .process-tabs-section > .process-step-pager {
        align-self: stretch;
        width: 100%;
        min-width: 0;
    }

    /* Title shown in pager; avoid duplicating the step heading in the panel body */
    .process-tabs-section .process-tab-panel > .subsection-heading:first-of-type {
        display: none;
    }

    .video-section > .ing-solution-workstream-pager {
        align-self: stretch;
        width: 100%;
        min-width: 0;
    }

    .ing-solution-workstream-pager,
    .process-step-pager {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        min-width: 0;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--card-border);
        box-sizing: border-box;
    }

    .ing-solution-workstream-label,
    .process-step-pager-label {
        flex: 1;
        min-width: 0;
        margin: 0;
        text-align: center;
        font-size: 0.875rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        line-height: 1.3;
        opacity: 0.95;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ing-solution-workstream-prev,
    .ing-solution-workstream-next,
    .process-step-pager-prev,
    .process-step-pager-next {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border-radius: 50%;
        border: 1px solid var(--card-border);
        background: transparent;
        color: var(--text-color);
        cursor: pointer;
        opacity: 0.85;
        transition: opacity 0.2s ease, border-color 0.2s ease;
    }

    .ing-solution-workstream-prev:hover:not(:disabled),
    .ing-solution-workstream-next:hover:not(:disabled),
    .process-step-pager-prev:hover:not(:disabled),
    .process-step-pager-next:hover:not(:disabled) {
        opacity: 1;
        border-color: rgba(255, 255, 255, 0.35);
    }

    .ing-solution-workstream-prev:disabled,
    .ing-solution-workstream-next:disabled,
    .process-step-pager-prev:disabled,
    .process-step-pager-next:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    .ing-solution-workstream-prev:focus-visible,
    .ing-solution-workstream-next:focus-visible,
    .process-step-pager-prev:focus-visible,
    .process-step-pager-next:focus-visible {
        outline: 3px solid var(--focus-color);
        outline-offset: 2px;
    }

    .project-main .section-content.video-section,
    .project-main .section-content.process-tabs-section {
        min-width: 0;
        max-width: 100%;
    }
}

.video-player-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.video-player-wrapper > :not(.video-open-button) {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
}

.video-aspect-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.video-aspect-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-aspect-wrap .video-aspect-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--card-bg);
}

/* Lazy YouTube: no 16:9 chrome until user clicks Open video */
.video-aspect-wrap.video-aspect-wrap--lazy-pending:not(.video-aspect-wrap--loaded) {
    padding-bottom: 0;
    height: 0;
    min-height: 0;
    border: none;
    background: transparent;
    overflow: hidden;
    border-radius: 0;
}

.video-aspect-wrap.video-aspect-wrap--lazy-pending:not(.video-aspect-wrap--loaded) iframe {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-open-button {
    padding: 0.65rem 1.35rem;
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--card-bg);
    background: var(--text-color);
    border: 1px solid var(--text-color);
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.video-open-button:hover {
    opacity: 0.92;
}

.video-open-button:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════
   NEXT PROJECT NAVIGATION
   ══════════════════════════════════════════════════════════════ */
.project-nav {
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--card-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-nav-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: clamp(3rem, 6vh, 5rem) var(--project-page-padding-x);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.3s ease;
}

.project-nav-link--prev {
    align-items: flex-start;
    border-right: 1px solid var(--card-border);
}

/* When only one link is present, span both columns and drop the divider */
.project-nav-link:only-child {
    grid-column: 1 / -1;
    border-right: none;
}

.project-nav-link--next {
    align-items: flex-end;
}

/* Stretch label/title to column width so wrapped lines respect start/end (NL “Volgend Project” etc.) */
.project-nav-link--prev .nav-link-label,
.project-nav-link--prev .nav-link-title {
    align-self: stretch;
    text-align: start;
}

.project-nav-link--next .nav-link-label,
.project-nav-link--next .nav-link-title {
    align-self: stretch;
    text-align: end;
}

.project-nav-link:hover,
.project-nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.03);
}

.project-nav-link:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: -3px;
}

.nav-link-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.45;
}

.nav-link-title {
    font-size: clamp(1.1rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-nav-link svg {
    opacity: 0.4;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-top: auto;
}

.project-nav-link--prev:hover svg,
.project-nav-link--prev:focus-visible svg {
    transform: translateX(-6px);
    opacity: 1;
}

.project-nav-link--next:hover svg,
.project-nav-link--next:focus-visible svg {
    transform: translateX(6px);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .project-nav-link svg {
        transition: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.project-footer {
    border-top: 1px solid var(--card-border);
    padding: clamp(2rem, 4vh, 3rem) 0;
    text-align: center;
}

.footer-content {
    max-width: var(--project-page-max-width);
    margin: 0 auto;
    padding: 0 var(--project-page-padding-x);
    box-sizing: border-box;
}

.footer-text {
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-sub {
    font-weight: 300;
    opacity: 0.4;
    margin-top: 0.375rem;
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .project-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .project-details {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .next-project-link svg {
        transition: none;
    }
}
