:root {
  --ink: #0f1b2a;
  --ink-soft: #3b4756;
  --muted: #6b7684;
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --line: #dcd7cb;
  --accent: #b9823a;
  --accent-soft: #d9a45b;
  --accent-text: #8f6224;
  --card: #fffdf9;
  --max: 1120px;
  --prose: 700px;
  --serif: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Preview banner (pull-request builds only) ---------- */
.preview-bar { background: var(--accent-soft); color: var(--ink); text-align: center; font-size: 14px; font-weight: 500; padding: 8px 16px; }
.preview-bar a { color: var(--ink); margin-left: 8px; text-underline-offset: 3px; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
header.nav.scrolled, header.nav.open { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper) !important;
  text-decoration: none; font-weight: 500; font-size: 15px;
  transition: transform .15s, background .15s;
}
.btn:hover { background: #1c2d42; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn svg { flex: none; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { color: var(--accent-text); }

/* ---------- Home hero ---------- */
.hero { padding: 104px 0 96px; position: relative; overflow: hidden; }
.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(42px, 6.4vw, 80px); line-height: 1.04; letter-spacing: -.02em;
  margin: 24px 0 28px; max-width: 14ch;
}
.hero h1 em, .page-hero h1 em { font-style: italic; color: var(--accent); font-weight: 300; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-soft); max-width: 58ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero-art { position: absolute; right: -120px; top: 40px; width: 560px; height: 560px; pointer-events: none; opacity: .9; }
.pillars {
  display: flex; gap: 28px; margin-top: 72px; padding-top: 28px;
  border-top: 1px solid var(--line); flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.pillars span { display: inline-flex; align-items: center; gap: 10px; }
.pillars span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 88px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(38px, 5.2vw, 64px); line-height: 1.06; letter-spacing: -.02em;
  margin: 20px 0 22px; max-width: 20ch;
}
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-underline-offset: 3px; }

