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

:root {
  --ink: #111;
  --mute: #8a8a86;
  --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; max-width: 0; overflow: hidden; margin-right: -5px; transition: max-width .35s cubic-bezier(.2,.7,.2,1), margin .35s; }
.np.on span, .np:hover span, .np:focus-visible span { max-width: 9em; margin-right: 0; }
.np sup { font-size: 11px; line-height: 1.3; }
.np:focus-visible, .logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- home: creative space ---------- */
body.space { overflow: hidden; overscroll-behavior: none; }
.space .topnav { opacity: 0; transform: translate(-50%, -8px); transition: opacity .6s, transform .6s; }
.space .topnav.in { opacity: 1; transform: translate(-50%, 0); }
.stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab; 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; }
.mid, .side, .count, .hint { position: absolute; margin: 0; pointer-events: none; }
.mid { left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 500; font-size: 14px; letter-spacing: -0.02em; opacity: 0; }
.side { top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0; }
.side-l { left: 9%; font-weight: 500; letter-spacing: -0.02em; }
.side-r { right: 9%; font: 400 16px/1 "Instrument Serif", Georgia, serif; }
.count { left: 50%; bottom: 10px; transform: translateX(-50%); font: 400 16px/1 "Instrument Serif", Georgia, serif; font-variant-numeric: tabular-nums; transition: opacity .5s; }
.count.done { opacity: 0; }
.hint { left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12px; color: var(--mute); opacity: 0; transition: opacity .6s; white-space: nowrap; }
.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); }
.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(2, 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); }
.wmeta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }

.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-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); }
.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 {
  position: sticky; top: 64px; 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; }
.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; }
  .side { display: none; }
  .ab-top, .ab-row, .ab-facts { display: block; }
  .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) {
  html { scroll-behavior: auto; }
  .wimg img, .wl { transition: none; }
}
