/* ---------- fonts (self-hosted, SIL OFL; licences in /fonts) ---------- */
@font-face {
  font-family: "Anybody";
  src: url("/fonts/anybody-900-condensed.woff2") format("woff2");
  font-weight: 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --sky: #A9CCFF;
  --coral: #FF5A36;
  --ink: #14161F;
  --ink-soft: #4B5064;
  --paper: #FFFFFF;
  --line: #DDE1EA;
  --display: "Anybody", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 68ch;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header / footer ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px var(--gutter);
  font-weight: 600;
}
.site-header ul, .site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-header a, .site-footer a { text-decoration: none; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; color: inherit; }
.wordmark { font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: 22px; letter-spacing: -.01em; }
.is-home .site-header { position: absolute; inset: 0 0 auto 0; z-index: 3; }

.site-footer {
  border-top: 2px solid var(--ink);
  padding: 28px var(--gutter) 40px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 16px;
}
.site-footer p { margin: 0; color: var(--ink-soft); }

/* ---------- inner pages ---------- */
.page { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 40px var(--gutter) 72px; }
.page-head { margin-bottom: 36px; }
.page-head h1 {
  font-family: var(--display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(38px, 9vw, 84px); line-height: .95; letter-spacing: -.02em;
  margin: 6px 0 16px;
}
.crumb { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.lede { font-size: 21px; line-height: 1.5; margin: 0 0 20px; }
.meta { color: var(--ink-soft); margin: 0; }

.facts { margin: 0 0 24px; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.facts dt { font-weight: 600; color: var(--ink-soft); font-size: 15px; padding-top: 2px; }
.facts dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.button {
  display: inline-block; padding: 11px 18px; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; font-size: 16px;
}
.button:hover { background: var(--coral); color: #fff; }
.button.is-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.button.is-quiet:hover { box-shadow: inset 0 0 0 2px var(--coral); color: var(--coral); }

.prose h2 { font-family: var(--display); font-weight: 900; font-stretch: 85%; font-size: 30px; line-height: 1.1; margin: 44px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose code { font-size: .88em; background: #F1F3F8; padding: 1px 5px; border-radius: 4px; }
.prose pre { background: #F1F3F8; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-size: 15px; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--coral); color: var(--ink-soft); }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); padding: 18px 0; }
.post-list a { text-decoration: none; }
.post-title { font-family: var(--display); font-weight: 900; font-stretch: 85%; font-size: 26px; line-height: 1.1; }
.post-list a:hover .post-title { color: var(--coral); }
.post-list p { margin: 6px 0 4px; }
.post-list time { color: var(--ink-soft); font-size: 15px; }

/* ---------- home hero ---------- */
.hero {
  position: relative;
  min-height: clamp(520px, 86svh, 820px);
  background: var(--sky);
  padding: 104px var(--gutter) 64px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  overflow: hidden;
}
.hero::after { /* ground strip for the no-JS view; the canvas draws its own */
  content: ""; position: absolute; inset: auto 0 0 0; height: 30px; background: var(--coral);
}
.hero.is-live::after { display: none; }
.hero.is-live { padding-top: calc(var(--title-bottom, 300px) + 140px); }
@media (max-width: 480px) { .hero { padding-top: 136px; } }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.hero.is-live .hero-canvas { display: block; cursor: crosshair; touch-action: manipulation; }
.hero-title {
  position: relative; margin: 0;
  font-family: var(--display); font-weight: 900; font-stretch: 75%;
  font-size: clamp(56px, 15vw, 170px); line-height: .92; letter-spacing: -.01em;
  color: var(--coral);
}
.hero.is-live .hero-title {
  position: absolute !important; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero-intro {
  position: relative; z-index: 2; margin: 0; max-width: 46ch;
  font-size: clamp(17px, 2vw, 19px); font-weight: 500; line-height: 1.5;
  pointer-events: none;
}
.hero.is-live .hero-intro { margin-top: auto; }
.hero-fire {
  position: relative; z-index: 2; align-self: flex-start;
  font: 600 15px var(--body); color: var(--ink); background: transparent;
  border: 2px solid var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.hero-fire:hover { background: var(--ink); color: #fff; }
.hero-card {
  position: absolute; z-index: 3; right: var(--gutter); bottom: 56px;
  width: min(320px, calc(100% - 2 * var(--gutter)));
  background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px 16px;
  font-size: 15px;
}
.hero-card p { margin: 0; }
.hero-card-count { color: #C9CEDD; }
.hero-card-title { display: block; font-family: var(--display); font-weight: 900; font-stretch: 85%; font-size: 24px; line-height: 1.1; margin: 2px 0 4px; text-decoration: none; color: #fff; }
.hero-card-title:hover { color: var(--sky); }
.hero-card-title::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */

/* ---------- home sections ---------- */
.home-section { max-width: 1120px; margin: 0 auto; padding: 56px var(--gutter) 8px; }
.home-section h2 { font-family: var(--display); font-weight: 900; font-stretch: 85%; font-size: 34px; margin: 0 0 18px; }
.home-section .post-list { max-width: var(--measure); }
.project-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 2px solid var(--ink); }
.project-list a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 18px 22px 0; text-decoration: none; }
.project-list li + li a { padding-left: 18px; }
.project-list li + li { border-left: 1px solid var(--line); }
.project-name { font-family: var(--display); font-weight: 900; font-stretch: 85%; font-size: 26px; line-height: 1.05; }
.project-kind { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.project-summary { font-size: 16px; }
.project-list a:hover .project-name { color: var(--coral); }
@media (max-width: 540px) {
  .project-list li + li { border-left: 0; border-top: 1px solid var(--line); }
  .project-list li + li a { padding-left: 0; }
}

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