/* Swiss minimal: grid, whitespace, one accent. Tokens first, dark mode swaps tokens only. */
:root {
  --ink: #0e1530;
  --text: #1c2233;
  --muted: #4b5563;
  --bg: #fafaf8;
  --card: #ffffff;
  --line: #e1e1db;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --mark: #f3e7b8;
  --footer-bg: #0e1530;
  --footer-text: #f7efd2;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f1e6;
    --text: #e4e2d9;
    --muted: #b4b8c4;
    --bg: #0b1024;
    --card: #121935;
    --line: #26305a;
    --accent: #8fb0ff;
    --accent-ink: #0b1024;
    --mark: #3a3a1f;
    --footer-bg: #070b1a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  color: var(--ink); font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em;
}
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--text); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 16px;
}
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--text); max-width: 46ch; }
.mark { background: linear-gradient(transparent 58%, var(--mark) 58%); }

/* Layout blocks */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }

.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 88px); }
.hero h1 { max-width: 18ch; }
.hero .lead { margin: 28px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); align-self: end; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.facts span:first-child { color: var(--muted); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.7fr 1fr; gap: 72px; }
}

.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--ink); transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); text-decoration: none; }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); text-decoration: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 20px 28px 0; border-bottom: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.95rem; max-width: 24ch; }
@media (min-width: 800px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { border-bottom: 0; border-right: 1px solid var(--line); padding-left: 24px; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { border-right: 0; }
}

/* Work cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 14px; padding: 28px; min-height: 280px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; }
.card .tags { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-head); }
.card h3 { font-size: 1.5rem; }
.card p { margin: 0; color: var(--text); }
.card .more { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--accent); }
.badge { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); margin-left: 8px; text-transform: none; letter-spacing: 0; }
.more-work { margin-top: 32px; color: var(--muted); max-width: 70ch; }

/* Two-column text */
.split { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 2fr; gap: 72px; } }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 2.2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }

/* Case study */
.crumb { display: inline-block; margin-bottom: 32px; font-family: var(--font-head); font-weight: 500; text-decoration: none; }
.case-hero { padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.case-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); max-width: 22ch; }
.case-hero .lead { margin-top: 24px; }
.meta { display: grid; grid-template-columns: 1fr; gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.meta div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.meta dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--font-head); }
.meta dd { margin: 4px 0 0; color: var(--ink); }
@media (min-width: 800px) {
  .meta { grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line); }
  .meta div { border-bottom: 0; padding-top: 18px; }
}
.callout { border-left: 4px solid var(--accent); background: var(--card); padding: 20px 24px; margin: 0 0 1.4em; }
.callout p { margin: 0; }
.numbers { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 1.6em; padding: 0; list-style: none; }
@media (min-width: 700px) { .numbers { grid-template-columns: repeat(2, 1fr); } }
.numbers li { border: 1px solid var(--line); background: var(--card); padding: 20px; margin: 0; }
.numbers b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.numbers span { color: var(--muted); font-size: 0.95rem; }
.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 40px 0; border-top: 1px solid var(--line); }
.next a { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }

/* About */
.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 0.92rem; }
.timeline .role { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.timeline p { margin: 6px 0 0; color: var(--text); }
@media (min-width: 800px) { .timeline li { grid-template-columns: 220px 1fr; gap: 32px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.chips li { border: 1px solid var(--line); background: var(--card); padding: 6px 14px; font-size: 0.95rem; }
.process { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: p; border-top: 1px solid var(--line); }
.process li { counter-increment: p; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.process li::before { content: "0" counter(p); display: block; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
@media (min-width: 800px) { .process { grid-template-columns: repeat(5, 1fr); } .process li { border-bottom: 0; } }

/* Form */
.form { display: grid; gap: 22px; max-width: 560px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--muted); padding: 12px 14px; min-height: 48px; border-radius: 0;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.contact-side { color: var(--text); }
.contact-side p { margin: 0 0 1em; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 40px; margin-top: 0; }
.site-footer a { color: var(--footer-text); }
.site-footer .wrap { display: grid; grid-template-columns: 1fr; gap: 32px; }
.site-footer h2 { color: var(--footer-text); font-size: 1.6rem; max-width: 20ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer small { opacity: 0.75; }
@media (min-width: 800px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .card:hover { transform: none; }
}
