@import url("../fonts/fonts.css");

:root {
  --ink: #0E0E0E;
  --ink-2: #1A1A1A;
  --paper: #ECEAE4;
  --cream: #EDEBE6;
  --yellow: #FFB703;
  --bg: var(--ink);
  --fg: var(--cream);
  --line: rgba(237, 235, 230, .16);
  --muted: rgba(237, 235, 230, .56);
  --gutter: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.65, .05, 0, 1);
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

body[data-theme="light"] {
  --bg: var(--paper);
  --fg: var(--ink);
  --line: rgba(14, 14, 14, .14);
  --muted: rgba(14, 14, 14, .55);
}
body[data-theme="yellow"] {
  --bg: var(--yellow);
  --fg: var(--ink);
  --line: rgba(14, 14, 14, .2);
  --muted: rgba(14, 14, 14, .6);
}

*, *::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(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .9s var(--ease), color .9s var(--ease);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }

::selection { background: var(--yellow); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Shared bits ---------- */
.label {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .9s var(--ease);
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.display {
  font-size: clamp(44px, 7.2vw, 132px);
  font-weight: 500;
  line-height: .92;
  letter-spacing: -.045em;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fg);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.pill:hover { color: var(--bg); }
.pill:hover::before { transform: translateY(0); }
.pill--solid { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pill--solid::before { background: var(--cream); }
.pill--solid:hover { color: var(--ink); }
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.magnetic { will-change: transform; }

/* Grain */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gutter);
  background: var(--ink);
  color: var(--cream);
}
.js .loader { display: flex; }
.loader.is-skipped { display: none !important; }
.loader__words {
  display: flex;
  gap: .25em;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -.04em;
  overflow: hidden;
}
.loader__words span { display: inline-block; transform: translateY(110%); }
.loader__words em { color: var(--yellow); }
.loader__count {
  align-self: flex-end;
  font-size: clamp(64px, 14vw, 220px);
  font-weight: 500;
  line-height: .8;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--cream);
  mix-blend-mode: difference;
  pointer-events: none;
  transition: width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background-color .4s;
}
.has-cursor .cursor { display: flex; }
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-label {
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  background: var(--yellow);
  mix-blend-mode: normal;
}
.cursor__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0;
  transition: opacity .2s;
  text-align: center;
  line-height: 1.15;
}
.cursor.is-label .cursor__label { opacity: 1; transition-delay: .15s; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
  font-size: 14px;
  font-weight: 500;
}
.nav__logo { font-size: 16px; letter-spacing: -.02em; }
.nav__logo em { font-size: 1.1em; }
.nav__time { font-variant-numeric: tabular-nums; opacity: .8; }
.nav__links { display: flex; justify-content: flex-end; gap: 28px; }
.nav__links a { position: relative; }
.nav__links a::after,
.link-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover::after,
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }
.link-line { position: relative; display: inline-block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: var(--cream);
  background: var(--ink);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left bottom;
  transform-origin: 30% 70%;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,.0) 55%, rgba(14,14,14,.75) 100%);
}
.hero__title {
  position: absolute;
  z-index: 1;
  top: 12vh;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: clamp(64px, 12.5vw, 236px);
  font-weight: 500;
  line-height: .86;
  letter-spacing: -.055em;
}
.hero__title .line { display: block; overflow: hidden; padding: .06em .14em .3em; margin: -.06em -.14em -.3em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { color: var(--yellow); letter-spacing: -.03em; padding-right: .04em; }
.hero__meta {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
  font-size: 15px;
}
.hero__roles { grid-column: 2; color: rgba(237,235,230,.7); }
.hero__claim {
  grid-column: 3;
  max-width: 340px;
  justify-self: end;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.hero__claim em { color: var(--yellow); }
.hero__scroll {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(237,235,230,.7);
}
.hero__scroll i {
  position: relative;
  width: 1px;
  height: 40px;
  background: rgba(237,235,230,.25);
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  animation: scrollhint 2s var(--ease) infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ---------- Marquee ---------- */
.marquee {
  padding: 4vw 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding-right: .5em;
  font-size: clamp(48px, 8vw, 140px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
}
.marquee__item em { color: var(--yellow); }
.marquee__item svg { width: .42em; height: .42em; fill: var(--yellow); flex-shrink: 0; }

/* ---------- About ---------- */
.about {
  padding: 18vh var(--gutter) 16vh;
}
.about__statement {
  max-width: 17em;
  margin: 40px 0 10vh;
  font-size: clamp(34px, 5vw, 88px);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.about__statement em { color: var(--yellow); }
.about__statement .w { display: inline-block; }
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: end;
}
.about__grid p {
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.4;
  color: var(--muted);
}
.about__grid p:nth-of-type(1) { grid-column: 5 / span 3; }
.about__grid p:nth-of-type(2) { grid-column: 8 / span 3; }
.about__grid .pill { grid-column: 11 / span 2; justify-self: end; white-space: nowrap; }

/* ---------- Social ---------- */
.social {
  position: relative;
  padding: 10vh var(--gutter) 22vh;
}
.social__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 12vh;
}
.social__head .label { grid-column: 1 / -1; margin-bottom: 20px; }
.social__head h2 { grid-column: 1 / span 9; }
.social__head h2 em { color: var(--yellow); }
.social__head .pill { grid-column: 11 / span 2; justify-self: end; }
.social__reels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
}
.reel {
  position: relative;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--ink-2);
  will-change: transform;
}
.reel video {
  width: 100%;
  border-radius: 26px;
  object-fit: cover;
  background: #000;
}
.reel--portrait video { aspect-ratio: 9 / 16; }
.reel--square video { aspect-ratio: 1; }
.reel:nth-child(1) { grid-column: 2 / span 3; }
.reel:nth-child(2) { grid-column: 6 / span 3; margin-top: 30vh; }
.reel:nth-child(3) { grid-column: 10 / span 3; margin-top: 8vh; }
.reel__tag {
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14,14,14,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Work ---------- */
.work { position: relative; }
.work__pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16vh 0 12vh;
  overflow: hidden;
}
.work__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--gutter);
  margin-bottom: 6vh;
}
.work__head .label { margin-bottom: 20px; }
.work__count {
  font-size: clamp(64px, 9vw, 160px);
  font-weight: 500;
  line-height: .8;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.work__count sup { font-size: .25em; vertical-align: top; letter-spacing: 0; margin-left: .2em; }
.work__track {
  display: flex;
  gap: 4vw;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.work__track::-webkit-scrollbar { display: none; }
.work__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.work__track img { -webkit-user-drag: none; user-select: none; }
.card { width: min(58vw, 980px, calc((100vh - 400px) * 1.7778)); flex-shrink: 0; scroll-snap-align: start; }
.work__side { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; }
.work__nav { display: flex; gap: 10px; }
.work__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease), opacity .3s;
}
.work__btn:hover { background: var(--fg); color: var(--bg); }
.work__btn:disabled { opacity: .3; pointer-events: none; }
.work__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.work .display { font-size: clamp(40px, 5vw, 96px); }
.card__img {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  aspect-ratio: 16 / 9;
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 1.1s var(--ease);
}
.card:hover .card__img img { transform: scale(1.04); }
.card__meta {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.card__num { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.card__name {
  font-size: clamp(26px, 2.6vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
}
.card__cat { font-size: 14px; color: var(--muted); text-align: right; }
.card__services { grid-column: 2 / -1; font-size: 14px; color: var(--muted); }
.card--end {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(36vw, 560px);
}
.card--end a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: clamp(26px, 2.6vw, 44px);
  font-weight: 500;
  letter-spacing: -.035em;
  text-align: center;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
.card--end a:hover { background: var(--ink); color: var(--paper); }
.card--end em { display: block; }
.work__progress {
  height: 1px;
  margin: 4vh var(--gutter) 0;
  background: var(--line);
}
.work__progress span {
  display: block;
  height: 100%;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Case ---------- */
.case {
  position: relative;
  height: 220vh;
}
.case__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.case__frame {
  position: absolute;
  inset: 0;
  clip-path: inset(18% 26% 18% 26% round 24px);
  will-change: clip-path;
}
.case__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,.92), rgba(14,14,14,.55) 32%, rgba(14,14,14,.05) 55%, rgba(14,14,14,.25));
}
.case__text {
  position: absolute;
  top: 12vh;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: var(--cream);
}
.case__text .label { color: rgba(237,235,230,.75); margin-bottom: 18px; }
.case__text h2 { font-size: clamp(52px, 10vw, 190px); }
.case__text h2 em { color: var(--yellow); }
.case__text p { max-width: 320px; margin-bottom: 20px; color: rgba(237,235,230,.8); font-size: 15px; }
.case__text .pill { color: var(--cream); }
.case__text .pill::before { background: var(--cream); }
.case__text .pill:hover { color: var(--ink); }

/* ---------- Clients ---------- */
.clients { padding: 18vh var(--gutter) 16vh; }
.clients__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: 10vh;
}
.clients__head .label { grid-column: 1 / -1; margin-bottom: 20px; }
.clients__head h2 { grid-column: 1 / span 10; }
.clients__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.clients__grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.35;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
}
.clients__grid img {
  width: 52%;
  max-width: 170px;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.15);
  opacity: .72;
  transition: filter .6s var(--ease), opacity .6s var(--ease), transform .8s var(--ease);
}
.clients__grid li:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* ---------- Contact ---------- */
.contact {
  padding: 20vh var(--gutter) 14vh;
}
.contact h2 {
  max-width: 11em;
  margin: 30px 0 9vh;
  font-size: clamp(56px, 10.5vw, 200px);
}
.contact__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.contact__mail {
  font-size: clamp(22px, 2.4vw, 40px);
  font-weight: 500;
  letter-spacing: -.03em;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: 10vh var(--gutter) 0;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
}
.footer__cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 8vh;
  font-size: 15px;
}
.footer__cols h3 {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(237,235,230,.5);
}
.footer__cols li + li { margin-top: 6px; }
.footer__lead {
  max-width: 340px;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.footer__lead em { color: var(--yellow); }
.footer__mark {
  display: block;
  font-size: 11vw;
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.06em;
  white-space: nowrap;
  padding-bottom: .12em;
}
.footer__mark em { color: var(--yellow); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid rgba(237,235,230,.16);
  font-size: 13px;
  color: rgba(237,235,230,.55);
}

/* ---------- Start states for the intro animation (JS only) ---------- */
.js .hero__title .line > span { transform: translateY(140%); }
.js .hero__meta { opacity: 0; }

/* ---------- Without JS: give every section its own colors ---------- */
.no-js .work, .no-js .clients { background: var(--paper); color: var(--ink); }
.no-js .contact { background: var(--yellow); color: var(--ink); }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__roles { display: none; }
  .hero__claim { grid-column: 2; }
  .about__grid p:nth-of-type(1) { grid-column: 1 / span 6; }
  .about__grid p:nth-of-type(2) { grid-column: 7 / span 6; }
  .about__grid .pill { grid-column: 1 / -1; justify-self: start; margin-top: 20px; }
  .social__head h2 { grid-column: 1 / -1; }
  .social__head .pill { grid-column: 1 / -1; justify-self: start; }
  .card { width: 76vw; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; padding: 18px var(--gutter); }
  .nav__time { display: none; }
  .nav__links { gap: 18px; }
  .nav__links > a:nth-child(2) { display: none; }

  .hero__media { top: 24svh; }
  .hero__media::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 1;
    height: 30%;
    background: linear-gradient(180deg, var(--ink), rgba(14,14,14,0));
  }
  .hero__media img { object-position: 24% bottom; }
  .hero__title {
    top: 11vh;
    left: var(--gutter);
    right: auto;
    align-items: flex-start;
    font-size: 21vw;
  }
  .hero__meta { grid-template-columns: 1fr; bottom: 22px; }
  .hero__claim { grid-column: 1; justify-self: start; font-size: 20px; max-width: 260px; margin-left: auto; text-align: right; }
  .hero__scroll { display: none; }

  .about { padding: 12vh var(--gutter); }
  .about__grid { grid-template-columns: 1fr; }
  .about__grid p:nth-of-type(n), .about__grid .pill { grid-column: 1; }

  .social { padding-bottom: 12vh; }
  .social__head { margin-bottom: 8vh; }
  .social__reels { grid-template-columns: 1fr 1fr; gap: 12px; }
  .reel { border-radius: 24px; padding: 6px; }
  .reel video { border-radius: 19px; }
  .reel:nth-child(1) { grid-column: 1; }
  .reel:nth-child(2) { grid-column: 2; grid-row: 1; margin-top: 18vh; }
  .reel:nth-child(3) { grid-column: 1 / span 2; width: 62%; margin: -6vh auto 0 0; }
  .reel__tag { left: 14px; bottom: 14px; }

  .work__pin { padding: 12vh 0 8vh; }
  .work__head { flex-direction: column; align-items: flex-start; }
  .work__side { align-items: flex-start; }
  .work__nav { display: none; }
  .card { width: 86vw; scroll-snap-align: center; }
  .card--end { width: 70vw; }
  .card__meta { grid-template-columns: 40px 1fr; }
  .card__cat { grid-column: 2; text-align: left; }
  .work__progress { display: none; }

  .case { height: auto; }
  .case__sticky { position: relative; height: 92svh; }
  .case__frame { clip-path: none !important; }
  .case__text { flex-direction: column; align-items: flex-start; }

  .clients { padding: 12vh var(--gutter); }
  .clients__head h2 { grid-column: 1 / -1; }
  .clients__grid { grid-template-columns: repeat(2, 1fr); }
  .clients__grid img { width: 46%; }

  .contact { padding: 14vh var(--gutter) 10vh; }
  .contact__actions { flex-direction: column; align-items: flex-start; }

  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scroll i::after { animation: none; }
  .js .hero__title .line > span { transform: none; }
  .js .hero__meta { opacity: 1; }
  .case { height: auto; }
  .case__sticky { position: relative; }
  .case__frame { clip-path: none; }
}

