/* Carpenter Financial — booksbycarpenter.com
   Palette from brand/BRAND.md. Gold is an accent (rules, numerals, ticks), never small text on light backgrounds. */
:root {
  --pine: #004D3E;        /* deep green: bands, buttons, headings */
  --pine-ink: #003A2F;
  --green: #027E4A;       /* brand green: links, accents */
  --gold: #C99E40;        /* rules, ticks, numerals */
  --gold-light: #E2C46A;  /* gold text on pine */
  --cream: #FBF8EF;
  --paper: #FFFFFF;
  --ink: #1D2B27;
  --muted: #4A5A55;
  --rule: #E7DFC8;
  --ledger-line: #D9E7DF;

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--pine); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--pine); line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--pine); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-solid { background: var(--pine); color: #fff; }
.btn-solid:hover { background: var(--green); color: #fff; }
.btn-quiet { color: var(--pine); border: 2px solid var(--pine); background: transparent; }
.btn-quiet:hover { background: var(--pine); color: #fff; }
.btn-gold { background: var(--gold); color: var(--pine-ink); }
.btn-gold:hover { background: var(--gold-light); color: var(--pine-ink); }
.btn-small { min-height: 42px; padding: 9px 18px; font-size: .925rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 92px; }
.brand img { width: auto; height: 72px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--green); text-decoration: underline; }
@media (max-width: 860px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; min-height: 72px; gap: 12px; }
  .brand img { height: 56px; }
}

/* Hero */
.hero { background: var(--cream); border-bottom: 3px solid var(--gold); padding: clamp(48px, 8vw, 104px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.byline { font-size: .95rem; color: var(--muted); margin: 0; text-wrap: balance; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .lede { font-size: 1.1rem; }
}
@media (max-width: 420px) {
  .cta-row .btn { width: 100%; }
}

/* Ledger card: the one signature element */
.ledger {
  margin: 0; background: var(--paper); border-radius: 6px;
  border: 1px solid var(--rule); border-top: 6px solid var(--pine);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(0, 77, 62, .45);
  padding: 22px 24px 10px;
  transform: rotate(.8deg);
}
.ledger-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--gold); }
.ledger-head img { width: 26px; }
.ledger-title { font-family: var(--serif); font-size: 1.5rem; color: var(--pine); margin: 0; line-height: 1.1; }
.ledger-sub { font-size: .85rem; color: var(--muted); margin: 2px 0 0; }
.ledger-rows { list-style: none; margin: 0; padding: 0; }
.ledger-rows li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--ledger-line); font-size: 1rem;
}
.ledger-rows li:last-child { border-bottom: 0; font-weight: 600; color: var(--pine); }
.tick { width: 26px; height: 26px; flex: none; }
.tick path {
  fill: none; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 24; stroke-dashoffset: 24;
  animation: tick .45s ease-out forwards;
}
.ledger-rows li:nth-child(1) .tick path { animation-delay: .5s; }
.ledger-rows li:nth-child(2) .tick path { animation-delay: .85s; }
.ledger-rows li:nth-child(3) .tick path { animation-delay: 1.2s; }
.ledger-rows li:nth-child(4) .tick path { animation-delay: 1.55s; }
.ledger-rows li:nth-child(5) .tick path { animation-delay: 1.9s; stroke: var(--gold); stroke-width: 3; }
@keyframes tick { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tick path { animation: none; stroke-dashoffset: 0; }
}
@media (max-width: 860px) {
  .ledger { transform: none; max-width: 480px; }
}

/* Sections */
section { scroll-margin-top: 100px; }
.relief, .services, .about { padding: clamp(56px, 8vw, 96px) 0; }
.relief p { font-size: 1.125rem; }
.relief { border-bottom: 1px solid var(--rule); }

.section-intro { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.service { border-top: 2px solid var(--gold); padding-top: 22px; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.service-lead { font-weight: 600; color: var(--pine); }
.service p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .service-grid { grid-template-columns: 1fr; } }

.serve { background: var(--cream); padding: clamp(56px, 8vw, 96px) 0; }
.serve-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: 12px; }
.serve-grid h3 { font-size: 1.3rem; }
.serve-grid p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .serve-grid { grid-template-columns: 1fr; } }

/* How it works: deep green band */
.steps { background: var(--pine); color: #EAF2EE; padding: clamp(56px, 8vw, 96px) 0; }
.steps h2, .steps h3 { color: #fff; }
.step-list { list-style: none; margin: 32px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); counter-reset: none; }
.step-num {
  display: block; font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--gold-light);
  padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid rgba(226, 196, 106, .45);
}
.step-list p { margin: 0; color: #D6E6DE; }
@media (max-width: 860px) { .step-list { grid-template-columns: 1fr; } }

/* About */
.about-grid { display: grid; grid-template-columns: 160px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; max-width: 900px; }
.about-mark { width: 110px; justify-self: center; }
.about p { font-size: 1.1rem; }
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-mark { width: 64px; justify-self: start; }
}

/* Referral */
.referral { padding: clamp(40px, 6vw, 64px) 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: center; }
.referral h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.referral p { color: var(--muted); margin: 0 auto; max-width: 36em; }

/* Contact */
.contact { background: var(--cream); padding: clamp(56px, 8vw, 96px) 0; }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.contact-grid p { font-size: 1.1rem; color: var(--muted); max-width: 32em; margin-bottom: 26px; }
.contact-list { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: 6px; padding: 8px 26px; }
.contact-list div { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font-size: .85rem; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.1rem; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--pine); color: #D6E6DE; padding: 28px 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: #fff; }

/* Privacy page */
.doc { padding: clamp(48px, 7vw, 88px) 0; }
.doc h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); }
.doc h2 { font-size: 1.6rem; margin-top: 1.6em; }
.doc .updated { color: var(--muted); }
