/* PostWeavers: indigo ink on paper, one red thread */

:root {
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --ink: #1d2440;        /* indigo ink */
  --ink-soft: #4a5170;
  --thread: #b23a2e;     /* madder red */
  --thread-soft: #d8a49e;
  --weft: #d9d4c8;       /* hairline weave */
  --night: #14161f;      /* the feed, X-dark */
  --night-ink: #e8e6df;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Public Sans", -apple-system, system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  --measure: 62rem;
  --rail: 4.5rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* ---- the red thread rail ---------------------------------------- */

.thread-rail {
  position: fixed;
  top: 0; bottom: 0;
  left: calc(var(--rail) / 2);
  width: 0;
  border-left: 2px dashed var(--thread);
  opacity: 0.55;
  z-index: 1;
}
@media (max-width: 720px) { .thread-rail { display: none; } }

.page { position: relative; z-index: 2; }

/* stitch knots: where sections attach to the thread */
.knot {
  position: absolute;
  left: calc(-1 * var(--rail) + var(--rail) / 2 - 5px);
  top: 0.9rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--thread);
}
@media (max-width: 720px) { .knot { display: none; } }

/* ---- layout ------------------------------------------------------ */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem 0 var(--rail);
  position: relative;
}
@media (max-width: 720px) { .wrap { padding-left: 1.5rem; } }

section { position: relative; padding: 4.5rem 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--thread);
  display: block;
  margin-bottom: 1rem;
}

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

header.site {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--weft);
}
header.site .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark .mark { width: 26px; height: 26px; flex: 0 0 auto; }
.wordmark em {
  font-style: italic;
  color: var(--thread);
}
/* stitched underline under the wordmark */
.wordmark span {
  border-bottom: 2px dashed var(--thread);
  padding-bottom: 2px;
}
nav.site a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.4rem;
}
nav.site a:hover, nav.site a:focus-visible { color: var(--thread); }
nav.site a.now { color: var(--ink); border-bottom: 2px dashed var(--thread); }

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

.hero { padding: 5.5rem 0 3.5rem; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 17ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--thread);
}
.hero .sub {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.cta-row { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
  outline: 2px dashed transparent;
}
.btn.primary:hover, .btn.primary:focus-visible {
  outline-color: var(--thread);
  outline-offset: 3px;
}
.btn.quiet {
  color: var(--ink);
  border: 1px solid var(--weft);
  background: transparent;
}
.btn.quiet:hover, .btn.quiet:focus-visible { border-color: var(--thread); color: var(--thread); }
.cta-note { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); }

/* ---- the loom (hero demo) ---------------------------------------- */

.loom {
  margin-top: 3.5rem;
  background: var(--night);
  color: var(--night-ink);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 24px 60px -30px rgba(29, 36, 64, 0.45);
}
.loom .post {
  border: 1px solid #2c2f3d;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  max-width: 34rem;
}
.loom .handle { font-family: var(--mono); font-size: 0.75rem; color: #8b90a3; }
.loom .arrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--thread-soft);
  margin: 1rem 0 1rem 1.5rem;
}
.loom .draft {
  border: 1px dashed var(--thread);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  max-width: 34rem;
  margin-left: 2.5rem;
  min-height: 5.4rem;
}
.loom .draft .who { font-family: var(--mono); font-size: 0.75rem; color: var(--thread-soft); margin-bottom: 0.35rem; }
.loom .caret {
  display: inline-block; width: 2px; height: 1em;
  background: var(--thread); vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.loom .postrow {
  margin-top: 0.9rem; margin-left: 2.5rem;
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--mono); font-size: 0.75rem; color: #8b90a3;
}
.loom .postbtn {
  background: var(--night-ink); color: var(--night);
  font-weight: 700; font-family: var(--sans); font-size: 0.85rem;
  border: none; border-radius: 999px; padding: 0.45rem 1.2rem;
}
.loom .postbtn.you { box-shadow: 0 0 0 2px var(--thread); }

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

.ledger { border-top: 1px solid var(--weft); }
.ledger ul { list-style: none; max-width: 40rem; }
.ledger li {
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--weft);
  display: flex; gap: 1rem; align-items: baseline;
}
.ledger li::before {
  content: "✕";
  color: var(--thread);
  font-weight: 700;
  flex: 0 0 auto;
}
.ledger li strong { color: var(--ink); font-weight: 600; }
.ledger li span { color: var(--ink-soft); }
.ledger .oath {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}

/* ---- steps -------------------------------------------------------- */

.steps ol { list-style: none; counter-reset: stitch; max-width: 44rem; }
.steps li {
  counter-increment: stitch;
  padding: 1.6rem 0 1.6rem 3.4rem;
  position: relative;
  border-bottom: 1px solid var(--weft);
}
.steps li::before {
  content: counter(stitch);
  position: absolute; left: 0; top: 1.7rem;
  width: 2.1rem; height: 2.1rem;
  border: 2px solid var(--thread);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700;
  color: var(--thread);
  background: var(--paper);
}
.steps h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 0.3rem; }
.steps p { color: var(--ink-soft); max-width: 52ch; }

/* ---- voice swatches ------------------------------------------------ */

