:root {
  --kit-accent: var(--fg);
  --bg: #efede8;
  --fg: #141414;
  --muted: #5c5b57;
  --line: #d6d3cc;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* minimal scrollbars: thin, no track, a quiet thumb */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 20, 20, 0.28) transparent;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(20, 20, 20, 0.28);
  border-radius: 3px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  color: var(--fg);
}
body {
  margin: 0;
  font:
    400 17px/1.55 'Helvetica Neue',
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
a {
  color: inherit;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 4vw, 48px);
  /* a solid strip rather than a blend mode: readable over any project image, and contrast can be measured */
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  color: var(--fg);
}
.brand {
  font-weight: 600;
  text-decoration: none;
}
.nav nav {
  display: flex;
  gap: 22px;
}
.nav nav a {
  text-decoration: none;
}
.nav nav a:hover {
  text-decoration: underline;
}
.label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

/* hero */
.hero {
  min-height: 100svh;
  display: grid;
  align-content: end;
  gap: 40px;
  padding: 120px clamp(20px, 4vw, 48px) 48px;
}
.hero {
  overflow-x: clip;
  position: relative;
  isolation: isolate;
}
.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.split {
  font-weight: 500;
  font-size: clamp(52px, 11.5vw, 190px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.dim {
  color: var(--muted);
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
}
.line > span {
  display: block;
}
.js .line > span {
  transform: translateY(105%);
  transition: transform 1.2s var(--ease);
}
.js .split.in .line > span {
  transform: none;
}
.js .split.in .line:nth-child(2) > span {
  transition-delay: 0.09s;
}
.js .split.in .line:nth-child(3) > span {
  transition-delay: 0.18s;
}
.meta {
  display: flex;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* marquee */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 22px 0;
}
.marquee-row {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(40px, 7vw, 96px);
  letter-spacing: -0.04em;
  will-change: transform;
}

/* work */
.work {
  padding: 96px clamp(20px, 4vw, 48px) 60px;
  display: grid;
  gap: 80px;
}
.project {
  display: grid;
  gap: 20px;
}
.clip {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.art {
  width: 100%;
  height: 100%;
  transform-origin: 50% 60%;
}
/* generated artwork in layers, so the example needs no image files; each layer's data-depth sets how far it
   travels as the frame opens, which reads as depth */
.art {
  display: block;
}
.art [data-depth] {
  will-change: transform;
}
/* the pointer's lean: the artwork shifts a few pixels against the pointer, inside its slightly larger frame */
.art {
  translate: calc(var(--lx, 0) * -10px) calc(var(--ly, 0) * -6px);
}
.pnum {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.project-text {
  display: grid;
  gap: 8px;
  padding-bottom: 6px;
}
.project h3 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.project p {
  color: var(--muted);
  max-width: 30ch;
}

/* horizontal gallery */
.hs-progress {
  margin: 0 clamp(20px, 4vw, 48px);
  height: 1px;
  background: var(--line);
}
.hs-progress i {
  display: block;
  height: 100%;
  background: var(--fg);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.hs-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 40px;
}
.hs-label {
  padding: 0 clamp(20px, 4vw, 48px);
}
.hs-track {
  display: flex;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 48px);
  width: max-content;
  will-change: transform;
}
.step {
  width: min(78vw, 420px);
  aspect-ratio: 4 / 5;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #e4e1da;
  border: 1px solid var(--line);
}
.step span {
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px #8a877f;
}
.step h3 {
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.step p {
  color: var(--muted);
  max-width: 24ch;
}

/* contact */
.contact {
  min-height: 80svh;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 80px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.mail {
  font-size: clamp(34px, 8vw, 120px);
  letter-spacing: -0.05em;
  text-decoration: none;
  line-height: 1;
  overflow-wrap: anywhere;
}
.mail:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
/* services: rows that open; a dark fill sweeps across the row under the pointer or focus */
.services {
  padding: 100px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.services .label {
  margin-bottom: 32px;
}
.services details {
  position: relative;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.services details::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease);
}
.services summary {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 22px 0;
  font-size: clamp(36px, 7vw, 96px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  transition:
    color 0.4s,
    padding 0.5s var(--ease);
}
.services summary::-webkit-details-marker {
  display: none;
}
.sn {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  transition: color 0.4s;
}
.services details p {
  max-width: 44ch;
  padding: 0 0 26px 34px;
  color: var(--muted);
  transition: color 0.4s;
}
@media (hover: hover) and (pointer: fine) {
  .services details:hover::before {
    transform: none;
  }
  .services details:hover summary {
    color: var(--bg);
    padding-left: 18px;
  }
  .services details:hover :is(.sn, p) {
    color: #c9c5bc;
  }
}
.services summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

/* the statement: words darken from the muted grey as the reader moves through it */
.manifesto {
  min-height: 160svh;
  padding: 0 clamp(20px, 4vw, 48px);
}
.manifesto .words {
  position: sticky;
  top: 20svh;
  max-width: 22ch;
  font-size: clamp(34px, 5.6vw, 84px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.manifesto .words span {
  color: var(--muted);
  transition: color 0.25s;
}
.manifesto .words span.lit {
  color: var(--fg);
}

.foot {
  display: grid;
  gap: 32px;
  padding: 56px clamp(20px, 4vw, 48px) 28px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.foot-cols {
  display: grid;
  gap: 24px;
}
.foot ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot a {
  text-decoration: none;
}
.foot a:hover,
.foot a:focus-visible {
  color: var(--fg);
}
.foot .brand {
  color: var(--fg);
  font-size: 22px;
}
.foot-note {
  font-size: 13px;
}
.nav .wide {
  display: none;
}

/* larger screens: image and caption side by side, alternating */
@media (min-width: 761px) {
  .nav .wide {
    display: inline;
  }
  .foot-cols {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .work {
    padding-top: 120px;
    gap: 120px;
  }
  .project {
    grid-template-columns: 1.6fr 1fr;
    gap: 32px;
    align-items: end;
  }
  .project:nth-of-type(even) {
    grid-template-columns: 1fr 1.6fr;
  }
  .project:nth-of-type(even) .clip {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js:not(.motion-on) .line > span {
    transition: none;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) .services details::before,
  html:not(.motion-on) .services :is(summary, .sn, p) {
    transition: none;
  }
  html:not(.motion-on) .manifesto {
    min-height: auto;
    padding-block: 100px;
  }
  html:not(.motion-on) .manifesto .words {
    position: static;
  }
}

/* the film layer, shared by all five projects: grain over everything, letterbox bars that close in while the
   signature moment plays (html.film, set by the script), and a fade up from black as the page opens. All of it is
   decoration, kept out of the way of the pointer and the reader, and still under reduced motion */
.grain {
  position: fixed;
  inset: -20px;
  z-index: 30;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bars {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: none;
  pointer-events: none;
}
.bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: #000;
  transform: scaleY(0);
  transition: transform 0.7s var(--ease);
}
.bars i:first-child {
  top: 0;
  transform-origin: top;
}
.bars i:last-child {
  bottom: 0;
  transform-origin: bottom;
}
html.film .bars i {
  transform: none;
}
@media (min-width: 900px) {
  .bars {
    display: block;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .grain {
    animation: gate 1s steps(4) infinite;
  }
  .js body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: #000;
    pointer-events: none;
    animation: curtain 1.4s var(--ease) 0.1s forwards;
  }
}
html.motion-on .grain {
  animation: gate 1s steps(4) infinite;
}
@keyframes gate {
  25% {
    transform: translate(-8px, 5px);
  }
  50% {
    transform: translate(6px, -7px);
  }
  75% {
    transform: translate(-4px, -3px);
  }
}
@keyframes curtain {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ---- the scroll kit's styles: the same in all five projects, coloured by each site's own tokens ---- */
header nav a[aria-current='location'] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--kit-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
/* reveal on scroll: hidden only when the script runs and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .kit-reveal {
    opacity: 0;
    translate: 0 28px;
    transition:
      opacity 0.9s var(--ease),
      translate 0.9s var(--ease);
  }
  .js .kit-reveal.kit-in {
    opacity: 1;
    translate: none;
  }
}
html.motion-on.js .kit-reveal:not(.kit-in) {
  opacity: 0;
  translate: 0 28px;
}
html.motion-on.js .kit-reveal {
  transition:
    opacity 0.9s var(--ease),
    translate 0.9s var(--ease);
}
.kit-section {
  padding: 14vh clamp(20px, 6vw, 96px);
  border-top: 1px solid var(--line);
}
.kit-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 32px;
}
.kit-head h2 {
  margin: 0;
  font-weight: inherit;
  font-size: clamp(32px, 4.8vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.kit-buttons {
  display: flex;
  gap: 8px;
}
.kit-buttons button,
.kit-more {
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
}
.kit-buttons button:hover,
.kit-buttons button:focus-visible,
.kit-more:hover,
.kit-more:focus-visible {
  border-color: var(--kit-accent);
}
/* scroll snap: a native horizontal track that settles on a card */
.kit-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 340px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
.kit-track > * {
  scroll-snap-align: start;
  margin: 0;
}
.kit-card {
  display: grid;
  gap: 10px;
}
.kit-card .kit-art {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
}
.kit-card h3 {
  margin: 0;
  font-weight: inherit;
  font-size: 22px;
}
.kit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
/* zoom on scroll: the frame stays put, the picture inside settles from 1.28x to 1x */
.kit-zoom {
  overflow: hidden;
  border: 1px solid var(--line);
}
.kit-zoom > * {
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(var(--zoom, 1));
  transform-origin: 50% 60%;
}
/* infinite scroll */
.kit-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.kit-list li {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 4px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.kit-list time,
.kit-list .kit-tag {
  color: var(--kit-accent);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 4px;
}
.kit-list p {
  margin: 0;
  color: var(--muted);
}
.kit-list b {
  display: block;
  color: var(--fg);
  font-weight: inherit;
  font-size: 1.15em;
}
.kit-end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}
.kit-more {
  display: none;
}
.js .kit-more:not([hidden]) {
  display: inline-block;
}

/* scroll-driven: a progress line along the top, scaled by how far down the page the reader is */
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 11;
  height: 2px;
  background: var(--kit-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* reduced motion: state changes happen at once, nothing fades or slides into place */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *,
  html:not(.motion-on) *::before,
  html:not(.motion-on) *::after {
    transition-duration: 0s !important;
  }
}
