/* Self-hosted fonts (SIL Open Font License, see fonts/). Latin subset covers German and English. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/cormorant-garamond-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300; font-display: swap; src: url('fonts/cormorant-garamond-latin-300-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jost-latin-500-normal.woff2') format('woff2'); }

:root {
  --sand: #EFE8DB;
  --ink: #2B2620;
  --ink-2: #5A5246;
  --ink-3: #7A7164;
  --rule: #D9CFBD;
  --clay: #B5654A;
  --sage: #7D8B6F;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;

  --pad-x: 110px;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
}

a { color: var(--clay); }
a:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

/* Side padding grows on wide screens so the content never exceeds 1200px and stays centred. */
.pd { padding-left: max(var(--pad-x), calc((100% - 1200px) / 2)); padding-right: max(var(--pad-x), calc((100% - 1200px) / 2)); box-sizing: border-box; }

.caps {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 44px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.wordmark { color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--ink-3); }
.nav { display: flex; gap: 40px; }
.nav a { color: var(--ink-2); text-decoration: none; }

/* Hero */
.hero { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(64px, 8vw, 100px); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 92px;
  line-height: 1;
  letter-spacing: -.015em;
  max-width: 1100px;
  margin: 32px 0 0;
  text-wrap: balance;
}
.hero h1 em { display: block; color: var(--clay); }
.hero p {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 560px;
  margin: 40px 0 0;
}

/* Sections */
.section { padding-bottom: clamp(72px, 9vw, 120px); }
.section-head { display: flex; justify-content: space-between; margin-bottom: 24px; }

/* Project rows */
.row {
  display: grid;
  grid-template-columns: 36px 280px minmax(0, 1fr) 120px;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  text-decoration: none;
  color: inherit;
}
.row .idx { font-family: var(--font-display); font-size: 20px; color: var(--ink-3); }
.row .im { height: 190px; }
.row .im img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.8) sepia(.12);
}
.row .nm {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.1;
}
.row:hover .nm { color: var(--clay); }
.row .desc {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 440px;
}
.row .url, .row .st {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.row .url { display: block; margin-top: 12px; color: var(--ink-3); }
.row .st { justify-self: end; }
.st-live { color: var(--sage); }
.st-building { color: var(--clay); }

/* How this works */
.how .section-head { margin-bottom: 36px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.g3 .num { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--sage); }
.g3 h3 { font-family: var(--font-display); font-weight: 300; font-size: 32px; margin: 10px 0; }
.g3 p { font-size: 15px; line-height: 1.8; color: var(--ink-2); margin: 0; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 28px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer .by { border-bottom: 1px solid currentColor; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 10px 26px; }

@media (max-width: 820px) {
  :root { --pad-x: 22px; }
  .hero h1 { font-size: 46px; }
  .nav { gap: 22px; }
  .row { grid-template-columns: 1fr; gap: 18px; }
  .row .im { height: 240px; }
  .row .st { justify-self: start; }
  .g3 { grid-template-columns: 1fr; }
}

/* Shared */
.nav a[aria-current] { color: var(--ink); }
.site-footer a[aria-current] { color: var(--ink); }
.eyebrow { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--sage); }
.page-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 76px;
  line-height: 1.04;
  margin: 28px 0 0;
}
.page-title em { color: var(--clay); }
.lead {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 560px;
  margin: 36px 0 0;
}

/* Legal pages */
.legal { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); max-width: 1000px; }
.legal .sub { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 0; }
.legal-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 48px;
  padding-top: 44px;
}
.legal-block h2 { font-family: var(--font-display); font-weight: 300; font-size: 30px; margin: 0; }
.legal-block p { grid-column: span 2; font-size: 16px; line-height: 1.8; color: var(--ink-2); margin: 0; white-space: pre-line; }
.legal .note { font-size: 13px; line-height: 1.7; color: var(--ink-3); margin: 72px 0 0; }

