@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Instrument+Serif&display=swap");

:root {
  --ink: #111;
  --mute: #6b6b66;          /* 5.3:1 on white, readable as interface text */
  --soft: #55554f;
  --pill: #ededeb;
  --tile: #f4f4f2;
  --bg: #fff;
  --pad: clamp(16px, 3.4vw, 48px);   /* page margin */
  --gap: 14px;                       /* between images */
  --r: 10px;
  --max: 1560px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 Inter, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; font-size: inherit; font-weight: 400; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mute { color: var(--mute); }

/* ---------- nav ---------- */
.pill, .chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--pill); color: var(--ink);
  font: inherit; font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s;
}
.pill:hover, .chip:hover { background: #e2e2df; }
.pill.dark, .chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pill.dark:hover { background: #333; }
.pill:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- top navigation (logo + numbered pages) ---------- */
.topnav {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
}
.topnav .logo { font-weight: 500; font-size: 14px; letter-spacing: -0.02em; }
.topnav nav { display: flex; gap: 4px; }
.np {
  display: inline-flex; align-items: flex-start; gap: 5px; height: 28px; padding: 5px 9px 0;
  border-radius: 4px; background: var(--tile); transition: background .15s;
}
.np:hover { background: #e9e9e6; }
.np span { font: 400 16px/1.1 "Instrument Serif", Georgia, serif; }
.np.on { background: var(--ink); color: #fff; }
.np sup { font-size: 11px; line-height: 1.3; }
.np:focus-visible, .logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.topnav { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 4px 6px 4px 12px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---------- home: introduction beside the gallery ---------- */
.fly { height: 230vh; }
/* the project grid rises over the end of the fly-through, so there is no empty stretch after it */
#projects { position: relative; z-index: 5; margin-top: -62vh; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); }
.first { position: sticky; top: 0; overflow: hidden; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(16px, 3vw, 48px); }
.hello { max-width: 30em; padding-top: 40px; display: grid; gap: 22px; position: relative; z-index: 2; }
.hello h1 { font: 400 clamp(40px, 5vw, 76px)/0.98 "Instrument Serif", Georgia, serif; letter-spacing: -0.015em; }
.hello h1 span { display: block; margin-top: 14px; font: 400 clamp(17px, 1.5vw, 21px)/1.3 Inter, system-ui, sans-serif; letter-spacing: -0.01em; color: var(--soft); }
.hello p { color: var(--soft); font-size: 16px; }
.hello-links { display: flex; flex-wrap: wrap; gap: 6px; }
.hello-links .pill { height: 36px; padding: 0 16px; font-size: 14px; }
.stage { position: relative; height: 100vh; height: 100svh; max-height: 900px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.stage.grab { cursor: grabbing; }
.orb { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.sc { position: absolute; left: 0; top: 0; display: block; background: var(--tile); will-change: transform; cursor: pointer; }
.sc img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: filter .2s; }
.sc:hover img { filter: brightness(1.06); }
.stage.grab .sc { cursor: grabbing; }
.count, .hint { position: absolute; margin: 0; pointer-events: none; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; }
.count { font: 400 16px/1 "Instrument Serif", Georgia, serif; font-variant-numeric: tabular-nums; transition: opacity .4s; }
.count.done { opacity: 0; }
.hint { font-size: 12px; color: var(--mute); opacity: 0; transition: opacity .6s; }
.hint.in { opacity: 1; }
.tip {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; white-space: nowrap;
  margin: 14px 0 0 14px; padding: 5px 8px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1;
  opacity: 0; transition: opacity .15s;
}
.tip.on { opacity: 1; }
@media (hover: none) { .tip { display: none; } }

.page { padding-top: 40px; }
.sec-head.first { padding-top: clamp(72px, 9vw, 130px); }
.sec-head h1 { font-size: inherit; }

/* ---------- intro ---------- */
.intro {
  max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vw, 180px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 120px);
  align-items: center;
}
.intro-img { max-width: 440px; border-radius: var(--r); overflow: hidden; background: var(--tile); aspect-ratio: 4 / 5; }
.intro-img img { width: 100%; height: 100%; object-fit: cover; }
.intro-txt { display: grid; gap: 28px; max-width: 46em; }
.big { font-size: clamp(22px, 2.5vw, 36px); line-height: 1.22; letter-spacing: -0.022em; }
.soft { color: var(--soft); max-width: 36em; font-size: 16px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.links .pill { height: 34px; padding: 0 16px; font-size: 14px; }
.facts { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; }

/* ---------- about page ---------- */
.about { max-width: var(--max); margin: 0 auto; padding: clamp(120px, 14vw, 200px) var(--pad) 0; }
.ab-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 7vw, 120px); align-items: end; padding-bottom: clamp(72px, 10vw, 150px); }
.ab-top .intro-img { justify-self: end; width: 100%; max-width: 380px; }
.ab-three { margin-top: 28px; font: 400 clamp(28px, 3.4vw, 48px)/1.1 "Instrument Serif", Georgia, serif; letter-spacing: -0.01em; }
.ab-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 7vw, 120px); padding: clamp(48px, 6vw, 90px) 0; border-top: 1px solid #e6e6e2; }
.ab-word { display: flex; flex-direction: column; gap: 10px; }
.ab-word h2, .ab-quote { font: 400 clamp(52px, 8vw, 128px)/0.95 "Instrument Serif", Georgia, serif; letter-spacing: -0.02em; }
.ab-text { display: grid; gap: 18px; max-width: 36em; font-size: 17px; line-height: 1.55; align-content: start; }
.ab-text p:first-child { color: var(--ink); }
.ab-text p { color: var(--soft); }
/* text that parts around the chrome head (about.js moves the exclusions) */
.about { overflow-anchor: none; }
.ab-block { padding: clamp(48px, 6vw, 90px) 0 clamp(72px, 9vw, 140px); border-top: 1px solid #e6e6e2; }
.ab-block .ab-word { margin-bottom: clamp(40px, 6vw, 90px); }
.ab-block .ab-word h2 { font-size: clamp(64px, 13vw, 220px); line-height: 0.9; }
.wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: start; font: 400 clamp(21px, 2.05vw, 31px)/1.42 "Instrument Serif", Georgia, serif; letter-spacing: -0.005em; }
.wa { justify-self: end; width: min(100%, 560px); text-align: right; padding-right: 14px; }
.wb { justify-self: start; width: min(100%, 560px); padding-left: 14px; }
.wrap p + p { margin-top: 0.9em; }
.ex { display: block; width: 0; height: 0; shape-margin: 22px; }
.wa .ex { float: right; }
.wb .ex { float: left; }
#head { position: fixed; left: 50%; top: 50%; z-index: 5; width: 300px; height: 300px; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .45s; }
#head.on { opacity: 1; }

.ab-people { padding: clamp(72px, 10vw, 150px) 0; border-top: 1px solid #e6e6e2; display: grid; gap: 28px; }
.ab-quote { max-width: 12em; }
.ab-people .ab-text { margin-left: auto; width: min(100%, 36em); }
.ab-people .ab-text p:last-child { color: var(--ink); }
.ab-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 4vw, 64px); padding-top: clamp(48px, 6vw, 90px); border-top: 1px solid #e6e6e2; }
.ab-facts h2 { margin-bottom: 14px; }
.ab-facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ab-facts .facts { margin-top: 22px; }
.pill[aria-current="page"] { background: #dcdcd8; }
.more { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c9c9c5; }
.more:hover { text-decoration-color: var(--ink); }

/* ---------- sections ---------- */
.sec { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sec-head { display: flex; justify-content: space-between; gap: 16px; padding: clamp(72px, 10vw, 150px) 0 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 36px; }
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(16px, 2.4vw, 36px); }
.wk { display: flex; flex-direction: column; }
.wimg { display: block; overflow: hidden; border-radius: var(--r); background: var(--tile); aspect-ratio: 4 / 3; }
.wimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.wk:hover .wimg img { transform: scale(1.025); }
.wimg.fit { box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.wimg.fit img { object-fit: contain; }
.wimg.mul img { mix-blend-mode: multiply; }   /* a logo saved on white sits straight on the tile colour */   /* wide covers are shown whole on their own colour */
.wmeta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
.wdesc { color: var(--soft); max-width: 34em; padding-top: 2px; }
.work.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sec-head a.more { align-self: baseline; }
.sec-head.tight { padding-top: 40px; }
.cstatus { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: var(--tile); color: var(--soft); font-size: 12px; line-height: 1.2; vertical-align: 2px; white-space: nowrap; }
.ctext p + p { margin-top: 10px; }
.ab-exp { padding: clamp(48px, 6vw, 90px) 0; border-top: 1px solid #e6e6e2; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 7vw, 120px); }
.ab-exp ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; max-width: 44em; }
.ab-exp li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.ab-exp li span { color: var(--mute); }
.ab-exp b { font-weight: 500; margin-right: 6px; }
.wrap a, .ab-text a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #b9b9b4; }
.wrap a:hover, .ab-text a:hover { text-decoration-color: var(--ink); }

.logos { display: grid; gap: var(--gap); }
.logos img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--r); background: var(--tile); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px clamp(20px, 3vw, 48px); margin: 0; padding: 28px 0 0; list-style: none; counter-reset: s; border-top: 1px solid #e6e6e2; }
.steps li { counter-increment: s; }
.steps li::before { content: "0" counter(s); display: block; color: var(--mute); margin-bottom: 10px; }
.steps p { color: var(--soft); margin-top: 6px; }

/* footer */
.foot {
  max-width: var(--max); margin: clamp(90px, 12vw, 170px) auto 0; padding: 22px var(--pad) 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px;
  font-size: 13px;
}
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.foot a:hover { color: var(--mute); }

/* ---------- case page ---------- */
.case { --max: 1160px; max-width: var(--max); margin: 0 auto; padding: clamp(110px, 12vw, 170px) var(--pad) 0; }
.chead { display: grid; grid-template-columns: 1fr 1fr; gap: 28px clamp(24px, 5vw, 80px); padding-bottom: clamp(48px, 6vw, 90px); }
.chead h1 { font-size: clamp(26px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 8px; }
.chead .lead { max-width: 32em; margin-top: 22px; font-size: 17px; }
.cmeta { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 12px 16px; align-content: start; max-width: 36em; }
.cmeta dt { color: var(--mute); }
.cmeta dd { margin: 0; }
.cmeta a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9c9c5; }
.csec { padding-top: clamp(72px, 9vw, 140px); }
.ctext { display: grid; grid-template-columns: 1fr 1fr; gap: 10px clamp(24px, 5vw, 80px); padding-bottom: 28px; }
.ctext p { max-width: 34em; color: var(--soft); }
.cimgs { display: grid; gap: var(--gap); }
/* a single image never runs taller than the screen, so it can be read whole */
.cimgs > img:not(#chero) { max-height: 84vh; object-fit: contain; }
.crow > img:not([style*="aspect-ratio"]) { max-height: 78vh; object-fit: contain; }
.cimgs img, .cba img { width: 100%; border-radius: var(--r); background: var(--tile); outline: 1px solid rgba(0,0,0,.06); outline-offset: -1px; }
.crow { display: grid; gap: var(--gap); align-items: start; }
.crow figure { margin: 0; position: relative; }
.crow figcaption { padding: 10px 0 6px; }
.chalf { background: var(--tile); border-radius: var(--r); padding: 5% 0; display: grid; place-items: center; }
.cimgs .chalf img { width: 46%; }

/* before / after: the first thing on a rebranding case */
.cba { padding-bottom: clamp(48px, 6vw, 90px); }
.cba figcaption {
  position: absolute; left: 14px; top: 14px; padding: 0 12px; height: 28px;
  display: inline-flex; align-items: center; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 13px; line-height: 1;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.cba .after figcaption { background: var(--ink); color: #fff; box-shadow: none; }
.cba img { object-fit: contain !important; }   /* never crop a logo */

/* website viewer */
.csite { position: relative; }
.cbrowser {
  margin: 0 auto;
  width: min(100%, calc((100vh - 150px) * 1.6)); min-width: min(100%, 320px);
  border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 30px 80px -30px rgba(0,0,0,.28);
}
.cbar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; background: var(--tile); border-bottom: 1px solid rgba(0,0,0,.07); }
.cbar i { width: 10px; height: 10px; border-radius: 50%; background: #d6d6d2; }
.cbar span { margin: 0 auto; padding: 0 14px; height: 24px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; color: var(--soft); font-size: 12px; transform: translateX(-24px); }
.cview { aspect-ratio: 16 / 10; overflow: hidden auto; overscroll-behavior: contain; }
.cview:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.cimgs .cview img { width: 100%; border-radius: 0; outline: 0; will-change: transform; }
.csite.manual .cbrowser { position: static; }
.csite.manual .cview { overflow-y: auto; }

/* more work */
.cmore { padding-top: clamp(110px, 13vw, 190px); }
.cmore-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 22px; }
.cmore-head a:hover { color: var(--mute); }
.cmore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .intro, .chead, .ctext { display: block; }
  .fly { height: auto; } #projects { margin-top: 0; }
  .first { display: block; position: static; height: auto; overflow: visible; padding-top: 84px; }
  .hello { padding-top: 0; }
  .stage { height: 62vh; height: 62svh; margin-top: 8px; overflow: hidden; }
  .work.three { grid-template-columns: 1fr; }
  .ab-exp { display: block; } .ab-exp h2 { margin-bottom: 18px; } .ab-exp li { grid-template-columns: 1fr; gap: 2px; }
  .topnav { gap: 8px; padding-left: 8px; } .topnav .logo { font-size: 13px; } .np { padding: 5px 6px 0; gap: 3px; } .np span { font-size: 15px; }
  .ab-top, .ab-row, .ab-facts { display: block; }
  .wrap { display: block; }
  .wa, .wb { width: auto; text-align: left; padding: 0; }
  .wb { margin-top: 0.9em !important; }
  .wa .ex, .wb .ex { float: right; }
  .ab-top .intro-img { margin: 40px 0 0; max-width: 260px; }
  .ab-word { margin-bottom: 24px; }
  .ab-facts > div + div { margin-top: 40px; }
  .ab-people .ab-text { margin-left: 0; }
  .intro-img { max-width: 300px; margin-bottom: 36px; }
  .ctext p { margin-top: 8px; }
  .work { grid-template-columns: 1fr; }
  .cimgs .chalf img { width: 70%; }
  .cmeta { margin-top: 32px; }
  .wmeta { flex-direction: column; gap: 2px; }
  .cba .crow { grid-template-columns: 1fr !important; }
  .cmore-grid { grid-template-columns: 1fr; gap: 40px; }
  .cview { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  .fly { height: auto; } .first { position: static; } #projects { margin-top: 0; }
  .count, .hint, .tip { transition: none; }
  html { scroll-behavior: auto; }
  .wimg img, .wl { transition: none; }
}
