:root {
  --bg: #f3eee3;
  --bg-elevated: #ebe4d4;
  --bg-ink: #1c1a14;
  --fg: #1c1a14;
  --fg-muted: #5c5748;
  --fg-subtle: #7a7464;
  --olive: #5c6e24;
  --olive-deep: #3d4a18;
  --olive-leaf: #778f2f;
  --olive-fg: #f3eee3;
  --border: color-mix(in oklab, var(--fg) 14%, transparent);
  --border-strong: color-mix(in oklab, var(--fg) 22%, transparent);
  --shadow-border:
    0 0 0 1px color-mix(in oklab, var(--fg) 10%, transparent),
    0 1px 2px -1px color-mix(in oklab, var(--fg) 8%, transparent);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.2vw, 3.15rem);
  --text-3xl: clamp(2.4rem, 1.4rem + 3.2vw, 3.75rem);

  --leading-tight: 1.12;
  --leading-snug: 1.28;
  --leading-normal: 1.55;
  --tracking-display: -0.03em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --wrap: 72rem;
  --header-h: 64px;

  --motion-quick: 150ms;
  --motion-fast: 250ms;
  --motion-slow: 400ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

body {
  min-height: 100dvh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--olive-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--olive);
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: var(--text-3xl);
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-2);
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: color-mix(in oklab, var(--olive) 8%, var(--bg));
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -40px;
  z-index: 20;
  background: var(--olive);
  color: var(--olive-fg);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
}

.skip:focus {
  top: var(--space-4);
  color: var(--olive-fg);
}

.wrap {
  width: min(100% - 2 * var(--space-5), var(--wrap));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 var(--space-4);
}

.section-lead {
  max-width: 42rem;
  color: var(--fg-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-7);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 92%, white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--fg);
  min-height: 44px;
}

.brand:hover {
  color: var(--olive-deep);
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--olive);
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav a {
  text-decoration: none;
  color: var(--fg-muted);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--fg);
  background: color-mix(in oklab, var(--olive) 8%, transparent);
}

.nav-cta {
  color: var(--olive-fg) !important;
  background: var(--olive) !important;
  padding-inline: 16px !important;
}

.nav-cta:hover {
  background: var(--olive-deep) !important;
}

/* Hero */

.hero {
  padding: var(--space-8) 0 var(--space-9);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: var(--space-8);
  align-items: center;
}

.lede {
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: 38rem;
}

.lede-second {
  margin-bottom: var(--space-6);
}

.lede em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--fg);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.hero-logo {
  width: min(240px, 70%);
  height: auto;
}

.term {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-ink);
  color: #e8e2d2;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-border);
}

.term-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: color-mix(in oklab, #e8e2d2 55%, transparent);
  padding: 4px 8px 12px;
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive-leaf);
}

.term-body {
  margin: 0;
  padding: var(--space-4);
  background: #14130f;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  max-width: 100%;
  color: #d9d2c0;
}

.term-body code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

.term-body .prompt {
  color: var(--olive-leaf);
}

.term-body .ok {
  color: #b7c77a;
}

.term-body .dim {
  color: #8a8374;
}

/* Join form */

.join {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
  max-width: 34rem;
}

.join input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border-strong);
  background: #faf7ef;
  color: var(--fg);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font: inherit;
  font-size: var(--text-sm);
}

.join input::placeholder {
  color: var(--fg-subtle);
}

.join input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--olive) 25%, transparent);
}

.join button {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--olive);
  color: var(--olive-fg);
  font: inherit;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-quick) var(--ease-out), transform 150ms ease-out;
}

.join button:hover {
  background: var(--olive-deep);
}

.join button:active {
  transform: scale(0.96);
}

.join-hint {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

.join-hint.is-error {
  color: #8a3d2b;
}

.join-hint.is-ok {
  color: var(--olive-deep);
}

.join-lg {
  max-width: 38rem;
}

.join-lg input,
.join-lg button {
  height: 52px;
}

/* Bands */

.band,
.plain,
.cta-block {
  padding: var(--space-9) 0;
}

.band {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-border);
}

.card h3 {
  font-family: var(--font-display);
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--fg-muted);
}

.manifesto {
  margin: 0;
  padding: var(--space-6) 0 0;
  border-top: 1px solid var(--border);
}

.manifesto p {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-3);
  color: var(--olive-deep);
}

.manifesto p:last-child {
  margin-bottom: 0;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6) var(--space-7);
}

.features li {
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.features p {
  color: var(--fg-muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
}

.step-n {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--olive-fg);
  background: var(--olive);
}

.steps p {
  color: var(--fg-muted);
}

.platforms {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

.cta-inner {
  max-width: 44rem;
}

.cta-block h2 {
  max-width: 18ch;
}

/* Footer */

.site-footer {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--border);
  color: var(--fg-subtle);
  font-size: var(--text-sm);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--fg-muted);
}

/* Motion */

.hero-copy > *,
.hero-panel {
  animation: rise var(--motion-slow) var(--ease-out) both;
}

.hero-copy > *:nth-child(1) { animation-delay: 40ms; }
.hero-copy > *:nth-child(2) { animation-delay: 80ms; }
.hero-copy > *:nth-child(3) { animation-delay: 120ms; }
.hero-copy > *:nth-child(4) { animation-delay: 160ms; }
.hero-copy > *:nth-child(5) { animation-delay: 200ms; }
.hero-copy > *:nth-child(6) { animation-delay: 240ms; }
.hero-panel { animation-delay: 160ms; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

  .hero-copy > *,
  .hero-panel {
    animation: none;
  }

  .join button:active {
    transform: none;
  }
}

/* Responsive */

@media (max-width: 860px) {
  .hero-grid,
  .split,
  .features {
    grid-template-columns: 1fr;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding-top: var(--space-6);
  }

  .hero-logo {
    width: 180px;
  }

  .join {
    flex-direction: column;
  }

  .join input,
  .join button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 2 * var(--space-4), var(--wrap));
  }

  .band,
  .plain,
  .cta-block {
    padding: var(--space-8) 0;
  }
}