/* ---------- Sections ---------- */
section { padding: 112px 0; }
section.tight { padding: 80px 0; }
.section-head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: end; margin-bottom: 64px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.1; letter-spacing: -.015em; margin-top: 16px;
}
.section-head p { color: var(--ink-soft); font-size: 18px; max-width: 52ch; }
.section-foot { margin-top: 40px; }
.surface { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); padding: 40px 34px 36px; display: flex; flex-direction: column; transition: background .2s; text-decoration: none; }
a.card:hover { background: var(--paper); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; margin-bottom: 28px; }
.card .icon svg { width: 22px; height: 22px; stroke: var(--accent-soft); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin-bottom: 12px; }
.card p { color: var(--ink-soft); margin-bottom: 20px; }
.card .meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.card .more { margin-top: auto; font-size: 15px; font-weight: 500; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.card ul { list-style: none; margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.card li { font-size: 15px; color: var(--ink-soft); padding: 5px 0 5px 22px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 1px; background: var(--accent); }

/* Service list rows (services index) */
.service-rows { border-top: 1px solid var(--line); }
.service-row { display: grid; grid-template-columns: 64px 1fr 1.4fr auto; gap: 32px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.service-row:hover h2 { color: var(--accent-text); }
.service-row .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; }
.service-row .icon svg { width: 22px; height: 22px; stroke: var(--accent-soft); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-row h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; transition: color .15s; }
.service-row .best { display: block; font-family: "Inter", sans-serif; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.service-row p { color: var(--ink-soft); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 1px solid var(--ink); padding-top: 24px; }
.step .num { font-family: var(--serif); font-size: 15px; color: var(--accent-text); letter-spacing: .06em; }
.step h3, .step h4 { font-size: 19px; font-weight: 600; margin: 12px 0 10px; }
.step p { color: var(--ink-soft); font-size: 16px; }

/* Dark band */
.band { background: var(--ink); color: var(--paper); }
.band .eyebrow { color: var(--accent-soft); }
.band .section-head p { color: #b8c0ca; }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #26374c; border: 1px solid #26374c; border-radius: 18px; overflow: hidden; }
.principle { background: var(--ink); padding: 40px 36px; }
.principle h3, .principle h4 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin-bottom: 10px; }
.principle p { color: #b8c0ca; }

/* CTA */
.cta { text-align: center; }
.cta h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -.02em;
  max-width: 18ch; margin: 20px auto 24px;
}
.cta h2 em { font-style: italic; color: var(--accent); }
.cta p { color: var(--ink-soft); font-size: 18px; max-width: 50ch; margin: 0 auto 36px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Two-column content (service pages, articles) ---------- */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 72px; align-items: start; padding: 72px 0 96px; }
.aside { position: sticky; top: 104px; display: grid; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; }
.panel h2, .panel h3 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.panel dl { display: grid; gap: 14px; }
.panel dt { font-size: 13px; color: var(--muted); }
.panel dd { font-size: 15px; color: var(--ink); }
.panel ul { list-style: none; display: grid; gap: 10px; }
.panel li a { font-size: 15px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.panel li a:hover { border-color: var(--accent); }
.panel .btn { width: 100%; justify-content: center; margin-top: 6px; }
.panel p { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }

/* ---------- Prose ---------- */
.prose { max-width: var(--prose); font-size: 18px; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.2; color: var(--ink); margin-top: 1.9em; letter-spacing: -.01em; }
.prose h3 { font-size: 20px; font-weight: 600; color: var(--ink); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-text); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 22px; font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-size: .9em; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.prose .callout { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: var(--prose); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-text); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); margin-top: 12px; }

/* ---------- Insights ---------- */
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(15, 27, 42, .35); border-color: #cfc8b9; }
.post-card:hover h3 { color: var(--accent-text); }
.post-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.post-cover svg, .post-cover img, .post-banner svg, .post-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 26px 28px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card .meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.post-card h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.25; margin-bottom: 12px; transition: color .15s; }
.post-card p { color: var(--ink-soft); font-size: 16px; }
.post-card .date { margin-top: auto; padding-top: 20px; font-size: 14px; color: var(--muted); }
.post-banner { margin: 48px 0 0; aspect-ratio: 16 / 5; border-radius: 18px; overflow: hidden; background: var(--ink); }
.post-banner.is-photo { aspect-ratio: 16 / 7; }
.post-banner.is-photo img { object-position: 50% 30%; }
.post-banner + .content-grid { padding-top: 56px; }
.post-meta { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.post-meta span + span::before { content: "·"; margin-right: 22px; color: var(--line); }
.empty { color: var(--muted); }

/* ---------- Founder / stats / work ---------- */
.founder { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 72px; align-items: center; }
.founder-photo img { display: block; width: 100%; height: auto; border-radius: 18px; background: var(--paper-2); }
.founder-role { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px !important; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stats > div { border-top: 1px solid var(--ink); padding-top: 22px; }
.stats strong { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -.01em; }
.stats span { display: block; margin-top: 8px; color: var(--ink-soft); }
.client-list { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 56px; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.8vw, 34px); color: var(--ink); }
.client-note { margin-top: 28px; color: var(--muted); }
.client-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.client-grid li { background: var(--card); padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 10px; }
.client-grid strong { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--ink); }
.client-grid span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.examples { display: grid; gap: 24px; }
.example { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 40px 40px 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px 56px; }
.example .meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.example h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; margin: 12px 0 10px; }
.example-client { color: var(--muted); font-weight: 500; }
.example-body { display: grid; gap: 18px; }
.example-body dt { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.example-body dd { color: var(--ink-soft); }
.example-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.example-links a { font-size: 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); }
.example-links a:hover { background: var(--paper); }
.trust { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; }
.trust .label { font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.trust ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 36px; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.byline img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.byline .who { display: grid; line-height: 1.35; }
.byline .who strong { color: var(--ink); font-weight: 600; font-size: 15px; }
.byline .who span { font-size: 14px; color: var(--muted); }
.author-panel { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.author-panel img { width: 56px; height: 56px; border-radius: 50%; }

/* ---------- Footer ---------- */
footer.site-foot { border-top: 1px solid var(--line); padding: 64px 0 36px; font-size: 15px; color: var(--muted); background: var(--card); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.foot-grid h2 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.foot-grid ul { list-style: none; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--ink-soft); }
.foot-grid a:hover { color: var(--ink); }
.foot-grid img { height: 22px; width: auto; margin-bottom: 16px; display: block; }
.foot-grid p { max-width: 34ch; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; }
.foot-base a { color: var(--muted); }
.foot-legal { margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 90ch; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .content-grid { grid-template-columns: 1fr; gap: 48px; }
  .aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .service-row { grid-template-columns: 56px 1fr auto; }
  .service-row p { grid-column: 2 / -1; }
}
@media (max-width: 960px) {
  .founder { grid-template-columns: 1fr; gap: 40px; }
  .founder-photo { max-width: 420px; }
  .example { grid-template-columns: 1fr; padding: 32px 28px 28px; }
  .client-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { opacity: .35; right: -220px; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .menu-toggle { display: inline-block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
  }
  header.nav.open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links .btn { margin-top: 16px; justify-content: center; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .btn { padding: 11px 18px; }
  .hero { padding: 64px 0 72px; }
  .hero-art { display: none; }
  .page-hero { padding: 56px 0 44px; }
  section { padding: 80px 0; }
  section.tight { padding: 56px 0; }
  .steps, .principles, .grid-2, .post-list { grid-template-columns: 1fr; }
  .post-banner { aspect-ratio: 16 / 9; margin-top: 32px; }
  .card, .principle { padding: 30px 24px; }
  .pillars { gap: 14px 22px; margin-top: 56px; }
  .content-grid { padding: 48px 0 72px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 27px; }
  .service-row { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  .service-row p { grid-column: auto; }
  .client-grid { grid-template-columns: 1fr; }
  .service-row .link-arrow { justify-self: start; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
}
