/* ==========================================================================
   Ledgerline — a marketing page set like a bank statement.

   Palette comes from the two materials of the subject: ledger paper (a cool
   green-grey, never cream) and green-bar continuous form. One alarm red, used
   only for the deposit that still needs a human.
   Display: Bodoni Moda (Bodoni's own printed account books).
   Text:    Libre Franklin (the American business-document grotesque).
   Figures: Azeret Mono, only ever on transaction data.
   ========================================================================== */

:root {
  /* paper + ink */
  --paper:      #E7EBE2;
  --paper-2:    #F4F7EF;
  --bar:        #DCE7D3;
  --ink:        #131814;
  --ink-2:      #3F4A42;
  --muted:      #52604A;
  --rule:       #C3CEB8;
  --rule-2:     #A6B39A;

  /* accents: green is the ledger ink, red has exactly one job */
  --green:      #145C3A;
  --green-deep: #0C3A24;
  --green-soft: #D5E5D1;
  --red:        #A2330F;
  --red-soft:   #F2DCD2;

  /* two radii, one shadow */
  --r-btn:  2px;
  --r-pill: 999px;
  --shadow: 0 1px 1px rgba(19, 24, 20, .05), 0 22px 44px -30px rgba(19, 24, 20, .55);

  --font-display: 'Bodoni Moda', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-text: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Azeret Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --t-display: clamp(2.6rem, 1.15rem + 6.1vw, 5.4rem);
  --t-h2: clamp(1.7rem, 1.1rem + 2.3vw, 2.7rem);
  --t-body: 1.0625rem;
  --t-sm: .875rem;
  --t-xs: .75rem;

  --maxw: 1120px;
}

/* ------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.62;
  font-synthesis-weight: none;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.005em;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-text);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn-solid { background: var(--green); color: #FFFFFF; }
.btn-solid:hover { background: var(--green-deep); color: #FFFFFF; }
.btn-line { border-color: var(--rule-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }
.btn-paper { background: var(--paper-2); color: var(--green-deep); }
.btn-paper:hover { background: #FFFFFF; color: var(--green-deep); }

/* ------------------------------------------------------------- header */

.site-head { border-bottom: 1px solid var(--rule); }
.head-inner { display: flex; align-items: center; gap: 32px; padding-block: 20px; }

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.mark { display: block; width: 24px; height: 24px; }
.brand-name { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 700; letter-spacing: -.012em; }

.site-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: .9375rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--green); text-decoration: underline; }

.head-cta { margin-left: auto; }

/* ------------------------------------------------------------- bands */

.band { padding-block: 96px; }
.band--hero { padding-block: 64px 96px; }

.sec-title { font-size: var(--t-h2); max-width: 24ch; }
.sec-lede { margin-top: 24px; max-width: 62ch; }

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

.hero-title {
  margin-top: 8px;
  max-width: 15ch;
  font-size: var(--t-display);
  line-height: .97;
  letter-spacing: -.022em;
}
.hero-lede { margin-top: 24px; max-width: 55ch; font-size: 1.125rem; }

.raw-chip {
  font-family: var(--font-mono);
  font-size: .8em;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-btn);
  padding: 4px 8px;
  white-space: nowrap;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.hero-note { margin-top: 16px; max-width: 54ch; font-size: var(--t-sm); color: var(--muted); }
.cta-note { font-size: var(--t-sm); color: var(--muted); }

/* ------------------------------------------------------------- the ledger */

.ledger {
  margin: 64px 0 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule-2);
}
.ledger-period { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.ledger-meta { margin-left: auto; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); }
.ledger-sample {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--muted);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th,
.ledger-table td { text-align: left; padding: 16px 24px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger-table th { padding-block: 12px; border-bottom-color: var(--rule-2); vertical-align: bottom; }
.ledger-table tbody tr:nth-child(odd) { background: var(--paper-2); }
.ledger-table tbody tr:nth-child(even) { background: var(--bar); }
.ledger-table tbody tr:last-child td { border-bottom: 0; }
.ledger-table tfoot td {
  border-top: 1px solid var(--rule-2);
  border-bottom: 0;
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
}

.lbl {
  font-family: var(--font-text);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ledger-table .num { text-align: right; font-size: var(--t-sm); color: var(--ink); white-space: nowrap; }
.ledger-table .num .when { white-space: normal; }

.raw { display: block; font-family: var(--font-mono); font-size: .8125rem; letter-spacing: -.01em; color: var(--ink-2); }
.when { display: block; margin-top: 4px; font-size: var(--t-xs); color: var(--muted); }
.who { display: block; font-weight: 600; color: var(--ink); }
.what { display: block; margin-top: 4px; font-size: var(--t-sm); color: var(--muted); }
.inv { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-2); }
.dash { color: var(--rule-2); }

.guess { display: block; font-weight: 600; color: var(--red); }
.guess-text { display: inline-block; }
.pen { display: block; width: 100%; height: 8px; }
.pen path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 0; }

@media (prefers-reduced-motion: no-preference) {
  .pen path { animation: pen-stroke 800ms cubic-bezier(.45, .05, .25, 1) 300ms 1 both; }
}
@keyframes pen-stroke { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 600;
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; }
.tag--ok { background: var(--green-soft); color: var(--green-deep); }
.tag--due { background: var(--red-soft); color: var(--red); }
.tag--note { background: var(--paper); color: var(--muted); border-color: var(--rule); }

/* ------------------------------------------------------------- two-column ledger rows */

