:root {
  --black: #000000;
  --white: #FFFFFF;
  --signal: #14C25E;
  --signal-deep: #0A7A3A;

  /* section-level tokens; .invert flips them */
  --bg: var(--black);
  --fg: var(--white);
  --muted: #A3A3A3;
  --rule: #333333;
  --accent: var(--signal);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
}
:root {
  /* type scale, ratio ~1.333 */
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lede: 1.3125rem;
  --t-h3: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  --t-h2: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --t-display: clamp(2.25rem, 1.2rem + 4.4vw, 5.25rem);
  --t-statement: clamp(1.5rem, 1rem + 2.2vw, 2.875rem);
}
.invert {
  --bg: var(--white);
  --fg: var(--black);
  --muted: #4D4D4D;
  --rule: #D4D4D4;
  --accent: var(--signal-deep);
  background: var(--bg);
  color: var(--fg);
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 20;
  background: var(--fg); color: var(--bg); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* wordmark */
.wordmark {
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.wordmark .dot {
  display: inline-block;
  width: 0.3em; height: 0.3em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: var(--signal);
}
.wordmark--small { font-size: 1.125rem; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
  transition: background-color .3s ease;
}
.nav.is-scrolled { background: rgba(0, 0, 0, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.nav nav a { text-decoration: none; font-size: var(--t-small); font-weight: 500; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav nav a:hover { border-bottom-color: var(--fg); }

/* hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(40px, 7vh, 88px);
  overflow: hidden;
}
#field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0; transition: opacity 1s ease;
}
#field.is-ready { opacity: 1; }
.hero::after {
  /* keeps the headline legible over the dot field */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.8) 30%, rgba(0,0,0,0) 62%);
}
.hero__copy { position: relative; z-index: 1; max-width: 21ch; max-width: min(1100px, 100%); }
.hero h1 {
  font-size: var(--t-display);
  font-weight: 750;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 19ch;
  text-wrap: balance;
}
.hero__lede { margin-top: 22px; font-size: var(--t-lede); color: var(--muted); max-width: 40ch; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.btn--solid:hover { background: var(--accent); color: var(--black); }
.btn--solid:hover::before { background: var(--black); }
.btn--line { border: 1.5px solid var(--fg); }
.btn--line:hover { background: var(--fg); color: var(--bg); }

.fallback-dot { display: none; }
.no-webgl #field { display: none; }
.no-webgl .hero {
  background-image: radial-gradient(var(--muted) 1.6px, transparent 1.8px);
  background-size: 26px 26px;
}
.no-webgl .fallback-dot {
  display: block; position: absolute; right: 22%; top: 34%;
  width: 22px; height: 22px; border-radius: 50%; background: var(--signal);
}

/* sections */
section:not(.hero) { padding: clamp(72px, 12vw, 160px) var(--gutter); }
section h2 {
  font-size: var(--t-h2);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: clamp(28px, 4vw, 48px);
  display: flex; align-items: center; gap: 12px;
}
section h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); flex: none; }

.statement { padding-top: clamp(48px, 8vw, 104px) !important; }
.statement p {
  font-size: var(--t-statement);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 32ch;
  text-wrap: pretty;
}

/* services */
.services { background: var(--bg); }
.services__list li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px 48px;
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 28px) 0;
  border-top: 1px solid var(--rule);
}
.services__list li:last-child { border-bottom: 1px solid var(--rule); }
.services__list h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.services__list p { color: var(--muted); max-width: 46ch; }

/* process */
.process__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  counter-reset: none;
}
.process__n {
  display: block;
  font-size: clamp(3rem, 2rem + 4vw, 6rem);
  font-weight: 300;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  line-height: .9;
  color: var(--accent);
  margin-bottom: 20px;
}
.process h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.process p { color: var(--muted); max-width: 36ch; }

/* work */
.work { padding-top: 0 !important; }
.work__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.work__filters button {
  font: inherit; font-size: 0.9375rem; font-weight: 500;
  color: var(--fg); background: transparent;
  border: 1.5px solid #555; border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.work__filters button:hover { border-color: var(--fg); }
.work__filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px);
}
.work__item--wide { grid-column: span 2; }
.work__item--feature { grid-column: 1 / -1; }
.work__item--feature .work__media { aspect-ratio: 21 / 9; }
.work__item[hidden] { display: none; }
.work__media { aspect-ratio: 1 / 1; overflow: hidden; background: #141414; }
.work__item--wide .work__media { aspect-ratio: 2 / 1; }
.work__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.work__item:hover .work__media img { transform: scale(1.03); }
.work__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.work__cap h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.work__cap span { font-size: var(--t-small); color: var(--accent); white-space: nowrap; }
.work__item p { margin-top: 4px; color: var(--muted); font-size: 0.9375rem; max-width: 46ch; }

/* clients */
.clients { border-top: 1px solid var(--rule); }
.clients__lede { font-size: var(--t-lede); max-width: 40ch; margin-bottom: clamp(32px, 4vw, 56px); }
.clients__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.clients__grid li {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12%;
}
.clients__grid img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }

