/* =========================================================================
   THE SORRY BUSINESS — site styles
   Editorial / PR-deck flavored. No frameworks. Hand-written.
   ========================================================================= */

:root {
  --ink:      #14110e;   /* near-black, warm */
  --ink-soft: #44403a;
  --paper:    #f6f1e7;   /* warm cream */
  --paper-2:  #efe7d6;
  --line:     #ddd2bd;
  --accent:   #b3201f;   /* redline / strikethrough red */
  --accent-2: #1f5c4d;   /* the "true" green-ink note */
  --gold:     #9a7b25;
  --shadow:   0 1px 0 rgba(20,17,14,.04), 0 24px 60px -28px rgba(20,17,14,.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --maxw: 1120px;
  --readw: 40rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: .5rem .9rem;
  border-radius: 4px;
}

/* ---- shared bits -------------------------------------------------------- */

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  text-decoration: none;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(20,17,14,.06); }

/* section-break ornament */
hr.break {
  border: 0;
  margin: 2.4rem auto;
  width: 100%;
  text-align: center;
}
hr.break::before {
  content: "·  ·  ·";
  letter-spacing: .6em;
  color: var(--gold);
  font-size: 1rem;
}

/* =========================================================================
   LANDING PAGE
   ========================================================================= */

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

/* top bar */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(246,241,231,.82);
  backdrop-filter: saturate(140%) blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar__brand {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .8rem;
  text-transform: uppercase;
  text-decoration: none;
}
.topbar__brand span { color: var(--accent); }
.topbar a.topbar__cta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .82rem;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

/* hero */
.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero__deck {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: .98;
  letter-spacing: -.015em;
  margin: 0 0 1.6rem;
  font-weight: 600;
}
.hero h1 .sub {
  display: block;
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* the moat / elevator pitch — styled as a redline */
.pitch {
  max-width: 46rem;
  margin: 0 0 2.4rem;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  line-height: 1.3;
  font-style: italic;
}
.pitch .redline {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  color: var(--ink-soft);
}
.pitch .ins {
  font-style: normal;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

/* the "draft" artifact strip on the hero */
.draftcard {
  margin-top: 3rem;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  max-width: 44rem;
  font-size: 1.02rem;
  line-height: 1.6;
}
.draftcard__tag {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .9rem;
}
.draftcard del {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  color: #8a8278;
}
.draftcard ins {
  text-decoration: none;
  color: var(--accent);
  background: rgba(179,32,31,.07);
  padding: 0 .15em;
  border-radius: 2px;
}
.draftcard .margin {
  display: block;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--accent-2);
  margin: .7rem 0 0;
  padding-left: .9rem;
  border-left: 2px solid var(--accent-2);
}

/* generic section */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--line);
}
.section__label {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1.6rem;
}
.section h2 {
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  font-weight: 600;
  margin: 0 0 1.4rem;
  max-width: 24ch;
}

/* blurb */
.blurb {
  max-width: var(--readw);
  font-size: 1.16rem;
  line-height: 1.7;
}
.blurb p { margin: 0 0 1.2rem; }
.blurb p:first-of-type { font-size: 1.28rem; }
.blurb em { color: var(--accent); font-style: italic; }
.blurb .kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  font-style: normal;
}

/* the three "rules of the trade" pull-quotes */
.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.rule {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.4rem 1.4rem 1.5rem;
}
.rule__n {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .1em;
}
.rule p {
  margin: .6rem 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
  font-style: italic;
}

/* comps */
.comps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1rem;
}
.comp {
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}
.comp h3 {
  font-size: 1.25rem;
  margin: 0 0 .15rem;
  font-style: italic;
  font-weight: 600;
}
.comp .by {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .7rem;
}
.comp p { margin: 0; font-size: .98rem; line-height: 1.5; }
.comps__line {
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.8rem 0 0;
  font-size: 1.05rem;
}

/* facts row */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.fact {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem 1.2rem 1.3rem;
}
.fact dt {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .4rem;
}
.fact dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.fact dd small {
  display: block;
  font-size: .82rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
  margin-top: .2rem;
  font-family: var(--sans);
}

/* the autonomous-team colophon block */
.colophon {
  background: var(--ink);
  color: var(--paper);
}
.colophon .section__label { color: #d8b25a; }
.colophon h2 { color: var(--paper); }
.colophon p {
  max-width: var(--readw);
  font-size: 1.1rem;
  line-height: 1.7;
  color: #e8e0d0;
}
.colophon .team {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.6rem;
}
.colophon .team span {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .04em;
  border: 1px solid rgba(246,241,231,.28);
  border-radius: 999px;
  padding: .4rem .9rem;
  color: #e8e0d0;
}

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--ink-soft);
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* =========================================================================
   READER PAGE (manuscript.html)
   ========================================================================= */

.reader-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246,241,231,.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.reader-nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.reader-nav__home {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .1em;
  font-size: .76rem;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.reader-nav__chapters {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.reader-nav__chapters a {
  font-family: var(--sans);
  font-size: .82rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
}
.reader-nav__chapters a:hover { color: var(--ink); border-color: var(--accent); }

.reader-main {
  max-width: var(--readw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 5rem;
}
.reader-lede { margin-bottom: 3rem; }
.reader-lede h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.015em;
  margin: 0 0 1rem;
  font-weight: 600;
}
.reader-sub {
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.chapter { padding-top: 2.5rem; scroll-margin-top: 4.5rem; }
.chapter-head { margin-bottom: 1.6rem; }
.chapter-kicker {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.chapter-head h2 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: .4rem 0 0;
  font-weight: 600;
}
.chapter p { margin: 0 0 1.3rem; }
.chapter p.artifact-head {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .4rem;
}

/* tracked-changes artifact blockquote */
.artifact {
  margin: 0 0 2rem;
  padding: 1.4rem 1.5rem;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: .98rem;
  line-height: 1.6;
}
.artifact p { margin: 0 0 .7rem; }
.artifact p:last-child { margin-bottom: 0; }
.artifact del {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  color: #8a8278;
}
.artifact ins.ins {
  text-decoration: none;
  color: var(--accent);
  background: rgba(179,32,31,.07);
  padding: 0 .15em;
  border-radius: 2px;
}
.artifact .margin {
  display: block;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--accent-2);
  padding-left: .9rem;
  border-left: 2px solid var(--accent-2);
}

.reader-end {
  margin-top: 3rem;
  padding-top: 1rem;
}
.reader-end__title {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--gold);
}
.reader-end p { font-size: 1.02rem; }

/* code spans (file names like untitled.docx) */
code {
  font-family: var(--mono);
  font-size: .86em;
  background: rgba(20,17,14,.06);
  padding: .05em .35em;
  border-radius: 3px;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 760px) {
  body { font-size: 18px; }
  .rules, .comps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .reader-nav__inner { gap: .6rem; }
  .reader-nav__chapters { gap: .9rem; }
}

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