:root {
  /* Palette: near-black surfaces, warm cream text, gold accent */
  --bg: #07090c;
  --surface: #0f1218;
  --surface-2: #161a22;
  --ink: #f1eadc;
  --ink-soft: #d9d1bf;
  --muted: #8a8676;
  --gold: #be9a40;
  --gold-light: #cdae54;
  --gold-pale: #dcc47c;
  --gold-dark: #977730;
  --gold-tint: #2a2517;
  --rule: rgba(241, 234, 220, 0.1);
  --rule-strong: rgba(241, 234, 220, 0.18);
  --rule-gold: rgba(190, 154, 64, 0.35);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: var(--sans);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; }
h1 em, h2 em, .logo-text em, .footer-mark em { font-style: italic; color: var(--gold-light); }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em; color: var(--gold);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(190,154,64,.15); }

.index {
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
  letter-spacing: .1em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 9, 12, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--gold); color: var(--gold-light);
  font-family: var(--serif); font-size: 1.15rem; line-height: 1;
}
.logo-text { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { text-decoration: none; font-size: .94rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a.btn { color: var(--bg); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: var(--radius); border: 1px solid var(--gold);
  background: var(--gold); color: var(--bg);
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-small { padding: 9px 18px; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold-light); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  padding: 104px 0 0;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
/* Graph-paper grid + gold glow */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -200px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(190,154,64,.16), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; font-weight: 400;
  letter-spacing: -0.025em; margin: 22px 0 26px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* Ledger panel / chart */
.ledger-panel {
  background: linear-gradient(180deg, rgba(22,26,34,.92), rgba(15,18,24,.92));
  border: 1px solid var(--rule-strong); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(241,234,220,.05);
}
.panel-head, .panel-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; font-family: var(--mono); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.panel-head { border-bottom: 1px solid var(--rule); }
.panel-foot { border-top: 1px solid var(--rule); text-transform: none; letter-spacing: .02em; font-size: .8rem; }
.panel-tag { color: var(--gold); border: 1px solid var(--rule-gold); padding: 3px 8px; border-radius: 2px; }
.growth-chart { width: 100%; height: auto; padding: 10px 6px 0; }
.chart-grid line { stroke: var(--rule); stroke-dasharray: 3 5; }
.chart-line { fill: none; stroke: var(--gold-light); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.chart-nodes circle { fill: var(--bg); stroke: var(--gold-light); stroke-width: 2; }
.chart-nodes .node-final { fill: var(--gold-light); }
.chart-nodes text { fill: var(--ink-soft); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-anchor: middle; }
.chart-nodes g:first-child text { text-anchor: start; }

.js .chart-line { stroke-dashoffset: 1; }
.js .chart-area, .js .chart-nodes g { opacity: 0; }
.js .ledger-panel.in .chart-line { animation: draw 1.8s var(--ease) .3s forwards; }
.js .ledger-panel.in .chart-area { animation: fade 1.2s ease 1.2s forwards; }
.js .ledger-panel.in .chart-nodes g { animation: fade .5s ease forwards; animation-delay: calc(.5s + var(--i) * .38s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Channels strip */
.channels {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px;
  margin-top: 88px; padding: 26px 0; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
}
.channels li { display: flex; align-items: center; gap: 12px; }
.channels li::before { content: ""; width: 5px; height: 5px; background: var(--gold-dark); transform: rotate(45deg); }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head {
  display: grid; grid-template-columns: 80px 1fr; gap: 24px; align-items: start;
  padding-top: 22px; margin-bottom: 64px;
  border-top: 1px solid var(--rule-gold);
}
.section-head .index { padding-top: 4px; }
.section-head h2 { margin-top: 12px; max-width: 760px; }

/* Services ledger */
.ledger {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px;
  margin-left: 104px;
}
.ledger li {
  position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 16px;
  padding: 30px 0; border-bottom: 1px solid var(--rule);
}
.ledger li:nth-child(-n+2) { border-top: 1px solid var(--rule); }
.ledger li::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: var(--gold); transition: width .5s var(--ease);
}
.ledger li:hover::after { width: 100%; }
.ledger-no { font-family: var(--mono); font-size: .85rem; color: var(--gold); padding-top: 3px; }
.ledger h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; margin-bottom: 8px; transition: color .3s; }
.ledger li:hover h3 { color: var(--gold-pale); }
.ledger p { color: var(--muted); max-width: 440px; }

/* Process timeline */
.timeline {
  list-style: none; position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin-left: 104px;
}
.timeline::before {
  content: ""; position: absolute; top: 22px; left: 22px; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--rule-gold) 70%, transparent);
}
.timeline li { position: relative; padding-right: 8px; }
.t-node {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 26px;
  background: var(--surface); border: 1px solid var(--gold);
  font-family: var(--mono); font-size: .9rem; color: var(--gold-light);
}
.timeline li:last-child .t-node { background: var(--gold); color: var(--bg); }
.timeline h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.timeline p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; margin-left: 104px; align-items: start; }
.pull { position: relative; padding-left: 28px; border-left: 2px solid var(--gold); }
.pull p {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.3; color: var(--ink);
}
.about-copy p { color: var(--muted); font-size: 1.04rem; }
.about-copy p + p { margin-top: 18px; }

.principles {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 80px 0 0 104px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.principles li { padding: 30px 28px; }
.principles li + li { border-left: 1px solid var(--rule); }
.principles li:first-child { padding-left: 0; }
.p-label { display: block; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); margin-bottom: 10px; }
.principles strong { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--ink); line-height: 1.3; }

