/* ═══════════════════════════════════════════════════════════════════════════
   project.css — Case study page (project.php)
   Builds on style.css tokens. Same design language as the home page,
   different line motifs (registration marks · frame line · ruler · arrow)
   and a gallery with wipe-reveal images + hover captions.
   ═══════════════════════════════════════════════════════════════════════════ */

.page-project main { padding-top: 7.5rem; }

/* Tighter section rhythm than the home page */
.page-project section { padding-block: clamp(2.5rem, 6vh, 4.5rem); }

.container--narrow { max-width: 920px; }

/* ── Page sketches ─────────────────────────────────────────────────────────── */
.sketch--cs-hero {
    top: clamp(1rem, 4vw, 3rem);
    right: 5vw;
    width: clamp(150px, 18vw, 240px);
}
.sketch--ruler {
    left: clamp(.5rem, 2vw, 2rem);
    top: 10%;
    width: clamp(34px, 4vw, 56px);
}
.sketch--next {
    right: 8vw;
    bottom: 18%;
    width: clamp(120px, 14vw, 190px);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.cs-hero { padding-bottom: 2rem; }

.cs-back {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 2.6rem;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color .3s, gap .3s var(--ease-out);
}
.cs-back:hover { color: var(--mint); gap: .9rem; }

.cs-eyebrow {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.3rem;
}
.cs-eyebrow__index {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--mint);
}
.cs-eyebrow__cat {
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--teal-500);
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.cs-eyebrow__cat::after {
    content: '';
    width: 4rem;
    height: 1px;
    background: var(--grad-accent);
}

.cs-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin-bottom: 1.2rem;
    max-width: 16ch;
    background: linear-gradient(110deg, var(--text) 55%, var(--mint));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cs-tagline {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-dim);
    max-width: 44rem;
}

/* ── Meta strip (mirrors the home hero stats strip) ────────────────────────── */
.cs-meta {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.cs-meta__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem clamp(2rem, 6vw, 5rem);
    padding-block: 1.3rem;
}
.cs-meta__label {
    display: block;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--teal-500);
}
.cs-meta__value {
    font-family: var(--font-display);
    font-size: .98rem;
    font-weight: 700;
}

/* ── Images — wipe-reveal + hover caption ──────────────────────────────────── */
.cs-img {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(7, 25, 82, .35);
    transition: border-color .4s, box-shadow .5s var(--ease-out),
                translate .5s var(--ease-out);
}
.cs-img:hover {
    border-color: var(--line-strong);
    translate: 0 -5px;
    box-shadow: 0 22px 60px rgba(3, 8, 43, .65), 0 0 36px rgba(53, 162, 159, .12);
}

/* Reveal: top-down wipe instead of the default fade-up.
   NOTE: the clip lives on the IMAGE, not the figure — clipping the observed
   figure itself to zero area stops IntersectionObserver from ever firing. */
.cs-img.reveal {
    opacity: 1;
    transform: none;
    transition: border-color .4s, box-shadow .5s var(--ease-out),
                translate .5s var(--ease-out);
}

.cs-img img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.12);
    transition: clip-path 1.1s var(--ease-snap),
                transform 1.4s var(--ease-out), filter .4s;
}
.cs-img.reveal > img,
.cs-img.reveal > .cs-visual__ph {
    clip-path: inset(0 0 100% 0);
}
.cs-img.reveal.is-visible > img,
.cs-img.reveal.is-visible > .cs-visual__ph {
    clip-path: inset(0 0 0 0);
}
.cs-visual__ph { transition: clip-path 1.1s var(--ease-snap); }

.cs-img.is-visible img { transform: scale(1); }
.cs-img:hover img {
    transform: scale(1.045);
    filter: brightness(1.07);
}

