/* Ledgerwise: ledger paper, blue-black ink, red ink for money going out */
:root {
  --paper: #f3f6f1;
  --paper-deep: #e6ece4;
  --rule: #c9d6cf;
  --ink: #1c2b33;
  --pencil: #5d6b66;
  --green: #2f6b57;
  --green-dark: #24543f;
  --red: #b5402f;
  --white: #ffffff;
  --measure: 66ch;
  --wrap: 1100px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { 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 {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: var(--measure); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 1.45rem;
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.wordmark svg { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--green); color: var(--white);
  font-weight: 600; text-decoration: none;
  padding: 0.8rem 1.3rem; border-radius: 6px;
  border: 2px solid var(--green);
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-small { padding: 0.55rem 1rem; font-size: 0.95rem; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-lede { font-size: 1.2rem; color: var(--ink); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-note { margin-top: 1.25rem; color: var(--pencil); font-size: 0.95rem; }

/* The ledger page: the one bold element */
.ledger {
  background-color: var(--white);
  background-image:
    linear-gradient(90deg, transparent 2.6rem, rgba(181, 64, 47, 0.55) 2.6rem, rgba(181, 64, 47, 0.55) calc(2.6rem + 1px), transparent calc(2.6rem + 1px)),
    repeating-linear-gradient(180deg, transparent 0, transparent calc(2.4rem - 1px), var(--rule) calc(2.4rem - 1px), var(--rule) 2.4rem);
  background-position: 0 3.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 6px 8px 0 var(--paper-deep);
  padding: 1.2rem 1.4rem 1.4rem 3.4rem;
  font-variant-numeric: tabular-nums;
  transform: rotate(-1.2deg);
}
.ledger-head {
  display: flex; justify-content: space-between; align-items: baseline;
  height: 2.4rem; margin-bottom: 0;
}
.ledger-head strong { font-family: var(--display); font-size: 1.15rem; }
.ledger-head span { color: var(--pencil); font-size: 0.9rem; }
.ledger table { width: 100%; border-collapse: collapse; }
.ledger td {
  height: 2.4rem; padding: 0; vertical-align: bottom; padding-bottom: 0.35rem;
  line-height: 1.2;
}
.ledger td:last-child { text-align: right; }
.ledger .out { color: var(--red); }
.ledger .total td {
  font-weight: 700; font-family: var(--display); font-size: 1.15rem;
  border-bottom: 3px double var(--ink);
}
.ledger .sent td { color: var(--green-dark); font-weight: 600; }
.ledger .tick {
  display: inline-block; width: 1.1rem; height: 1.1rem; margin-right: 0.4rem;
  vertical-align: -0.15rem;
}
.ledger-caption { margin: 0.9rem 0 0; color: var(--pencil); font-size: 0.85rem; transform: rotate(-1.2deg); }

/* Sections */
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.band { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-intro { max-width: 60ch; margin-bottom: 2.5rem; }
.section-intro p { color: var(--pencil); font-size: 1.1rem; }

/* Who it's for */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split > div { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.split ul { margin: 0; padding-left: 1.1rem; }
.split li { margin-bottom: 0.45rem; max-width: 52ch; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } }
.services > div { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 861px) {
  .services > div { padding-right: 2rem; }
  .services > div + div { padding-left: 2rem; border-left: 1px solid var(--rule); }
  .services > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
}
.services p { margin: 0; color: var(--pencil); }

/* Pricing table, styled as a ledger column */
.price-table-wrap { overflow-x: auto; }
.price-table {
  width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums;
  min-width: 640px;
}
.price-table th, .price-table td {
  text-align: left; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.price-table thead th {
  font-weight: 600; color: var(--pencil); font-size: 0.95rem;
  border-bottom: 2px solid var(--ink);
}
.price-table .num { text-align: right; padding-right: 0; padding-left: 1.5rem; white-space: nowrap; }
.price-table tbody th { font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.price-table tbody th small { display: block; font-family: var(--body); font-weight: 400; color: var(--pencil); font-size: 0.92rem; margin-top: 0.2rem; }
.price-table .monthly { font-family: var(--display); font-size: 1.35rem; font-weight: 700; }
.price-table .annual { color: var(--green-dark); }
.price-notes { margin-top: 1.5rem; color: var(--pencil); font-size: 0.95rem; }
.price-notes p { margin-bottom: 0.5rem; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--display); font-weight: 700;
  margin-bottom: 1rem;
}
.steps p { color: var(--pencil); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.facts li { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }

/* FAQ */
.faq { max-width: 780px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--green);
}
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 1.25rem; }
.faq .answer p, .faq .answer ul { max-width: 64ch; }
.faq .answer ul { padding-left: 1.1rem; margin: 0 0 1em; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
form { display: grid; gap: 1rem; }
label { font-weight: 600; display: block; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.8rem; border: 1px solid var(--pencil); border-radius: 6px; background: var(--white);
}
textarea { min-height: 8rem; resize: vertical; }
.form-hint { color: var(--pencil); font-size: 0.9rem; margin: 0; }
form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }

/* Footer */
.site-footer {
  background: var(--ink); color: #dfe7e3; padding: 3rem 0 2.5rem; font-size: 0.95rem;
}
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer p { max-width: 70ch; margin-bottom: 0.6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.footer-small { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #3a4b54; color: #b8c6c0; }

/* Policy pages */
.policy { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.policy .wrap { max-width: 820px; }
.policy h1 { font-size: clamp(2rem, 4vw, 3rem); }
.policy h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.policy .updated { color: var(--pencil); }
.policy table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; }
.policy th, .policy td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.policy th { border-bottom: 2px solid var(--ink); }
.policy ul { padding-left: 1.1rem; max-width: var(--measure); }

@media (max-width: 520px) {
  .ledger { padding: 1rem 1rem 1.2rem 2.4rem; font-size: 0.9rem; transform: none; background-position: 0 3.6rem; background-image: linear-gradient(90deg, transparent 1.6rem, rgba(181, 64, 47, 0.55) 1.6rem, rgba(181, 64, 47, 0.55) calc(1.6rem + 1px), transparent calc(1.6rem + 1px)); }
  .ledger-caption { transform: none; }
  .ledger-head { height: auto; min-height: 2.4rem; flex-wrap: wrap; gap: 0 0.75rem; }
  .ledger td { height: auto; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
  .ledger td:first-child { padding-right: 0.75rem; }
  .ledger .total td { font-size: 1rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* Contact form states */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty, .field-error:empty { display: none; }
.form-status { padding: 1rem 1.2rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 600; }
.form-success { background: #e3f0e8; border: 1px solid var(--green); color: var(--green-dark); }
.form-error { background: #f8e6e2; border: 1px solid var(--red); color: var(--red); }
.field-error { display: block; color: var(--red); font-size: 0.9rem; margin-top: 0.3rem; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
button[disabled] { opacity: 0.6; cursor: wait; }
