/* ==========================================================================
   Joe Nelson Design — Mobility Design Studio
   Design tokens live in :root. The accent colour is overridden at runtime
   from Site settings → Accent colour in the admin panel.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f3f1;
  --bg-softer: #ebebe8;
  --ink: #121212;
  --ink-2: #4a4a47;
  --ink-3: #6e6e6a;
  --line: #e2e2de;
  --dark: #0f0f0f;
  --dark-2: #1c1c1b;
  --on-dark: #f5f5f3;
  --on-dark-2: #a9a9a4;
  --accent: #f62900; /* jnd orange-red */
  --accent-ink: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --narrow: 1000px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
  --header-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="zh"] body { font-family: var(--font), var(--font-zh); }
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }
.section { padding: var(--section) 0 0; }
.section:last-of-type { padding-bottom: var(--section); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 5vw, 80px);
}

/* ---------- Type ---------- */
.display {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 300;
}
.h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.h2 {
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.h3 { font-size: 18px; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.lead {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.38;
  letter-spacing: -0.015em;
  font-weight: 300;
  color: var(--ink);
}
.body { color: var(--ink-2); font-size: 16px; }
.body p + p { margin-top: 1em; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
}
.num { font-variant-numeric: tabular-nums; color: var(--accent); font-size: 13px; letter-spacing: 0.08em; }
html[lang="zh"] .eyebrow, html[lang="zh"] .tracked { letter-spacing: 0.08em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.005em;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--accent); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent); color: #fff; }
.btn--ghost { border: 1px solid var(--line); background: var(--bg); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: 0.06em; line-height: 1; }
.logo img { height: 36px; width: auto; }
.site-footer .logo img { height: 64px; }
.logo__mark { position: relative; width: 18px; height: 18px; flex: none; }
.logo__mark::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  transition: transform .5s var(--ease);
}
.logo__mark::after {
  /* motion trail */
  content: ""; position: absolute; top: 50%; right: 50%; height: 2px; width: 0;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform: translateY(-50%);
  transition: width .5s var(--ease), right .5s var(--ease);
}
.logo:hover .logo__mark::before { transform: translateX(6px); }
.logo:hover .logo__mark::after { width: 22px; right: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  color: var(--ink);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .4s var(--ease);
}
.site-header.is-solid {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner {
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 14px; font-weight: 500; opacity: .72;
  transition: opacity .2s;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent);
}
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
/* fixed width so switching language never nudges the language buttons */
.header-actions > .btn { width: 136px; padding: 0 12px; }

.lang { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; }
.lang button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; min-height: 36px; padding: 0; border-radius: 999px; opacity: .55;
  transition: opacity .2s;
}
.lang button:hover { opacity: 1; }
.lang button[aria-pressed="true"] { opacity: 1; }
/* underline sits outside the layout so the buttons never shift */
.lang button[aria-pressed="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 7px; height: 1px; background: currentColor; }

.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 999px; }
.menu-toggle span, .menu-toggle span::before { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s var(--ease); }
.menu-toggle span::before { content: ""; position: absolute; top: 6px; }
.menu-toggle span { transform: translateY(-3px); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; padding: 0 var(--gutter) 32px;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.mobile-menu nav { display: flex; flex-direction: column; margin-top: 8vh; }
.mobile-menu nav a { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mobile-menu nav a[aria-current="page"] { color: var(--accent); }
.mobile-menu__foot { margin-top: auto; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Hero: headline + photo grid ---------- */
.ghero { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px)); }
.ghero__title { font-size: clamp(44px, 7vw, 96px); line-height: 1; letter-spacing: -0.04em; font-weight: 300; max-width: 13ch; }
.ghero__sub { margin-top: 22px; color: var(--ink-2); font-size: 17px; max-width: 52ch; }
.ghero__sign { margin-top: 28px; display: inline-flex; align-items: center; gap: 14px; }
.ghero__face { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--bg-soft); flex: none; }
.ghero__face img { width: 100%; height: 100%; object-fit: cover; }
.ghero__sign strong { display: block; font-size: 16px; font-weight: 500; }
.ghero__sign small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.ghero__sign:hover strong { color: var(--accent); }
.ghero__grid { margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; height: clamp(360px, 46vw, 620px); }
.ghero__grid > a { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); display: block; }
.ghero__grid > a:first-child { grid-row: 1 / 3; }
.ghero__grid > a:nth-child(4) { grid-column: 2 / 4; }
.ghero__grid img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform-origin: var(--pos, 50% 50%); transform: scale(var(--zoom, 1)); transition: transform 1s var(--ease); }
.ghero__grid > a:hover img { transform: scale(calc(var(--zoom, 1) * 1.03)); }
.ghero__grid small { position: absolute; left: 14px; bottom: 12px; font-size: 12px; font-weight: 500; letter-spacing: .04em; background: rgba(255,255,255,.92); color: var(--ink); padding: 5px 10px; border-radius: 999px; }

