:root {
  --bg: #d8d5ce;        /* warm stone */
  --ink: #161514;
  --muted: #5f5b55;
  --line: rgba(22, 21, 20, 0.16);
  --accent: #b8391f;    /* terracotta — used sparingly */
  --field: #e4e1db;

  --sans: "Instrument Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

em { font-family: var(--serif); font-style: italic; font-weight: 400; }

a { color: inherit; }

::selection { background: var(--ink); color: var(--bg); }

/* ---------- visible grid ---------- */
.grid-lines {
  position: fixed;
  inset: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  z-index: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.grid-lines span { border-right: 1px solid var(--line); }
.grid-lines span:last-child { border-right: 0; }

header, main, footer { position: relative; z-index: 1; }

.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- header ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
}

.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.06em;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.12em;
  line-height: 1;
}
.wordmark span { transform: translateY(0.02em); }
.col-a { width: 0.9em; height: 0.99em; fill: currentColor; }

.site-header .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.header-cta {
  justify-self: end;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.header-cta:hover { background: var(--ink); color: var(--bg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(calc(100svh - 64px), 920px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding: 80px var(--gutter) 64px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-weight: 500;
  font-size: clamp(52px, 10.5vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.hero h1 em { letter-spacing: -0.02em; }

.lede {
  max-width: 46ch;
  font-size: clamp(17px, 1.5vw, 20px);
  margin-left: auto;
  margin-right: calc(25% - var(--gutter) * 0.5);
}

.circle {
  position: absolute;
  top: 50%;
  right: 6%;
  width: min(62vw, 640px);
  transform: translateY(-58%);
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.8;
  opacity: 0.55;
  z-index: -1;
  animation: turn 120s linear infinite;
}
.circle .faint { opacity: 0.35; stroke-dasharray: 2 5; }
.circle .seats circle { fill: var(--bg); stroke: var(--ink); stroke-width: 0.8; }
.circle .seats circle.lit { fill: var(--accent); stroke: var(--accent); }

@keyframes turn { to { transform: translateY(-58%) rotate(360deg); } }

/* ---------- join ---------- */
.join {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 64px;
}
.join > * { padding: 72px var(--gutter); }
.join-intro { border-right: 1px solid var(--line); }

.join h2, .commitments h3 {
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
}
.join h2 {
  font-size: clamp(40px, 5.4vw, 80px);
  margin: 20px 0 48px;
  max-width: 10ch;
}

.dates { list-style: none; font-family: var(--mono); font-size: 14px; }
.dates li {
  display: grid;
  grid-template-columns: 11ch 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.dates li:last-child { border-bottom: 1px solid var(--line); }
.dates .tba { color: var(--accent); }

.signup {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: flex-end;
  max-width: 520px;
}
.signup label { display: flex; flex-direction: column; gap: 8px; }
.label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.label i { font-style: normal; color: var(--muted); text-transform: none; }

.signup input[type="text"],
.signup input[type="email"] {
  font: inherit;
  font-size: 20px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
  border-radius: 0;
  outline: none;
}
.signup input::placeholder { color: color-mix(in srgb, var(--ink) 35%, transparent); }
.signup input:focus { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }

.consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px !important;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  appearance: none;
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-content: center;
}
.consent input:checked { background: var(--ink); }
.consent input:checked::after { content: "✓"; color: var(--bg); font-size: 12px; line-height: 1; }
.consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.signup button {
  align-self: flex-start;
  font: inherit;
  font-weight: 500;
  font-size: 18px;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.signup button:hover { background: var(--accent); border-color: var(--accent); }
.signup button:disabled { opacity: 0.5; cursor: wait; }
.signup button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.status { font-family: var(--mono); font-size: 13px; min-height: 1.5em; }
.status.ok { color: var(--ink); }
.status.error { color: var(--accent); }

/* ---------- commitments ---------- */
.commitments { padding: 72px var(--gutter) 96px; border-bottom: 1px solid var(--line); }
.commitments ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 40px;
}
.commitments li { padding: 0 32px 0 0; }
.commitments li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.commitments .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.commitments h3 { font-size: clamp(28px, 2.8vw, 40px); margin: 16px 0 18px; }
.commitments h3 em { display: block; }
.commitments p { color: var(--muted); max-width: 36ch; }

/* ---------- projects ---------- */
.projects { padding: 72px var(--gutter) 96px; border-bottom: 1px solid var(--line); }
.project-list { list-style: none; margin-top: 40px; border-top: 1px solid var(--ink); }
.project-list li { border-bottom: 1px solid var(--ink); }
.project-list a {
  display: grid;
  grid-template-columns: 6ch 1fr auto auto;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
  text-decoration: none;
  transition: color .2s, padding .3s;
}
.project-list .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.project-name {
  font-weight: 500;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.project-status { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.project-list .arrow { font-size: clamp(28px, 3vw, 44px); transition: transform .3s; }
.project-list a:hover { color: var(--accent); padding-left: 12px; }
.project-list a:hover .arrow { transform: translate(4px, -4px); }
.project-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- one goal ---------- */
.goal { padding: 80px var(--gutter) 96px; border-bottom: 1px solid var(--line); }
.goal-line {
  margin-top: 40px;
  font-weight: 500;
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.goal-line em { color: var(--accent); letter-spacing: -0.015em; }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-header .meta a, .site-footer a.by { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-header .meta a:hover, .site-footer a.by:hover { color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .grid-lines { grid-template-columns: repeat(2, 1fr); }
  .grid-lines span:nth-child(n+3) { display: none; }
  .grid-lines span:nth-child(2) { border-right: 0; }
  .site-header .meta { display: none; }
  .site-header { grid-template-columns: 1fr auto; }

  .hero { min-height: min(88svh, 760px); padding-top: 48px; }
  .lede { margin: 0; }
  .circle { width: 110vw; right: -30vw; top: 38%; opacity: 0.4; }

  .join { grid-template-columns: 1fr; }
  .join > * { padding: 56px var(--gutter); }
  .join-intro { border-right: 0; border-bottom: 1px solid var(--line); }
  .join h2 { margin-bottom: 32px; }
  .dates li { grid-template-columns: 10ch 1fr auto; gap: 10px; font-size: 13px; }

  .commitments ol { grid-template-columns: 1fr; gap: 40px; }
  .commitments li, .commitments li + li { padding: 0; border: 0; }
  .commitments li + li { padding-top: 40px; border-top: 1px solid var(--line); }

  .project-list a { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .project-list .num { grid-column: 1 / -1; }
  .project-status { grid-column: 1 / -1; grid-row: 3; }
  .project-list .arrow { grid-column: 2; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .circle { animation: none; }
  html { scroll-behavior: auto; }
}
