*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Stop phone browsers from enlarging text on their own: sizes here are deliberate */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    background: #000;
    color: #fff;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

/* Hidden visually, still read by screen readers and search engines */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- Floating nav ---------- */

.floating-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 20px 8px;
    container-type: inline-size;
    /* The nav spans the full width; let clicks pass through its empty areas */
    pointer-events: none;
    /* Inverts against whatever is behind it: white on dark covers, black on white boards */
    mix-blend-mode: difference;
    animation: fadeIn 0.9s cubic-bezier(0.25, 0.6, 0.3, 1);
}

.site-title {
    display: block;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    /* Roughly full width before JS; main.js then fits it exactly edge to edge */
    font-size: 9.6cqi;
    width: max-content;
    pointer-events: auto;
    line-height: 0.75;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transform: scaleY(0.6);
    transform-origin: top left;
    /* scaleY leaves empty space below the title; pull the menu partway back up */
    margin-bottom: -0.1em;
    position: relative;
}

/* Invisible strip under the title so the pointer can move down to the menu without it closing */
.site-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.5em;
}

.site-title:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---------- Menu: hidden until the title is hovered (or tapped / focused) ---------- */

/* Animates open to the menu's real height (grid 0fr -> 1fr).
   Closing waits a moment so the pointer can travel from the title to the links. */
.nav-menu {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 400ms ease 250ms, opacity 250ms ease 250ms, visibility 0s 650ms;
}

.floating-nav.open .nav-menu,
.floating-nav:has(:focus-visible) .nav-menu {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    transition: grid-template-rows 400ms ease, opacity 250ms ease;
}

