:root {
  --ink: #111110;
  --ink-soft: #1C1B19;
  --paper: #F1ECE2;
  --paper-deep: #E4DDCF;
  --text-on-ink: #F1ECE2;
  --muted-on-ink: #9C978C;
  --muted-on-paper: #5E5A52;
  --accent: #D2462B;
  --rule-on-ink: #2A2926;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: 72px;
  /* Vertical rhythm scales with screen height so every section fits one fold */
  --pad-y: clamp(40px, 7vh, 72px);
  --gap-lg: clamp(28px, 5vh, 48px);
  --gap-md: clamp(16px, 3vh, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text-on-ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
i { font-style: italic; }

.ink { background: var(--ink); color: var(--text-on-ink); --muted: var(--muted-on-ink); --fg: var(--text-on-ink); }
.paper { background: var(--paper); color: var(--ink); --muted: var(--muted-on-paper); --fg: var(--ink); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow, .section-label, .note, .kicker, .caption-bar, .footer-bottom, .museum-meta, .ts, .svc-tags, .axis {
  font-family: var(--mono); text-transform: uppercase; color: var(--muted);
}
.eyebrow, .section-label { font-size: 13px; letter-spacing: 2px; }
.note { font-size: 12px; letter-spacing: 2px; }
.kicker { font-size: 12px; letter-spacing: 1.5px; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff; font: 600 16px/1 var(--body);
  padding: 18px 28px; border-radius: 999px; transition: background .2s, transform .2s;
}
.btn-primary svg { width: 18px; height: 18px; transition: transform .2s; }
.btn-primary:hover { background: #B93A21; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary.lg { font-size: 17px; padding: 20px 32px; }
.btn-outline {
  font: 500 14px/1 var(--body); color: var(--text-on-ink);
  border: 1px solid var(--text-on-ink); border-radius: 999px; padding: 13px 19px;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--text-on-ink); color: var(--ink); }

/* Hero: exactly one screen; the portrait ends at the CTA row */
.hero { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100svh; min-height: 600px; max-height: 960px; }
.nav {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vh, 32px) var(--gutter); background: var(--ink);
}
.wordmark { display: flex; align-items: center; gap: 14px; font: 26px/1 var(--display); color: var(--text-on-ink); }
.wordmark-mark { width: 29px; height: 28px; color: var(--text-on-ink); }
.nav-links { display: flex; gap: 40px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a { font-size: 14px; color: var(--muted-on-ink); transition: color .2s; }
.nav-links a:hover { color: var(--text-on-ink); }

.hero-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 40%; }
.hero-copy { padding: clamp(16px, 3vh, 40px) var(--gutter) clamp(24px, 5vh, 56px); display: flex; flex-direction: column; justify-content: center; }
.hero-title {
  font: 400 clamp(80px, min(11vw, 21vh), 168px)/0.86 var(--display); letter-spacing: -0.022em;
  color: var(--text-on-ink); margin: clamp(16px, 3vh, 32px) 0 clamp(20px, 4vh, 40px);
}
.hero-sub { max-width: 480px; font-size: clamp(16px, 2.3vh, 19px); line-height: 1.5; color: var(--muted-on-ink); }
.hero-ctas { display: flex; align-items: center; gap: 24px; margin-top: clamp(20px, 4vh, 40px); flex-wrap: wrap; }
.link-secondary { font-size: 15px; color: var(--text-on-ink); }
.link-secondary:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-portrait { position: relative; overflow: hidden; }
.hero-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; }
.hero-portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--ink) 0, rgba(17,17,16,0) 160px);
}
.caption-bar {
  display: flex; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter); border-top: 1px solid var(--rule-on-ink);
  font-size: 12px; letter-spacing: 1.5px;
}

