:root {
  --paper: #efefec;
  --paper-2: #e6e6e2;
  --ink: #111112;
  --ink-2: #5d5d60;
  --night: #121214;
  --night-2: #1c1c1f;
  --bone: #ecebe6;
  --accent: #3d2bff;
  --rule: rgba(17, 17, 18, 0.14);
  --rule-night: rgba(236, 235, 230, 0.14);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
small { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
h1, h2, h3, p, ol, ul, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--night); color: var(--bone);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--gutter);
  font-size: 13px;
  transition: transform 1s var(--ease) 0.15s;
}
.loader.is-done { transform: translateY(-100%); }
.loader__count { font-variant-numeric: tabular-nums; font-size: clamp(48px, 9vw, 140px); line-height: 0.85; letter-spacing: -0.04em; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: 0.07;
  background-image: var(--noise);
  animation: grain 0.6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--gutter);
  color: #fff; mix-blend-mode: difference;
  font-size: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.03em; font-weight: 500; justify-self: start; }
.brand__mark { width: 30px; height: 19px; fill: currentColor; }
.header__status { display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.header__nav { justify-self: end; display: flex; gap: 24px; }
.header__nav a, .index a, .footer a { position: relative; }
.header__nav a::after, .index a::after, .footer a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.header__nav a:hover::after, .index a:hover::after, .footer a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--night);
  color: var(--bone);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero__face { position: absolute; inset: 0; }
.hero__face canvas { display: block; width: 100%; height: 100%; }
/* sized to the head by face.js: dragging there turns the head instead of scrolling the page */
.face__touch { position: absolute; touch-action: none; }
.hero__face img.fallback {
  position: absolute; left: 50%; top: 8%; height: 70%; transform: translateX(-50%);
  filter: grayscale(1) contrast(1.2); opacity: 0.85;
}

.hero__side {
  position: absolute; top: 44%;
  font-size: 11px; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(236, 235, 230, 0.7);
  max-width: 240px;
}
.hero__side--l { left: var(--gutter); }
.hero__side--r { right: var(--gutter); text-align: right; }

.hero__bottom { position: relative; z-index: 2; padding: 0 var(--gutter) 22px; pointer-events: none; mix-blend-mode: difference; }
.hero__bottom a { pointer-events: auto; }
.hero__title {
  font-weight: 400;
  font-size: clamp(88px, 21vw, 360px);
  line-height: 0.8;
  letter-spacing: -0.065em;
  margin-left: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.hero__title .line { display: inline-block; transform: translateY(105%); transition: transform 1.4s var(--ease) 0.2s; }
.is-ready .hero__title .line { transform: none; }
.hero__title em { letter-spacing: -0.04em; margin-right: 0.02em; }
.hero__title sup { font-size: 0.11em; letter-spacing: 0; vertical-align: top; position: relative; top: 0.45em; margin-left: 0.25em; font-weight: 400; }

.index {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-night);
  padding-top: 12px; margin-top: 10px;
  font-size: 13px;
}
.index li { display: flex; flex-direction: column; gap: 2px; }
.index small { color: rgba(236, 235, 230, 0.45); font-size: 9px; }
.index__copy { justify-content: flex-end; align-items: flex-end; }

/* ---------- reveal helper ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in, .is-ready .hero .reveal { opacity: 1; transform: none; }
.is-ready .hero .reveal { transition-delay: 0.9s; }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(96px, 16vw, 220px) var(--gutter) clamp(72px, 10vw, 140px); }
.manifesto__quote {
  margin-top: 28px;
  font-size: clamp(40px, 7.4vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 400;
  max-width: 15ch;
}
.manifesto__quote .w { opacity: 0.12; transition: opacity 0.35s linear; }
.manifesto__quote .w.on { opacity: 1; }
.manifesto__quote .accent { color: var(--accent); }
.manifesto__quote .accent .w { font-family: var(--serif); font-style: italic; letter-spacing: -0.02em; }
.manifesto__sig { margin-top: 28px; font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -0.02em; text-align: right; }

.manifesto__cols {
  margin-top: clamp(64px, 9vw, 120px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter);
  border-top: 1px solid var(--rule); padding-top: 18px;
}
.manifesto__cols p { margin-top: 10px; font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; max-width: 30ch; }

/* ---------- work ---------- */
.work { padding: clamp(72px, 10vw, 140px) 0 clamp(72px, 10vw, 140px); border-top: 1px solid var(--rule); }
.work__head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gutter);
  padding: 0 var(--gutter);
}
.work__title { font-weight: 400; font-size: clamp(56px, 9vw, 150px); letter-spacing: -0.05em; line-height: 0.9; text-align: center; }
.work__title em { font-size: 1.08em; margin-right: 0.04em; }
.work__aside { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }

.track {
  margin-top: clamp(56px, 8vw, 110px);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.track.is-dragging { cursor: grabbing; }
.track__inner { display: flex; align-items: flex-start; gap: 10px; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.track__year {
  font-family: var(--serif); font-size: clamp(40px, 4.4vw, 68px); line-height: 1; letter-spacing: -0.02em;
  padding: 0 clamp(24px, 4vw, 64px) 0 clamp(24px, 6vw, 96px);
}
.track__year:first-child { padding-left: 0; }

.card { display: block; flex: none; width: clamp(220px, 22vw, 340px); }
.card--tall .card__media { aspect-ratio: 3 / 4; }
.card--wide { width: clamp(300px, 30vw, 460px); }
.card--wide .card__media { aspect-ratio: 16 / 10; }
.card--square .card__media { aspect-ratio: 1; }
.card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-radius: 2px;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); pointer-events: none; }
.card:hover .card__media img, .card:hover .ph__fig { transform: scale(1.04); }
.card__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; }
.card__meta span:last-child { color: var(--ink-2); }

/* placeholder tile */
.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px;
  color: var(--ink-2);
  background:
    radial-gradient(120% 90% at var(--px, 30%) var(--py, 20%), rgba(255, 255, 255, 0.75), transparent 60%),
    linear-gradient(160deg, #e4e4e0, #d4d4cf);
}
.ph__top { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.ph__fig {
  align-self: center;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(64px, 7vw, 110px); line-height: 1; color: rgba(17, 17, 18, 0.16);
  transition: transform 1.2s var(--ease);
}
.ph__browser { display: flex; gap: 4px; }
.ph__browser i { width: 6px; height: 6px; border-radius: 50%; background: rgba(17, 17, 18, 0.18); }
.ph__bottom { font-size: 11px; letter-spacing: 0.04em; }

.list { margin-top: clamp(72px, 10vw, 120px); padding: 0 var(--gutter); }
.list__head, .list li a {
  display: grid; grid-template-columns: 70px 2fr 1.4fr 80px 110px; gap: 16px; align-items: baseline;
}
.list__head { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.list li { border-bottom: 1px solid var(--rule); }
.list li a { padding: 18px 0; transition: padding 0.5s var(--ease), color 0.3s; }
.list li a:hover { padding-left: 14px; color: var(--accent); }
.list__name { font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }
.list__go { text-align: right; font-size: 13px; }
.list__go.is-soon { color: var(--ink-2); }

/* ---------- process ---------- */
.process { position: relative; height: 420vh; border-top: 1px solid var(--rule); }
.process__sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-items: center;
}
.process__intro {
  position: absolute; top: 96px; left: var(--gutter);
  max-width: 340px; font-size: 16px; line-height: 1.4; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 14px;
}
.process__intro .eyebrow { margin-bottom: 4px; }

.rings { position: absolute; width: min(72vh, 84vw); aspect-ratio: 1; }
.rings span {
  position: absolute; inset: calc(var(--i) * 12%); border-radius: 50%;
  background: var(--paper);
  box-shadow: 18px 22px 48px rgba(0, 0, 0, 0.1), -14px -14px 40px rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  /* --r is the scroll ripple, set per ring from main.js */
  transform: scale(calc(1 + var(--p, 0) * (0.06 * var(--i) - 0.04) + var(--r, 0)));
}
.rings span:nth-child(1) { --i: 0; }
.rings span:nth-child(2) { --i: 1; }
.rings span:nth-child(3) { --i: 2; }
.rings span:nth-child(4) { --i: 3; }

/* the title starts in the middle of the rings, then moves up to make room for the steps */
.process__title {
  position: relative; font-weight: 400; font-size: clamp(48px, 6.4vw, 104px); letter-spacing: -0.05em; line-height: 0.9;
  transition: transform 1s var(--ease);
}
.process__title em { font-size: 1.08em; }
.process.is-stepping .process__title { transform: translateY(calc(-1 * min(25vh, 29vw))) scale(0.55); }
.process__hint { position: absolute; bottom: 7vh; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

.steps {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%);
  width: min(420px, 74vw); min-height: 260px; text-align: center;
}
.steps li {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  pointer-events: none;
}
.steps li.is-active { opacity: 1; transform: none; }
.steps__num { display: block; font-size: 28px; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.steps h3 { margin-top: 22px; font-size: 30px; font-weight: 500; letter-spacing: -0.03em; }
.steps p { margin-top: 18px; font-size: 16px; color: var(--ink-2); line-height: 1.45; }

/* ---------- contact ---------- */
.contact {
  background: var(--night); color: var(--bone);
  padding: clamp(110px, 16vw, 220px) var(--gutter) clamp(90px, 12vw, 160px);
}
.contact .eyebrow { color: #8e84ff; }
.contact__title { margin-top: 24px; font-weight: 400; font-size: clamp(52px, 9.5vw, 168px); letter-spacing: -0.055em; line-height: 0.92; }
.contact__title em { color: #8e84ff; font-size: 1.06em; }
.contact__mail {
  margin-top: clamp(48px, 7vw, 96px);
  display: inline-flex; align-items: center; gap: 18px;
  font-size: clamp(22px, 2.6vw, 40px); letter-spacing: -0.03em;
  padding-bottom: 10px; border-bottom: 1px solid var(--rule-night);
  transition: gap 0.5s var(--ease), border-color 0.4s;
}
.contact__mail svg { width: 0.9em; height: 0.9em; transition: transform 0.5s var(--ease); }
.contact__mail:hover { gap: 28px; border-color: var(--bone); }
.contact__mail:hover svg { transform: rotate(45deg); }

/* ---------- footer ---------- */
.footer {
  background: var(--night); color: var(--bone);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gutter);
  padding: 40px var(--gutter) 32px;
  border-top: 1px solid var(--rule-night);
  font-size: 15px;
}
.footer small { color: rgba(236, 235, 230, 0.45); display: block; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--rule-night); }
.footer__mark { width: clamp(120px, 14vw, 200px); fill: var(--bone); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__col small { align-self: stretch; }
.footer__col--meta span { font-variant-numeric: tabular-nums; }
.footer__copy { margin-top: auto; padding-top: 28px; font-size: 12px; color: rgba(236, 235, 230, 0.45); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .header { grid-template-columns: 1fr auto; }
  .header__status { display: none; }
  .header__nav { gap: 16px; }
  .hero__side { top: auto; bottom: calc(21vw + 92px); max-width: 46%; font-size: 10px; }
  .index { grid-template-columns: repeat(3, 1fr); }
  .index__copy { display: none !important; }
  .manifesto__cols { grid-template-columns: 1fr; gap: 28px; }
  .work__head { grid-template-columns: 1fr 1fr; }
  .work__title { grid-column: 1 / -1; order: -1; }
  .work__aside { text-align: left; }
  .work__aside--r { text-align: right; }
  .list__head { display: none; }
  .list li a { grid-template-columns: 40px 1fr auto; row-gap: 2px; }
  .list__type { grid-column: 2; font-size: 13px; color: var(--ink-2); }
  .list__year { display: none; }
  .list__go { grid-column: 3; grid-row: 1; }
  .process { height: 380vh; }
  .process__intro { top: 80px; right: var(--gutter); max-width: none; font-size: 14px; }
  .process__intro p:last-child { display: none; }
  .rings { width: 78vw; }
  .steps { width: 72vw; min-height: 210px; }
  .steps h3 { margin-top: 14px; font-size: 24px; }
  .steps p { margin-top: 10px; font-size: 15px; }
  .process__hint { display: none; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__mark { grid-column: 1 / -1; width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .manifesto__quote .w { opacity: 1; }
}