@media (hover: hover) {
    .floating-nav:hover .nav-menu {
        grid-template-rows: 1fr;
        opacity: 1;
        visibility: visible;
        transition: grid-template-rows 400ms ease, opacity 250ms ease;
    }
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.nav-links a {
    display: block;
    padding: 2px 0;
    font: bold 20px/1.1 Helvetica, Arial, sans-serif;
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
    transform: scaleY(0.6);
    transform-origin: left;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.55;
}

/* ---------- Home header: black band with the title, then an equal gap ---------- */

/* --header-space is set by main.js: space above the title + its height + one --gap below */
.home main {
    padding-top: var(--header-space, 120px);
}


/* ---------- Home: large scrolling title in a band that scrolls away with the page ---------- */

.home .floating-nav {
    position: absolute;
    padding: 0;
    /* The band is solid black here, so no colour inversion is needed; blending over a
       moving layer also makes Safari flicker */
    mix-blend-mode: normal;
    animation: none;
}


.site-title.marquee {
    pointer-events: none;   /* not interactive: clicks, hovers and swipes go to what's below */
    position: relative;
    z-index: 1;
    width: 100%;
    height: calc(var(--title-size, 9.4vw) * 0.81);
    margin: var(--title-offset, 24px) 0 0;
    /* Clip only sideways: the letters must never be cut off at the top or bottom */
    overflow-x: clip;
    overflow-y: visible;
    /* --title-size is set by main.js so one copy of the name spans the page width */
    font-size: var(--title-size, 9.4vw);
    line-height: 1;
    transform: none;
}


/* main.js moves the track one copy at a time, pausing with the full name in view */
.marquee-track {
    display: inline-flex;
    transform: translate3d(20px, 0, 0);
    will-change: transform;
}

/* Hidden until main.js has sized it, then faded in, so it never visibly jumps in size */
.js .site-title.marquee {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.js .site-title.marquee.ready {
    opacity: 1;
}

/* The squash lives on each copy and never changes; only the track's position animates,
   so the text is drawn identically while moving and at rest (no shimmer when it stops) */
.marquee-track span {
    flex: none;
    /* Home title squash (main.js SCALE_Y); project pages keep their own 0.6 */
    transform: scaleY(0.81);
    transform-origin: 0 0;
    padding-right: 0.35em;
    /* Box hugs the capitals exactly (cap height to baseline), so it can be centred precisely */
    text-box: trim-both cap alphabetic;
}

/* ---------- Home intro: about + contact | experience | skills ---------- */

/* Column 2 lines up with the second project column below (50%); the bottom lines of all
   three columns line up, with the first block of columns 1 and 2 at the top */
.intro {
    display: grid;
    grid-template-columns: 50% 23.5% 26.5%;
    /* One --gap down to the first rule, the same as from the title down to this text */
    padding-bottom: var(--gap, 24px);
    font: bold clamp(13px, 1vw, 20px)/1.28 Helvetica, Arial, sans-serif;
    color: #fff;
}

.intro-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.28em;
}

.intro-about { padding: 0 20px; }
/* 50% + 2px = the page centre plus half a 4px gap, where the section headings slide to */
.intro-experience { padding-left: calc(2px - 0.05em); }   /* minus the letters' built-in left spacing */
.intro-skills { padding-right: 20px; }

/* Trim every text block to its letters (cap height to baseline): the spacing to the title above
   and the projects below then matches the space around the title, and columns line up exactly */
.intro p {
    margin: 0;
    text-box: trim-both cap alphabetic;
}

.intro-bio {
    max-width: 21em;
    margin-top: 1.6em !important;
    line-height: 1.02;
}

.intro address {
    font-style: normal;
}

.intro a {
    color: inherit;
    text-decoration: none;
}

.intro a:hover {
    opacity: 0.55;
}

.intro a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Phones: about + contact across the top, experience and skills side by side below */
@media (max-width: 600px) {
    .intro {
        grid-template-columns: 1fr 1fr;
        row-gap: 2.56em;
        font-size: 13px;
    }
    .intro-about { grid-column: 1 / -1; padding: 0 12px; gap: 2.56em; }
    .intro-experience { padding-left: 12px; }
    .intro-skills { padding: 0 12px 0 0; }
}

/* ---------- Home on phones: intro folds up once scrolling starts ---------- */

/* main.js toggles .intro-hidden: on as soon as the visitor scrolls down; after that the intro
   stays folded (even back at the top), leaving just "Footwear Designer" and a wide arrow that
   unfolds it again. Scroll anchoring is off so the browser doesn't counter-scroll as it folds. */
.home {
    overflow-anchor: none;
}

.intro-wrap {
    display: grid;
    grid-template-rows: 1fr;
    position: relative;
}

.intro-wrap-inner {
    min-height: 0;
    overflow: hidden;
    /* Room above the trimmed first lines so round letters aren't clipped; the negative
       margin keeps the layout exactly where it was */
    padding-top: 6px;
    margin-top: -6px;
}

/* The arrow: phones only, once the intro has folded the first time; it faces down while the
   intro is folded and turns to face up when it's open */
.intro-toggle { display: none; }

@media (max-width: 600px) {
    .intro-wrap {
        transition: grid-template-rows 0.55s cubic-bezier(0.25, 0.6, 0.3, 1);
    }
    /* folded: only the first line stays, with the usual gap below it (main.js measures
       --intro-peek) */
    .intro-hidden .intro-wrap { grid-template-rows: 0fr; }
    .intro-hidden .intro-wrap-inner { min-height: var(--intro-peek, 0px); }

    .intro > *,
    .intro-about > *,
    .intro-about > div > * { transition: opacity 0.35s ease 0.15s; }
    .intro-hidden .intro > :not(.intro-about),
    .intro-hidden .intro-about > :not(:first-child),
    .intro-hidden .intro-about > div > :not(.intro-role) {
        opacity: 0;
        transition-delay: 0s;
    }

    .intro-folded-once .intro-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: absolute;
        top: calc(var(--intro-role-top, 0px) - 20px);   /* centred on the first line */
        right: 0;
        width: 58px;
        height: 40px;
        padding: 0 12px 0 0;
        border: 0;
        background: none;
        color: #fff;
        cursor: pointer;
        animation: fadeIn 0.5s ease;
    }
    .intro-toggle svg {
        display: block;
        width: 24px;
        height: 9px;
        transform: rotate(180deg);   /* open: faces up */
        transition: transform 0.45s cubic-bezier(0.25, 0.6, 0.3, 1);
    }
    .intro-hidden .intro-toggle svg { transform: none; }   /* folded: faces down */
    .intro-toggle:focus-visible { outline: 1px solid #fff; outline-offset: -4px; }
}

/* ---------- Home: collapsible project sections ---------- */

/* Figure standing on the first rule, between the first and second intro columns, in front of
   the scrolling title (placement measured from the mockup: 26.5% to 45.6% of the width) */
.project-sections {
    position: relative;
}

.hero-figure {
    /* Never overlap the bio (max 21em of intro text from the left margin) or the second
       column at 50%; on large screens this is simply 26.5% / 19.1% as in the mockup */
    --fig-left: max(26.5%, calc(44px + 21 * clamp(13px, 1vw, 20px)));
    position: absolute;
    bottom: 100%;
    left: var(--fig-left);
    width: min(19.1%, 420px, calc(50% - 24px - var(--fig-left)));
    height: auto;
    z-index: 1001;          /* above the title, which sits in the header at z-index 1000 */
    pointer-events: none;   /* the title underneath stays clickable */
}

/* Below 1000px there's no room between the intro columns; on phones the intro also stacks */
@media (max-width: 999px) {
    .hero-figure { display: none; }
}

/* One even --gap (set by main.js) between every element down the page: title, intro, rules,
   headings and project grids */
.home {
    --section-pad: calc(var(--gap, 36px) * 0.9);
}

/* Thin rules between sections, aligned with the title's side margins */
.project-section::before {
    content: "";
    display: block;
    height: 1px;
    margin: 0 20px;
    background: rgba(255, 255, 255, 0.8);
}

.section-heading {
    margin: var(--section-pad) 20px calc(var(--section-pad) + var(--heading-trim, 0px));
    font: inherit;
    /* The heading row is the reference for the slide below (cqw = 1% of this row's width) */
    container-type: inline-size;
}

.section-toggle {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.section-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 6px;
}

/* Same type as the title, squashed to the headings' own height */
.section-text {
    display: block;
    width: max-content;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: calc(var(--title-size, 9.4vw) * 0.91);
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    margin-left: 0;
    transform: translateX(0) scaleY(0.628);   /* main.js HEADING_Y */
    transform-origin: 0 0;
    text-box: trim-both cap alphabetic;
    transition: opacity 0.35s ease, margin-left 0.7s cubic-bezier(0.25, 0.6, 0.3, 1),
                transform 0.7s cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* An open section's heading slides across until its first letter sits on the left edge of
   the second image below: the page centre + 2px (half the grid gap). The margin is half of
   the heading row (page width minus the 2 x 20px side margins), so it follows any width change
   by itself, scrollbars included; main.js only supplies --ink, the letter's own left spacing. */
.project-section.open .section-text {
    /* 50cqw, not 50%: browsers disagree on what a % inside a <button> refers to (Safari uses
       a wider box, which put the heading 20px too far right there) */
    margin-left: calc(50cqw + 2px - var(--ink, 0px));
}

/* Safari (and every iPhone/iPad browser, which all use Safari's engine) lands the heading
   further right than other browsers; main.js adds .is-safari so it can be nudged back */
@media (min-width: 601px) {
    .is-safari .project-section.open .section-text {
        margin-left: calc(50cqw + 2px - var(--ink, 0px) - 11px);
    }
}

/* Phones: no slide at all; the heading stays put while its projects open below */
@media (max-width: 600px) {
    .section-text,
    .project-section.open .section-text {
        margin-left: 0;
        transform: scaleY(0.628);
        transition: opacity 0.35s ease;
    }
}

@media (hover: hover) {
    .section-toggle:hover .section-text {
        opacity: 0.72;
    }
}

/* Opening a section slides its projects open and pushes the sections below down */
.section-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.7s cubic-bezier(0.25, 0.6, 0.3, 1);
}

.project-section.open .section-panel {
    grid-template-rows: 1fr;
}

/* Once a section has finished opening (main.js adds .settled), nothing in it is cropped, so
   e.g. the Graphic cards' 3D flip can reach past the panel's edges */
.project-section.open.settled .section-panel-inner {
    overflow: visible;
}

/* Phones, until main.js has set the sections: Product starts closed (no flash of it open) */
.phone-start .project-section.open .section-panel { grid-template-rows: 0fr; }
.phone-start .project-section.open .section-panel-content { opacity: 0; }

/* While restoring saved open/closed states on load, skip the slide */
.no-section-anim .section-panel,
.no-section-anim .section-panel-content,
.no-section-anim .section-text {
    transition: none !important;
}

.section-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.section-panel-content {
    padding-bottom: var(--section-pad);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-section.open .section-panel-content {
    opacity: 1;
    transition: opacity 0.6s ease 0.1s;
}

/* ---------- Graphic: three works on one row (same 4px gaps), on every screen size ---------- */

/* Product and Graphic: three across on every screen size */
.grid-container.grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Each graphic is a card: clicking flips it right to left to a black back with white text in
   Arial Black at the intro text's size */
.graphic-card {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    position: relative;
    perspective: 1200px;   /* strong enough to read as a real 3D turn */
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.graphic-card-inner {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.45, 0, 0.2, 1);
}

/* The turning card passes in front of its neighbours */
.graphic-card.turning {
    z-index: 2;
}

.graphic-card.flipped .graphic-card-inner {
    transform: rotateY(-180deg);   /* the right edge sweeps over to the left */
}

.graphic-card-front,
.graphic-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.graphic-card-front {
    object-fit: cover;
    background: #111;
}

.graphic-card-back {
    display: block;
    padding: 20px;
    background: #000;
    color: #fff;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: clamp(13px, 1vw, 20px);
    line-height: 1.28;
    transform: rotateY(180deg);
    overflow: hidden;
}

.graphic-card-back span {
    display: block;
    text-box: trim-both cap alphabetic;
}

.graphic-card:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

@media (max-width: 600px) {
    .graphic-card-back { padding: 10px; font-size: 11px; }
}

/* Over the Graphic cards the cursor is a dot (main.js moves it): the reverse colour of whatever
   it covers, round over a card's front, slowly turning square over a flipped card */
@media (hover: hover) {
    .js .graphic-card { cursor: none; }
}

.card-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;   /* always the reverse of what's underneath */
    pointer-events: none;
    opacity: 0;
    transition: border-radius 0.7s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.25s ease;
    will-change: transform;
}

.card-cursor.visible { opacity: 1; }
.card-cursor.square { border-radius: 0; }

/* ---------- Creative: FW24 Mostro show strip ---------- */

/* One row of looks, five across (two and a half on phones, 60% size on laptops and up) with the grid's 4px gaps.
   main.js moves the track right to left at the title's speed while Creative is open. */
.show-strip {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;   /* dragged sideways (main.js); vertical swipes scroll the page */
    user-select: none;
    -webkit-user-select: none;
    container-type: inline-size;
}

.show-track {
    display: flex;
    gap: 4px;
    width: max-content;
    will-change: transform;
}

.show-track img {
    flex: none;
    -webkit-user-drag: none;
    /* main.js rounds this to whole pixels (--look-w) so the loop starts and ends on exact pixels */
    width: var(--look-w, calc((100cqw - 16px) / 5));
    height: auto;
    aspect-ratio: 2 / 3;
    background: #fff;
}

/* Title over the strip: plain black at 10% opacity, stretched (main.js sets --tx / --ty) so its
   capitals sit 20px inside the top and bottom of the photos and 20px from each side of the
   page. Fades in slowly on hover and out even more slowly. */
.show-title {
    position: absolute;
    top: 20px;
    left: var(--show-side, 20px);
    margin: 0;
    opacity: 0;
    transition: opacity 3.5s cubic-bezier(0.4, 0, 0.6, 1);   /* very slow, even fade out */
    pointer-events: none;
}

.show-title span {
    display: block;
    width: max-content;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 100px;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.1);
    text-box: trim-both cap alphabetic;
    transform: scale(var(--tx, 1), var(--ty, 1));
    transform-origin: 0 0;
}

