/* Layout: left-aligned editorial grid; one bold moment (hero artifact collage), everything else quiet. */
:root {
  --paper: #f1f3f2;     /* cool mineral white */
  --surface: #ffffff;
  --ink: #15202b;       /* blue-black ink */
  --muted: #56636c;
  --rule: #cdd4d6;
  --accent: #0e6b5c;    /* spruce */
  --accent-soft: #dcebe6;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.5rem, 6.2vw, 4.75rem);

  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10161b; --surface: #182128; --ink: #e5ebe9; --muted: #9aa7ad;
    --rule: #2b363d; --accent: #5cc6b1; --accent-soft: #173a35; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10161b; --surface: #182128; --ink: #e5ebe9; --muted: #9aa7ad;
  --rule: #2b363d; --accent: #5cc6b1; --accent-soft: #173a35; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--step-0);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 20; }

/* Header */
.site-head { padding-block: 22px; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.wordmark { font-weight: 700; font-size: var(--step-1); text-decoration: none; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 22px; font-size: var(--step-0); }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding-block: clamp(32px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  font-weight: 600;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.035em;
}
.hero .lede { margin-top: 28px; max-width: 34em; font-family: var(--body); font-size: var(--step-1); line-height: 1.55; color: var(--muted); }
.proof { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; max-width: 40em; }
.proof li { border-top: 1px solid var(--rule); padding-block: 14px; font-size: var(--step-0); }
.proof li:last-child { border-bottom: 1px solid var(--rule); }
.proof strong { font-weight: 600; }

/* The one bold moment: real working artifacts, pinned like a review wall */
.wall { position: relative; aspect-ratio: 5 / 5.4; max-width: 100%; }
.wall figure { position: absolute; margin: 0; background: var(--surface); padding: 8px; border: 1px solid var(--rule); box-shadow: 0 18px 40px -22px rgba(21, 32, 43, 0.45); }
.wall figure img { width: 100%; }
.wall figcaption { font-size: 0.75rem; color: var(--muted); padding: 6px 2px 0; }
.wall .a { width: 78%; top: 0; right: 0; transform: rotate(1.2deg); }
.wall .b { width: 58%; top: 34%; left: 0; transform: rotate(-2deg); }
.wall .c { width: 52%; bottom: 0; right: 4%; transform: rotate(1.6deg); }
@media (prefers-reduced-motion: no-preference) {
  .wall figure { animation: pin 700ms cubic-bezier(.2,.7,.2,1) both; }
  .wall .b { animation-delay: 120ms; }
  .wall .c { animation-delay: 240ms; }
  @keyframes pin { from { opacity: 0.001; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
}

/* Sections */
.section { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; margin-bottom: 40px; align-items: end; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { font-family: var(--body); color: var(--muted); max-width: 36em; }

/* Selected work rows */
.work-list { display: grid; gap: clamp(40px, 6vw, 72px); }
.work {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  text-decoration: none;
}
.work-meta { font-size: var(--step--1); color: var(--muted); display: grid; gap: 2px; padding-top: 6px; }
.work-meta .org { color: var(--ink); font-weight: 600; font-size: var(--step-0); }
.work h3 { font-size: var(--step-2); line-height: 1.15; }
.work .summary { margin-top: 12px; font-family: var(--body); color: var(--muted); }
.work .result { margin-top: 16px; font-size: var(--step--1); display: inline-block; background: var(--accent-soft); color: var(--ink); padding: 5px 10px; border-radius: 3px; }
.work .shot { background: var(--surface); border: 1px solid var(--rule); padding: 6px; overflow: hidden; }
.work .shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.work:hover h3 { color: var(--accent); }
.work .read { margin-top: 18px; font-size: var(--step--1); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* How I lead */
.lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 5vw, 64px); }
.lead-grid h3 { font-size: var(--step-1); }
.lead-grid p { margin-top: 10px; font-family: var(--body); color: var(--muted); max-width: 32em; }

/* Earlier work */
.earlier { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 64px); }
.earlier li { border-top: 1px solid var(--rule); padding-block: 14px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; }
.earlier .org { font-weight: 600; }
.earlier .what { color: var(--muted); font-size: var(--step--1); padding-top: 2px; }
.more { margin-top: 28px; }

/* Contact / footer */
.contact h2 { font-size: var(--step-3); max-width: 18em; }
.contact p { margin-top: 16px; font-family: var(--body); color: var(--muted); max-width: 34em; }
.contact .links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: var(--step-1); }
.site-foot { padding-block: 32px 48px; color: var(--muted); font-size: var(--step--1); border-top: 1px solid var(--rule); }

/* Case study pages */
.cs-head { padding-block: clamp(32px, 6vw, 72px) 32px; }
.back { font-size: var(--step--1); color: var(--muted); text-decoration: none; }
.back:hover { text-decoration: underline; }
.cs-head .org { margin-top: 28px; color: var(--accent); font-weight: 600; }
.cs-head h1 { margin-top: 8px; font-size: var(--step-4); line-height: 1.04; font-variation-settings: "wdth" 85; letter-spacing: -0.03em; max-width: 16em; }
.cs-head .dek { margin-top: 20px; max-width: 36em; font-family: var(--body); font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.facts { margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.facts div { padding: 14px 16px 14px 0; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: var(--step--1); line-height: 1.45; }

.cs-cover { padding-block: 8px 24px; }
.cs-cover figure, .cs-body figure { margin: 0; }
.cs-cover img, .cs-body figure img { background: var(--surface); border: 1px solid var(--rule); padding: 6px; width: 100%; }
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 10px; }

.cs-body .wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr) minmax(0, 1fr); gap: 32px; }
.cs-body article { grid-column: 2; min-width: 0; }
.cs-body h2 { font-size: var(--step-2); margin-top: 56px; }
.cs-body h2:first-child { margin-top: 0; }
.cs-body p, .cs-body li { font-family: var(--body); font-size: 1.125rem; line-height: 1.7; max-width: 36em; }
.cs-body p + p { margin-top: 1em; }
.cs-body h2 + p, .cs-body h2 + ul { margin-top: 16px; }
.cs-body ul { padding-left: 1.2em; margin: 16px 0 0; }
.cs-body li + li { margin-top: 6px; }
.cs-body figure { margin-block: 40px; }
.cs-body .wide { margin-inline: 0; }

.results { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.results div { background: var(--surface); padding: 18px; }
.results .n { font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--accent); }
.results .l { font-size: var(--step--1); color: var(--muted); margin-top: 4px; line-height: 1.4; }

.next { padding-block: 56px; border-top: 1px solid var(--rule); margin-top: 72px; }
.next a { font-size: var(--step-2); font-weight: 600; text-decoration: none; }
.next a:hover { text-decoration: underline; }
.next span { display: block; font-size: var(--step--1); color: var(--muted); margin-bottom: 6px; }

/* Archive */
.archive { display: grid; gap: clamp(48px, 6vw, 80px); }
.arch { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 3vw, 40px); scroll-margin-top: 24px; }
.arch h2 { font-size: var(--step-2); }
.arch .what { margin-top: 8px; color: var(--muted); font-family: var(--body); max-width: 24em; }
.arch .imgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.arch .imgs img { background: var(--surface); border: 1px solid var(--rule); padding: 4px; width: 100%; }
.arch .imgs img.tall { max-height: 520px; object-fit: cover; object-position: top; }
.arch .imgs.one { grid-template-columns: minmax(0, 1fr); }

/* About */
.about .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.about img { width: 100%; max-width: 280px; filter: grayscale(1); }
.about h1 { font-size: var(--step-3); }
.about p { margin-top: 1em; font-family: var(--body); font-size: 1.125rem; line-height: 1.7; max-width: 36em; }
.about h2 { font-size: var(--step-1); margin-top: 40px; }

@media (max-width: 860px) {
  .hero .wrap, .section-head, .about .wrap, .arch { grid-template-columns: minmax(0, 1fr); }
  .wall { max-width: 520px; }
  .work { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .work .shot { order: -1; }
  .lead-grid, .earlier { grid-template-columns: minmax(0, 1fr); }
  .cs-body .wrap { grid-template-columns: minmax(0, 1fr); }
  .cs-body article { grid-column: 1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .earlier li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .arch .imgs { grid-template-columns: minmax(0, 1fr); }
}
