/* ==========================================================================
   R & J Bookkeeping — design tokens (matched to logo: gold on black)
   Palette:
     --bg        #0B0A08  near-black (logo background)
     --bg-alt    #17140F  raised panel on black
     --gold      #D8B369  primary gold (logo letterforms)
     --gold-lt   #F1DDA0  light gold (highlights)
     --gold-dk   #8C6E33  deep gold / shadow
     --cream     #F3EEE1  body text on black
     --line      #332D22  hairline on dark
   Type:
     Display — Fraunces (serif, italic accents like the reference sites)
     Body    — IBM Plex Sans
     Data    — IBM Plex Mono (numbers, figures, tabular data)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #0B0A08;
  --bg-alt: #17140F;
  --gold: #D8B369;
  --gold-lt: #F1DDA0;
  --gold-dk: #8C6E33;
  --cream: #F3EEE1;
  --line: #332D22;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  margin: 0 0 0.4em 0;
  color: var(--gold-lt);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; line-height: 1.05; }
h1 em, h2 em { font-style: italic; color: var(--gold); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; color: var(--gold-lt); }

p { margin: 0 0 1em 0; }
a { color: inherit; }
.mono { font-family: 'IBM Plex Mono', monospace; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6em;
  display: inline-block;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ---------- Top contact bar ---------- */
.top-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}
.top-bar .wrap {
  display: flex; justify-content: flex-end; gap: 24px;
  padding-top: 8px; padding-bottom: 8px;
}
.top-bar a { text-decoration: none; color: var(--gold); opacity: 0.9; }
.top-bar a:hover { opacity: 1; color: var(--gold-lt); }
@media (max-width: 560px) {
  .top-bar .wrap { justify-content: center; gap: 16px; flex-wrap: wrap; }
}

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 8, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 8px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--gold-lt);
}
.wordmark img { height: 100px; width: auto; display: block; }
.wordmark-text {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.3rem;
  letter-spacing: -0.01em; color: var(--gold-lt);
}
.wordmark-text span { color: var(--gold); font-style: italic; }

@media (max-width: 720px) {
  .wordmark img { height: 70px; }
}

nav.links { display: flex; gap: 28px; }
nav.links a {
  text-decoration: none; font-size: 0.92rem; color: var(--cream);
  position: relative; padding: 4px 0; opacity: 0.85;
}
nav.links a.active { color: var(--gold-lt); opacity: 1; font-weight: 500; }
nav.links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold);
}
nav.links a:hover { color: var(--gold-lt); opacity: 1; }

.nav-cta {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem;
  background: linear-gradient(180deg, var(--gold-lt), var(--gold));
  color: #17140A; padding: 10px 18px; border-radius: 3px;
  text-decoration: none; white-space: nowrap; font-weight: 500;
}
.nav-cta:hover { background: var(--gold-lt); }

@media (max-width: 720px) {
  nav.links { display: none; }
  .nav-cta { padding: 8px 12px; font-size: 0.72rem; }
  .wordmark-text { display: none; }
}

/* ---------- Ledger seam divider (signature motif) ---------- */
.ledger-seam {
  position: relative; height: 28px; margin: 0 auto; max-width: 1080px; padding: 0 32px;
}
.ledger-seam::before {
  content: ''; position: absolute; left: 32px; right: 32px; top: 50%;
  height: 1px; background: var(--line);
}
.ledger-seam::after {
  content: ''; position: absolute; left: 32px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; background: var(--gold); border-radius: 50%;
}

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.dim { background: var(--bg-alt); }
section.tight { padding: 56px 0; }
.lede { font-size: 1.15rem; color: var(--cream); max-width: 640px; opacity: 0.82; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.btn-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 3px;
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.btn-primary { background: linear-gradient(180deg, var(--gold-lt), var(--gold)); color: #17140A; }
.btn-primary:hover { background: var(--gold-lt); }
.btn-ghost { border: 1px solid var(--gold-dk); color: var(--gold-lt); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Ledger illustration ---------- */
.ledger-panel { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ledger-panel-grid { display: grid; grid-template-columns: 1fr 1fr; }
.ledger-half { padding: 22px 20px; }
.ledger-half.before { border-right: 1px dashed var(--line); }
.ledger-half h4 {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0 0 14px 0; color: var(--gold-dk);
}
.messy-row {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; color: var(--cream);
  opacity: 0.45; margin-bottom: 9px; display: flex; justify-content: space-between;
}
.messy-row:nth-child(2) { transform: rotate(-1.2deg); margin-left: 6px; }
.messy-row:nth-child(3) { transform: rotate(0.8deg); }
.messy-row:nth-child(4) { transform: rotate(-0.6deg); margin-left: 3px; }
.clean-row {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; color: var(--cream);
  margin-bottom: 9px; display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.clean-row.total {
  border-bottom: none; border-top: 1px solid var(--gold-dk); padding-top: 8px;
  font-weight: 500; color: var(--gold-lt);
}

/* ---------- Cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid.cols-4 { grid-template-columns: 1fr; } }
.card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 28px 24px; }
.card .num { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--gold); margin-bottom: 10px; }
.card p { color: var(--cream); opacity: 0.78; font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; align-items: stretch; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px;
  padding: 32px 26px; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--gold); box-shadow: 0 2px 0 var(--gold); }
.price-card h3 { margin-bottom: 4px; }
.price-tag { font-family: 'IBM Plex Mono', monospace; font-size: 2rem; color: var(--gold-lt); margin: 14px 0 4px 0; }
.price-tag span { font-size: 0.9rem; color: var(--cream); opacity: 0.6; }
.price-note { font-size: 0.82rem; color: var(--cream); opacity: 0.55; margin-bottom: 20px; }
.price-list { list-style: none; padding: 0; margin: 0 0 24px 0; flex-grow: 1; }
.price-list li {
  font-size: 0.9rem; padding: 7px 0; border-top: 1px solid var(--line);
  display: flex; gap: 8px; color: var(--cream);
}
.price-list li::before { content: '✓'; color: var(--gold); }
.price-fineprint {
  font-size: 0.8rem; color: var(--cream); opacity: 0.55; margin-top: 28px;
  border-top: 1px solid var(--line); padding-top: 18px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%; font-family: 'IBM Plex Sans', sans-serif; font-size: 0.95rem;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--bg-alt); color: var(--cream);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.contact-info dt {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold); margin-top: 20px;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 4px 0 0 0; font-size: 1.05rem; color: var(--gold-lt); }
.contact-info dd a { text-decoration: none; color: var(--gold-lt); }
.contact-info dd a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-note { font-size: 0.82rem; color: var(--cream); opacity: 0.5; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