@media (hover: hover) {
    .show-strip:hover .show-title {
        opacity: 1;
        transition: opacity 1.4s cubic-bezier(0.4, 0, 0.6, 1);   /* slow fade in */
    }
}

/* Reduced motion: no automatic scrolling; the row can be scrolled sideways instead */
@media (prefers-reduced-motion: reduce) {
    .show-strip { overflow-x: auto; touch-action: auto; }
}

@media (min-width: 1025px) {
    .show-track img { width: var(--look-w, calc((100cqw - 16px) / 5 * 0.6)); }
}

@media (max-width: 600px) {
    .show-track img { width: var(--look-w, calc((100cqw - 8px) / 2.5)); }
}

/* ---------- Creative: the open show ---------- */

/* Clicking the strip opens the show (main.js): a white wash fades in over the strip, the
   section grows down to the bottom of the screen, then the text appears and the looks follow
   one after another. Layout as in the mockup: the name and role across the top, the looks
   14 to a row from 15.25% of the width, the text beside the first row, and one look large in a
   framed box on the right (its top level with the bottom of the role) with the credit below. */
.show {
    position: relative;
    overflow: hidden;
    container-type: inline-size;
}

.show-detail {
    --look-rows-gap: 2.8cqw;
    display: none;
    grid-template-columns: calc(12cqw - 4px) repeat(14, 1fr) calc(3.65cqw - 4px) 25.6cqw;
    column-gap: 4px;
    row-gap: var(--look-rows-gap);
    align-items: start;
    align-content: start;   /* rows stay packed at the top when the section fills the screen */
    padding: 2.7cqw 2.5cqw 7.5cqw 3.25cqw;   /* the bottom leaves room for the large look and credit */
    background: #fff;
    color: #000;
}

