/* Lanitor waitlist — "ticket stub" palette.
   One ink, one signal. Dots carry the meaning; colour carries the action. */

:root {
  --paper: #fbfbf9;
  --text: #2b2a28;
  --soft: #6f6d68;
  --dither: #9a9891;
  --rule: #e4e3de;
  --rule-strong: #cfcdc6;
  --signal: #e2a93b;
  --signal-deep: #c98f22;
  --code-bg: #f3f2ee;

  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, pre, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
code, pre { font-family: var(--mono); }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

:focus-visible {
  outline: 2px solid var(--signal-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---- header ---- */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.mark { width: 20px; height: 20px; }

.top-link {
  font-size: .9375rem;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
}
.top-link:hover { color: var(--text); border-color: var(--text); }

/* ---- hero ---- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy { max-width: var(--measure); }

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lede {
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--soft);
  max-width: 30rem;
}

/* ---- form ---- */

.waitlist { margin-top: 2.25rem; max-width: 30rem; }

.field {
  display: flex;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: #fff;
  padding: 4px;
  transition: border-color .15s;
}
.field:focus-within { border-color: var(--text); }

.field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  padding: .55rem 1rem;
  color: var(--text);
  outline: none;
}
.field input::placeholder { color: #a5a39c; }

.field button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--signal);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  padding: .6rem 1.15rem;
  cursor: pointer;
  transition: background-color .15s, transform .12s;
}
.field button:hover { background: var(--signal-deep); }
.field button:active { transform: translateY(1px); }
.field button:disabled { opacity: .6; cursor: default; }

.form-note {
  margin-top: .75rem;
  font-size: .875rem;
  color: var(--soft);
  min-height: 1.4em;
}
.form-note.is-error { color: #a1441e; }
.form-note.is-done { color: var(--text); }

.waitlist.is-done .field { display: none; }
.waitlist.is-done .form-note { font-size: 1.0625rem; }

/* ---- hero art ---- */

.hero-art {
  display: grid;
  width: 100%;
  gap: 1.25rem;
  justify-self: center;
  justify-items: center;
}

.turnstile {
  width: min(100%, 280px);
  aspect-ratio: 1;
  height: auto;
  margin: 0;
}

.decision { width: 100%; min-width: 0; display: grid; gap: .4rem; }

.code {
  background: var(--code-bg);
  border-radius: 8px;
  padding: .8rem 1rem;
  font-size: .8125rem;
  line-height: 1.5;
  overflow-x: auto;
  color: var(--text);
  tab-size: 2;
}
.code-out {
  background: #fff;
  border: 1px solid var(--rule);
  min-width: 0;
  /* Ten lines in every response, plus padding and borders. */
  min-height: calc(15em + 1.6rem + 2px);
}

.c-kw { color: var(--soft); }
.c-fn { font-weight: 500; }
.c-str { color: #7a5a1c; }
.c-num { color: #4a5e3a; }
.c-dim { color: #a5a39c; }

.decision-action {
  color: var(--text);
  background: #f9eac8;
  border-radius: 3px;
  padding: .1em .35em;
  font-weight: 600;
}

/* ---- four actions ---- */

.actions {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.action-list {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-list li {
  padding: 2rem 1.5rem 2rem 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: .5rem;
}
.action-list li + li { border-left: 1px solid var(--rule); padding-left: 1.5rem; }

.action-list canvas { width: 56px; height: 56px; margin-bottom: .5rem; }

.action-list h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1rem;
}

.action-list p { color: var(--soft); font-size: .9375rem; max-width: 18rem; }

/* ---- ledger ---- */

.ledger {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
}

.section-head { max-width: var(--measure); }

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head p { margin-top: 1rem; color: var(--soft); }

.decisions-table {
  margin-top: 2.5rem;
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

.decisions-table th {
  text-align: left;
  font-weight: 500;
  color: var(--soft);
  padding: 0 1rem .75rem 0;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.decisions-table td {
  padding: .9rem 1rem .9rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.decisions-table code { font-size: .8125rem; }
.decisions-table td:last-child code {
  display: inline-block;
  background: var(--code-bg);
  padding: .1rem .4rem;
  border-radius: 4px;
  margin: 0 .25rem .25rem 0;
}

/* Decision word with a swatch that mirrors the four dither densities. */
.pill {
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border: 1px solid var(--dither);
  image-rendering: pixelated;
}
.pill-allow::before     { background: var(--dither); }
.pill-limit::before     { background-image: radial-gradient(var(--dither) .8px, transparent .9px); background-size: 3px 3px; background-position: 1px 1px; }
.pill-challenge::before { background-image: radial-gradient(var(--dither) .8px, transparent .9px); background-size: 5px 5px; background-position: 2px 2px; }
.pill-deny::before      { border-style: dashed; }
.pill-deny              { color: var(--soft); }

.pill-amount { font-size: .8125rem; color: var(--soft); margin-left: .35rem; white-space: nowrap; }

/* ---- prose ---- */

.prose {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 6vw, 5rem);
}

.prose-block {
  grid-column: 1;
  min-width: 0;
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 3rem;
  max-width: 30rem;
}
.prose-block h2 { font-size: 1.375rem; }
.prose-block p { margin-top: .9rem; color: var(--soft); }
.prose-block p code { font-size: .875em; color: var(--text); }
.prose-install {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  max-width: none;
}
.prose-install .code { margin-top: 1.25rem; }

/* ---- closing ---- */

.closing {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(4rem, 9vw, 7rem);
  border-top: 1px solid var(--rule);
}
.closing h2 { max-width: var(--measure); }
.closing .waitlist { margin-top: 1.75rem; }

/* ---- footer ---- */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .875rem;
  color: var(--soft);
  border-top: 1px solid var(--rule);
}

/* ---- responsive ---- */

@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 32rem; }
  .turnstile { width: min(100%, 260px); margin: 0; }
  .action-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-list li { padding: 1.5rem 1.25rem 1.5rem 0; }
  .action-list li + li { padding-left: 1.25rem; }
  .action-list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .action-list li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .prose { grid-template-columns: 1fr; }
  .prose-install { grid-column: 1; grid-row: auto; max-width: 30rem; }
}

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .field { flex-direction: column; border-radius: 12px; }
  .field button { border-radius: 8px; }
  .action-list { grid-template-columns: 1fr; }
  .action-list li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .decisions-table thead { display: none; }
  .decisions-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
  .decisions-table td { border: 0; padding: 0; }
  .decisions-table td:last-child { grid-column: 1 / -1; }
  .foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