/* offices */
.offices {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px var(--gutter);
}
.office h3 {
  font-size: clamp(2.5rem, 1.4rem + 5vw, 6.5rem);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 14px;
}
.office p { color: var(--muted); }
.office__time { margin-top: 4px; }
.office__time time { color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 600; }

/* contact */
.contact h2 { font-size: var(--t-display); font-weight: 750; font-stretch: 112%; font-variation-settings: "wdth" 112; color: var(--fg); line-height: 1.02; letter-spacing: -0.025em; max-width: 16ch; margin-bottom: 24px; display: block; }
.contact h2::before { display: none; }
.contact p { font-size: var(--t-lede); color: var(--muted); max-width: 40ch; }
.contact__mail {
  display: inline-block;
  margin-top: 36px;
  font-size: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 3px solid var(--signal);
  padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--accent); }
.contact__phone { margin-top: 18px; }
.contact__phone a { text-decoration: none; font-weight: 500; }
.contact__phone a:hover { color: var(--accent); }

/* footer */
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px;
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--rule);
  font-size: var(--t-small); color: var(--muted);
}
.foot p:last-child { margin-left: auto; }

/* responsive */
@media (max-width: 1100px) and (min-width: 761px) {
  .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav nav a:not(:last-child) { display: none; }
  .services__list li { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .work__item--wide { grid-column: auto; }
  .work__item--wide .work__media, .work__item--feature .work__media { aspect-ratio: 16 / 10; }
  .clients__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offices { grid-template-columns: 1fr; }
  .foot p:last-child { margin-left: 0; }
  .hero::after { background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,.85) 45%, rgba(0,0,0,0) 75%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #field { transition: none; }
}

/* ---------- links inside cards and lists ---------- */
.work__link { display: block; text-decoration: none; color: inherit; }
.work__link:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.services__list h3 a { text-decoration: none; }
.services__list h3 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.office h3 a { text-decoration: none; }
.office h3 a:hover { color: var(--accent); }
.hero__lede a { color: var(--fg); text-underline-offset: 4px; }
.contact__social { margin-top: 10px; display: flex; gap: 20px; }
.contact__social a { font-size: 1rem; font-weight: 500; color: var(--fg); text-underline-offset: 4px; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(120px, 16vw, 200px) var(--gutter) clamp(40px, 6vw, 72px) !important; }
.page-head h1 {
  font-size: var(--t-display);
  font-weight: 750; font-stretch: 112%; font-variation-settings: "wdth" 112;
  line-height: 1.02; letter-spacing: -0.025em;
  max-width: 20ch; text-wrap: balance;
}
.page-head__lede { margin-top: 22px; font-size: var(--t-lede); color: var(--muted); max-width: 52ch; }
.page-head__time { margin-top: 16px; color: var(--muted); }
.page-head__time time { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.page-head--404 .hero__actions { margin-top: 32px; }
.page-head--404 { min-height: 70vh; }

.crumbs { margin-bottom: 28px; font-size: var(--t-small); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #555; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.crumbs [aria-current] { color: var(--fg); }

.meta {
  margin: 36px 0 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px 32px; max-width: 900px;
  border-top: 1px solid var(--rule); padding-top: 20px;
}
.meta dt { font-size: var(--t-small); color: var(--muted); margin-bottom: 4px; }
.meta dd { margin: 0; font-weight: 600; }
.meta dd a { color: var(--accent); text-underline-offset: 3px; }

.case-hero { margin: 0; padding: 0 var(--gutter); }
.case-hero img { display: block; width: 100%; max-height: 82vh; object-fit: cover; background: #141414; }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(48px, 7vw, 88px) !important;
  padding-bottom: clamp(48px, 7vw, 88px) !important;
}
.split > h2 { margin-bottom: 0; align-self: start; }
.prose p { font-size: var(--t-lede); line-height: 1.5; max-width: 58ch; }
.prose p + p { margin-top: 1em; }
.prose a { color: var(--fg); text-underline-offset: 4px; }

.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.checklist li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--rule); position: relative; font-size: 1.125rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 1.35em; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }

.pill-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-links a { display: inline-block; padding: 10px 18px; border: 1.5px solid #555; border-radius: 999px; text-decoration: none; font-weight: 500; }
.pill-links a:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }

.gallery-wrap { border-top: 1px solid var(--rule); }
.gallery { columns: 3 260px; column-gap: 16px; }
.gallery li { break-inside: avoid; margin-bottom: 16px; }
.gallery img { display: block; width: 100%; height: auto; background: #141414; }

.more { border-top: 1px solid var(--rule); }
.work--index { padding-top: 0 !important; }
.services--index { padding-top: 0 !important; }

/* ---------- footer ---------- */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px 32px;
  padding: clamp(48px, 7vw, 80px) var(--gutter) 36px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem; color: var(--muted);
}
.foot__brand p { margin-top: 14px; max-width: 28ch; }
.foot__col h2 { font-size: var(--t-small); font-weight: 600; color: var(--fg); margin-bottom: 14px; }
.foot__col li { margin-bottom: 8px; }
.foot__col a { text-decoration: none; }
.foot__col a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--rule); font-size: var(--t-small); }
.foot p:last-child { margin-left: 0; }

@media (max-width: 900px) {
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