.show.detail-on .show-detail { display: grid; }
.show.detail-on .show-strip { display: none; }

.show-head {
    grid-column: 1 / -2;
    grid-row: 1;
    margin-bottom: calc(5.5cqw - var(--look-rows-gap));   /* the mockup's space above the looks */
}

.show-name {
    margin: 0 0 1.75cqw;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 2.8cqw;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-box: trim-both cap alphabetic;
}

.show-role {
    margin: 0;
    font: bold 1.65cqw/1.05 Helvetica, Arial, sans-serif;
    letter-spacing: -0.01em;
    text-box: trim-both cap alphabetic;
}

.show-about {
    grid-column: 1;
    grid-row: 2 / span 2;   /* spans two rows so it never makes the first row taller */
    margin-top: 0.5cqw;
    padding-right: 1em;
    max-width: 17em;
    font-size: clamp(9px, 0.56cqw, 14px);
    line-height: 1.3;
}

/* The large look (its runway photo): a thin black frame, its number in the top-left corner, the credit below.
   Its top is level with the bottom of the role; the negative bottom margin keeps it from
   stretching the rows of looks (it reaches a little below the last one). */
.show-view {
    grid-column: -2;
    grid-row: 2 / span 4;
    position: relative;
    margin: -5.5cqw 0 -12cqw;
}