.cs-img figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.4rem 1.3rem .85rem;
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text);
    background: linear-gradient(to top, rgba(3, 8, 43, .88), transparent);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s, transform .45s var(--ease-out);
    pointer-events: none;
}
.cs-img:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hero visual + frame line ──────────────────────────────────────────────── */
.cs-visual-sec { padding-top: clamp(2rem, 5vh, 3.5rem); }

.cs-visual { position: relative; }

.sketch--frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;     /* lead-in line extends off-screen left */
    color: var(--mint);
    opacity: .7;
    filter: drop-shadow(0 0 6px rgba(151, 254, 237, .5));
    z-index: 1;
    pointer-events: none;
}
.sketch--frame .sk-draw { stroke-width: 2; }

.cs-img--hero { border-radius: 20px; }
.cs-img--hero:hover { translate: 0 0; }    /* the hero visual stays planted */

.cs-visual__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(280px, 42vw, 520px);
    background: linear-gradient(135deg, rgba(11, 102, 106, .3), rgba(7, 25, 82, .75));
}

/* ── Story ─────────────────────────────────────────────────────────────────── */
.cs-chapter__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.cs-chapter__index {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--mint);
}
.cs-chapter__label {
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
}

.cs-lead { margin-bottom: 3.2rem; }
.cs-lead__text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.65rem);
    font-weight: 600;
    line-height: 1.55;
}

.cs-chapter {
    border-top: 1px solid var(--line);
    padding-top: 2.2rem;
    margin-bottom: 3rem;
}
.cs-chapter__body p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-dim);
}

.cs-outcome {
    position: relative;
    padding: 2.2rem 0 2.2rem 2rem;
    border-top: 1px solid var(--line);
}
.cs-outcome::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2.4rem;
    bottom: 2.4rem;
    width: 2px;
    border-radius: 2px;
    background: var(--grad-accent);
}
.cs-outcome .cs-chapter__meta { margin-left: 0; }
.cs-outcome__text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

/* ── Gallery ───────────────────────────────────────────────────────────────── */
.cs-gallery { position: relative; }

.cs-gallery-group { margin-bottom: clamp(3rem, 7vh, 4.5rem); }
.cs-gallery-group:last-child { margin-bottom: 0; }

.cs-gallery-group__label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.cs-gallery-group__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.cs-gallery-grid { display: grid; gap: 1.4rem; }
.cs-gallery-grid--1 { grid-template-columns: 1fr; }
.cs-gallery-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cs-gallery-grid--3 { grid-template-columns: repeat(3, 1fr); }

.cs-img--span { grid-column: 1 / -1; }

/* Editorial rhythm — alternate images sit slightly lower */
.cs-gallery-grid--2 > .cs-img:nth-child(even):not(.cs-img--span) { margin-top: 2.2rem; }
.cs-gallery-grid--3 > .cs-img:nth-child(3n+2):not(.cs-img--span) { margin-top: 1.8rem; }

/* ── Live site ─────────────────────────────────────────────────────────────── */
.cs-live {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-block: clamp(2.5rem, 6vh, 4rem);
}
.cs-live__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 2rem;
}
.cs-live__label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
}
.cs-live__url {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--mint);
}

/* ── Testimonial ───────────────────────────────────────────────────────────── */
.cs-quote {
    position: relative;
    padding-left: 2rem;
}
.cs-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: .4rem;
    bottom: .4rem;
    width: 2px;
    border-radius: 2px;
    background: var(--grad-accent);
}
.cs-quote__text {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 600;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}
.cs-quote__author {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    color: var(--mint);
}
.cs-quote__role {
    display: block;
    font-size: .84rem;
    color: var(--text-dim);
    margin-top: .15rem;
}