/* =====================================================================
   Sub-pages
   ===================================================================== */

/* ---------- Page hero ---------- */
.page-hero {
  padding: 22vh var(--gutter) 10vh;
  border-bottom: 1px solid var(--line);
}
.page-hero .label { margin-bottom: 28px; }
.page-hero__title {
  font-size: clamp(56px, 11vw, 210px);
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.055em;
}
.page-hero__title .line { display: block; overflow: hidden; padding: .06em .14em .3em; margin: -.06em -.14em -.3em; }
.page-hero__title .line > span { display: inline-block; }
.page-hero__title em { color: var(--accent-em, inherit); }
.page-hero__meta {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 8vh;
  align-items: start;
}
.page-hero__intro {
  grid-column: 1 / span 6;
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.3;
  letter-spacing: -.015em;
}
.facts { grid-column: 8 / span 5; display: grid; grid-template-columns: auto 1fr; gap: 10px 32px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.js .page-hero__title .line > span { transform: translateY(140%); }
.js .page-hero__fade { opacity: 0; transform: translateY(30px); }

/* ---------- Project index (web design) ---------- */
.index-list { border-top: 1px solid var(--line); margin-top: 8vh; }
.index-list a {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .6s var(--ease), color .4s;
}
.index-list a:hover { padding-left: 24px; }
.index-list__num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.index-list__name {
  font-size: clamp(30px, 4.2vw, 76px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
}
.index-list__cat { font-size: 14px; color: var(--muted); }
.index-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 380px;
  margin: -107px 0 0 -190px;
  aspect-ratio: 16 / 9;
  background: #E3E0D8;
  border-radius: 6px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(.85);
}
.index-preview img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Project detail ---------- */
.project {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 16vh var(--gutter) 6vh;
  scroll-margin-top: 0;
}
.project + .project { border-top: 1px solid var(--line); }
.project__aside {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: 14vh;
}
.project__num {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.project__title {
  margin-bottom: 24px;
  font-size: clamp(36px, 3.6vw, 64px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}
.project__title em { display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tags li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}
.project__text p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.project__text p + p { margin-top: 1em; }
.project__gallery {
  grid-column: 6 / span 7;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.project__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.shot {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #E3E0D8;
}
.shot img { width: 100%; mix-blend-mode: multiply; }
.shot--sub { margin-top: 10vh; }
.shot-caption {
  margin-top: 10vh;
  font-size: clamp(26px, 2.4vw, 40px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.shot-caption + p { margin-top: 14px; color: var(--muted); max-width: 46ch; }

.next-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 14vh var(--gutter);
  border-top: 1px solid var(--line);
}
.next-link .display { transition: transform .8s var(--ease); }
.next-link:hover .display { transform: translateX(2vw); }
.next-link .label { margin-bottom: 20px; }

/* ---------- Case study ---------- */
.film { position: relative; padding: 0 var(--gutter) 14vh; }
.film__frame { position: relative; overflow: hidden; border-radius: 8px; background: #000; }
.film__frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sound-toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(14,14,14,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--cream);
  font: 500 13px var(--sans);
  cursor: pointer;
}
.sound-toggle i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}
.sound-toggle[aria-pressed="true"] i { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }

.chapter {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 14vh var(--gutter);
  border-top: 1px solid var(--line);
}
.chapter__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: 14vh; }
.chapter__head h2 { margin: 20px 0 20px; font-size: clamp(36px, 3.6vw, 64px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.chapter__head p { color: var(--muted); max-width: 34ch; }
.chapter__body { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 24px; }
.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  margin-top: 16px;
}
.checklist li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.checklist li::before { content: "→"; color: var(--muted); }
.posts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.posts img, .photos img { width: 100%; border-radius: 6px; }
.posts--hero { grid-template-columns: 2fr 1.125fr; align-items: start; }
.photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; align-items: start; }
.photos > :nth-child(1) { grid-column: span 2; }
.photos > :nth-child(2) { grid-column: span 4; }
.photos > :nth-child(n+3) { grid-column: span 3; }

/* ---------- Legal ---------- */
.legal {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 10vh var(--gutter) 16vh;
}
.legal__aside { grid-column: 1 / span 3; align-self: start; position: sticky; top: 14vh; }
.legal__body { grid-column: 5 / span 7; max-width: 72ch; }
.legal__body h1 { display: none; }
.legal__body h4 {
  margin: 56px 0 14px;
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.legal__body h5 { margin: 40px 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.legal__body p, .legal__body li { color: var(--muted); font-size: 15px; line-height: 1.65; }
.legal__body p + p { margin-top: 1em; }
.legal__body ul, .legal__body ol { padding-left: 1.2em; margin: 1em 0; list-style: disc; }
.legal__body a { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
.legal__body > :first-child { margin-top: 0; }
.legal-table { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--line); margin: 0; }
.legal-table dt, .legal-table dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.legal-table dt { color: var(--muted); }

@media (max-width: 1024px) {
  .page-hero__intro { grid-column: 1 / span 12; }
  .facts { grid-column: 1 / span 12; }
  .project__aside, .chapter__head { grid-column: 1 / span 5; }
  .project__gallery, .chapter__body { grid-column: 6 / span 7; }
  .legal__aside { display: none; }
  .legal__body { grid-column: 1 / span 12; }
}

@media (max-width: 767px) {
  .page-hero { padding: 18vh var(--gutter) 8vh; }
  .page-hero__title { font-size: 14.5vw; }
  .page-hero__meta { margin-top: 5vh; }
  .index-list a { grid-template-columns: 36px 1fr; gap: 6px 12px; padding: 18px 0; }
  .index-list__cat { grid-column: 2; }
  .index-list a:hover { padding-left: 0; }
  .index-preview { display: none; }
  .project, .chapter { display: block; padding: 10vh var(--gutter) 4vh; }
  .project__aside, .chapter__head { position: static; margin-bottom: 32px; }
  .project__gallery, .chapter__body { gap: 14px; }
  .project__pair { gap: 14px; }
  .shot--sub, .shot-caption { margin-top: 6vh; }
  .checklist { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .photos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .photos > :nth-child(n) { grid-column: span 1; }
  .film { padding-bottom: 8vh; }
  .next-link { flex-direction: column; align-items: flex-start; padding: 10vh var(--gutter); }
  .legal { display: block; padding: 6vh var(--gutter) 10vh; }
  .legal-table { grid-template-columns: 1fr; }
  .legal-table dt { padding-bottom: 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .page-hero__title .line > span { transform: none; }
  .js .page-hero__fade { opacity: 1; transform: none; }
}

.toc { max-height: 70vh; overflow-y: auto; font-size: 13px; line-height: 1.4; list-style: none; padding: 0; }
.toc li + li { margin-top: 8px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--fg); }

/* =====================================================================
   Blog / Essays
   ===================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 24px; }
.post-grid-wrap { padding: 10vh var(--gutter) 16vh; }
.post-card { display: block; }
.post-card__img { overflow: hidden; border-radius: 6px; aspect-ratio: 16 / 10; background: var(--ink-2); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post-card:hover .post-card__img img { transform: scale(1.05); }
.post-card__meta {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 10px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.post-card__title {
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.post-card__sub { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3; color: var(--muted); }

/* Home teaser */
.essays { padding: 16vh var(--gutter); border-top: 1px solid var(--line); }
.essays__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 8vh; }
.essays__head .label { margin-bottom: 20px; }
.essays .post-card__img { background: #E3E0D8; }

/* Essay hero */
.essay-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 92vh;
  padding: 18vh var(--gutter) 8vh;
  overflow: hidden;
  color: var(--cream);
  background: var(--ink);
}
.essay-hero__media { position: absolute; inset: 0; }
.essay-hero__media img { width: 100%; height: 112%; object-fit: cover; opacity: .62; }
.essay-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,.45), rgba(14,14,14,.15) 35%, rgba(14,14,14,.85));
}
.essay-hero__text { position: relative; z-index: 1; max-width: 1100px; }
.essay-hero .label { color: rgba(237,235,230,.75); margin-bottom: 26px; }
.essay-hero__title { font-size: clamp(48px, 7.4vw, 140px); }
.essay-hero__title em { color: var(--yellow); }
.essay-hero__sub {
  margin-top: 28px;
  max-width: 30ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.2;
  color: rgba(237,235,230,.85);
}

/* Essay body */
.essay { padding: 14vh var(--gutter) 10vh; }
.prose { max-width: 680px; margin: 0 auto; }
.prose p, .prose li {
  font-size: clamp(18px, 1.25vw, 20px);
  line-height: 1.7;
  color: rgba(14,14,14,.82);
}
.prose p + p { margin-top: 1.1em; }
.prose > p:first-child::first-letter {
  float: left;
  margin: .08em .1em 0 0;
  font-family: var(--serif);
  font-size: 4.2em;
  line-height: .8;
  color: var(--fg);
}
.prose h3 {
  margin: 2.4em 0 .7em;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.prose h3 strong { font-weight: inherit; }
.prose .pull {
  margin: 1.6em 0;
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -.025em;
  color: var(--fg);
}
.prose blockquote {
  margin: 2.2em 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--yellow);
}
.prose blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.2;
  color: var(--fg);
}
.prose cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; color: var(--muted); }
.prose strong { font-weight: 600; color: var(--fg); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.essence {
  margin: 3em 0 0;
  padding: 32px 34px;
  border-radius: 8px;
  background: var(--yellow);
}
.essence .label { color: rgba(14,14,14,.6); margin-bottom: 14px; }
.essence p { color: var(--ink); font-size: clamp(19px, 1.4vw, 22px); line-height: 1.5; }
.essence strong { font-weight: 600; }

.post-more { padding: 12vh var(--gutter) 16vh; border-top: 1px solid var(--line); }
.post-more__head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 6vh; }
.post-more .post-card__img { background: #E3E0D8; }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid--3 > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
  .post-grid { grid-template-columns: 1fr; gap: 44px; }
  .post-grid--3 > :nth-child(3) { display: block; }
  .essays { padding: 10vh var(--gutter); }
  .essays__head, .post-more__head { flex-direction: column; align-items: flex-start; }
  .essay-hero { min-height: 86svh; padding-bottom: 6vh; }
  .essay-hero__title { font-size: 12.5vw; }
  .essay { padding: 9vh var(--gutter) 6vh; }
  .prose blockquote { padding-left: 18px; }
  .essence { padding: 24px; }
}

