/* Red String — redstring.rosint.org
 *
 * The corkboard, done honestly. Dark ink, paper-white type, one red thread.
 * Red is the evidence colour and is never used for decoration: it marks a
 * connection, a source, a verdict. Everything else stays quiet.
 */

:root {
  --thread: #ff3545;
  --paper: #f2eee7;
  --ink: #0d1110;
  --ink-soft: #141a18;
  --muted: #89918c;
  --line: #262e2b;

  --mono: "SauceCodePro Nerd Font", "Hasklug Nerd Font", "Cousine Nerd Font",
    ui-monospace, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --rail-h: clamp(3.6rem, 7vmin, 4.6rem);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--rail-h);
}

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

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

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.wrap {
  width: min(68rem, calc(100% - clamp(2rem, 8vw, 6rem)));
  margin-inline: auto;
}

/* ---- rail --------------------------------------------------------------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--rail-h);
  display: flex;
  align-items: center;
  background: rgb(13 17 16 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.rail .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.78rem, 1.7vmin, 0.92rem);
}

.rail__brand img { width: 1.9rem; height: 1.9rem; }

.rail__back {
  margin-left: auto;
  font: 0.72rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.6em 0.9em;
  border: 1px solid var(--line);
  transition: color 120ms linear, border-color 120ms linear;
}

.rail__back:hover,
.rail__back:focus-visible {
  color: var(--paper);
  border-color: var(--muted);
}

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

.hero {
  padding: clamp(3rem, 10vmin, 7rem) 0 clamp(2.5rem, 8vmin, 5rem);
}

.hero .wrap {
  display: grid;
  /* Copy gets the long track; the mark is self-limiting. Otherwise the
   * headline is squeezed into one word per line. */
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  font: 0.72rem/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin-top: 1.2rem;
  /* Sized off the column, not the viewport. */
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.hero h1 .thread {
  color: var(--thread);
}

.hero p {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 42ch;
}

.hero__mark {
  width: min(100%, 24rem);
  margin-inline: auto;
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  font: 0.68rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--thread);
  border: 1px solid var(--thread);
  padding: 0.55em 0.8em;
}

.ghost {
  font: 0.72rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3em;
  transition: color 120ms linear, border-color 120ms linear;
}

.ghost:hover,
.ghost:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--thread);
}

/* ---- the claim ---------------------------------------------------------- */

.claim {
  border-block: 1px solid var(--line);
  padding: clamp(2.5rem, 7vmin, 4.5rem) 0;
  background: var(--ink-soft);
}

.claim p {
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  max-width: 34ch;
  text-wrap: balance;
}

.claim .thread { color: var(--thread); }

/* ---- the model: four objects -------------------------------------------- */

.model {
  padding: clamp(3rem, 9vmin, 6rem) 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.6rem, 4vmin, 2.6rem);
}

.section-head h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.objects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.object {
  background: var(--ink);
  padding: clamp(1.3rem, 3vmin, 1.9rem);
}

.object__n {
  font: 0.68rem/1 var(--mono);
  color: var(--thread);
  letter-spacing: 0.14em;
}

.object h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.object p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---- the rule ----------------------------------------------------------- */

.rule {
  padding: clamp(3rem, 9vmin, 6rem) 0;
  border-top: 1px solid var(--line);
}

/* Even 2x2 rather than 3 + an orphan on the second row. */
.rule__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 6vw, 4rem);
}

@media (max-width: 40rem) {
  .rule__grid { grid-template-columns: 1fr; }
}

.rule__item {
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
}

.rule__item--flag {
  border-left-color: var(--thread);
}

.rule__item h3 {
  font: 0.72rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.rule__item--flag h3 { color: var(--thread); }

.rule__item p {
  font-size: 0.95rem;
  color: var(--muted);
}

.rule__item strong { color: var(--paper); font-weight: 600; }

/* ---- status ------------------------------------------------------------- */

.status {
  padding: clamp(3rem, 9vmin, 6rem) 0;
  border-top: 1px solid var(--line);
}

.status .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.status p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 44ch;
}

.status h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
}

.facts {
  list-style: none;
  font: 0.8rem/1.9 var(--mono);
  color: var(--muted);
}

.facts li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
}

.facts span:last-child { color: var(--paper); }

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

.foot {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vmin, 3rem) 0;
}

.foot .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font: 0.72rem/1.6 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

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

@media (max-width: 52rem) {
  .hero {
    padding: clamp(1.75rem, 5vmin, 3rem) 0 clamp(2rem, 6vmin, 3.5rem);
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 4vmin, 2rem);
  }

  .hero__mark {
    order: -1;
    width: min(46vw, 11rem);
    margin-inline: 0;
  }

  .hero p { max-width: none; }
}
