/* ---------------------------------------------------------------
   Tokens — one typeface, one accent, lots of white space.
---------------------------------------------------------------- */
:root {
  --bg: #fafaf9;
  --surface: #f2f1ef;
  --text: #171717;
  --muted: #6b6b6b;      /* 5.0:1 on --bg */
  --line: #e7e5e4;
  --accent: #1f6f43;     /* availability dot + focus only */
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --col: 680px;
  --wide: 1040px;
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --section: 88px;   /* the one gap between every homepage section */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul[role='list'], ol[role='list'] { list-style: none; margin: 0; padding: 0; }

.wrap { width: min(100% - 40px, var(--col)); margin-inline: auto; }
.wrap-wide { width: min(100% - 40px, var(--wide)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* Mono micro-labels: the one typographic accent */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.label-spaced { margin-top: var(--section); }

/* ---------- Header / footer ---------- */
.site-header { display: flex; justify-content: space-between; align-items: center; padding-block: 24px; font-size: 15px; }
.brand { font-weight: 500; text-decoration: none; }
.site-header ul { display: flex; gap: 22px; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }
.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 40px 56px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: var(--section); }
.site-footer a { text-decoration: none; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--text);
  font: 500 14px/1 var(--font); letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--surface); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { background: #333; }

/* ---------- Intro ---------- */
.intro { padding-block: 48px 0; }
.section { padding-top: var(--section); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.intro h1 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.25; margin-bottom: 20px; }
.intro .lede { font-size: 17px; margin-bottom: 14px; max-width: 60ch; }

/* ---------- Work ---------- */
.projects { display: grid; gap: 56px; }
.project { display: block; text-decoration: none; }
.project-media {
  overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.project-media img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.project:hover .project-media img { transform: scale(1.02); }
.project-placeholder { aspect-ratio: 16 / 10; display: grid; place-content: center; gap: 6px; height: 100%; text-align: center; font-size: 22px; letter-spacing: -0.02em; }
.project-placeholder small { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.project-text { padding-top: 16px; }
.project h3 { font-size: 17px; }
.project:hover h3 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.meta { font-size: 14px; color: var(--muted); margin-top: 4px; }
.meta-name { color: var(--text); }
.meta-role { margin-top: 2px; font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 1fr auto; column-gap: 16px; row-gap: 2px;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15px;
}
.rows li:last-child .row, .rows .row:last-child { border-bottom: 0; }
.rows { border-bottom: 1px solid var(--line); }
.row-title { font-weight: 500; }
.row-meta { grid-column: 1; font-size: 14px; color: var(--muted); }
.row-summary { grid-column: 1 / -1; margin-top: 8px; font-size: 14px; color: var(--muted); max-width: 60ch; }
.row-arrow, .row-date { grid-column: 2; grid-row: 1; align-self: start; padding-top: 2px; color: var(--muted); font-size: 14px; }
a.row:hover .row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.row .row-arrow { transition: transform .2s var(--ease); }
a.row:hover .row-arrow { transform: translateX(3px); color: var(--text); }

/* ---------- About ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 32px; margin: 40px 0 0; }
.services dt { font-weight: 500; font-size: 15px; }
.services dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.testimonials { display: grid; gap: 32px; }
.testimonials blockquote { margin: 0; font-size: 17px; }
.testimonials figcaption { margin-top: 10px; font-size: 14px; }

/* ---------- Contact ---------- */
.contact h2 { font-size: clamp(24px, 3.4vw, 30px); margin-bottom: 12px; }
.contact .actions { margin-top: 32px; }
.contact .inline-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.inline-links a { color: var(--muted); text-decoration: none; }
.inline-links a:hover { color: var(--text); }

/* ---------- Case study ---------- */
.cs-hero { padding-top: 40px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 32px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back span { transition: transform .2s var(--ease); }
.back:hover { color: var(--text); }
.back:hover span { transform: translateX(-3px); }
.cs-hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; letter-spacing: -0.035em; max-width: 18ch; }
.cs-hero .lede { font-size: 18px; color: var(--muted); margin-top: 24px; max-width: 62ch; }

.cs-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 24px; margin-top: 48px; margin-bottom: 0; padding-block: 20px; border-block: 1px solid var(--line); }
.cs-meta dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cs-meta dd { margin: 4px 0 0; font-size: 14px; }

.cs-cover { margin-top: 40px; margin-bottom: 0; }
.cs-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.cs-onrequest { aspect-ratio: 16 / 7; display: grid; place-content: center; gap: 8px; text-align: center; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.cs-onrequest p { font-size: 20px; letter-spacing: -0.02em; }
.cs-onrequest a { font-size: 14px; color: var(--muted); }

.cs-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; margin-top: 72px; }
.cs-overview .label { margin-bottom: 10px; }
.cs-overview p { font-size: 15px; line-height: 1.6; }

.stats { margin-top: 56px; }

/* Each ## heading becomes a numbered section: label left, story right */
.cs-sections { margin-top: 48px; }
.cs-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px 64px; padding-top: 72px; }
.cs-section + .cs-section { border-top: 1px solid var(--line); margin-top: 72px; }
.cs-section-head { align-self: start; position: sticky; top: 28px; }
.cs-num { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cs-section-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.cs-section .prose { max-width: 680px; }
.cs-section .prose > :first-child { margin-top: 0; }
@media (max-width: 860px) {
  .cs-section { grid-template-columns: 1fr; padding-top: 48px; }
  .cs-section + .cs-section { margin-top: 48px; }
  .cs-section-head { position: static; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-bottom: 0; }
.stats div { border-top: 1px solid var(--text); padding-top: 14px; display: flex; flex-direction: column; }
.stats dd { order: -1; margin: 0 0 4px; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.stats dt { font-size: 14px; color: var(--muted); }

/* Long-form reading */
.prose { font-size: 16px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 22px; margin-top: 2.6em; scroll-margin-top: 24px; }
.prose h3 { font-size: 17px; margin-top: 2.4em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li + li { margin-top: .45em; }
.prose strong { font-weight: 500; }
.prose em { font-style: italic; }
.prose a { text-decoration-thickness: 1px; }

.callout { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; font-size: 15px; }
.callout > * + * { margin-top: .6em; }

.figure, .screens, .journey { margin: 2.2em 0; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.screens-row { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 220px)); gap: 12px; align-items: start; }
.screen { background: var(--surface); border-radius: var(--radius); padding: 10px; }
.screen img { border-radius: 6px; width: 100%; }
.screen-label { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; text-transform: lowercase; }
@media (max-width: 640px) {
  .screens-row { grid-template-columns: repeat(min(var(--n, 3), 2), minmax(0, 1fr)); }
  .screens-row[style*='--n:1'] { grid-template-columns: minmax(0, 220px); }
}

.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.note { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: 14px; }
.note p + p { margin-top: 6px; color: var(--muted); }
.note-label { font-weight: 500; }

.journey { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.journey-title { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 12px; }
.journey ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.journey ol li::marker { font-family: var(--mono); color: var(--muted); font-size: 13px; }

.checklist { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 24px; font-size: 15px; }
.checklist li { margin: 0 !important; padding-left: 22px; position: relative; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--muted); }

.quote { margin: 2em 0; padding: 0; font-size: 19px; line-height: 1.5; letter-spacing: -0.015em; }
.quote footer { font-size: 14px; color: var(--muted); margin-top: 10px; }

.next { margin-top: var(--section); }
.next a { display: grid; gap: 6px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; }
.next .label { margin: 0; }
.next-title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.next a:hover .next-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.next .muted { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
