:root {
  --paper: #f6f4ec;
  --paper-warm: #efeadb;
  --ink: #1e2528;
  --ink-soft: #4b5458;
  --rule: #c9dccd;
  --margin-red: #c4473a;
  --pencil: #8a8f86;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Karla", system-ui, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --hand: "Caveat", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.small-head {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.4em;
}

/* Header */
.site-header { border-bottom: 1px solid var(--ink); }
.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  text-decoration: none;
  line-height: 1.1;
}
.wordmark small {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 2px;
}
.main-nav { display: flex; gap: 26px; font-size: 0.95rem; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }
.main-nav .nav-book { font-weight: 700; text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 22px;
  border-radius: 3px;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: var(--margin-red); }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 64px;
  align-items: center;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }
.or { color: var(--ink-soft); font-size: 0.95rem; }

/* Receipt */
.receipt {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 330px;
  background: #fffefa;
  padding: 26px 24px 30px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #2b2b2b;
  transform: rotate(2deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 12px 28px rgba(30,37,40,0.12);
  position: relative;
  /* torn bottom edge */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.receipt-head {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed #9a9a9a;
}
.receipt-head strong { display: block; font-size: 1.05rem; }
.receipt-lines { margin: 0; }
.receipt-lines div { display: flex; gap: 6px; margin-bottom: 6px; }
.receipt-lines dd { margin: 0 0 0 auto; white-space: nowrap; padding-left: 8px; }
.receipt-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px dashed #9a9a9a;
  border-bottom: 1px dashed #9a9a9a;
  padding: 10px 0;
  margin: 14px 0;
}
.receipt-foot { text-align: center; margin: 0; font-size: 0.75rem; }

/* Services: ledger page */
.services {
  padding: 80px 0 72px;
  background: var(--paper-warm);
  border-top: 1px solid var(--ink);
}
.ledger {
  margin-top: 36px;
  border-top: 2px solid var(--ink);
  background-image: linear-gradient(var(--margin-red), var(--margin-red));
  background-size: 1px 100%;
  background-position: 190px 0;
  background-repeat: no-repeat;
}
.ledger-row {
  display: grid;
  grid-template-columns: 190px 1fr 110px;
  border-bottom: 1px solid var(--rule);
}
.ledger-row h3 {
  font-size: 1.15rem;
  margin: 0;
  padding: 22px 20px 22px 0;
}
.ledger-row p {
  margin: 0;
  padding: 22px 24px;
  color: var(--ink-soft);
}
.ledger-note {
  padding: 24px 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--pencil);
  text-align: right;
}
.scribble {
  display: block;
  font-family: var(--hand);
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--margin-red);
  transform: rotate(-2deg);
  margin-top: 6px;
}
.software {
  margin: 22px 0 0 214px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Who */
.who { padding: 88px 0 72px; }
.who-list {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.2;
  max-width: 900px;
  margin-bottom: 0.6em;
}
.who-text { max-width: 600px; font-size: 1.1rem; color: var(--ink-soft); }

/* About */
.about { padding: 40px 0 88px; }
.about-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}
.photo {
  margin: 0;
  background: #fffefa;
  padding: 12px 12px 8px;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 10px 24px rgba(30,37,40,0.12);
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
}
.photo figcaption {
  font-family: var(--hand);
  font-size: 1.5rem;
  text-align: center;
  padding-top: 4px;
}
.about-text { max-width: 600px; }
.credential {
  margin-top: 1.6em;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Why */
.why {
  padding: 72px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.why-list {
  display: grid;
  grid-template-columns: 280px 1fr;
  margin: 0;
}
.why-list dt, .why-list dd {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.why-list dt { font-family: var(--serif); font-size: 1.3rem; }
.why-list dd { margin: 0; color: var(--ink-soft); padding-top: 22px; }

/* Contact */
.contact { padding: 96px 0 104px; }
.contact h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 720px; }
.contact > .wrap > p:first-of-type { font-size: 1.15rem; color: var(--ink-soft); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }
.contact-email { font-family: var(--serif); font-size: 1.4rem; }
.contact-area { color: var(--pencil); font-size: 0.95rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #b9c0bd;
  padding: 26px 0;
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .receipt { transform: rotate(1.5deg); }
  .ledger { background-position: 0 0; background-size: 0 0; }
  .ledger-row { grid-template-columns: 1fr auto; padding: 18px 0; }
  .ledger-row h3 { padding: 0; }
  .ledger-row p { grid-column: 1 / -1; grid-row: 2; padding: 6px 0 0; }
  .ledger-note { grid-column: 2; grid-row: 1; padding: 4px 0 0; }
  .software { margin-left: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .photo { max-width: 380px; }
  .why-list { grid-template-columns: 1fr; }
  .why-list dd { border-top: 0; padding-top: 0; }
}

@media (max-width: 520px) {
  body { font-size: 17px; }
  .main-nav a:not(.nav-book) { display: none; }
}