/* ── Deliverables + tools ──────────────────────────────────────────────────── */
.cs-facts__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}
.cs-facts__block {
    border-top: 1px solid var(--line);
    padding-top: 1.7rem;
}
.cs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.cs-chip {
    padding: .42rem 1.05rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-dim);
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: color .3s, border-color .3s, transform .3s var(--ease-out);
}
.cs-chip:hover {
    color: var(--mint);
    border-color: var(--mint);
    transform: translateY(-3px);
}
.cs-chip--alt {
    color: var(--mint);
    background: rgba(151, 254, 237, .08);
    border-color: rgba(151, 254, 237, .28);
    font-weight: 600;
}
.cs-chip--alt:hover {
    background: rgba(151, 254, 237, .18);
    border-color: var(--mint);
}

/* ── Next project ──────────────────────────────────────────────────────────── */
.cs-next {
    position: relative;
    border-top: 1px solid var(--line);
    margin-top: clamp(2.5rem, 6vh, 4rem);
}
.cs-next__label {
    display: block;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
    margin-bottom: 1.4rem;
}
.cs-next__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.cs-next__cat {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.cs-next__name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-top: .4rem;
    transition: color .3s;
}
.cs-next__link:hover .cs-next__name { color: var(--mint); }
.cs-next__arrow {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--mint);
    transition: transform .4s var(--ease-out);
}
.cs-next__link:hover .cs-next__arrow { transform: translate(8px, -8px); }

/* ── Placeholder visuals (projects without an image) ───────────────────────── */
.ph-logo { text-align: center; }
.ph-mark {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .3rem;
}
.ph-logo--xl { text-align: center; }
.ph-mark--xl { font-size: clamp(4rem, 10vw, 7rem) !important; }
.ph-sub--xl {
    font-size: .85rem;
    letter-spacing: .4em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.ph-print {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 60%;
    max-width: 320px;
}
.ph-page {
    background: rgba(151, 254, 237, .06);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ph-line-block {
    height: 6px;
    width: 100%;
    border-radius: 3px;
    background: rgba(151, 254, 237, .18);
}

.ph-social-grid {
    display: grid;
    grid-template-columns: repeat(4, 52px);
    gap: 9px;
}
.ph-sq {
    aspect-ratio: 1;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(53, 162, 159, .4), rgba(151, 254, 237, .12));
    border: 1px solid var(--line);
}
.ph-sq--span { grid-column: span 2; aspect-ratio: auto; }

.ph-web {
    width: 70%;
    max-width: 360px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: rgba(3, 8, 43, .6);
}
.ph-browser-bar {
    display: flex;
    gap: 6px;
    padding: 9px 12px;
    background: rgba(151, 254, 237, .07);
    border-bottom: 1px solid var(--line);
}
.ph-browser-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(151, 254, 237, .3);
}
.ph-browser-content { padding: 16px; }

/* ── Logo showcase (two-panel brand presentation) ──────────────────────────── */
.logo-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
}
.logo-showcase__panel {
    border-radius: 20px;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(200px, 28vw, 340px);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .45s var(--ease-out), box-shadow .45s;
}
.logo-showcase__panel:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(3, 8, 43, .65);
}
.logo-showcase__panel--dark {
    background: #141041;
    border-color: rgba(255, 215, 0, .2);
}
.logo-showcase__panel--light {
    background: #fffdf1;
    border-color: rgba(38, 34, 92, .15);
}
.logo-showcase__panel img {
    max-width: min(75%, 280px);
    height: auto;
    display: block;
}

/* ── Sub-project section header (e.g. Warnervale Garden campaign) ───────────── */
.subproject-header {
    border-top: 1px solid var(--line);
    padding-top: clamp(3rem, 7vh, 5rem);
    margin-top: clamp(3rem, 7vh, 5rem);
    margin-bottom: clamp(2rem, 4vh, 3.5rem);
}
.subproject-header__eyebrow {
    font-size: .71rem;
    font-weight: 600;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--teal-500);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.subproject-header__eyebrow::before {
    content: '';
    width: 2.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--grad-accent);
    flex-shrink: 0;
}
.subproject-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 1.1rem;
    background: linear-gradient(110deg, var(--text) 60%, var(--mint));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subproject-header__desc {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-dim);
    max-width: 56rem;
}