/* Contact */
.section-contact {
  position: relative; isolation: isolate;
  background: var(--surface-2); border-top: 1px solid var(--rule-gold);
}
.section-contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 0% 100%, rgba(190,154,64,.1), transparent 70%);
}
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
.contact-copy .index { display: block; margin-bottom: 18px; }
.contact-copy h2 { margin: 14px 0 22px; }
.contact-copy > p { color: var(--ink-soft); max-width: 440px; }
.contact-meta { margin-top: 40px; border-top: 1px solid var(--rule); }
.contact-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.contact-meta dt { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding-top: 3px; }
.contact-meta dd { color: var(--ink); }
.contact-meta a { color: var(--gold-light); text-decoration: none; border-bottom: 1px solid var(--rule-gold); transition: border-color .2s; }
.contact-meta a:hover { border-color: var(--gold-light); }

.form {
  display: grid; gap: 20px; padding: 36px;
  background: var(--bg); border: 1px solid var(--rule-strong); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form label {
  display: grid; gap: 8px;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
}
.optional { text-transform: none; letter-spacing: 0; color: var(--muted); opacity: .8; }
.form input, .form textarea {
  font: inherit; font-family: var(--sans); font-size: 1rem; text-transform: none; letter-spacing: 0;
  color: var(--ink); background: var(--surface); width: 100%;
  padding: 13px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.form input:hover, .form textarea:hover { border-color: rgba(241,234,220,.28); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
.form textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-size: .95rem; font-weight: 500; }
.form-status.ok { color: #6cc28f; }
.form-status.err { color: #ff6568; }

/* ---------- Footer ---------- */
.site-footer { background: #000; border-top: 1px solid var(--rule); padding: 64px 0 28px; font-size: .9rem; color: var(--muted); }
.footer-top { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 28px; padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
.footer-mark { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-links a, .footer-bottom a { text-decoration: none; transition: color .2s; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--gold-light); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; }

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.not-found .index { display: block; margin-bottom: 18px; }
.not-found h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--gold-light); }
.not-found p { color: var(--muted); margin: 16px 0 32px; font-size: 1.1rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .chart-line { stroke-dashoffset: 0; animation: none !important; }
  .js .chart-area, .js .chart-nodes g { opacity: 1; animation: none !important; }
  .ledger li::after { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .ledger-panel { max-width: 560px; }
  .ledger, .timeline, .about, .principles { margin-left: 0; }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .timeline::before { display: none; }
  .contact { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px 24px 22px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--rule); }
  .nav-links a.btn { margin-top: 14px; border-bottom: 1px solid var(--gold); }

  .hero { padding-top: 72px; }
  .channels { margin-top: 64px; justify-content: flex-start; gap: 12px 22px; }
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 44px; }

  .ledger { grid-template-columns: 1fr; }
  .ledger li:nth-child(2) { border-top: 0; }
  .ledger li { grid-template-columns: 40px 1fr; }

  .timeline {
    grid-template-columns: 1fr; gap: 36px; padding-left: 0;
  }
  .timeline::before {
    display: block; top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--gold), var(--rule-gold) 80%, transparent);
  }
  .timeline li { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .timeline .t-node { grid-row: span 2; margin-bottom: 0; }

  .about { grid-template-columns: 1fr; gap: 36px; }
  .principles { grid-template-columns: 1fr; margin-top: 56px; }
  .principles li { padding: 24px 0; }
  .principles li + li { border-left: 0; border-top: 1px solid var(--rule); }

  .form { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-meta div { grid-template-columns: 1fr; gap: 4px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