/* ---------- Strengths, wider work, project summary ---------- */
.caps { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.cap { padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.cap h3 { font-size: 17px; font-weight: 500; margin-top: 10px; }
.cap p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.cap .fact { display: block; margin-top: 12px; font-size: 13px; color: var(--accent); }
.beyond { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.beyond a { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s; }
.beyond a:hover { border-color: var(--ink); }
.beyond .thumb { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.beyond .thumb img { width: 100%; height: 100%; object-fit: cover; }
.beyond h3 { font-size: 16px; font-weight: 500; }
.beyond p { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.beyond small { display: block; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.summary { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.summary dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.summary dd { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.placeholder-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8a4a12; background: #fdf0dc; border-radius: 999px; padding: 5px 10px; }
.card__media .placeholder-tag { position: absolute; left: 14px; top: 14px; z-index: 2; }
.lead-list { margin-top: 14px; display: grid; gap: 10px; }
.lead-list li { display: flex; gap: 12px; color: var(--ink-2); font-size: 15px; }
.lead-list li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--accent); }

/* ---------- Page intro (non-hero pages) ---------- */
.page-intro { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 110px)); }
.page-intro .h1 { max-width: 18ch; }
.page-intro p { margin-top: 20px; max-width: 54ch; color: var(--ink-2); font-size: 17px; }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 36px; }
.stat__value { font-size: clamp(34px, 3.6vw, 46px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.stat__label { margin-top: 14px; font-size: 14px; color: var(--ink-3); max-width: 24ch; line-height: 1.45; }

/* ---------- Project cards ---------- */
.cards { display: grid; gap: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: block; }
.card__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.035); }
.card__media::after {
  content: ""; position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='1.6'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center/16px no-repeat;
  opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.card:hover .card__media::after { opacity: 1; transform: none; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; }
.card__title { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.card__meta { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__text { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; max-width: 52ch; }

/* ---------- Banner CTA ---------- */
.banner {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 24px;
  background: var(--dark); color: var(--on-dark);
  border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  position: relative; overflow: hidden;
}
.banner__title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.1; }
.banner__text { color: var(--on-dark-2); font-size: 15px; max-width: 42ch; }
.banner::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; top: -260px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
  opacity: .55; pointer-events: none;
}
.banner > * { position: relative; }

/* ---------- Process teaser ---------- */
.process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 48px; }
.process__item { border-top: 1px solid var(--line); padding-top: 22px; }
.process__item h3 { margin-top: 12px; font-size: 20px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.process__item .eyebrow { margin-top: 6px; display: block; }
.process__item p { margin-top: 16px; color: var(--ink-2); font-size: 15px; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.founder__media { border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4 / 5; position: sticky; top: calc(var(--header-h) + 24px); }
.founder__media img { width: 100%; height: 100%; object-fit: cover; }
.founder__name { margin-top: 10px; }
.founder__role { margin-top: 6px; color: var(--ink-3); }
.founder .body { margin-top: 28px; }
.timeline { margin-top: 40px; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.timeline .when { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline strong { font-weight: 500; }
.timeline span { color: var(--ink-3); }

/* ---------- Clients ---------- */
.clients { margin-top: 48px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 24px; }
.client {
  display: flex; align-items: center; justify-content: center; min-height: 88px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
/* brightness(0) turns any uploaded logo solid black */
.client img { max-height: 40px; max-width: 80%; width: auto; filter: brightness(0); opacity: .88; transition: opacity .3s; }
.client:hover img { opacity: 1; }
.client img[src*="fisher-paykel"] { max-width: 100%; } /* very wide wordmark */

/* ---------- About: CV ---------- */
.cv-heading { margin-top: 56px; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.cv-heading + .timeline { margin-top: 14px; }
.skills { margin-top: 14px; border-top: 1px solid var(--line); }
.skills > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.skills dt { color: var(--ink-3); }
.skills dd { margin: 0; }

/* ---------- Big CTA ---------- */
.cta {
  display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 32px; align-items: center;
  background: var(--dark); color: var(--on-dark); border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 64px) clamp(28px, 5vw, 64px); position: relative; overflow: hidden;
}
.cta__title { font-size: clamp(30px, 3.6vw, 48px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; }
.cta__text { color: var(--on-dark-2); max-width: 40ch; }
.cta__lines { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.cta > *:not(.cta__lines) { position: relative; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); padding: 72px 0 28px; font-size: 14px; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer address { font-style: normal; color: var(--ink-2); margin-top: 20px; line-height: 1.7; }
.site-footer h4 { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.site-footer li a { display: inline-block; padding: 4px 0; color: var(--ink-2); }
.site-footer li a:hover { color: var(--ink); }
.site-footer__bottom { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 12.5px; }
.site-footer__bottom .lang button { min-height: 32px; }

/* ---------- Services: journey ---------- */
.journey { margin-top: clamp(48px, 7vw, 88px); }
.journey__rail { text-align: center; position: relative; padding: 0 0 26px; }
.journey__rail .tracked { font-size: 15px; letter-spacing: .32em; text-transform: uppercase; font-weight: 500; }
.journey__rail .eyebrow { margin-top: 18px; display: block; font-size: 11px; letter-spacing: .28em; }
.rail-line { position: relative; height: 14px; margin-top: 10px; }
.rail-line::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--ink); opacity: .35; transform-origin: center; transform: scaleX(var(--rail, 1)); transition: transform 1.4s var(--ease); }
.rail-line i { position: absolute; top: 50%; width: 8px; height: 8px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); opacity: .45; }
.rail-line i:first-child { left: 2px; transform: translateY(-50%) rotate(-45deg); }
.rail-line i:last-child { right: 2px; transform: translateY(-50%) rotate(135deg); }
.journey:hover .rail-line::before { opacity: .8; }

.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); align-items: stretch; }
.phase {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-lg); padding: clamp(24px, 2.6vw, 36px);
  background: linear-gradient(170deg, #f7f5f1 0%, #ece8e1 100%);
  min-height: 520px; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.phase:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(0,0,0,.35); }
.phase--dark { background: linear-gradient(170deg, #26262a 0%, #111113 100%); color: var(--on-dark); }
.phase--dark .eyebrow, .phase--dark .phase__team small { color: var(--on-dark-2); }
.phase__bg { position: absolute; inset: 0; opacity: .2; }
.phase__bg img { width: 100%; height: 100%; object-fit: cover; }
.phase--dark .phase__bg { opacity: .22; mix-blend-mode: screen; }
.phase > *:not(.phase__bg) { position: relative; }
.phase__num { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .14em; }
.phase__num::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .5; }
.phase__name { margin-top: 18px; font-size: clamp(30px, 3vw, 40px); font-weight: 400; letter-spacing: .22em; line-height: 1; }
html[lang="zh"] .phase__name { letter-spacing: .1em; }
.phase__tag { margin-top: 14px; font-size: 11px; letter-spacing: .3em; }
.phase__list { margin-top: 30px; display: grid; gap: 6px; font-size: 16px; }
.phase__team { margin-top: auto; padding-top: 40px; display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-end; }
.member { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.phase--dark .avatar { background: #f5f5f3; color: var(--ink); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 30px; height: 30px; margin-left: -8px; border: 2px solid #1b1b1d; background: #5b5b60; color: #fff; font-size: 0; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.phase__team strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.2; }
.phase__team small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.phase__expanded { width: 100%; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--on-dark-2); }
.phase-col { display: flex; flex-direction: column; }
.phase-col .phase { flex: 1; }
.phase-pill {
  margin: 18px auto 0; display: flex; align-items: center; gap: 10px; justify-content: center;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
}
.phase-pill span { border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; background: var(--bg); transition: border-color .3s, color .3s; }
.phase-pill::before, .phase-pill::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.phase-col:hover .phase-pill span { border-color: var(--ink); color: var(--ink); }

/* ---------- Services: detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.detail + .detail { margin-top: clamp(72px, 9vw, 128px); }
.detail--flip .detail__media { order: 2; }
.detail__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 5 / 4; background: var(--bg-soft); }
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__name { margin-top: 12px; font-size: clamp(30px, 3.4vw, 44px); font-weight: 300; letter-spacing: -0.02em; }
.detail .body { margin-top: 20px; }
.detail__list { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; border-top: 1px solid var(--line); }
.detail__list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; display: flex; gap: 10px; align-items: baseline; }
.detail__list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); }
.detail__meta { margin-top: 22px; font-size: 14px; color: var(--ink-3); }
.detail__meta strong { color: var(--ink); font-weight: 500; }

.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { border-top: 1px solid var(--ink); padding-top: 20px; }
.step h3 { margin-top: 10px; font-size: 17px; font-weight: 500; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip {
  min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip small { font-size: 11px; opacity: .7; }
.work-grid { margin-top: 40px; }
.work-grid .card { transition: opacity .4s var(--ease), transform .4s var(--ease); }
.work-grid.is-filtering .card { opacity: 0; transform: translateY(8px); }
.empty { padding: 60px 0; color: var(--ink-3); }

/* ---------- Project ---------- */
.project-head { padding-top: calc(var(--header-h) + clamp(36px, 6vw, 80px)); }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); min-height: 44px; }
.back:hover { color: var(--ink); }
.back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.project-title { margin-top: 18px; }
.project-meta { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.project-meta dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.project-meta dd { margin-top: 8px; font-size: 15px; }
.phase-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.phase-tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.phase-tag.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.project-cover { margin-top: clamp(36px, 5vw, 64px); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); aspect-ratio: 16 / 9; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-body { margin-top: clamp(56px, 7vw, 96px); }
.gallery { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 20px); }
.gallery button { display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery button.is-wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery button:hover img { transform: scale(1.025); }
.next-project { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; border-top: 1px solid var(--line); padding-top: 40px; }
.next-project__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-soft); }
.next-project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.next-project:hover img { transform: scale(1.03); }

.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(10,10,10,.94); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 6px; }
.lightbox .icon-btn { position: absolute; color: #fff; background: rgba(255,255,255,.08); }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%) rotate(180deg); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 13px; opacity: .7; }

/* ---------- Contact drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(15,15,15,.42);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(560px, 100%);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .5s var(--ease); visibility: hidden;
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.25);
}
.contact-open .drawer-backdrop { opacity: 1; visibility: visible; }
.contact-open .drawer { transform: none; visibility: visible; }
.drawer__head { padding: 22px clamp(20px, 4vw, 40px) 0; display: flex; justify-content: space-between; align-items: center; }
.drawer__progress { margin: 22px clamp(20px, 4vw, 40px) 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.drawer__progress i { display: block; height: 100%; background: var(--accent); width: 33.33%; transition: width .5s var(--ease); }
.drawer__body { flex: 1; overflow-y: auto; padding: 28px clamp(20px, 4vw, 40px) 24px; overscroll-behavior: contain; }
.drawer__foot { padding: 16px clamp(20px, 4vw, 40px) 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drawer__title { font-size: clamp(28px, 3vw, 36px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.08; }
.drawer__intro { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.form-step { display: none; }
.form-step.is-active { display: block; animation: stepIn .5s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.field { margin-top: 28px; border: 0; padding: 0; min-width: 0; }
.field legend, .field > label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 12px; padding: 0; }
.field legend small, .field > label small { color: var(--ink-3); font-weight: 400; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 14px; cursor: pointer; line-height: 1.3;
  transition: border-color .2s, background-color .2s, color .2s;
}
.option span:hover { border-color: var(--ink); }
.option input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.option--card { flex: 1 1 calc(50% - 4px); }
.option--card span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 14px 16px; min-height: 72px; }
.option--card b { font-weight: 600; letter-spacing: .12em; font-size: 13px; }
.option--card em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.option--card input:checked + span em { color: rgba(255,255,255,.7); }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: #c8c8c3; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea.input { min-height: 132px; resize: vertical; }
.field.has-error .input, .field.has-error .option span { border-color: #b3261e; }
.field__error { display: none; margin-top: 8px; font-size: 13px; color: #b3261e; }
.field.has-error .field__error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-note { margin-top: 22px; font-size: 13px; color: var(--ink-3); }
.form-note a { text-decoration: underline; }
.form-success { text-align: left; padding-top: 20px; }
.form-success__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.form-success__icon svg { width: 26px; height: 26px; }
.form-success h3 { margin-top: 26px; }
.form-success p { margin-top: 12px; color: var(--ink-2); }
.form-alert { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #fdecea; color: #8a1c14; font-size: 14px; display: none; }
.form-alert.is-visible { display: block; }
.step-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(8% 0 0 0 round var(--radius)); transition: clip-path 1.2s var(--ease); }
.reveal-img.in { clip-path: inset(0 0 0 0 round var(--radius)); }

.page-fade { animation: pageIn .6s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

.loading-error { padding: 160px var(--gutter); text-align: center; color: var(--ink-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .phases { grid-template-columns: 1fr; }
  .phase { min-height: 0; }
  .journey__rail { display: none; }
  .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards--3 .card:nth-child(3) { display: none; }
  .cta { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav, .header-actions .lang, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header__inner { grid-template-columns: 1fr auto; }
  .split, .founder, .detail { grid-template-columns: 1fr; }
  .detail--flip .detail__media { order: 0; }
  .founder__media { position: relative; top: 0; aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .process, .caps, .beyond, .summary { grid-template-columns: 1fr; }
  .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .next-project { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ghero__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1.4fr 1fr 1fr; height: 560px; }
  .ghero__grid > a:first-child { grid-row: auto; grid-column: 1 / 3; }
  .ghero__grid > a:nth-child(4) { grid-column: 1 / 3; }
  .beyond a { grid-template-columns: 110px 1fr; gap: 14px; }
  .cards--2, .cards--3 { grid-template-columns: 1fr; }
  .cards--3 .card:nth-child(3) { display: block; }
  .gallery { grid-template-columns: 1fr; }
  .gallery button, .gallery button.is-wide { aspect-ratio: 4 / 3; }
  .detail__list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .option--card { flex-basis: 100%; }
  .timeline li, .skills > div { grid-template-columns: 1fr; gap: 2px; }
  .lightbox img { max-width: 100vw; }
  .card__head { flex-direction: column; gap: 2px; }
  .card__meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal-img { clip-path: none; }
}

/* ---------- How I work: photo per stage ---------- */
.caps--img .cap__img { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); margin-bottom: 18px; }
.caps--img .cap__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.caps--img .cap:hover .cap__img img { transform: scale(1.03); }

/* ---------- Places map (About) ---------- */
.pmap { margin-top: 40px; }
.pmap__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; margin-bottom: 16px; }
.pmap__bar .filters { margin: 0; }
.pmap__legend { list-style: none; display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); }
.pmap__legend li { display: flex; align-items: center; gap: 8px; }
.pmap__key { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pmap__key--home { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.pmap__key--work { background: var(--ink); }
.pmap__key--client { background: var(--bg); border: 2px solid var(--ink); }
.pmap__stage { position: relative; isolation: isolate; background: var(--bg-soft); border-radius: var(--radius-lg); overflow: hidden; }
.pmap__svg { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 435; }
.pmap__land { fill: #dcdcd7; stroke: var(--bg-soft); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pmap__route path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; opacity: .75; }
.pmap__pin { cursor: pointer; outline: none; transition: opacity .4s; }
.pmap__pin.is-dim { opacity: .25; }
.pmap__hit { fill: transparent; }
.pmap__dot { stroke-width: 2; vector-effect: non-scaling-stroke; transition: stroke-width .2s; }
.pmap__pin--home .pmap__dot { fill: var(--accent); stroke: #fff; }
.pmap__pin--work .pmap__dot { fill: var(--ink); stroke: #fff; }
.pmap__pin--client .pmap__dot { fill: #fff; stroke: var(--ink); }
.pmap__pin:hover .pmap__dot, .pmap__pin:focus-visible .pmap__dot, .pmap__pin.is-active .pmap__dot { stroke-width: 3.5; }
.pmap__pin:focus-visible .pmap__dot { stroke: var(--accent); }
.pmap__pulse { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; animation: pmap-pulse 2.4s ease-out infinite; }
@keyframes pmap-pulse { 0% { opacity: .45; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.pmap__label { fill: var(--ink); font-weight: 500; paint-order: stroke; stroke: var(--bg-soft); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0; pointer-events: none; transition: opacity .3s; }
.pmap__stage.is-zoomed .pmap__pin:not(.is-dim) .pmap__label,
.pmap__pin:hover .pmap__label, .pmap__pin:focus-visible .pmap__label, .pmap__pin.is-active .pmap__label { opacity: 1; }
.pmap__card { position: absolute; left: 16px; bottom: 16px; width: min(320px, calc(100% - 32px)); background: var(--bg); border-radius: var(--radius); padding: 18px 20px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12); animation: pmap-card .35s cubic-bezier(.2,.7,.2,1); }
@keyframes pmap-card { from { opacity: 0; transform: translateY(8px); } }
.pmap__card h3 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; margin-top: 8px; }
.pmap__card small { color: var(--ink-2); font-size: 13px; }
.pmap__card ul { list-style: none; margin-top: 12px; border-top: 1px solid var(--line); }
.pmap__card li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.pmap__card li:last-child { border-bottom: 0; padding-bottom: 0; }
.pmap__card li strong { display: block; font-weight: 500; }
.pmap__card li span { color: var(--ink-2); font-size: 13px; }
.pmap__kind { font-size: 12px; letter-spacing: .04em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.pmap__kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.pmap__kind--home::before { background: var(--accent); }
.pmap__kind--client::before { background: var(--bg); border: 2px solid var(--ink); width: 5px; height: 5px; }
.pmap__close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.pmap__close:hover { background: var(--bg-soft); }
.pmap__close svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .pmap__stage { border-radius: var(--radius); }
  .pmap__card { position: relative; left: auto; bottom: auto; width: auto; box-shadow: none; border-top: 1px solid var(--line); border-radius: 0; }
  .pmap__legend { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pmap__pulse { animation: none; } }

/* ---------- Gallery: odd-shaped photos ---------- */
.gallery img.is-contain { object-fit: contain; }
.gallery img.is-tall { object-position: 50% 35%; }

/* ---------- Work: miscellaneous sketches ---------- */
.sketches { margin-top: 40px; columns: 2; column-gap: clamp(12px, 1.6vw, 20px); }
.sketches button { display: block; width: 100%; margin: 0 0 clamp(12px, 1.6vw, 20px); break-inside: avoid; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); cursor: zoom-in; }
.sketches img { display: block; width: 100%; height: auto; transition: transform 1s var(--ease); }
.sketches button:hover img { transform: scale(1.02); }
@media (max-width: 640px) { .sketches { columns: 1; } }
/* "Show photos whole" galleries: natural proportions, no frames */
.gallery--whole { align-items: start; }
.gallery--whole button, .gallery--whole button.is-wide { aspect-ratio: auto; background: none; }
.gallery--whole img { height: auto; }
.gallery img.is-contain { background: var(--bg); }
.gallery button:has(img.is-contain) { background: var(--bg); }