/* ── Document preview cards ─────────────────────────────────────────────────── */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.4rem;
    margin-block: clamp(2rem, 4vh, 3rem);
}
.doc-card {
    background: rgba(7, 25, 82, .28);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .4s, transform .4s var(--ease-out), box-shadow .4s;
}
.doc-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-6px);
    box-shadow: 0 22px 55px rgba(3, 8, 43, .6), 0 0 28px rgba(53, 162, 159, .1);
}
.doc-card__thumb {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 19, 62, .55);
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.doc-card__thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(53, 162, 159, .14), rgba(13, 19, 62, .45));
}
.doc-card__icon {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -.05em;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    line-height: 1;
}
.doc-card__body {
    padding: 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.doc-card__tag {
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
}
.doc-card__title {
    font-family: var(--font-display);
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.3;
}
.doc-card__desc {
    font-size: .83rem;
    color: var(--text-dim);
    line-height: 1.65;
    flex: 1;
}
.doc-card__link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: .9rem;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mint);
    text-decoration: none;
    transition: gap .3s var(--ease-out), opacity .3s;
}
.doc-card__link:hover { gap: .75rem; opacity: .75; }

/* ── Individual website showcase (header + screenshots + button) ────────────── */
.cs-site-section {
    border-top: 1px solid var(--line);
    padding-block: clamp(2.5rem, 6vh, 4rem);
}
.cs-site-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

/* ── Campaign deliverable editorial list ────────────────────────────────────── */
.wg-deliverables { margin-top: clamp(2rem, 4vh, 3rem); }

.wg-deliverable {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem clamp(2rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
    padding-top: 2.2rem;
    padding-bottom: 2rem;
}
.wg-deliverable__meta { padding-top: .2rem; }
.wg-deliverable__num {
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--mint);
    margin-bottom: .35rem;
}
.wg-deliverable__type {
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
    line-height: 1.5;
}
.wg-deliverable__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .75rem;
    line-height: 1.3;
}
.wg-deliverable__text {
    font-size: .95rem;
    line-height: 1.85;
    color: var(--text-dim);
}
.wg-deliverable__text + .wg-deliverable__text { margin-top: .9rem; }

/* ── Reflections ────────────────────────────────────────────────────────────── */
.cs-reflection-sec { padding-block: clamp(2.5rem, 6vh, 4rem); }
.cs-reflection {
    position: relative;
    background: rgba(13, 19, 62, .38);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem) calc(clamp(2rem, 5vw, 3.5rem) + 14px);
    overflow: hidden;
}
.cs-reflection::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--grad-accent);
}
.cs-reflection__label {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--teal-500);
    margin-bottom: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cs-reflection__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}
.cs-reflection__text {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.2vw, 1.42rem);
    font-weight: 600;
    line-height: 1.65;
}

/* ── Dual live-site strip ───────────────────────────────────────────────────── */
.cs-live-dual {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-block: clamp(2.5rem, 6vh, 4rem);
}
.cs-live-dual__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.cs-live-dual__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding-block: 2rem;
}
.cs-live-dual__item:first-child {
    padding-right: clamp(1.5rem, 4vw, 3rem);
    border-right: 1px solid var(--line);
}
.cs-live-dual__item:last-child {
    padding-left: clamp(1.5rem, 4vw, 3rem);
}