.duo {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  column-gap: 48px;
  margin-top: 48px;
}
.duo dt {
  grid-column: 1;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.duo dd { padding-top: 24px; padding-bottom: 4px; border-top: 1px solid var(--rule); }
.duo dt:first-of-type,
.duo dd:first-of-type { padding-top: 0; border-top: 0; }

/* ------------------------------------------------------------- catches */

.milestone { margin-top: 48px; padding: 32px; background: var(--paper-2); border: 1px solid var(--rule); }
.milestone-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.milestone-client { font-size: 1.5rem; }
.milestone-quote { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); }

.mstones { margin-top: 24px; }
.mstones li { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-top: 1px solid var(--rule); }
.mstones .num { font-size: var(--t-sm); color: var(--ink); }
.milestone-note { margin-top: 24px; max-width: 60ch; font-size: var(--t-sm); color: var(--muted); }

.edges { margin-top: 48px; }
.edges li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 48px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid var(--rule);
}
.edges li:first-child { padding-top: 0; border-top: 0; }
.edge-name { font-size: 1.25rem; }
.edge-note { max-width: 62ch; }

/* ------------------------------------------------------------- tax table */

.tax-table { width: 100%; margin-top: 48px; border-collapse: collapse; }
.tax-table th,
.tax-table td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tax-table th { padding-block: 12px; border-bottom-color: var(--rule-2); vertical-align: bottom; }
.tax-table tbody td:first-child { font-weight: 600; color: var(--ink); }
.tax-table .num { text-align: right; color: var(--ink); }
.tax-table tfoot td { border-top: 1px solid var(--rule-2); border-bottom: 0; font-weight: 600; color: var(--ink); }
.tax-note { margin-top: 24px; max-width: 64ch; font-size: var(--t-sm); color: var(--muted); }

/* ------------------------------------------------------------- pricing */

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
}
.price-name { display: block; font-family: var(--font-display); font-size: 1.375rem; color: var(--ink); }
.price-cadence { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--muted); }
.price-num { font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 3.75rem); font-weight: 600; line-height: 1; color: var(--ink); }
.price-per { font-family: var(--font-text); font-size: 1rem; font-weight: 400; color: var(--muted); }

.price-inc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; margin-top: 24px; }
.price-inc li { position: relative; padding-left: 24px; }
.price-inc li::before { content: ""; position: absolute; left: 0; top: .8em; width: 12px; height: 1px; background: var(--rule-2); }
.price-honest { margin-top: 32px; max-width: 60ch; font-size: var(--t-sm); color: var(--muted); }

/* ------------------------------------------------------------- safety, voices, faq */

.safety-note { margin-top: 32px; max-width: 60ch; font-size: var(--t-sm); color: var(--muted); }

.voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 48px; }
.voice { margin: 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.voice p { font-family: var(--font-display); font-style: italic; font-size: 1.375rem; line-height: 1.4; color: var(--ink); }
.voice cite { display: block; margin-top: 16px; font-family: var(--font-mono); font-size: var(--t-xs); font-style: normal; color: var(--muted); }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; margin-top: 48px; }
.faq-item { padding-top: 24px; border-top: 1px solid var(--rule); }
.faq dt { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.faq dd { margin-top: 8px; }

/* ------------------------------------------------------------- close */

.band--close { background: var(--green-deep); color: var(--paper-2); }
.band--close :focus-visible { outline-color: var(--paper-2); }
.close-title { max-width: 22ch; font-size: var(--t-h2); color: var(--paper-2); }
.close-lede { margin-top: 24px; max-width: 56ch; color: var(--paper-2); }
.close-note { font-size: var(--t-sm); color: var(--paper-2); }

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

.site-foot { padding-block: 48px; border-top: 1px solid var(--rule); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot-brand { max-width: 36ch; }
.foot-line { margin-top: 8px; font-size: var(--t-sm); color: var(--muted); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--t-sm); }
.foot-nav a { color: var(--ink-2); text-decoration: none; }
.foot-nav a:hover { color: var(--green); text-decoration: underline; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: var(--t-xs);
  color: var(--muted);
}
.foot-fine { max-width: 56ch; }

/* ------------------------------------------------------------- narrower */

@media (max-width: 960px) {
  .band { padding-block: 64px; }
  .band--hero { padding-block: 48px 64px; }
}

@media (max-width: 760px) {
  .head-inner { flex-wrap: wrap; row-gap: 16px; gap: 24px; }
  .head-cta { margin-left: auto; }
  .site-nav { flex-basis: 100%; order: 3; gap: 8px 20px; }

  .ledger-table thead th { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger-table tbody tr,
  .ledger-table tfoot tr { display: block; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
  .ledger-table tbody tr:last-child { border-bottom: 0; }
  .ledger-table tfoot tr { border-bottom: 0; border-top: 1px solid var(--rule-2); }
  .ledger-table th,
  .ledger-table td { padding: 0; border: 0; }
  .ledger-table td + td { margin-top: 8px; }
  .ledger-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--muted);
  }
  .ledger-table .num { text-align: left; }

  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo dd { padding-top: 8px; padding-bottom: 24px; border-top: 0; }
  .duo dt:first-of-type,
  .duo dd:first-of-type { padding-top: 0; }

  .edges li { grid-template-columns: minmax(0, 1fr); }
  .edge-note { margin-top: 8px; }

  .tax-table thead th { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tax-table tbody tr,
  .tax-table tfoot tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .tax-table tfoot tr { border-bottom: 0; border-top: 1px solid var(--rule-2); }
  .tax-table th,
  .tax-table td { padding: 0; border: 0; }
  .tax-table td + td { margin-top: 4px; }
  .tax-table td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--muted);
  }
  .tax-table .num { text-align: left; }

  .price-inc { grid-template-columns: minmax(0, 1fr); }
  .voices { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
