/* Brand palette shared by page styles and future CMS colour options. */
:root {
    /* Typography */
    --font-body: "Rubik", system-ui, sans-serif;
    --font-editorial: "EB Garamond", Georgia, serif;
    --statement-size: clamp(1.5rem, 3vw, 3.5rem);

    --color-charcoal: #292623;
    --color-chalk: #FEFFFA;
    --color-fog: #EDEEEE;
    --color-sage: #C3CEB7;
    --color-moss: #7A8962;
    --color-olive: #737950;
    --color-forest: #43703A;
    --color-mist: #C4D9E8;
    --color-powder: #CCDCFF;
    --color-slate: #55678E;
    --color-teal: #547C80;
    --color-rose: #AB7477;
    --color-mauve: #B89BA8;
    --color-wine: #650322;
    --color-plum: #796277;
    --color-peach: #E6B6A0;
    --color-straw: #F1DFA3;
    --color-gold: #C99A3D;
    --color-clay: #B87961;
    --color-eucalyptus: #94AAA0;
    --color-lavender: #C8C4D8;
    --color-sand: #D8CBB7;
    --color-cream: #F5F1E8;

    /* Supporting colours */
    --color-white: #FFFFFF;
    --color-text-secondary: #67645F;
    --color-border-light: #E4E4E4;
}

/* Minimal foundation. Page styles will be added alongside the designs. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-white);
    color: var(--color-charcoal);
    font-family: var(--font-body);
    line-height: 1.5;
}


/* Body copy, tags and small text inherit Rubik. */
.font-body {
    font-family: var(--font-body);
}

/* Use .text-editorial for larger editorial copy outside headings. */
h1,
h2,
h3,
h4,
h5,
h6,
.text-editorial {
    font-family: var(--font-editorial);
    font-weight: 400;
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.error-page {
    padding: 2rem;
}

/* Shared editorial header */
.site-header {
    background: transparent;
    color: var(--project-hover-foreground, var(--project-foreground, var(--header-foreground, var(--color-charcoal))));
}

.site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "left brand right";
    align-items: flex-start;
    gap: clamp(3rem, 7vw, 8rem);
    padding: 1.75rem clamp(1.25rem, 3.5vw, 4rem);
}

.site-header__brand {
    grid-area: brand;
    justify-self: center;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    text-decoration: none;
}

.site-header__monogram {
    display: block;
    width: 80px;
    aspect-ratio: 180 / 105;
    background-color: currentColor;
    -webkit-mask: var(--monogram-url) center / contain no-repeat;
    mask: var(--monogram-url) center / contain no-repeat;
}

.site-header__name {
    font-family: var(--font-editorial);
    font-size: 1.5rem;
}

.site-header__links {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__links--left {
    grid-area: left;
}

.site-header__links--right {
    grid-area: right;
    justify-content: space-between;
}

.site-header__link {
    position: relative;
    display: inline-grid;
    align-items: start;
    font-style: normal;
    padding-inline: .85em;
    min-height: 44px;
    max-width: 100%;
    font-family: var(--font-editorial);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .025em;
    text-decoration: none;
    text-transform: none;
    overflow-wrap: anywhere;
}

.site-header__links li {
    display: flex;
    min-width: 0;
    max-width: 100%;
}

/* Keep every header element solid; italics identify the current page. */
.site-header__link[aria-current="page"] .site-header__label {
    font-style: italic;
}

/* Solid parentheses slide through a clipping mask, without shifting the text. */
.site-header__link::before,
.site-header__link::after {
    position: absolute;
    top: 0;
    font-style: normal;
    pointer-events: none;
    transition:
        clip-path 320ms cubic-bezier(.16, 1, .3, 1),
        transform 420ms cubic-bezier(.16, 1, .3, 1);
}

.site-header__link::before {
    content: "(";
    left: .15em;
    clip-path: inset(0 0 0 100%);
    transform: translateX(-.28em);
    transform-origin: center;
}

.site-header__link::after {
    content: ")";
    right: .15em;
    clip-path: inset(0 100% 0 0);
    transform: translateX(.28em);
    transform-origin: center;
}

.site-header__link:is(:hover, :focus-visible, [aria-current="page"])::before,
.site-header__link:is(:hover, :focus-visible, [aria-current="page"])::after {
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .site-header__link::before,
    .site-header__link::after {
        transition: none;
    }
}

.site-header a:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}

