/* Pipelinebureau - "Ledger" (Direction 1, Claude Design handoff 2026-06-09).
   Tokens documented in site/designs/README.md. */

:root {
  --paper: #f6f2e9;
  --paper-2: #eee8d9;
  --ink: #211d15;
  --muted: #5d5649;
  --accent: #e8b04b;
  --accent-deep: #8a5d10;
  --rule: #d9d1bf;
  --rule-strong: #211d15;
  --serif: "Charter", "Iowan Old Style", "Palatino", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --maxw: 62rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- masthead ---------- */

.masthead {
  border-top: 3px double var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  margin-top: 1.25rem;
}

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark b { color: var(--accent-deep); font-weight: 700; }
a.wordmark:hover { color: var(--accent-deep); }

.masthead-meta {
  display: flex;
  gap: 1.5rem;
  row-gap: 0.4rem;
  flex-wrap: wrap;
  color: var(--muted);
}
.masthead-meta a { color: var(--muted); text-decoration: none; }
.masthead-meta a:hover { color: var(--ink); }
.masthead-meta a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

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

.hero { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.eyebrow {
  color: var(--accent-deep);
  margin: 0 0 1.4rem;
}

h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.9rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 2.25rem;
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 600; }

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.85rem 1.6rem;
}
.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--paper); }

.cta-note {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 30ch;
  line-height: 1.45;
}

/* ---------- sections ---------- */

section { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--rule-strong);
  padding-bottom: 0.6rem;
  margin-bottom: 0;
}

.section-head h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-no { color: var(--muted); }

/* ledger rows */

.ledger { list-style: none; margin: 0; padding: 0; }

.ledger li {
  display: grid;
  grid-template-columns: 4rem 16rem 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.ledger .no {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  padding-top: 0.25rem;
}

.ledger h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

.ledger p {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

/* who it's for + contact */

.split {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding-top: 1.35rem;
}

.split .no {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  padding-top: 0.45rem;
}

.bigtext {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  margin: 0;
  max-width: 44ch;
  text-wrap: pretty;
}
.bigtext em { font-style: italic; }

.contact-block { background: var(--paper-2); border: 1px solid var(--rule); padding: clamp(1.5rem, 4vw, 2.5rem); }

.contact-block .mono { color: var(--accent-deep); margin: 0 0 1rem; }

.contact-mail {
  display: inline-block;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}
.contact-mail:hover { border-bottom-color: var(--ink); color: var(--accent-deep); }

.contact-block p.note {
  color: var(--muted);
  max-width: 52ch;
  margin: 0.75rem 0 0;
  text-wrap: pretty;
}

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

footer {
  border-top: 3px double var(--rule-strong);
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner p { margin: 0; }

/* ---------- inner pages ---------- */

.page-hero { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3rem); }

.page-hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  max-width: 22ch;
}

.prose p {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}
.prose p strong { color: var(--ink); font-weight: 600; }
.prose p:last-child { margin-bottom: 0; }

.fineprint {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  max-width: 62ch;
  margin: 1.5rem 0 0;
}

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

body.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.error-page footer { margin-top: 0; }

.error-page main { flex: 1; display: flex; align-items: center; }

.notice { padding-top: clamp(3rem, 10vw, 6rem); padding-bottom: clamp(3rem, 10vw, 6rem); }

.code {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 1.4rem;
}

.notice h1 {
  font-size: clamp(2rem, 5.6vw, 3.6rem);
  line-height: 1.1;
  max-width: 20ch;
}

.notice p {
  color: var(--muted);
  max-width: 50ch;
  margin: 0 0 2.25rem;
  text-wrap: pretty;
}

.actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

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

@media (max-width: 760px) {
  .ledger li { grid-template-columns: 3rem 1fr; }
  .ledger p { grid-column: 2; }
  .split { grid-template-columns: 3rem 1fr; }
}

@media (max-width: 560px) {
  .masthead-extra { display: none; }
  .masthead-meta { gap: 1rem; }
}

@media (max-width: 420px) {
  .ledger li { grid-template-columns: 1fr; gap: 0.4rem; }
  .ledger p { grid-column: 1; }
  .split { grid-template-columns: 1fr; gap: 0.5rem; }
}