/* ── Device grid (desktop + mobile screenshots) ─────────────────────────────── */
.cs-device-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.4rem;
    align-items: end;
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cs-img.reveal > img,
    .cs-img.reveal > .cs-visual__ph { clip-path: none; }
    .cs-img img { transform: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .page-project main { padding-top: 6.5rem; }

    .cs-facts__grid { grid-template-columns: 1fr; gap: 2rem; }
    .cs-gallery-grid--3 { grid-template-columns: repeat(2, 1fr); }

    /* No vertical offsets once space tightens */
    .cs-gallery-grid--2 > .cs-img:nth-child(even):not(.cs-img--span),
    .cs-gallery-grid--3 > .cs-img:nth-child(3n+2):not(.cs-img--span) { margin-top: 0; }

    .sketch.sketch--ruler { display: none; }

    .cs-live-dual__inner { grid-template-columns: 1fr; }
    .cs-live-dual__item:first-child { padding-right: 0; border-right: none; border-bottom: 1px solid var(--line); }
    .cs-live-dual__item:last-child { padding-left: 0; }

    .cs-device-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .logo-showcase { grid-template-columns: 1fr; }
    .wg-deliverable { grid-template-columns: 1fr; gap: .7rem; }
    .wg-deliverable__meta { display: flex; gap: 1.5rem; align-items: baseline; }
}

@media (max-width: 560px) {
    .cs-gallery-grid--2,
    .cs-gallery-grid--3 { grid-template-columns: 1fr; }

    .cs-meta__inner { gap: 1rem 2rem; }
    .cs-live__inner { flex-direction: column; align-items: flex-start; }
    .cs-next__link { align-items: flex-start; }
}

/* ── Carousel (Swiper-based) ────────────────────────────────────────────────── */
.ea-swiper-wrap {
    position: relative;
}

/* Swiper container — overflow hidden is required by Swiper */
.ea-swiper {
    overflow: hidden;
    padding-bottom: 3rem;
}

/* Slide images — override the default scale(1.12) start state */
.ea-swiper .swiper-slide .cs-img {
    cursor: grab;
    active-cursor: grabbing;
    margin: 0;
}
.ea-swiper .swiper-slide .cs-img img {
    width: 100%;
    height: auto;
    display: block;
    transform: none;
    clip-path: none;
    transition: transform .55s var(--ease-out), filter .4s;
}
.ea-swiper .swiper-slide .cs-img:hover img {
    transform: scale(1.04);
    filter: brightness(1.07);
}

/* Fade non-active slides subtly */
.ea-swiper .swiper-slide {
    opacity: .5;
    transition: opacity .4s;
}
.ea-swiper .swiper-slide-visible { opacity: 1; }

/* Navigation arrows — positioned over the wrap, outside overflow */
.ea-swiper__btn {
    position: absolute;
    top: calc(50% - 1.5rem);
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(151, 254, 237, .3);
    background: rgba(3, 8, 43, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mint);
    transition: border-color .3s, background .3s, opacity .3s,
                transform .35s var(--ease-out);
}
.ea-swiper__btn--prev { left: .25rem; }
.ea-swiper__btn--next { right: .25rem; }
.ea-swiper__btn:hover {
    border-color: var(--mint);
    background: rgba(3, 8, 43, .98);
    box-shadow: 0 0 20px rgba(151, 254, 237, .15);
}
.ea-swiper__btn--prev:hover { transform: translateY(-50%) translateX(-2px); }
.ea-swiper__btn--next:hover { transform: translateY(-50%) translateX(2px); }
.ea-swiper__btn.swiper-button-disabled { opacity: .2; cursor: default; pointer-events: none; }

/* Pagination dots */
.ea-swiper .swiper-pagination {
    bottom: .4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    pointer-events: none;
}
.ea-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(151, 254, 237, .35);
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
    transition: background .3s, width .35s var(--ease-out), border-radius .35s;
    margin: 0 !important;
}
.ea-swiper .swiper-pagination-bullet-active {
    background: var(--mint);
    width: 24px;
    border-radius: 3px;
}

/* Banner — single portrait image centred with a glassy frame */
.ea-banner-showcase {
    display: flex;
    justify-content: center;
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
}
.ea-banner-showcase .cs-img {
    max-width: 400px;
    width: 100%;
}

/* Section label above each carousel */
.ea-section-label {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}
.ea-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

@media (max-width: 600px) {
    .ea-swiper__btn { width: 36px; height: 36px; }
}