/* One evenly distributed navigation row, aligned to the mobile page gutters. */
@media (max-width: 1050px) {
    .site-header__inner {
        grid-template-columns: repeat(var(--navigation-count, 4), max-content);
        grid-template-areas: none;
        justify-content: space-between;
        gap: 1rem .625rem;
        padding: 1.25rem 1rem .5rem;
    }

    .site-header__brand {
        grid-area: auto;
        grid-column: 1 / -1;
    }

    .site-header__monogram { width: 64px; }

    .site-header__links { display: contents; }

    .site-header__link {
        font-size: 1rem;
        letter-spacing: 0;
        padding-inline: 0;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    /* Brackets sit in the gutters so the labels keep their alignment. */
    .site-header__link::before { left: -.65em; }
    .site-header__link::after { right: -.65em; }
}

/* Compact mobile navigation, with the monogram and menu at opposite edges. */
.site-header__mobile-menu { display: none; }
@media (max-width: 700px) {
    .site-header__inner { grid-template-columns: auto auto; align-items: start; }
    .site-header__brand { grid-area: auto; grid-column: 1; grid-row: 1; justify-self: start; }
    .site-header__links { display: none; }
    .site-header__mobile-menu { display: block; position: relative; grid-column: 2; grid-row: 1; justify-self: end; }
    /* Soften the page with blur and a wash of its own background colour. */
    .site-header { position: relative; isolation: isolate; z-index: 30; }
    .site-header::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: color-mix(in srgb, var(--menu-backdrop-colour, var(--project-background, var(--information-background, var(--color-white)))) 55%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 350ms ease;
    }
    .site-header:has(.site-header__mobile-menu[open])::before {
        opacity: 1;
        pointer-events: auto;
        touch-action: none;
    }

    .site-header__mobile-menu summary {
        display: block;
        min-height: 44px;
        min-width: 44px;
        text-align: right;
        list-style: none;
        cursor: pointer;
        font-family: var(--font-editorial);
        font-size: 1.125rem;
        line-height: 1.4;
    }
    .site-header__mobile-menu summary::-webkit-details-marker { display: none; }
    .site-header__menu-close { display: none; }
    .site-header__mobile-menu[open] .site-header__menu-open { display: none; }
    .site-header__mobile-menu[open] .site-header__menu-close { display: inline; }
    .site-header__mobile-menu summary:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
    .site-header__mobile-links {
        position: absolute;
        z-index: 2;
        top: 100%;
        right: -.5rem;
        min-width: 11rem;
        margin: 0;
        padding: .75rem 1rem .5rem;
        list-style: none;
        text-align: right;
        background: transparent;
    }
    .site-header__mobile-links .site-header__link { font-size: 1.125rem; min-height: 44px; }
    .site-header__mobile-menu[open] .site-header__mobile-links { animation: mobile-menu-reveal 350ms cubic-bezier(.22,1,.36,1) both; }
}
@keyframes mobile-menu-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .site-header__mobile-menu[open] .site-header__mobile-links { animation: none; }
    .site-header::before { transition: none; }
}

@media (max-width: 560px) {
    .site-header__inner { row-gap: .875rem; }
    .site-header__link { font-size: clamp(.8125rem, 3.45vw, 1rem); }
}

/* Homepage-only arrival sequence. Hidden unless the first-visit script opts in. */
.home-intro {
    display: none;
}

html.home-intro-pending,
.home-intro-pending body {
    overflow: hidden;
}

.home-intro-pending .home-intro {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 100;
    outline: none;
    height: 100vh;
    height: 100dvh;
    isolation: isolate;
    background: var(--color-charcoal);
    color: var(--color-white);
    opacity: 1;
    transition: opacity 550ms cubic-bezier(.22, 1, .36, 1);
}