.show-view-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    border: 1px solid #000;
    background: #fff;
}

.show-view-layer {
    position: absolute;
    inset: 0;
    transition: opacity 0.55s ease;
}

.show-view-layer.entering { opacity: 0; }

.show-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.show-view-number {
    position: absolute;
    top: 0.9cqw;
    left: 0.9cqw;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.65cqw;
    line-height: 1;
    color: #fff;   /* the runway photos are dark */
    text-box: trim-both cap alphabetic;
}

.show-credit {
    margin: 2cqw 0 0;
    font-size: clamp(8px, 0.42cqw, 11px);
    line-height: 1.25;
}

/* Each row of 14 starts in the second column */
.show-look:nth-child(14n + 1 of .show-look) { grid-column: 2; }

.show-look {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #fff;
    font: inherit;
    color: inherit;
}

.show-look img {
    aspect-ratio: 2 / 3;
}

/* A thin box fades in round the look under the pointer, and stays round the large one */
.show-look::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 1px solid #000;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.show-look[aria-pressed="true"]::after { opacity: 1; }

@media (hover: hover) {
    .show-look:hover::after { opacity: 1; }
}

.show-look:focus-visible { outline: none; }
.show-look:focus-visible::after { opacity: 1; border-width: 2px; }

/* Text first, then the large look, then the small looks one after another; closing runs it
   backwards (main.js sets the delays: --in when appearing, --out when going) */
