/* Conduit landing page.
   Warm paper ground, book serif display, mono for anything that reads as data. */

:root {
  --paper:   #FCFBF8;
  --paper-2: #F6F4EF;
  --ink:     #17160F;
  --ink-2:   #45423A;
  --muted:   #78746A;
  --rule:    #E4E0D7;
  --rule-2:  #CFCABE;
  --stamp:   #9E3520;
  --ok:      #3F6B4C;
  --warn:    #8A6415;

  --serif: ui-serif, "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --measure: 34rem;
  --frame: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131210; --paper-2: #1A1916;
    --ink: #F2F0EA;   --ink-2: #C4C0B6;  --muted: #8C877B;
    --rule: #2C2A25;  --rule-2: #3D3A33;
    --stamp: #D4715A; --ok: #7FAF8B;     --warn: #C79A4A;
  }
}

:root[data-theme="dark"] {
  --paper: #131210; --paper-2: #1A1916;
  --ink: #F2F0EA;   --ink-2: #C4C0B6;  --muted: #8C877B;
  --rule: #2C2A25;  --rule-2: #3D3A33;
  --stamp: #D4715A; --ok: #7FAF8B;     --warn: #C79A4A;
}

:root[data-theme="light"] {
  --paper: #FCFBF8; --paper-2: #F6F4EF;
  --ink: #17160F;   --ink-2: #45423A;  --muted: #78746A;
  --rule: #E4E0D7;  --rule-2: #CFCABE;
  --stamp: #9E3520; --ok: #3F6B4C;     --warn: #8A6415;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.frame { max-width: var(--frame); margin: 0 auto; padding: 0 1.5rem; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 2px;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; }

/* masthead */

.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark { font-family: var(--serif); font-size: 1.375rem; letter-spacing: -0.01em; }
.wordmark b { font-weight: 600; }
.masthead .tag,
.eyebrow {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* type */

h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5.4vw, 3.3rem);
  line-height: 1.1; letter-spacing: -0.02em;
  text-wrap: balance; max-width: 20ch;
}
h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance;
}
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; }
p { max-width: var(--measure); }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.note { font-size: 0.9375rem; color: var(--muted); }

/* sections */

section { padding: 4.5rem 0; border-top: 1px solid var(--rule); }
section.hero { padding: 4rem 0 3.5rem; border-top: 0; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.hero .stack { gap: 1.5rem; }
.section-head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2.5rem; }

.cta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.25rem; margin-top: 0.25rem;
}
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  font: 500 0.9375rem var(--sans); text-decoration: none;
  padding: 0.6875rem 1.125rem; border: 1px solid var(--ink);
  border-radius: 3px; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.cta-fine { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

/* queue panel */

.queue {
  margin-top: 3rem; border: 1px solid var(--rule-2);
  border-radius: 3px; background: var(--paper-2); overflow: hidden;
}
.queue-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule-2);
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.queue-scroll { overflow-x: auto; }
table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 0.875rem; }
th {
  text-align: left; font-family: var(--mono); font-size: 0.625rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  padding: 0.625rem 1rem; border-bottom: 1px solid var(--rule-2); white-space: nowrap;
}
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
tbody tr:last-child td { border-bottom: 0; }
td.carrier { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
td.acct { color: var(--ink-2); }
td.when {
  font-family: var(--mono); font-size: 0.75rem;
  font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap;
}
.stamp {
  display: inline-block; font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.1875rem 0.375rem; border: 1px solid currentColor;
  border-radius: 2px; white-space: nowrap;
}
.stamp.done { color: var(--ok); }
.stamp.hold { color: var(--warn); }
.stamp.block { color: var(--stamp); }

/* ledger list */

.ledger .row {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1.5rem;
  padding: 1.75rem 0; border-top: 1px solid var(--rule);
}
.ledger .row:first-child { border-top: 0; padding-top: 0; }
.ledger .key {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); padding-top: 0.3125rem;
}
.ledger .body { display: flex; flex-direction: column; gap: 0.5rem; }
.before {
  font-family: var(--mono); font-size: 0.8125rem; color: var(--muted);
  border-left: 2px solid var(--rule-2); padding-left: 0.75rem; max-width: var(--measure);
}

/* start grid */

.start {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border: 1px solid var(--rule); border-radius: 3px;
}
.start > div {
  padding: 1.5rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.start > div p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }
.start .rank {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}

/* limits */

.limit {
  display: grid; grid-template-columns: 1.5rem 1fr; gap: 1rem;
  padding: 1.375rem 0; border-top: 1px solid var(--rule);
}
.limit:first-child { border-top: 0; }
.limit .mark { font-family: var(--mono); font-size: 0.9375rem; color: var(--stamp); line-height: 1.5; }
.limit p { margin: 0.3125rem 0 0; font-size: 0.9375rem; color: var(--ink-2); }

/* waitlist */

.join {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: start;
}
.join-form { display: flex; flex-direction: column; gap: 1rem; max-width: 26rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  font: 400 0.9375rem var(--sans);
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-2); border-radius: 3px;
  padding: 0.625rem 0.75rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 4.5rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

.form-msg {
  font-size: 0.9375rem; line-height: 1.5;
  padding: 0.75rem 0.875rem; border-radius: 3px;
  border: 1px solid currentColor;
}
.form-msg[hidden] { display: none; }
.form-msg.ok   { color: var(--ok); }
.form-msg.bad  { color: var(--stamp); }
.form-msg strong { font-weight: 600; }

.join-aside { display: flex; flex-direction: column; gap: 1.25rem; padding-top: 0.25rem; }
.join-aside ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.join-aside li {
  font-size: 0.9375rem; color: var(--ink-2);
  padding-left: 1.125rem; text-indent: -1.125rem;
}
.join-aside li::before { content: "\2014\00a0"; color: var(--muted); }

/* sources */

.sources { display: flex; flex-direction: column; gap: 1.5rem; }
.source {
  display: flex; flex-direction: column; gap: 0.375rem;
  padding-top: 1.25rem; border-top: 1px solid var(--rule); max-width: 46rem;
}
.source:first-child { border-top: 0; padding-top: 0; }
.source .claim { font-size: 0.9375rem; max-width: none; }
.source .prov {
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.5;
  color: var(--muted); max-width: none;
}
.source .prov a { text-decoration-color: var(--rule-2); }
.caveat {
  color: var(--stamp); font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}

footer {
  padding: 2.5rem 0 4rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem;
  align-items: baseline; justify-content: space-between;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}

@media (max-width: 48rem) {
  .join { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 34rem) {
  body { font-size: 16px; }
  .ledger .row { grid-template-columns: 1fr; gap: 0.625rem; }
  .ledger .key { padding-top: 0; }
}
