@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-0130,U+0132-0151,U+0154-02BA,U+1E00-1E9F; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-0130,U+0132-0151,U+0154-02BA,U+1E00-1E9F; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-0130,U+0132-0151,U+0154-02BA,U+1E00-1E9F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-0130,U+0132-0151,U+0154-02BA,U+1E00-1E9F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/fonts/jetbrains-mono-greek-wght-normal.woff2) format("woff2");
  unicode-range: U+0370-03FF; }

:root {
  --bg: #f6f4ee;
  --bg-2: #edeae1;
  --ink: #15181d;
  --dim: #5a6068;
  --rule: #d8d3c7;
  --accent: #0b7f76;
  --amber: #b86e00;
  --rose: #c92a55;

  --gutter: clamp(18px, 5vw, 80px);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e12;
    --bg-2: #14171d;
    --ink: #ecebe4;
    --dim: #949aa3;
    --rule: #272c34;
    --accent: #4fd1c5;
    --amber: #ffb547;
    --rose: #ff6b8b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0e12;
  --bg-2: #14171d;
  --ink: #ecebe4;
  --dim: #949aa3;
  --rule: #272c34;
  --accent: #4fd1c5;
  --amber: #ffb547;
  --rose: #ff6b8b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--rule); transition: color 0.15s, text-decoration-color 0.15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--bg); padding: 8px 14px; }
.skip:focus { top: 12px; }

/* Hero */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.carpet { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; cursor: crosshair; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
}

.brand { font-family: var(--mono); font-size: 15px; font-weight: 500; text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 14.5px; }
.site-nav a { text-decoration: none; color: var(--dim); }
.site-nav a:hover { color: var(--ink); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); }

.hero {
  padding: clamp(28px, 8vh, 96px) var(--gutter) 0;
  max-width: 1500px;
  pointer-events: none;
}
.hero a { pointer-events: auto; }

.eyebrow, .kicker, .stack, .when, .idx, .readout {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.eyebrow { color: var(--dim); }

h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(3.5rem, 10.4vw, 10rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  max-width: 9.2em;
}
h1 em { font-weight: 340; color: var(--accent); }

.lede {
  margin-top: clamp(20px, 3.4vh, 34px);
  max-width: 31em;
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 24px;
  font-size: 15px;
}

.button {
  padding: 9px 18px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  border-radius: 2px;
}
.button:hover { background: var(--accent); color: var(--bg); }

.readout {
  margin-top: auto;
  padding: 18px var(--gutter) 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--dim);
  pointer-events: none;
}
#readout-state { color: var(--ink); white-space: nowrap; }
.readout-hint { text-align: right; }
.tap::after { content: ""; }
@media (hover: none) { .tap { font-size: 0; } .tap::after { content: "Tap"; font-size: 12.5px; } }

/* Sections */

.section {
  padding: clamp(72px, 11vw, 136px) var(--gutter) 0;
  max-width: 1500px;
  margin: 0 auto;
  scroll-margin-top: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(32px, 5vw, 56px);
}
.idx { color: var(--dim); }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}
h3 a { text-decoration: none; }

.kicker { color: var(--accent); margin-bottom: 6px; }
.stack { color: var(--dim); margin-top: 14px; }

.links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: 15px; }
.links a::after, .tile h3 a::after { content: "↗"; display: inline-block; margin-left: 0.28em; font-family: var(--sans); font-size: 0.8em; color: var(--dim); text-decoration: none; }

.art-frame { position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden; }
.art-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 64px);
  align-items: start;
}
.feature .art-frame { aspect-ratio: 1 / 1; position: sticky; top: 24px; }
.feature h3 { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.feature p + p { margin-top: 14px; }
.feature .kicker + h3 { margin-bottom: 14px; }
.what { font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.3; }

.rules { margin-top: 20px; border-top: 1px solid var(--rule); }
.rules li {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.5;
}
.rules strong { font-weight: 500; }
.feature .stack { margin-top: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(44px, 6vw, 80px) clamp(24px, 4.5vw, 64px);
  margin-top: clamp(56px, 8vw, 104px);
}

.tile .art-frame { margin-bottom: 18px; }
.tile h3 { margin-bottom: 8px; }
.tile > p:not(.kicker):not(.stack):not(.links) { font-size: 16px; max-width: 36em; }

.more { margin-top: clamp(44px, 6vw, 72px); color: var(--dim); font-size: 15.5px; }

.timeline li {
  display: grid;
  grid-template-columns: minmax(8em, 1fr) minmax(0, 3fr);
  gap: 8px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.timeline li:first-child { padding-top: 0; }
.when { color: var(--dim); padding-top: 7px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p:not(.when) { max-width: 44em; font-size: 16px; }

.toolkit > div {
  display: grid;
  grid-template-columns: minmax(8em, 1fr) minmax(0, 3fr);
  gap: 4px 32px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.toolkit > div:first-child { padding-top: 0; }
.toolkit dt { color: var(--dim); font-size: 15px; }
.toolkit dd { font-size: 16px; }

.contact-line { font-size: 1.05rem; }
.contact-mail {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 6.6vw, 6.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.contact-mail a { text-decoration: none; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1500px;
  margin: clamp(72px, 10vw, 120px) auto 0;
  padding: 18px var(--gutter) 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
}

.not-found { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 var(--gutter); }
.not-found h1 { margin: 0; font-size: clamp(3rem, 9vw, 7rem); }

@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .art-frame { aspect-ratio: 16 / 10; position: relative; top: 0; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .fine { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-nav a[href="#toolkit"] { display: none; }
  .rules li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .timeline li, .toolkit > div { grid-template-columns: minmax(0, 1fr); }
  .when { padding-top: 0; }
  h1 { font-size: clamp(3.3rem, 17.5vw, 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a { transition: none; }
}