.show-head > *,
.show-about,
.show-view,
.show-look {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease var(--out, 0s), transform 0.3s ease var(--out, 0s);
}

.show-detail.revealed .show-head > *,
.show-detail.revealed .show-about,
.show-detail.revealed .show-view,
.show-detail.revealed .show-look {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease var(--in, 0s), transform 0.45s ease var(--in, 0s);
}

.show-detail.instant * { transition: none !important; }

/* The white wash over the strip */
.show-wash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

/* Pointer: a small triangle that faces down over the strip and turns to face up once the show
   is open; always the reverse of the colour underneath */
@media (hover: hover) {
    .js .show,
    .js .show * { cursor: none; }
}

.show-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 14px;
    height: 12px;
    margin: -6px 0 0 -7px;
    mix-blend-mode: difference;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    will-change: transform;
}

.show-cursor::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transition: transform 0.7s cubic-bezier(0.45, 0, 0.2, 1);
}

.show-cursor.visible { opacity: 1; }
.show-cursor.up::before { transform: rotate(180deg); }
.show-cursor.right::before { transform: rotate(270deg); }

/* Phones: name, role and text across the top, then the large look, then the looks seven to
   a row, then the credit */
@media (max-width: 600px) {
    .show-detail {
        grid-template-columns: repeat(7, 1fr);
        row-gap: 6px;
        padding: 28px 12px 40px;
    }
    .show-head { grid-column: 1 / -1; margin-bottom: 20px; }
    .show-name { font-size: 5.4cqw; margin-bottom: 14px; }
    .show-role { font-size: 4.2cqw; }
    .show-about,
    .show-view { grid-column: 1 / -1; grid-row: auto; padding: 0; }
    .show-about { margin: 0 0 18px; font-size: 12px; max-width: 24em; }
    .show-view { width: 64%; margin: 0 auto 18px; }
    .show-view-number { top: 8px; left: 8px; font-size: 16px; }
    .show-credit { margin-top: 12px; font-size: 9px; }
    .show-look:nth-child(14n + 1 of .show-look) { grid-column: auto; }
}

/* ---------- Product: launch layouts ---------- */

/* Clicking a Product cover (main.js): a white wash fades in over the covers, the section grows
   to the height of the project's layout, then its text and first images fade in; the rest fade
   in as they're scrolled to. Clicking anywhere on it runs it backwards. Each layout is the
   designer's 1200px layout, positioned in shares of the width (cqw) so it scales. */
