@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans.woff2") format("woff2");
	font-weight: 400 700;
	font-stretch: 75% 100%;
	font-display: swap;
}
@font-face {
	font-family: "IBM Plex Mono";
	src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

:root {
	--ink: #111110;
	--muted: #6d6a64;
	--line: #dcdbd6;
	--paper: #ffffff;
	--soft: #f3f2ee;
	--accent: #0b1fd1;
	--gutter: clamp(18px, 2.2vw, 32px);
	--edge: var(--gutter); /* side margin of the page */
	--gap: clamp(10px, 1.1vw, 16px);
	--radius: 0px;
	--sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--header-h: 64px;
	--sticky-top: var(--header-h);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 500; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; padding: 8px 12px; background: var(--ink); color: #fff; }

.label { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

.link { display: inline-block; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color .2s; }
.link:hover { color: var(--accent); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 22px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 500 15px/1.2 var(--sans); letter-spacing: .02em; text-transform: uppercase; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.button:hover { background: #0816a3; border-color: #0816a3; }
.button__icon { font-size: 11px; }
.button--block { display: flex; width: 100%; justify-content: flex-start; }
.button--ghost { background: transparent; color: var(--accent); }
.button--ghost:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px; height: var(--header-h); padding: 0 var(--edge); font-size: 15px; font-weight: 500; transition: background-color .3s, transform .4s var(--ease); }
.site-header.is-scrolled { background: rgb(255 255 255 / .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-hidden { --sticky-top: 0px; }
.site-header__name { font-size: 17px; letter-spacing: -.01em; }
.site-nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.site-nav a { transition: color .2s; }
.site-nav a:hover, .site-nav a.is-current { color: var(--accent); }

/* Media tiles */
.tile { position: relative; aspect-ratio: var(--ratio, 9 / 16); overflow: hidden; border-radius: var(--radius); background: #ebeae5; }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
/* The film tile: a click opens the film. */
.tile--film { cursor: pointer; }
.tile__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; padding-left: 3px; border-radius: 50%; background: rgb(255 255 255 / .9); color: var(--ink); font-size: 16px; opacity: 0; transform: scale(.9); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.tile--film.is-loaded:hover .tile__play { opacity: 1; transform: none; }
.strip.is-dragging .tile__play { opacity: 0; }
/* Loading skeleton: the tile already has the image's exact shape; a soft shine runs over it until the
   image has arrived (.is-loaded, set by main.js), then the image fades in over it. */
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .6) 50%, transparent 70%) 0 0 / 220% 100% no-repeat; animation: shine 1.5s ease-in-out infinite; transition: opacity .4s; }
.tile.is-loaded::before { opacity: 0; animation: none; }
.tile.is-loaded img { opacity: 1; }
.tile:not(.is-loaded) .tile__label, .tile:not(.is-loaded) .compare__line { opacity: 0; }
.tile__label, .compare__line { transition: opacity .4s; }
@keyframes shine { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.tile__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; pointer-events: none; }
.tile__video.is-playing { opacity: 1; }
.tile__label { position: absolute; left: 10px; bottom: 10px; padding: 5px 8px; background: rgb(255 255 255 / .92); color: var(--ink); font-family: var(--mono); font-size: 11px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; }
.tile__label--right { left: auto; right: 10px; }
/* Before/after: the after image shows to the right of the divider. */
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.compare { --pos: 50%; cursor: pointer; transition: --pos .5s var(--ease); }
.compare.is-tracking { transition: --pos .08s linear; }
.compare img { position: absolute; inset: 0; }
.compare__after { clip-path: inset(0 0 0 var(--pos)); }
.compare__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 .5px rgb(0 0 0 / .15); pointer-events: none; }
.compare__knob { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgb(0 0 0 / .25); pointer-events: auto; touch-action: none; cursor: ew-resize; }
.compare__knob::before, .compare__knob::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; }
.compare__knob::before { left: 6px; border-right-color: var(--ink); }
.compare__knob::after { right: 6px; border-left-color: var(--ink); }

/* Hero: the presentation in large type, filling the first screen */
.hero { padding: calc(var(--header-h) + clamp(32px, 4.5vw, 72px)) var(--edge) 0; }
.hero__statement { max-width: 1180px; }
.hero__title, .hero__text, .site-footer__title, .site-footer__text { font-size: clamp(28px, 3.3vw, 54px); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; }
.hero__title { text-wrap: balance; }
.hero__text a, .site-footer__text a { color: var(--accent); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; transition: text-decoration-thickness .2s; }
.hero__text a:hover, .site-footer__text a:hover { text-decoration-thickness: .1em; }
.hero__text { max-width: 36ch; margin-top: .32em; text-indent: clamp(32px, 5vw, 80px); }

/* Section heads */

/* Selected work: a bordered card and a strip of stills beside it */
/* Area sections: their titles stick to the top and stack, so the areas already passed stay in view.
   Each title takes a thin slot (--head-h). In the page it shows large; once stuck (.is-stuck, set by main.js)
   it shrinks into its line, the current area a little larger than the ones passed. Only transforms change,
   so nothing below moves. */
.catalog { --head-h: 30px; --stuck: .5; --stuck-current: .66; }
.works { padding: 0 var(--edge); }
.works__head { position: sticky; top: calc(var(--sticky-top) + var(--i) * var(--head-h)); z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; box-sizing: border-box; height: var(--head-h); margin: clamp(68px, 7vw, 108px) var(--edge) 0; font-weight: 500; transition: top .4s var(--ease); }
.works__head::before { content: ""; position: absolute; inset: -1px calc(var(--edge) * -1) 0; z-index: -1; background: var(--paper); }
.works__head::after { content: ""; position: absolute; inset: -16px 0 auto; border-top: 1px solid var(--ink); transition: transform .35s var(--ease), border-color .35s; }
.works__head.is-stuck::after { transform: translateY(16px); border-color: var(--line); }
.works__head.is-stuck.is-current::after { border-color: var(--ink); }
.works__head + .works { margin-top: 20px; }
.works__title { font-size: clamp(22px, 2vw, 30px); line-height: 1; letter-spacing: -.03em; transform-origin: left center; transition: transform .35s var(--ease), color .2s; }
.works__head.is-stuck .works__title { transform: scale(var(--stuck)); color: var(--muted); }
.works__head.is-stuck.is-current .works__title { transform: scale(var(--stuck-current)); color: var(--ink); }
.works__head.is-stuck .works__title:hover { color: var(--accent); }
.works__title:hover { color: var(--accent); }
.works__count { transition: opacity .3s; }
.works__head.is-stuck:not(.is-current) .works__count { opacity: 0; }
.project { margin-top: clamp(20px, 2.2vw, 32px); }
.project__body { display: flex; gap: var(--gap); height: clamp(420px, 64vh, 640px); margin-right: calc(var(--edge) * -1); }
.project__card { flex: 0 0 clamp(300px, 27vw, 400px); display: flex; flex-direction: column; padding: clamp(18px, 1.6vw, 24px); background: var(--soft); }
.project__top { display: flex; justify-content: space-between; gap: 16px; }
.project__title { margin-top: clamp(28px, 4vw, 64px); font-size: clamp(34px, 3.4vw, 54px); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.project__meta { margin: auto 0 20px; font-size: 15px; line-height: 1.35; }
.project__meta div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-top: 1px solid var(--line); }
.project__meta dt { color: var(--muted); }
.project__meta dd { margin: 0; text-align: right; }
.project__actions { display: grid; gap: 12px; justify-items: start; font-size: 15px; }
.strip { flex: 1 1 0; min-width: 0; display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-right: var(--edge); cursor: grab; -webkit-user-select: none; user-select: none; }
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; }
/* Right edge: the frames blur softly toward the edge; the blur leaves at the end (.is-end). */
.strip-wrap { position: relative; flex: 1 1 0; min-width: 0; height: 100%; }
.strip-wrap .strip { height: 100%; }
.strip-blur { position: absolute; top: 0; right: 0; bottom: 0; width: calc(var(--edge) + clamp(48px, 5vw, 88px)); pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: linear-gradient(to right, rgb(255 255 255 / 0), rgb(255 255 255 / .18)); -webkit-mask-image: linear-gradient(to right, transparent, #000 75%); mask-image: linear-gradient(to right, transparent, #000 75%); transition: opacity .4s; }
.strip-wrap.is-end .strip-blur { opacity: 0; }
.strip .tile { flex: 0 0 auto; height: 100%; }
.strip .tile img { -webkit-user-drag: none; }
.works__more { display: flex; margin-top: clamp(20px, 2.2vw, 32px); }

/* Film player, opened from a card */
.player { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 56px 16px 24px; border: 0; background: rgb(8 8 10 / .96); }
.player[open] { display: grid; place-items: center; }
.player::backdrop { background: rgb(8 8 10 / .96); }
.player__video { max-width: 100%; max-height: calc(100dvh - 96px); background: #000; }
.player__close { position: absolute; top: 14px; right: 16px; padding: 8px 10px; border: 0; background: none; color: #fff; font: 500 15px var(--sans); cursor: pointer; }



/* Footer: white, with the name as the last thing on the page */
.site-footer { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 72px); margin: clamp(96px, 11vw, 180px) var(--edge) 0; padding: clamp(28px, 3vw, 44px) 0 0; border-top: 1px solid var(--ink); overflow: clip; }
/* Closing words, in the same large type as the hero, with the same blue links. */
.site-footer__title { font-weight: 400; }
.site-footer__text { max-width: 36ch; margin-top: .32em; text-indent: clamp(32px, 5vw, 80px); }
.site-footer__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.wordmark { display: block; width: max-content; margin: 0; color: var(--accent); font-weight: 640; font-stretch: 75%; font-size: 30vw; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; text-box: trim-both cap alphabetic; margin-bottom: -.25em; /* only the top part shows: the word runs past the page bottom and is cut there (main.js sets the exact cut) */ }

/* Phone */
@media (max-width: 720px) {
	:root { --header-h: 56px; }
	body { font-size: 16px; }
	.site-header { font-size: 14px; }
	.site-header__name { font-size: 15px; white-space: nowrap; }
	.site-nav a:nth-child(2) { display: none; }

	.hero__text, .site-footer__text { text-indent: 0; }


	.project__body { flex-direction: column; height: auto; margin-right: 0; }
	.project__card { flex: none; }
	.project__title { margin-top: 28px; }
	.project__meta { margin: 36px 0 20px; }
	.strip-wrap { flex: none; height: 62vh; max-height: 520px; margin-right: calc(var(--edge) * -1); }

	.catalog { --head-h: 26px; --stuck: .66; --stuck-current: .82; }
	.works__title { font-size: 20px; }
	.works__count { font-size: 11px; }


}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}
