:root {
  --ink: #0F1C16;
  --panel: #16281F;
  --panel-2: #1C3226;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.05);
  --paper: #ECEEE0;
  --paper-ink: #16221A;
  --muted-on-paper: #5B6355;
  --gold: #C9A227;
  --gold-dim: rgba(201, 162, 39, 0.16);
  --sage: #4E8A6B;
  --text: #F2F4EC;
  --muted: #93A092;
  --disp: 'Fraunces', serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

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

::selection {
  background: var(--gold);
  color: #16221A;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== nav ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}

header.scrolled {
  background: rgba(15, 28, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1160px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--disp);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .01em;
}

.logo .mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--gold);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--disp);
  font-size: 16px;
  color: var(--gold);
}

.logo .mark::before,
.logo .mark::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: var(--gold);
}

.logo .mark::before {
  top: -1.5px;
  left: -1.5px;
  border-top: 1.5px solid var(--gold);
  border-left: 1.5px solid var(--gold);
}

.logo .mark::after {
  bottom: -1.5px;
  right: -1.5px;
  border-bottom: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
}

.logo .name b {
  color: var(--gold);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.cta-link {
  color: #16221A;
  background: var(--gold);
  padding: 10px 18px;
  font-weight: 600;
}

.nav-links a.cta-link:hover {
  background: #dab53b;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 172px 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, #122019 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-dim), transparent 68%);
  top: -320px;
  right: -160px;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(201, 162, 39, 0.35);
  padding: 7px 14px;
  margin-bottom: 28px;
}

h1 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

h1 i {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}

.hero p.lead {
  font-size: 17.5px;
  line-height: 1.68;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 38px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px 26px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: #16221A;
}

.btn-primary:hover {
  background: #dab53b;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== ledger card ===== */
.ledger {
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.ledger-head span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}

.ledger-body {
  padding: 22px;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-family: var(--mono);
  font-size: 13.5px;
}

.ledger-row span:first-child {
  color: var(--muted);
}

.ledger-row span:last-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ledger-row.neg span:last-child {
  color: #E88B7D;
}

.ledger-total {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  margin-top: 6px;
  border-top: 1px solid var(--gold);
  font-family: var(--mono);
}

.ledger-total span:first-child {
  color: var(--text);
  font-weight: 500;
  letter-spacing: .03em;
}

.ledger-total span:last-child {
  color: var(--gold);
  font-size: 19px;
  font-weight: 500;
}

.ledger-caption {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  padding: 14px 22px 18px;
  letter-spacing: .03em;
}

.stat-strip {
  margin-top: 86px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 2;
}

.stat-strip div {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-strip div b {
  display: block;
  font-family: var(--disp);
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 5px;
}

/* ===== section shared ===== */
section {
  padding: 120px 0;
}

.section-head {
  max-width: 600px;
  margin-bottom: 60px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

.paper .tag {
  color: #8a6f14;
}

h2 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 14px;
  line-height: 1.65;
}

.paper .section-head p {
  color: var(--muted-on-paper);
}

/* ===== about ===== */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}

.about-grid p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted-on-paper);
  margin-bottom: 18px;
}

.about-list {
  list-style: none;
  margin-top: 8px;
}

.about-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--paper-line, rgba(20, 20, 10, 0.12));
}

.about-list li:first-child {
  border-top: none;
}

.about-list b {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 15.5px;
  display: block;
  margin-bottom: 3px;
}

.about-list span {
  font-size: 14px;
  color: var(--muted-on-paper);
  line-height: 1.5;
}

.about-list .num {
  font-family: var(--mono);
  color: #8a6f14;
  font-size: 13px;
  min-width: 26px;
}

/* ===== services ===== */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.svc-card {
  background: var(--ink);
  padding: 36px 30px;
  transition: background .2s;
}

.svc-card:hover {
  background: var(--panel);
}

.svc-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 22px;
}

.svc-card h3 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
}

.svc-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* ===== process ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.process-step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.process-step .step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: .05em;
  margin-bottom: 18px;
  display: block;
}

.process-step h3 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 12px;
}

.process-step p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

/* ===== cta ===== */
.cta-section {
  background: linear-gradient(160deg, #1C3226 0%, #0F1C16 65%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-dim), transparent 70%);
  bottom: -320px;
  left: -140px;
}

.cta-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.cta-grid h2 {
  margin-bottom: 16px;
}

.cta-grid p {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 8px;
  max-width: 440px;
}

.contact-info {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-info a,
.contact-info div {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
}

.contact-info a:hover {
  color: var(--gold);
}

.cform {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px;
}

.cform label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cform input,
.cform textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
}

.cform input::placeholder,
.cform textarea::placeholder {
  color: #5c6b62;
}

.cform textarea {
  resize: vertical;
  min-height: 90px;
}

.cform .btn {
  width: 100%;
  justify-content: center;
}

/* ===== footer ===== */
footer {
  padding: 60px 0 36px;
  background: #0A140F;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 44px;
}

.footer-grid h5 {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--gold);
}

.footer-grid p,
.footer-grid a {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.85;
  display: block;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all .2s;
}

.footer-socials a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #5c6b62;
}

.footer-bottom a:hover {
  color: var(--gold);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width:900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .ledger {
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 26px;
  }
}

@media (max-width:640px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 78%;
    max-width: 300px;
    background: var(--panel);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 28px;
    gap: 24px;
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .menu-btn {
    display: block;
  }

  .svc-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 80px 0;
  }

  .hero {
    padding-top: 140px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Ledger typing animation ===== */
.ledger-row, .ledger-total{
  opacity:0;
  transform:translateY(6px);
  transition:opacity .3s ease, transform .3s ease;
}
.ledger-row.in, .ledger-total.in{
  opacity:1;
  transform:none;
}
.ledger-cursor{
  display:inline-block;
  width:7px;
  height:14px;
  background:var(--gold, #C9A227);
  vertical-align:-2px;
  margin-left:5px;
  animation: ledgerBlink 1s steps(1) infinite;
}
@keyframes ledgerBlink{
  50%{ opacity:0; }
}

@media (prefers-reduced-motion: reduce){
  .ledger-row, .ledger-total{ opacity:1; transform:none; transition:none; }
  .ledger-cursor{ animation:none; }
}