.voice { background: var(--paper-deep); }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 720px) { .swatches { grid-template-columns: 1fr; } }
.swatch { border-radius: 8px; padding: 1.5rem; font-size: 0.98rem; }
.swatch .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 0.8rem; }
.swatch.them { background: #fff; border: 1px solid var(--weft); color: var(--ink-soft); }
.swatch.them .tag { color: #9a948a; }
.swatch.you { background: var(--ink); color: var(--paper); border: 1px dashed var(--thread); }
.swatch.you .tag { color: var(--thread-soft); }
.swatch.you q { font-family: var(--serif); font-style: italic; font-size: 1.12rem; quotes: none; }
.voice .note { margin-top: 1.4rem; font-size: 0.95rem; color: var(--ink-soft); max-width: 56ch; }

/* ---- field guide (comparison strip) -------------------------------- */

.field .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
@media (max-width: 860px) { .field .cols { grid-template-columns: 1fr; } }
.field .col { border-top: 3px solid var(--weft); padding-top: 1.2rem; }
.field .col.us { border-top-color: var(--thread); }
.field h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.field .price { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); margin: 0.3rem 0 0.8rem; }
.field p { font-size: 0.97rem; color: var(--ink-soft); }
.field .col.us p { color: var(--ink); }

/* ---- pricing -------------------------------------------------------- */

.pricing { background: var(--paper-deep); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; max-width: 50rem; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: #fff;
  border: 1px solid var(--weft);
  border-radius: 8px;
  padding: 1.8rem;
}
.plan.cloud { border: 1px dashed var(--thread); }
.plan h3 { font-family: var(--serif); font-size: 1.3rem; }
.plan .amount { font-family: var(--serif); font-size: 2.3rem; font-weight: 600; margin: 0.6rem 0 0.2rem; }
.plan .amount small { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); }
.plan ul { list-style: none; margin: 1.1rem 0 1.4rem; }
.plan li { padding: 0.35rem 0; font-size: 0.95rem; color: var(--ink-soft); }
.plan li::before { content: "· "; color: var(--thread); }
.pricing .jab { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.85rem; color: var(--ink-soft); }

/* ---- faq ------------------------------------------------------------ */

.faq details { border-bottom: 1px solid var(--weft); max-width: 46rem; }
.faq summary {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  padding: 1.1rem 0; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--thread); font-family: var(--mono); }
.faq details[open] summary::before { content: "– "; }
.faq details p { padding: 0 0 1.2rem; color: var(--ink-soft); max-width: 60ch; }

/* ---- prose pages (why-not-automation, vs) ---------------------------- */

.prose h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.12; letter-spacing: -0.02em;
  max-width: 22ch;
}
.prose h1 em { font-style: italic; color: var(--thread); }
.prose .lede { margin-top: 1.3rem; font-size: 1.15rem; color: var(--ink-soft); max-width: 58ch; }
.prose h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 3rem 0 0.8rem; max-width: 30ch; }
.prose p { margin: 0.9rem 0; max-width: 66ch; color: var(--ink-soft); }
.prose p strong { color: var(--ink); }
.prose blockquote {
  margin: 1.4rem 0; padding: 0.4rem 0 0.4rem 1.3rem;
  border-left: 2px dashed var(--thread);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink);
  max-width: 56ch;
}
.fault {
  margin: 2.2rem 0; padding: 1.5rem;
  background: #fff; border: 1px solid var(--weft); border-radius: 8px;
  max-width: 46rem;
}
.fault h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.fault .mode { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #9a948a; display: block; margin-bottom: 0.5rem; }
.fault p { color: var(--ink-soft); margin-top: 0.5rem; max-width: 62ch; }
.fault .answer { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--weft); }
.fault .answer::before { content: "the postweavers answer: "; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--thread); }

/* comparison table */
table.compare { border-collapse: collapse; width: 100%; max-width: 46rem; margin: 2rem 0; font-size: 0.95rem; }
table.compare th, table.compare td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--weft); vertical-align: top; }
table.compare th { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
table.compare td:first-child { color: var(--ink-soft); }
table.compare .us { color: var(--ink); font-weight: 600; }
table.compare .flag { color: var(--thread); font-weight: 600; }

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

footer.site {
  border-top: 1px solid var(--weft);
  padding: 3rem 0 3.5rem;
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
footer.site .line { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
footer.site nav a { display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); text-decoration: none; padding: 0.15rem 0; }
footer.site nav a:hover { color: var(--thread); }

/* ---- blog ------------------------------------------------------------ */

.postlist { list-style: none; max-width: 46rem; margin-top: 2rem; }
.postlist li { border-bottom: 1px solid var(--weft); padding: 1.7rem 0; }
.postlist .date {
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
}
.postlist h2 { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin: 0.35rem 0 0.4rem; }
.postlist h2 a { color: var(--ink); text-decoration: none; }
.postlist h2 a:hover, .postlist h2 a:focus-visible { color: var(--thread); }
.postlist p { color: var(--ink-soft); max-width: 62ch; font-size: 0.97rem; }

.prose .meta {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--ink-soft); margin-top: 1rem;
}
.prose ul, .prose ol { margin: 0.9rem 0 0.9rem 1.4rem; max-width: 62ch; color: var(--ink-soft); }
.prose li { padding: 0.25rem 0; }
.prose li::marker { color: var(--thread); }
.prose a { color: var(--ink); text-decoration-color: var(--thread); text-underline-offset: 3px; }
.prose a:hover { color: var(--thread); }
.prose .backlink { font-family: var(--mono); font-size: 0.8rem; }

/* ---- 404 ------------------------------------------------------------- */

.lost { padding: 7rem 0; }
.lost h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lost h1 em { font-style: italic; color: var(--thread); }
.lost p { margin-top: 1rem; color: var(--ink-soft); }

:focus-visible { outline: 2px dashed var(--thread); outline-offset: 3px; }