/* Project page */
.back { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; }
.back:hover { color: var(--ink); }
.proj-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: end;
  margin-top: 48px;
}
.proj-hero .tag { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; }
.proj-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 84px;
  line-height: 1.02;
  margin: 24px 0 0;
}
.proj-hero .lead { max-width: 460px; margin-top: 32px; }
.proj-hero .open {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 48px;
  margin-top: 40px;
  padding: 0 24px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 3px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.proj-hero .open::before { content: "\25B6"; font-size: 9px; letter-spacing: 0; color: var(--clay); }
.proj-hero .open:hover { color: var(--ink); border-color: var(--ink); background: transparent; }
.proj-hero .im { height: 560px; }
.proj-hero .im img, .entry .im img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.8) sepia(.12); }
.kv {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px 40px;
  align-items: baseline;
  padding: 22px 0;
}
.kv dt, .kv .k { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.kv dd { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.4; }
.upd { padding: 32px 0; }
.upd h3 { font-family: var(--font-display); font-weight: 300; font-size: 36px; line-height: 1.15; margin: 0; }
.upd p { font-family: var(--font-display); font-size: 22px; line-height: 1.5; color: var(--ink-2); max-width: 620px; margin: 10px 0 0; }
.section-top { padding-top: clamp(72px, 9vw, 120px); }
.section-head.tight { margin-bottom: 12px; }

/* Field notes */
.notes-hero { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(48px, 6vw, 72px); }
.notes-hero .page-title { max-width: 900px; }
.notes-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.filters button {
  font: 500 11px var(--font-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 10px 0;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-3);
}
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filters button:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.entry {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px 56px;
  align-items: center;
  padding: 36px 0;
  text-decoration: none;
  color: inherit;
}
.entry[hidden] { display: none; }
.entry .im { height: 200px; }
.entry .meta { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.entry .nm {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.12;
  margin-top: 14px;
}
.entry:hover .nm { color: var(--clay); }
.entry p { font-family: var(--font-display); font-size: 21px; line-height: 1.5; color: var(--ink-2); margin: 14px 0 0; max-width: 620px; }

@media (max-width: 820px) {
  .page-title { font-size: 44px; overflow-wrap: anywhere; }
  .legal .page-title { font-size: 34px; }
  .proj-hero { grid-template-columns: 1fr; }
  .proj-hero h1 { font-size: 48px; }
  .proj-hero .im { height: 300px; }
  .kv { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry .im { height: 240px; }
}

/* teka teki silang artwork: portrait, own colours, so no sepia and no cropping on the project page */
.row .im img.cover-tts { object-position: 50% 55%; filter: none; }
.proj-hero .im.im-art { background: #e8137f; }
.proj-hero .im.im-art img { object-fit: contain; filter: none; }

.kv dd, .proj-hero .open { overflow-wrap: anywhere; }


/* Field notes, empty state */
.empty { font-family: var(--font-display); font-style: italic; font-size: 24px; line-height: 1.5; color: var(--ink-2); max-width: 560px; margin: 28px 0 0; }
.notes-bar:has(+ .empty) { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }

/* Rows stack earlier than the rest of the page: with a 280px image the text column would get too narrow. */
@media (max-width: 1100px) {
  .row { grid-template-columns: 1fr; gap: 18px; }
  .row .im { height: 240px; }
  .row .st { justify-self: start; }
}

/* snek & wood block: two phone screenshots side by side */
.row .im.im-pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 2px; background: var(--rule); overflow: hidden; }
.row .im.im-pair img { filter: none; }
.row .im.im-pair .cover-snek { object-position: 50% 50%; }
.row .im.im-pair .cover-wood { object-position: 50% 30%; }
.row .url + .url { margin-top: 4px; }
.proj-hero .im.im-pair-art { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 2px; background: var(--rule); overflow: hidden; }
.proj-hero .im-pair-art .pa-snek { background: #0a0a0a; }
.proj-hero .im-pair-art .pa-wood { background: #35200f; }
.proj-hero .im-pair-art > div { min-height: 0; }
.proj-hero .im-pair-art img { width: 100%; height: 100%; object-fit: contain; display: block; filter: none; }
.open-row { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 40px; }
.open-row .open { margin-top: 0; }

/* Index rows: the title link stretches over the whole row; the Play buttons sit above it. */
.row { position: relative; }
.row a.nm { display: block; color: inherit; text-decoration: none; }
.row a.nm::after { content: ""; position: absolute; inset: 0; }
.row a.nm:focus-visible { outline: none; }
.row a.nm:focus-visible::after { outline: 2px solid var(--sage); outline-offset: 4px; }
.row .plays { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.row .play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 20px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 3px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.row .play::before { content: "\25B6"; font-size: 8px; letter-spacing: 0; color: var(--clay); }
.row .play:hover { color: var(--ink); border-color: var(--ink); background: transparent; }

/* Phone nav: wordmark on its own line, links never break mid-label. */
.nav a { white-space: nowrap; }
@media (max-width: 820px) {
  .site-header { row-gap: 14px; }
  .nav { flex-basis: 100%; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 10px; letter-spacing: .18em; }
}

/* Identity line above the hero headline (must out-rank ".hero p") */
.hero .hero-id { margin: 0; max-width: none; font-family: var(--font-body); font-size: 11px; line-height: 2; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.hero .hero-id a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.hero .hero-id a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Field notes: list rows and note pages (generated by scripts/build-notes.mjs) */
.note-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 8px 40px;
  align-items: start;
  padding: 28px 0;
  text-decoration: none;
  color: inherit;
}
.note-row[hidden] { display: none; }
.note-meta { display: flex; flex-direction: column; gap: 6px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); padding-top: 8px; }
.note-topic { color: var(--sage); }
.note-name { font-family: var(--font-display); font-weight: 300; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.note-row:hover .note-name { color: var(--clay); }
.note-main p { font-family: var(--font-display); font-size: 21px; line-height: 1.5; color: var(--ink-2); margin: 10px 0 0; max-width: 620px; }
.note-thumb { width: 140px; height: 100px; }
.note-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.8) sepia(.12); }

.note-page { padding-top: 56px; padding-bottom: clamp(72px, 9vw, 120px); }
.note-byline { margin: 40px 0 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.note-heading { font-family: var(--font-display); font-weight: 300; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -.015em; margin: 20px 0 0; max-width: 900px; overflow-wrap: anywhere; }
.note-hero { display: block; width: auto; max-width: 100%; height: auto; max-height: 520px; margin-top: 40px; filter: saturate(.8) sepia(.12); }
.note-body { max-width: 66ch; margin-top: 40px; font-family: var(--font-display); font-size: 23px; line-height: 1.6; color: var(--ink-2); }
.note-body p { margin: 0 0 1.1em; }
.note-body h2, .note-body h3, .note-body h4 { font-family: var(--font-display); font-weight: 300; color: var(--ink); line-height: 1.2; margin: 1.6em 0 .5em; }
.note-body h2 { font-size: 34px; }
.note-body h3 { font-size: 28px; }
.note-body h4 { font-size: 24px; }
.note-body ul, .note-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.note-body li { margin: .25em 0; }
.note-body blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 2px solid var(--rule); font-style: italic; }
.note-body blockquote p:last-child { margin-bottom: 0; }
.note-body pre { overflow-x: auto; padding: 16px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 14px; line-height: 1.6; }
.note-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8em; }
.note-body img { max-width: 100%; height: auto; display: block; margin: 1.4em 0; }
.note-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.note-body a { color: var(--clay); }

@media (max-width: 820px) {
  .note-row { grid-template-columns: 1fr; padding: 24px 0; }
  .note-meta { flex-direction: row; gap: 16px; padding-top: 0; }
  .note-thumb { width: 100%; height: 200px; }
  .note-body { font-size: 21px; }
}