.no-js .essay, .no-js .post-more, .no-js .essays { background: var(--paper); color: var(--ink); }

/* Long words and addresses must never run off the screen */
body { overflow-wrap: break-word; }
.prose, .post-card__title, .post-card__sub, .essay-hero__title, .legal__body { -webkit-hyphens: auto; hyphens: auto; }
.contact__mail { overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .contact__mail { font-size: 4.6vw; }
}
@media (max-width: 767px) {
  .hero__title .line { padding-left: .1em; padding-right: .1em; margin-left: -.1em; margin-right: -.1em; }
}

/* Language switch */
.lang-switch { display: inline-flex; gap: 2px; margin-left: 4px; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.35); }
.nav__links .lang-switch a { padding: 0 4px; opacity: .45; transition: opacity .3s; }
.nav__links .lang-switch a::after { display: none; }
.nav__links .lang-switch a[aria-current="true"], .nav__links .lang-switch a:hover { opacity: 1; }
.legal-note { padding: 14px 18px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px !important; }
@media (max-width: 767px) {
  .lang-switch { padding-left: 14px; }
}

@media (max-width: 767px) {
  .nav__logo { white-space: nowrap; }
}
@media (max-width: 440px) {
  .nav__links > a:first-child { display: none; }
  .nav__logo { font-size: 15px; }
}