.home-intro__images,
.home-intro__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-intro__images {
    z-index: -2;
}

.home-intro__image {
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--intro-image-fade, 70ms) ease;
}

.home-intro__image.is-active {
    opacity: 1;
}

.home-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(0 0 0 / 12%);
    pointer-events: none;
}

.home-intro__logo {
    width: clamp(160px, 20vw, 280px);
    aspect-ratio: 255 / 233;
    background: currentColor;
    -webkit-mask: var(--intro-logo) center / contain no-repeat;
    mask: var(--intro-logo) center / contain no-repeat;
}

.home-intro__name {
    font-family: var(--font-editorial);
    font-size: clamp(3rem, 8vw, 7rem);
}

.home-intro__skip {
    position: absolute;
    right: max(1.5rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    min-height: 44px;
    padding: .5rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: var(--font-body);
    font-size: .625rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.home-intro__skip:hover {
    opacity: .65;
}

.home-intro__skip:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 6px;
}

.home-intro.is-leaving {
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .home-intro-pending .home-intro,
    .home-intro__image {
        transition: none;
    }
}

/* A quiet opening statement, with projects scattered over it as you scroll. */
.page-home > .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
}

.home-stage {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    color: var(--project-hover-foreground, var(--home-foreground, var(--color-charcoal)));
}

.home-stage::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--project-hover-background, var(--home-background, var(--color-white)));
    pointer-events: none;
}