/* Sections */
.section { padding: var(--pad-y) 0; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 0; }
.split.align-center { align-items: center; }
.split.align-end { align-items: end; }
.section-no { font: clamp(56px, 9vh, 80px)/0.9 var(--display); color: var(--fg); }
.section-label { margin-top: 16px; }
.title { font: 400 clamp(40px, min(4.2vw, 7.5vh), 60px)/1.04 var(--display); letter-spacing: -1px; color: var(--fg); }
.body { font-size: 17px; line-height: 1.6; color: var(--muted); }
.lede { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.lede.small { font-size: 17px; line-height: 1.6; }

/* I — body copy and Napier's Bones side by side */
.story-row { margin-top: var(--gap-md); display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: start; }
.bones { position: relative; background: #000; height: clamp(180px, 28vh, 260px); overflow: hidden; }
.bones img { width: 100%; height: 100%; object-fit: cover; }
.museum-label {
  position: absolute; left: 16px; bottom: 16px; max-width: 320px;
  background: #F7F5EF; border: 1px solid #D9D2C3; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.museum-title { font: italic 19px/1.1 var(--display); color: var(--ink); }
.museum-meta { font-size: 10px; letter-spacing: 1px; line-height: 1.5; color: var(--muted-on-paper); }

.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.sub-title { font: 400 clamp(28px, 4.4vh, 36px)/1.1 var(--display); color: var(--fg); }

/* Journey */
.journey { margin-top: var(--gap-lg); }
.journey .row-head { padding-bottom: 14px; border-bottom: 2px solid rgba(17,17,16,.55); }
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; margin-top: 16px; }
.figure { height: clamp(64px, 11vh, 96px); display: flex; align-items: center; }
.dot {
  flex: none; width: calc(var(--s) * .66); height: calc(var(--s) * .66); border-radius: 50%; background: var(--c);
  display: grid; place-items: center; color: var(--paper);
}
.dot svg { width: 46%; height: 46%; }
.connector { flex: 1; height: 1px; background: var(--ink); opacity: .5; }
.stop .kicker { margin-top: 12px; }
.stop-head { margin-top: 8px; font: 400 26px/1.05 var(--display); color: var(--ink); }
.stop-desc { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted-on-paper); }

/* II — Log ruler */
.log-ruler { margin-top: var(--gap-lg); }
.ruler {
  margin-top: 16px; display: flex; justify-content: space-between;
  border-top: 2px solid var(--text-on-ink);
}
.tick { position: relative; display: flex; flex-direction: column; gap: 14px; padding-top: 30px; color: var(--text-on-ink); }
.tick::before {
  content: ""; position: absolute; top: 0; left: 0; width: 2px; height: 18px; background: currentColor;
}
.tick.end { align-items: flex-end; }
.tick.end::before { left: auto; right: 0; }
.tv { font: clamp(32px, 5vh, 44px)/1 var(--display); }
.ts { font-size: 11px; letter-spacing: 2px; color: inherit; }
.tick.dim { color: #76705F; }

.doublings { margin-top: var(--gap-lg); padding-top: var(--gap-md); border-top: 1px solid var(--rule-on-ink); }
.big-20 { font: clamp(96px, 17vh, 150px)/0.85 var(--display); letter-spacing: -4px; color: var(--text-on-ink); }
.doublings-line { font: clamp(30px, 5vh, 42px)/1.1 var(--display); color: var(--text-on-ink); max-width: 880px; }
.dots { margin-top: var(--gap-md); display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; padding: 0 16px; }
.dots .d { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dots .c { border-radius: 50%; transform: scale(0); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.dots.in .c { transform: scale(1); }
.dots .v { font: 11px/1 var(--mono); color: var(--muted-on-ink); }
.dots .v.on { color: var(--text-on-ink); }

/* III — Charts */
.charts { margin-top: var(--gap-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.chart { background: var(--paper-deep); border-radius: 6px; padding: 24px 32px; display: flex; flex-direction: column; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; }
.chart-head h3 { font: 400 28px/1.1 var(--display); }
.bars {
  margin-top: 16px; height: clamp(160px, 30vh, 280px); display: flex; align-items: flex-end; gap: 6px;
  border-bottom: 1px solid var(--ink);
}
.bars span { flex: 1; background: #B9B0A0; height: 0; transition: height .7s cubic-bezier(.2,.8,.2,1); }
.bars span.mark { background: #6E685D; }
.bars span.last { background: var(--ink); }
.axis { margin-top: 12px; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1px; }
.axis span:nth-child(2) { margin-left: -40px; }
.chart figcaption { margin-top: 14px; font: 24px/1.2 var(--display); }

/* IV — Services */
.services { margin-top: var(--gap-lg); border-top: 1px solid var(--rule-on-ink); }
.services li {
  display: grid; grid-template-columns: 320px 1fr auto; align-items: center; gap: 24px;
  padding: clamp(16px, 3vh, 26px) 0; border-bottom: 1px solid var(--rule-on-ink);
}
.svc-name { display: flex; align-items: flex-start; gap: 18px; }
.svc-name i { width: 22px; font: italic 24px/1 var(--display); color: var(--muted-on-ink); }
.svc-name span { font: clamp(36px, 6vh, 48px)/1 var(--display); color: var(--text-on-ink); }
.svc-desc { font-size: 19px; line-height: 1.5; color: var(--text-on-ink); }
.svc-tags { font-size: 12px; letter-spacing: 1.5px; color: var(--text-on-ink); text-align: right; }

/* V — Formula */
.formula {
  margin-top: var(--gap-md); background: var(--paper-deep); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 28px;
  font: clamp(48px, min(7vw, 13vh), 104px)/1 var(--display); color: var(--ink); padding: clamp(20px, 3.5vh, 36px) 24px;
}
.formula .op { color: var(--muted-on-paper); }
.formula sup { font-size: .55em; margin-left: -16px; align-self: flex-start; }
.formula-key { margin-top: var(--gap-md); display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 56px; font-size: 15px; color: var(--muted-on-paper); }
.formula-key span { display: flex; align-items: baseline; gap: 12px; }
.formula-key i { font: italic 28px/1 var(--display); color: var(--ink); }
.steps { margin-top: var(--gap-md); display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 16px; }
.steps .sym { display: block; font: italic clamp(40px, 6vh, 56px)/1 var(--display); }
.steps .kicker { margin-top: 12px; }
.steps h3 { margin-top: 8px; font: 400 28px/1.1 var(--display); }
.steps h3 + p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted-on-paper); }

/* Closing */
.closing { padding: clamp(64px, 12vh, 112px) 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing-title { margin-top: 24px; font: 400 clamp(56px, min(7.8vw, 13vh), 104px)/0.95 var(--display); letter-spacing: -3px; }
.closing-sub { margin-top: 24px; font-size: 18px; line-height: 1.55; color: var(--muted-on-paper); }
.closing .btn-primary { margin-top: 32px; }

/* Footer */
.footer { padding: clamp(48px, 9vh, 80px) 0 32px; }
.footer-top { display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding-bottom: clamp(40px, 7vh, 64px); }
.footer-top span { font: clamp(64px, 12vh, 104px)/0.85 var(--display); letter-spacing: -2px; }
.footer-mark { width: 84px; height: 80px; color: var(--text-on-ink); margin-bottom: 4px; }
.footer-bottom { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--rule-on-ink); font-size: 12px; letter-spacing: 1.5px; }

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

/* Responsive */
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .nav-links { display: none; }
  .split { grid-template-columns: 200px 1fr; }
  .services li { grid-template-columns: 1fr 1fr; }
  .svc-tags { grid-column: 1 / -1; text-align: left; }
  .track { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .connector { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .story-row { grid-template-columns: 1fr; gap: 24px; }
  .footer-top span { font-size: 80px; }
  .footer-mark { width: 64px; height: 62px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --pad-y: 64px; --gap-lg: 40px; --gap-md: 24px; }
  .nav { padding: 18px var(--gutter); }
  .wordmark { font-size: 22px; }
  .btn-outline { font-size: 13px; padding: 11px 15px; }
  .hero { height: auto; min-height: 0; max-height: none; }
  .hero-body { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; height: 46vh; max-height: 420px; }
  .hero-portrait::before { background: linear-gradient(0deg, var(--ink) 0%, rgba(17,17,16,0) 25%); }
  .hero-copy { padding: 0 var(--gutter) 40px; }
  .hero-title { margin: 16px 0 20px; font-size: clamp(64px, 20vw, 110px); }
  .hero-sub { font-size: 16px; }
  .hero-ctas { margin-top: 24px; }
  .caption-bar { font-size: 10px; letter-spacing: 1px; }
  .hide-sm { display: none; }

  .split { grid-template-columns: 1fr; }
  .label-col { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
  .section-no { font-size: 48px; }
  .section-label { margin-top: 0; }
  .title { font-size: 36px; }
  .body, .lede { font-size: 16px; }
  .bones { height: auto; background: transparent; }
  .bones img { aspect-ratio: 4 / 3; height: auto; }
  .museum-label { position: static; max-width: none; }

  .row-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sub-title { font-size: 28px; }
  .track { grid-template-columns: 1fr; gap: 28px; }
  .figure { height: auto; }
  .dot { --s: 60px !important; }

  .tv { font-size: 24px; }
  .ts { font-size: 9px; letter-spacing: 1px; }
  .tick { gap: 10px; padding-top: 24px; }
  .tick::before { height: 14px; }
  .doublings .split { gap: 8px; }
  .big-20 { font-size: 112px; }
  .doublings-line { font-size: 28px; }
  .dots { padding: 0; gap: 2px; }
  .dots .v { font-size: 8px; writing-mode: vertical-rl; transform: rotate(180deg); }
  .dots .d:nth-child(odd):not(:first-child):not(:last-child) .v { visibility: hidden; }

  .charts { grid-template-columns: 1fr; gap: 20px; }
  .chart { padding: 24px 20px; }
  .chart-head h3 { font-size: 24px; }
  .bars { height: 180px; gap: 3px; }
  .axis span:nth-child(2) { margin-left: 0; }
  .chart figcaption { font-size: 20px; }

  .services li { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .svc-name span { font-size: 38px; }
  .svc-desc { font-size: 16px; }

  .formula { gap: 0 12px; padding: 32px 16px; }
  .formula sup { margin-left: -6px; }
  .formula-key { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; }
  .formula-key i { width: 20px; font-size: 24px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps h3 { font-size: 26px; }

  .closing { padding: 80px 20px; }
  .closing-title { letter-spacing: -1.5px; }
  .closing-title br { display: none; }

  .footer { padding: 56px 0 28px; }
  .footer-top { gap: 12px; padding-bottom: 40px; }
  .footer-top span { font-size: 46px; }
  .footer-mark { width: 38px; height: 36px; }
  .footer-bottom { gap: 8px; flex-direction: column; align-items: center; font-size: 10px; }
}