.launch-stage {
    position: relative;
    overflow: hidden;
    container-type: inline-size;
}

.launch-views { display: none; }
.launch-stage.detail-on .launch-views { display: block; }
.launch-stage.detail-on > .grid-container,
.launch-stage.detail-on > .launch-covers { display: none; }

/* Concept: the covers on one row, three in view, drifting slowly right to left; they can be
   dragged either way (main.js). Vertical swipes still scroll the page. */
.launch-covers {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.grid-container.carousel-track {
    display: flex;
    gap: 4px;
    width: max-content;
    will-change: transform;
}

.carousel-track > * {
    flex: none;
    width: calc((100cqw - 8px) / 3);
}

.carousel-track img { -webkit-user-drag: none; }

.launch {
    display: none;
    position: relative;
    background: #fff;
    color: #000;
}

.launch.current { display: block; }

.launch-text,
.launch-item {
    position: absolute;
    margin: 0;
}

.launch-text {
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.02em;
    text-box: trim-both cap alphabetic;
    z-index: 5;
}

.launch-title { font-size: max(2.68cqw, 12px); }
.launch-label { font-size: max(1.25cqw, 7px); text-transform: uppercase; letter-spacing: 0; }
.launch-note {
    font: 400 max(0.77cqw, 8px)/1.15 Helvetica, Arial, sans-serif;
    letter-spacing: 0;
    white-space: normal;
}
.launch-light { color: #fff; }

/* Phones: a little more room under the title, and small notes in their own, wider place */
@media (max-width: 600px) {
    .launch-label { margin-top: 1.5px; }
    .launch-note { font-size: 7px; line-height: 1.3; }
    .launch-text[style*="--phone-top"] {
        left: var(--phone-left) !important;
        top: var(--phone-top) !important;
        width: var(--phone-width) !important;
    }
}

.launch-item { height: auto; }
.launch-item.multiply { mix-blend-mode: multiply; }
.launch-item.screen { mix-blend-mode: screen; }

/* Fading in: the text and first images when the layout opens, the others (.later) as they're
   scrolled to (main.js adds .seen); closing fades everything out together */
.launch-text,
.launch-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.launch.revealed .launch-text:not(.later),
.launch.revealed .launch-item:not(.later),
.launch.revealed .later.seen {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease var(--in, 0s), transform 0.6s cubic-bezier(0.25, 0.6, 0.3, 1) var(--in, 0s);
}

.launch.instant * { transition: none !important; }

.launch-wash {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Home footer ---------- */

/* Home page: the footer always sits in the bottom-right corner of the page, at the bottom of
   the screen even when every section is closed and the page is shorter than the window */
body.home {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.home > main {
    flex: 1 0 auto;
}

.site-footer {
    padding: calc(var(--gap, 36px) * 2.1) 20px 10px;
    font: bold 9px/1.2 Helvetica, Arial, sans-serif;   /* tiny, but still readable */
    letter-spacing: 0.02em;
    color: #fff;
    text-align: right;
}

/* ---------- Home grid ---------- */

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
}

.grid-container a {
    display: block;
    overflow: hidden;
}

.cover {
    position: relative;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.6, 0.3, 1);
}

.grid-container a:hover .cover,
.grid-container a:focus-visible .cover {
    transform: scale(0.993);
}

.grid-container a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* ---------- Project covers (Product and Concept) ---------- */

.expandable {
    text-decoration: none;
}

/* A thin black plus cursor on the project covers (32px) */
.expandable {
    cursor: url("../assets/cursors/plus.png") 16 16, crosshair;
    cursor: -webkit-image-set(url("../assets/cursors/plus.png") 1x, url("../assets/cursors/plus@2x.png") 2x) 16 16, crosshair;   /* sharp on Retina (Safari) */
    cursor: image-set(url("../assets/cursors/plus.png") 1x, url("../assets/cursors/plus@2x.png") 2x) 16 16, crosshair;
}

/* White version over dark covers (the builder marks those .on-dark) */
.expandable.on-dark {
    cursor: url("../assets/cursors/plus-white.png") 16 16, crosshair;
    cursor: -webkit-image-set(url("../assets/cursors/plus-white.png") 1x, url("../assets/cursors/plus-white@2x.png") 2x) 16 16, crosshair;   /* sharp on Retina (Safari) */
    cursor: image-set(url("../assets/cursors/plus-white.png") 1x, url("../assets/cursors/plus-white@2x.png") 2x) 16 16, crosshair;
}

/* With JavaScript and a mouse, main.js draws the plus/minus itself (Safari sometimes drops
   custom CSS cursors after the page layout changes); the CSS cursors above stay as a fallback */
@media (hover: hover) {
    .js .expandable,
    .js .expandable *,
    .js .launch-stage.is-open,
    .js .launch-stage.is-open * {
        cursor: none !important;
    }
}

.tile-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;   /* centred on the pointer, like the 16 16 hotspot */
    background: url("../assets/cursors/plus.png") center / 32px 32px no-repeat;
    background-image: -webkit-image-set(url("../assets/cursors/plus.png") 1x, url("../assets/cursors/plus@2x.png") 2x);
    background-image: image-set(url("../assets/cursors/plus.png") 1x, url("../assets/cursors/plus@2x.png") 2x);
    pointer-events: none;
    visibility: hidden;
    will-change: transform;
}

.tile-cursor.visible { visibility: visible; }
.tile-cursor.minus {
    background-image: url("../assets/cursors/minus.png");
    background-image: -webkit-image-set(url("../assets/cursors/minus.png") 1x, url("../assets/cursors/minus@2x.png") 2x);
    background-image: image-set(url("../assets/cursors/minus.png") 1x, url("../assets/cursors/minus@2x.png") 2x);
}
.tile-cursor.white {
    background-image: url("../assets/cursors/plus-white.png");
    background-image: -webkit-image-set(url("../assets/cursors/plus-white.png") 1x, url("../assets/cursors/plus-white@2x.png") 2x);
    background-image: image-set(url("../assets/cursors/plus-white.png") 1x, url("../assets/cursors/plus-white@2x.png") 2x);
}
.tile-cursor.minus.white {
    background-image: url("../assets/cursors/minus-white.png");
    background-image: -webkit-image-set(url("../assets/cursors/minus-white.png") 1x, url("../assets/cursors/minus-white@2x.png") 2x);
    background-image: image-set(url("../assets/cursors/minus-white.png") 1x, url("../assets/cursors/minus-white@2x.png") 2x);
}

/* ---------- Project page ---------- */

.project-detail img {
    background: #111;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 48px 20px;
}

.project-footer a {
    font: bold 20px/1.2 Helvetica, Arial, sans-serif;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.project-footer a:hover {
    opacity: 0.55;
}

.project-footer .next {
    margin-left: auto;
    text-align: right;
}

/* ---------- Fade-in (only when JS is running, so images never stay hidden) ---------- */

.js .fade-in {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.6, 0.3, 1), transform 0.9s cubic-bezier(0.25, 0.6, 0.3, 1);
}

.js .fade-in.visible {
    opacity: 1;
    transform: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    .js .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .nav-links a { font-size: 18px; }
}

@media (max-width: 768px) {
    .nav-links a { font-size: 16px; }
}

@media (max-width: 480px) {
    .floating-nav { padding: 12px 12px 6px; }
    .section-heading { margin-left: 12px; margin-right: 12px; }
    .site-footer { padding-left: 12px; padding-right: 12px; }
    .project-section::before { margin: 0 12px; }
    /* Phone menu: whole-pixel line spacing so every gap between titles looks the same,
       and the first title sits that same distance below the top edge of the image */
    .nav-links a { padding: 0; line-height: 25px; }
}