.home-hover-title {
    position: fixed;
    inset-inline: clamp(1.25rem, 3.5vw, 4rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
}
.home-hover-title__text {
    display: block;
    max-width: 24ch;
    margin-inline: auto;
    font: 400 clamp(2rem, 3.7vw, 4rem)/1.05 var(--font-editorial);
    letter-spacing: -.025em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.home-hover-title.is-visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.page-is-leaving .home-hover-title { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .home-hover-title { transition: none; }
}

.home-statement {
    position: fixed;
    inset-inline: clamp(1.25rem, 3.5vw, 4rem);
    bottom: clamp(1.5rem, 4vh, 3.5rem);
    z-index: 0;
    pointer-events: none;
    opacity: var(--hover-statement-opacity, var(--statement-opacity, 1));
}

.home-statement__text {
    margin: 0;
    font-family: var(--font-editorial);
    font-size: var(--statement-size);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}


.project-field {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    column-gap: clamp(1rem, 2.5vw, 3rem);
    row-gap: clamp(4rem, 12vh, 9rem);
    padding: max(11rem, 35vh) clamp(1.25rem, 3.5vw, 4rem) 30vh;
}

.project-card {
    grid-column: var(--column) / span var(--span);
    grid-row: var(--row);
    margin-top: var(--offset);
    min-width: 0;
}

.project-card__inner {
    transform-origin: center;
}

.has-project-motion .project-card__inner {
    opacity: var(--project-opacity, 0);
    transform: translateY(var(--project-lift, 28px)) scale(var(--project-scale, .78));
}

.project-thumbnail {
    margin: 0;
}

.project-thumbnail .project-media {
    display: block;
    width: 100%;
    height: auto;
}

/* Image-only hover growth leaves the caption and scroll reveal independent. */
@media (prefers-reduced-motion: no-preference) {
    .project-card .project-thumbnail .project-media {
        transform-origin: center bottom;
        transition: transform 550ms cubic-bezier(.22, 1, .36, 1);
    }

    .project-card .project-thumbnail__link:focus-visible .project-media {
        transform: scale(1.035);
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .project-card .project-thumbnail .project-media:hover {
        transform: scale(1.035);
    }
}

.project-thumbnail__title {
    display: table;
    margin-top: .65rem;
    padding: .1rem .25rem .1rem 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .015em;
}

.home-extra {
    position: relative;
    z-index: 2;
    padding: 3rem clamp(1.25rem, 3.5vw, 4rem);
    background: var(--project-hover-background, var(--home-background, var(--color-white)));
}

.project-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 4rem;
    max-width: 1200px;
    padding: 3rem;
    margin: 0 auto;
}

@media (max-width: 700px) {
    :root { --statement-size: clamp(1.25rem, 4.6vw, 1.75rem); }
    .home-statement {
        inset-inline: 1rem;
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .home-statement__text {
        font-size: clamp(1.5rem, min(6.8vw, 5svh), 2.5rem);
        line-height: 1.1;
        letter-spacing: -.025em;
    }


    .project-field {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 1rem;
        row-gap: 4rem;
        padding: max(14rem, 34vh) 1rem 25vh;
    }

    .project-card {
        grid-row: auto;
        grid-column: 1 / span 2;
        margin-top: 0;
    }

    .project-card:nth-child(even) {
        grid-column: 3 / span 2;
        margin-top: 18vh;
    }

    .project-card:nth-child(4n + 3) {
        width: 83%;
        justify-self: end;
    }

    .project-card:nth-child(4n + 4) {
        width: 90%;
    }

    .project-thumbnail__title {
        font-size: .6875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .has-project-motion .project-card__inner {
        opacity: 1;
        transform: none;
    }
}

/* A project's single colour setting also themes its own page. */
.page-project {
    background: var(--project-background, var(--color-white));
    color: var(--project-foreground, var(--color-charcoal));
}

.project-thumbnail .project-media:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

@media (prefers-reduced-motion: no-preference) {
    .home-stage::before, .home-extra {
        transition: background-color 240ms ease;
    }
    .home-stage, .page-home > .site-header {
        transition: color 240ms ease;
    }
}

/* Information: an inset emblem within the opening editorial statement. */
.page-information {
    background: var(--information-background, var(--color-white));
    color: var(--information-foreground, var(--color-charcoal));
}
.page-information > .site-header {
    color: var(--information-foreground, var(--color-charcoal));
    position: absolute;
    inset: 0 0 auto;
}
.information-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    padding: 10rem clamp(1.25rem, 3.5vw, 4rem) 6rem;
    font-weight: 500;
}
.information-statement {
    display: flow-root;
    margin: 0;
    font-size: var(--statement-size);
    line-height: 1.08;
    letter-spacing: -.035em;
}
.information-statement__logo {
    float: left;
    width: 1.95em;
    height: 1.95em;
    margin: .12em .45em 0 0;
    background: currentColor;
    -webkit-mask: var(--information-logo) center / contain no-repeat;
    mask: var(--information-logo) center / contain no-repeat;
}
.information-extra {
    margin-top: 2rem;
    max-width: 42rem;
}
.information-groups {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: clamp(3rem, 7vw, 8rem);
    margin-top: clamp(2.5rem, 6vh, 4.5rem);
}
.information-group {
    min-width: 0;
    font-family: var(--font-body);
    font-size: .75rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.information-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.information-group li + li { margin-top: .2rem; }
.information-group a {
    text-decoration: none;
    transition: opacity 220ms ease;
}
.information-group a:is(:hover, :focus-visible) { opacity: .55; }
@media (prefers-reduced-motion: reduce) {
    .information-group a { transition: none; }
}
.information-group a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
@media (max-width: 700px) {
    .information-page { padding: 11rem 1rem 4rem; }
    .information-statement { line-height: 1.1; letter-spacing: -.025em; }
    .information-groups { flex-direction: column; gap: 2rem; }
    .information-group { font-size: .6875rem; }
}

/* Layout 01: centred photography with fixed, quiet editorial annotations. */
.project-thumbnail__link { display: block; }
.project-thumbnail__link:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
.page-project > .site-header { position: fixed; inset: 0 0 auto; z-index: 30; }
.project-gallery-page { --gallery-gutter: clamp(1.25rem, 3.5vw, 4rem); }
.project-gallery-titles {
    position: fixed;
    inset: 50% var(--gallery-gutter) auto;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 10;
    pointer-events: none;
}
.project-gallery-titles h1, .project-gallery-titles p {
    margin: 0;
    width: 20%;
    font-family: var(--font-editorial);
    font-size: clamp(1rem, 1.5vw, 1.375rem);
    font-weight: 400;
    line-height: 1.2;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.project-gallery-titles p { text-align: right; }
.project-gallery__slide {
    margin: 0;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 26vw;
}
.project-gallery__slide .project-media {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100svh - 16rem);
    object-fit: contain;
}
.project-gallery-meta {
    position: fixed;
    inset: auto var(--gallery-gutter) max(1.75rem, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    z-index: 10;
    pointer-events: none;
    font-family: var(--font-body);
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.5;
}
.project-gallery-meta p { margin: 0; max-width: 40%; }
.project-gallery-meta ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem 1.5rem; margin: 0 0 0 auto; padding: 0; list-style: none; max-width: 60%; }
.project-gallery-meta li { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
    .has-gallery-motion .project-gallery__slide .project-media { opacity: 0; transform: translateY(12px); transition: opacity 700ms ease, transform 900ms cubic-bezier(.22, 1, .36, 1); }
    .has-gallery-motion .project-gallery__slide.is-visible .project-media { opacity: 1; transform: translateY(0); }
}
@media (max-width: 800px) {
    .project-gallery-page { --gallery-gutter: 1rem; }
    .project-gallery-titles { inset: 10.5rem var(--gallery-gutter) auto; transform: none; align-items: flex-start; gap: 1.5rem; }
    .project-gallery-titles h1, .project-gallery-titles p { width: 48%; font-size: 1rem; }
    .project-gallery__slide { padding: 15rem 1rem 7rem; }
    .project-gallery__slide .project-media { max-height: calc(100svh - 22rem); }
    .project-gallery-meta { bottom: max(1.5rem, env(safe-area-inset-bottom)); font-size: .625rem; gap: 1rem; }
    .project-gallery-meta ul { gap: .25rem 1rem; }
}
@media (max-height: 600px) and (max-width: 800px) {
    .project-gallery__slide { min-height: 38rem; }
    .project-gallery__slide .project-media { max-height: 16rem; }
}

/* Layout 02: centred, continuous horizontal gallery with a quiet bottom caption. */
.project-horizontal-page {
    --film-height: clamp(12rem, 48svh, 36rem);
    --film-width-limit: 72vw;
    position: relative;
    min-height: max(100svh, 36rem);
}
.project-horizontal-heading { position: absolute; inset: auto 0 0; margin: clamp(1.5rem, 4vh, 2.5rem) var(--gallery-gutter) max(1.75rem, env(safe-area-inset-bottom)); }
.project-horizontal-heading .project-gallery-titles {
    position: static;
    transform: none;
    align-items: flex-start;
}
.project-horizontal-heading .project-gallery-titles h1,
.project-horizontal-heading .project-gallery-titles p { width: 48%; }
.project-horizontal-heading .project-gallery-meta {
    position: static;
    margin-top: 1.25rem;
    align-items: flex-start;
}
.project-horizontal-gallery {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: clamp(1.5rem, 3vw, 3rem);
    width: 100%;
    margin-top: 0;
    padding: 0 calc((100% - min(var(--film-width-limit), var(--film-height) * var(--last-aspect))) / 2) 0 calc((100% - min(var(--film-width-limit), var(--film-height) * var(--first-aspect))) / 2);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.project-horizontal-gallery::-webkit-scrollbar { display: none; }
.project-horizontal-gallery:focus-visible { outline: 1px solid currentColor; outline-offset: -5px; }
.project-horizontal-gallery.is-wheel-scrolling,
.project-horizontal-gallery.is-looping { scroll-snap-type: none; }
.project-horizontal-gallery.is-looping { padding-inline: 50%; }
.project-horizontal-gallery__item {
    flex: 0 0 min(var(--film-width-limit), calc(var(--film-height) * var(--image-aspect)));
    height: var(--film-height);
    margin: 0;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-horizontal-gallery__item .project-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: var(--image-opacity, .5);
    transform: translateY(var(--image-offset, 0px)) scale(var(--image-scale, .55));
    transform-origin: center;
}
.project-horizontal-gallery__item:nth-child(4n + 1) { --image-scale: .48; }
.project-horizontal-gallery__item:nth-child(4n + 2) { --image-scale: .6; }
.project-horizontal-gallery__item:nth-child(4n + 3) { --image-scale: .52; }
.project-horizontal-gallery__item:nth-child(4n + 4) { --image-scale: .64; }
.project-horizontal-gallery__item:first-child { --image-opacity: 1; --image-scale: 1; }
@media (max-width: 800px) {
    .project-horizontal-page { --film-height: clamp(12rem, 43svh, 28rem); --film-width-limit: 70vw; }
    .project-horizontal-heading { margin-top: 1.75rem; margin-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
    .project-horizontal-gallery { gap: 1rem; }
    .project-horizontal-heading .project-gallery-meta { margin-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .project-horizontal-gallery__item .project-media { transform: none; }
}

/* Layout 03: a quiet text column beside a single-item gallery. */
.project-editorial-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: clamp(3rem, 9vw, 10rem);
    min-height: 100svh;
    padding: 9rem clamp(1.25rem, 3.5vw, 4rem) 2rem;
}
.project-editorial-heading {
    position: sticky;
    top: 9rem;
    align-self: start;
    min-width: 0;
    min-height: calc(100svh - 11rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(5rem, 12svh, 10rem);
    padding-top: 1.25rem;
}
.project-editorial-heading h1 {
    margin: 0;
    font-family: var(--font-editorial);
    font-size: clamp(3.25rem, 7.2vw, 8rem);
    font-weight: 400;
    line-height: .84;
    letter-spacing: -.045em;
    text-transform: uppercase;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
}
.project-editorial-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem 1.5rem;
}
.project-editorial-detail-group {
    flex: 1 1 7rem;
    max-width: 20ch;
    list-style: none;
    margin: 0;
    padding: 0;
    font: 500 clamp(.5625rem, .7vw, .6875rem)/1.3 var(--font-body);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.project-editorial-detail-group li:nth-child(even) { text-align: right; }
.project-editorial-detail-group:last-child { text-align: right; }
.project-editorial-right { min-width: 0; display: flex; flex-direction: column; }
.project-click-gallery__slide { margin: 0; }
.project-click-gallery.is-ready .project-click-gallery__stage { height: clamp(15rem, 48svh, 36rem); }
.project-click-gallery.is-ready .project-click-gallery__slide { height: 100%; }
.project-click-gallery__slide[hidden], .project-click-gallery__controls[hidden] { display: none; }
.project-click-gallery__advance {
    display: block;
    padding: 0;
    border: 0;
    width: 100%;
    height: 100%;
    background: none;
    color: inherit;
    cursor: pointer;
}
.project-click-gallery .project-media { width: 100%; height: 100%; object-fit: contain; object-position: right center; }
.project-click-gallery__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .875rem;
    font: 500 .6875rem/1.5 var(--font-body);
}
.project-click-gallery__controls button { font: inherit; color: inherit; padding: .5rem 0; border: 0; background: none; cursor: pointer; }
.project-click-gallery button:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.project-click-gallery__controls button:hover { opacity: .55; }
.project-editorial-description {
    margin-top: auto;
    padding-top: clamp(2.5rem, 6vh, 5rem);
    font-family: var(--font-editorial);
    font-size: clamp(1.125rem, 1.6vw, 1.5rem);
    line-height: 1.3;
}
.project-editorial-description > :first-child { margin-top: 0; }
.project-editorial-description > :last-child { margin-bottom: 0; }
.project-video-fallback { font: 500 .75rem/1.5 var(--font-body); }
.project-video-fallback[hidden] { display: none; }
@media (max-width: 800px) {
    .project-editorial-page { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding: 10.5rem 1rem 2rem; }
    .project-editorial-heading { position: static; min-height: clamp(22rem, 56svh, 34rem); padding-top: 0; gap: 4rem; }
    .project-editorial-heading h1 { font-size: clamp(3.25rem, 13.5vw, 6.75rem); }
    .project-editorial-detail-group { font-size: .625rem; }
    .project-click-gallery.is-ready .project-click-gallery__stage { height: clamp(14rem, 42svh, 28rem); }
    .project-editorial-description { font-size: 1.25rem; padding-top: 2.5rem; }
}

/* Shared page arrival/exit. The head script opts in before the first paint. */
html.page-reveal-pending body > .site-header,
html.page-reveal-pending body > main { opacity: 0; }
html.page-is-leaving body > .site-header,
html.page-is-leaving body > main { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    html.page-reveal-pending body > .site-header,
    html.page-reveal-pending body > main { opacity: 1; }
}

/* Carry the departing page's colour through the document swap. */
html.page-colour-bridge body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--page-arrival-colour, transparent);
    pointer-events: none;
    opacity: 1;
    transition: opacity 450ms cubic-bezier(.22, 1, .36, 1);
}
html.page-colour-releasing body::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    html.page-colour-bridge body::after { display: none; }
}

/* Projects index: natural thumbnails, small colophon details and right-aligned titles. */
.project-archive {
    padding: clamp(10rem, 17vh, 13rem) clamp(1.25rem, 3.5vw, 4rem) 5rem;
}
.project-archive__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.project-archive__list, .project-archive__tags {
    margin: 0;
    padding: 0;
    list-style: none;
}
.project-archive__row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(calc(100px * var(--archive-thumb-growth, 1)), calc(12% * var(--archive-thumb-growth, 1))) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.6fr);
    transition: grid-template-columns 650ms cubic-bezier(.22, 1, .36, 1);
    align-items: start;
    column-gap: clamp(2rem, 5vw, 6rem);
    min-height: 180px;
    padding-block: 1.5rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.project-archive__thumbnail {
    display: flex;
    align-items: start;
    height: calc(132px * var(--archive-thumb-growth, 1));
    transition: height 650ms cubic-bezier(.22, 1, .36, 1);
}
.project-archive__thumbnail .project-media {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: left top;

}
.project-archive__details, .project-archive__tags, .project-archive__empty {
    font-family: var(--font-body);
    font-size: .5625rem;
    font-weight: 400;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.project-archive__details { display: flex; flex-direction: column; gap: .3rem; }
.project-archive__title {
    margin: 0;
    text-align: right;
    font-size: clamp(1.375rem, 2.1vw, 2.25rem);
    font-weight: 400;
    line-height: 1.12;
    text-wrap: balance;
}
.project-archive__title a { text-decoration: none; }
/* One accessible link covers each row without nesting links around video media. */
.project-archive__title a::after { content: ""; position: absolute; inset: 0; }
.project-archive__title a:focus-visible { outline: none; }
.project-archive__title a:focus-visible::after { outline: 1px solid currentColor; outline-offset: 4px; }
@media (hover: hover) {
    .project-archive__row:hover { --archive-thumb-growth: 1.25; }
}
@media (max-width: 800px) {
    .project-archive { padding: 10rem 1rem 3rem; }
    .project-archive__row {
        grid-template-columns: calc(88px * var(--archive-thumb-growth, 1)) minmax(0, 1fr) minmax(0, 1.35fr);
        gap: 1rem 1.5rem;
        min-height: 156px;
    }
    .project-archive__thumbnail { height: calc(108px * var(--archive-thumb-growth, 1)); grid-column: 1; grid-row: 1 / 3; }
    .project-archive__title { grid-column: 3; grid-row: 1 / 3; font-size: clamp(1.375rem, 3.3vw, 1.75rem); }
    .project-archive__details { grid-column: 2; align-self: start; }
    .project-archive__tags { grid-column: 2; align-self: start; }
}
@media (max-width: 540px) {
    .project-archive__row { grid-template-columns: calc(76px * var(--archive-thumb-growth, 1)) minmax(0, 1fr); gap: 1rem 1.5rem; padding-block: 1.5rem; }
    .project-archive__thumbnail { grid-row: 1; height: calc(90px * var(--archive-thumb-growth, 1)); }
    .project-archive__title { grid-column: 2; grid-row: 1; font-size: clamp(1.375rem, 5.2vw, 1.75rem); }
    .project-archive__details { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; gap: .25rem 1.25rem; }
    .project-archive__tags { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: -.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .project-archive__row, .project-archive__thumbnail { transition: none; }
}

.page-project-archive {
    background: var(--project-hover-background, var(--project-background));
    color: var(--project-hover-foreground, var(--project-foreground));
    transition: background-color 500ms ease, color 350ms ease;
}
.project-archive__pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 1.5rem;
    padding-top: 2rem;
    font-family: var(--font-body);
    font-size: .625rem;
    font-weight: 400;
}
.project-archive__page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.project-archive__pagination a { min-height: 44px; min-width: 24px; text-decoration: none; }
.project-archive__page-numbers a { text-align: center; }
.project-archive__pagination a[aria-current="page"]::before { content: "( "; }
.project-archive__pagination a[aria-current="page"]::after { content: " )"; }
.project-archive__pagination a:hover { opacity: .55; }
.project-archive__pagination a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.project-archive__next { justify-self: end; }
@media (prefers-reduced-motion: reduce) {
    .page-project-archive { transition: none; }
}

@media (hover: hover) and (max-width: 540px) {
    .project-archive__row:hover { --archive-thumb-growth: 1.15; }
}

/* Services: text-only editorial cards, each covering the previous section. */
.page-services {
    --services-top: 9rem;
    background: var(--services-background, var(--color-chalk));
    color: var(--services-foreground, var(--color-charcoal));
    transition: background-color 420ms ease, color 420ms ease;
}
.page-services > .site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    color: var(--services-foreground);
    transition: color 420ms ease;
}
.services-page { padding-top: var(--services-top); }
/* Keep the fixed navigation clear when a tall card scrolls beneath it. */
.services-page::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: var(--services-top);
    z-index: 20;
    background: var(--services-background);
    transition: background-color 420ms ease;
    pointer-events: none;
}
.service-marker { height: 0; pointer-events: none; }
.service-card {
    position: sticky;
    top: var(--card-top, var(--services-top));
    z-index: var(--card-order);
    min-height: calc(100svh - var(--services-top));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: auto 1fr;
    align-items: end;
    gap: clamp(4rem, 9svh, 7rem) clamp(3rem, 9vw, 10rem);
    padding: 2rem clamp(1.25rem, 3.5vw, 4rem) 3rem;
    background: var(--card-background);
    color: var(--card-foreground);
    scroll-margin-top: var(--services-top);
}
.service-card__title {
    grid-column: 1 / -1;
    margin: 0;
    font: 400 clamp(3rem, 7.6vw, 8rem)/.84 var(--font-editorial);
    letter-spacing: -.045em;
    text-transform: uppercase;
    text-align: center;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.service-card__details {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    grid-column: 1;
}
.service-card__detail-group {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 23ch;
    font: 500 clamp(.625rem, .75vw, .75rem)/1.35 var(--font-body);
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.service-card__detail-group li:nth-child(even),
.service-card__detail-group:last-child { text-align: right; }
.service-card__copy {
    grid-column: 2;
    font: 400 clamp(1.25rem, 1.7vw, 1.65rem)/1.3 var(--font-editorial);
}
.service-card__copy > :first-child { margin-top: 0; }
.service-card__copy > :last-child { margin-bottom: 0; }
.service-card__copy a { text-decoration: none; transition: opacity 200ms ease; }
.service-card__copy a:hover { opacity: .55; }
.service-card__copy a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
@media (max-width: 800px) {
    .page-services { --services-top: 9rem; }
    .service-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: 2rem 1rem 2rem; gap: 3.5rem; }
    .service-card__title { font-size: clamp(1.75rem, 8.7vw, 4.75rem); }
    .service-card__copy { grid-column: 1; grid-row: 2; font-size: 1.25rem; }
    .service-card__details { grid-row: 3; }
}
@media (max-width: 700px) {
    .page-services { --services-top: 6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .page-services, .page-services > .site-header, .services-page::before { transition: none; }
}
