/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Color — ledger ink, aged paper, brass, and a single ledger-green accent */
  --ink: #14213D;
  --ink-soft: #2A3B63;
  --paper: #F5EFE2;
  --paper-deep: #EBE1CC;
  --brass: #9C7A3C;
  --brass-light: #BFA06A;
  --ledger-green: #2F5233;
  --charcoal: #22231F;
  --charcoal-soft: #4A473E;
  --rule: #C9BFA6;
  --rule-strong: #A99C7C;
  --white: #FFFCF6;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  /* Scale */
  --step-1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --step0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step2: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step3: clamp(2.5rem, 2rem + 2.2vw, 4rem);

  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--step0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ==========================================================================
   Signature motif — the accounting double rule (used under totals/headlines)
   ========================================================================== */
.ledger-rule {
  border: none;
  border-top: 1.5px solid var(--charcoal);
  border-bottom: 3px solid var(--charcoal);
  height: 0;
  margin: 0.35rem 0 0;
  width: 100%;
}
.ledger-rule.brass {
  border-top-color: var(--brass);
  border-bottom-color: var(--brass);
}
.ledger-rule.on-dark {
  border-top-color: var(--paper);
  border-bottom-color: var(--paper);
}
.ledger-rule.short { width: 3.5rem; }

/* eyebrow labels styled like a ledger account code */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.4em;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 226, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.wordmark span {
  color: var(--brass);
  font-style: italic;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step-1);
}
.nav-links a {
  text-decoration: none;
  color: var(--charcoal-soft);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--ink);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { background: var(--ledger-green); border-color: var(--ledger-green); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-block; }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 1.5rem;
    gap: 1rem;
  }
  .site-header.open .nav-cta {
    display: inline-block;
    margin: 0 1.5rem 1.25rem;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 5rem 0 6rem;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--step3);
  line-height: 1.05;
  margin: 0.9rem 0 1.2rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--ledger-green);
  font-weight: 400;
}
.hero p.lede {
  font-size: var(--step1);
  color: var(--charcoal-soft);
  max-width: 46ch;
  margin: 0 0 2rem;
}

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ledger-green); border-color: var(--ledger-green); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-deep); }

/* Ledger card — the signature hero visual: a small styled financial statement */
.ledger-card {
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 6px 6px 0 var(--paper-deep), 6px 6px 0 1px var(--rule);
  padding: 1.75rem 1.75rem 1.5rem;
}
.ledger-card .lc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--charcoal-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lc-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--step-1);
  padding: 0.45rem 0;
  color: var(--charcoal);
  border-bottom: 1px dotted var(--rule);
}
.lc-row span:first-child { color: var(--charcoal-soft); }
.lc-row .num { font-variant-numeric: tabular-nums; }
.lc-row .num.neg { color: #8B3A3A; }
.lc-row .num.pos { color: var(--ledger-green); }
.lc-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-weight: 600;
  padding-top: 0.75rem;
  margin-top: 0.35rem;
}
.lc-total .num { font-variant-numeric: tabular-nums; color: var(--ledger-green); }
.lc-caption {
  font-size: var(--step-1);
  color: var(--charcoal-soft);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 2.25rem 0;
}
.trust-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (max-width: 700px) {
  .trust-strip .wrap { grid-template-columns: repeat(2, 1fr); }
}
.trust-stat .num {
  font-family: var(--font-display);
  font-size: var(--step2);
  color: var(--brass-light);
  display: block;
}
.trust-stat .label {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--paper-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Section shell
   ========================================================================== */
section { padding: 5.5rem 0; }
.section-head { max-width: 60ch; margin-bottom: 3rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--step2);
  color: var(--ink);
  margin: 0.7rem 0 0.9rem;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--charcoal-soft); margin: 0; font-size: var(--step0); }
.alt { background: var(--paper-deep); }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service-card {
  background: var(--paper);
  padding: 2.25rem 2rem;
}
.alt .service-card { background: var(--paper-deep); }
.service-card .code {
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: var(--step-1);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--step1);
  color: var(--ink);
  margin: 0.5rem 0 0.9rem;
}
.service-card ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step-1);
  color: var(--charcoal-soft);
}
.service-card li {
  padding: 0.4rem 0;
  border-top: 1px dotted var(--rule);
}
.service-card li:first-child { border-top: none; }

/* ==========================================================================
   Process (numbered — this content is a genuine ordered sequence)
   ========================================================================== */
.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.process-item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.process-item:last-child { border-bottom: 1px solid var(--rule); }
.process-item .step-num {
  font-family: var(--font-mono);
  font-size: var(--step1);
  color: var(--brass);
}
.process-item h3 {
  font-family: var(--font-display);
  font-size: var(--step1);
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.process-item p { margin: 0; color: var(--charcoal-soft); }

/* ==========================================================================
   Results / case studies
   ========================================================================== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
}
.result-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 1.75rem;
}
.result-card .sector {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--charcoal-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-shift {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 1.1rem 0 0.3rem;
  font-family: var(--font-mono);
}
.result-shift .from { color: var(--charcoal-soft); text-decoration: line-through; font-size: var(--step0); }
.result-shift .to { color: var(--ledger-green); font-size: var(--step1); font-weight: 600; }
.result-card .metric-label {
  font-size: var(--step-1);
  color: var(--charcoal-soft);
  margin-bottom: 0.5rem;
}
.result-card p.detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--rule);
  color: var(--charcoal-soft);
  font-size: var(--step-1);
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}
.credential-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: var(--step-1);
}
.credential-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-top: 1px dotted var(--rule);
  color: var(--charcoal-soft);
}
.credential-list li:first-child { border-top: none; }
.credential-list li span:last-child { color: var(--ink); }

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: var(--step2);
  margin: 0.8rem 0 1.5rem;
}
.cta-banner .eyebrow { color: var(--brass-light); }
.cta-banner .eyebrow::before { background: var(--brass-light); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info dl {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  margin: 1.5rem 0 0;
}
.contact-info dt { color: var(--charcoal-soft); margin-top: 1rem; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
.contact-info dd { margin: 0.2rem 0 0; color: var(--ink); font-size: var(--step0); }

form.contact-form {
  display: grid;
  gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--charcoal-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: var(--step0);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule-strong);
  background: var(--white);
  color: var(--charcoal);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: var(--step-1); color: var(--charcoal-soft); margin-top: -0.3rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  background: var(--paper-deep);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--step-1);
  color: var(--charcoal-soft);
}
.site-footer a { text-decoration: none; color: var(--charcoal-soft); }
.site-footer a:hover { color: var(--ink); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