/* Apps (home) */
.apps { padding: 16vh var(--gutter) 14vh; border-top: 1px solid var(--line); }
.apps__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 8vh; }
.apps__head .label { margin-bottom: 20px; }
.apps__intro { max-width: 34ch; color: var(--muted); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.4; }
.apps__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; }
.apps__grid .card { width: auto; }
.project__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.shot--photo img { mix-blend-mode: normal; }
@media (max-width: 767px) {
  .apps { padding: 10vh var(--gutter); }
  .apps__head { flex-direction: column; align-items: flex-start; }
  .apps__grid { grid-template-columns: 1fr; gap: 48px; }
}

/* App screens: large phones in a horizontal slider */
.app-feature {
  display: grid;
  grid-template-columns: minmax(260px, 4fr) 8fr;
  gap: 4vw;
  align-items: center;
  padding: 7vh 0;
  border-top: 1px solid var(--line);
}
.app-feature__num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-feature__name { margin: 12px 0 8px; font-size: clamp(44px, 4.6vw, 84px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.app-feature__cat { margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.app-feature__desc { max-width: 30ch; font-size: clamp(18px, 1.4vw, 22px); line-height: 1.4; }
.phone-slider { min-width: 0; }
.phone-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.phone-slider__track::-webkit-scrollbar { display: none; }
.phone-slider__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.phone { flex-shrink: 0; margin: 0; scroll-snap-align: start; }
.phone img { width: auto; max-width: none; height: min(76vh, 720px); -webkit-user-drag: none; user-select: none; }
.project__gallery .phone img { height: min(72vh, 660px); }
.phone figcaption { margin-top: -2%; font-size: 13px; color: var(--muted); text-align: center; }
.phone-slider__foot { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.slider__progress { flex: 1; height: 1px; background: var(--line); }
.slider__progress span { display: block; height: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }
@media (max-width: 1024px) {
  .app-feature { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .app-feature { padding: 6vh 0; }
  .phone img, .project__gallery .phone img { height: auto; width: 78vw; }
  .phone-slider__foot .work__nav { display: none; }
}
