:root {
  --paper: #F3EFE7;
  --paper-2: #ECE7DC;
  --ink: #111111;
  --muted: #5B5750;
  --rule: rgba(17, 17, 17, .18);
  --accent: #2338FF;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 3.9vw, 56px);
  --nav-h: 68px;
  --ease: cubic-bezier(.65, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .32; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .4 0 0 0 0 .33 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.cta :focus-visible { outline-color: #fff; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 12px; }
main:focus, section:focus { outline: none; }
main { overflow-x: clip; }

/* ---------- shared bits ---------- */
.wordmark { font: 400 30px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.wordmark .dot { color: var(--accent); }
.wordmark em { margin-left: -.12em; }

.u-link { position: relative; display: inline-block; padding-block: 2px; }
.u-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.u-link:hover::after, .u-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.btn {
  display: inline-flex; align-items: center; gap: 22px;
  font: 500 14px/1 var(--sans); letter-spacing: .01em;
  padding: 14px 18px 14px 20px; border-radius: 2px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn .arr { transition: transform .45s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn-accent, .btn-ink { background: var(--accent); color: #fff; }
.btn-accent::before, .btn-ink::before { background: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); padding: 20px 26px 20px 30px; gap: 80px; font-size: 16px; }
.btn-paper::before { background: #fff; }

.kicker { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.kicker.ruled { border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.no { font: italic 400 15px/1 var(--serif); letter-spacing: .02em; }
.count, .eyebrow { font: 500 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line .w { display: inline-block; will-change: transform; }

.sec-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px;
  align-items: end; padding: clamp(28px, 4vw, 56px) 0 clamp(28px, 3.4vw, 48px);
}
.sec-title { grid-column: 1 / span 8; font: 400 clamp(56px, 8.4vw, 132px)/.9 var(--serif); letter-spacing: -.025em; }
.sec-sub { grid-column: 9 / span 4; color: var(--muted); font-size: 16px; max-width: 30ch; padding-bottom: .6em; }

section { position: relative; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .6s var(--ease);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; position: relative; }
.nav-inner::after { content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: 0; height: 1px; background: var(--rule); }
.nav-links { display: flex; align-items: center; gap: clamp(28px, 4.6vw, 72px); font-size: 14px; }
.nav-links .nav-cta { margin-left: clamp(40px, 12vw, 200px); padding: 12px 14px 12px 18px; gap: 26px; }
.menu-toggle { display: none; }

/* ---------- hero ---------- */
.hero { overflow-x: clip; padding-top: calc(var(--nav-h) + 22px); min-height: 100svh; display: flex; flex-direction: column; }
.hero .kicker { padding-bottom: 12px; }
.hero .no { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.hero-title {
  position: relative; z-index: 2;
  font: 400 clamp(64px, min(12.8vw, 19vh), 204px)/.86 var(--serif);
  letter-spacing: -.035em; margin-top: clamp(4px, 1vw, 12px);
  max-width: 9.2em;
}
.hero-title em { font-style: italic; letter-spacing: -.02em; }
.w-fast { padding-right: .06em; }
.dash { font-weight: 400; transform-origin: left; }

.sphere-scroll {
  position: absolute; z-index: 1;
  right: calc(var(--pad) + 1vw); top: calc(var(--nav-h) + 4vw);
  width: min(38vw, 600px); aspect-ratio: 1;
  pointer-events: none;
}
.sphere-float, .sphere-tilt { width: 100%; height: 100%; }
.sphere { width: 118%; height: 118%; max-width: none; margin: -9%; position: relative; z-index: 1; filter: drop-shadow(0 30px 40px rgba(60, 50, 30, .12)); }
.sphere-shadow {
  position: absolute; z-index: 0; left: -14%; right: -6%; top: 64%; height: 46%;
  background:
    radial-gradient(42% 30% at 46% 40%, rgba(255, 252, 244, .95), rgba(255, 252, 244, 0) 70%),
    radial-gradient(60% 46% at 42% 46%, rgba(70, 58, 36, .30), rgba(70, 58, 36, .1) 55%, rgba(70, 58, 36, 0) 75%);
  filter: blur(6px);
  transform: skewX(-18deg);
}

.hero-foot {
  margin-top: auto; position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px;
  padding: clamp(28px, 3vw, 44px) 0 clamp(28px, 3vw, 44px);
  border-bottom: 1px solid var(--rule);
}
.hero-sub { grid-column: 1 / span 4; font-size: 16px; max-width: 36ch; }
.hero-ctas {
  grid-column: 5 / span 5; display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  padding-left: 24px; border-left: 1px solid var(--rule);
}
.link-quiet { font-size: 14px; font-weight: 500; }

/* ---------- services ---------- */
.services { padding-top: clamp(56px, 7vw, 110px); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.svc { position: relative; padding: 26px 24px 0; display: flex; flex-direction: column; min-height: clamp(460px, 40vw, 600px); }
.svc:first-child { padding-left: 0; }
.vrule { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--rule); transform-origin: top; }
.svc:first-child .vrule { display: none; }
.svc-no { display: block; font-size: 11px; letter-spacing: .08em; margin-bottom: 10px; }
.svc h3 { font: 400 clamp(32px, 2.9vw, 44px)/.98 var(--serif); letter-spacing: -.015em; margin-bottom: 14px; }
.svc p { color: var(--muted); font-size: 14px; max-width: 30ch; }
.glass { margin-top: auto; padding: 24px 0 18px; perspective: 900px; }
.glass-float, .glass-tilt { transform-style: preserve-3d; }
.glass-svg { width: 100%; height: clamp(200px, 19vw, 290px); overflow: visible; filter: drop-shadow(0 18px 22px rgba(70, 58, 36, .14)); }
.svc:nth-child(2) .glass-svg { transform: scale(1.05); }

/* ---------- approach ---------- */
.approach { padding-top: clamp(80px, 9vw, 140px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.step { position: relative; display: flex; align-items: flex-start; gap: 18px; padding: 24px 24px 30px; border-left: 1px solid var(--rule); overflow: hidden; }
.step:first-child { border-left: 0; padding-left: 0; }
.step-num { font: italic 400 clamp(64px, 6.4vw, 104px)/.82 var(--serif); letter-spacing: -.03em; flex: none; }
.step-text { padding-top: 10px; }
.step h3 { font: 400 clamp(24px, 2vw, 30px)/1 var(--serif); margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--muted); max-width: 24ch; }
.step-arrow { position: absolute; right: 18px; bottom: 26px; width: 34px; fill: none; stroke: var(--ink); stroke-width: 1.2; }

/* ---------- stats ---------- */
.stats { padding-top: clamp(80px, 9vw, 140px); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.stat { padding: 26px 24px 34px; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-val { font: 400 clamp(64px, 6.6vw, 108px)/.9 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.stat-val em { font-size: .66em; letter-spacing: -.01em; }
.stat:first-child .stat-val em { display: block; }
.stat:last-child .stat-val em { font-size: 1em; }
.stat-desc { font: italic 400 clamp(20px, 1.7vw, 26px)/1.15 var(--serif); margin-top: 14px; max-width: 17ch; }

/* ---------- stack ---------- */
.stack { padding-top: clamp(80px, 9vw, 140px); }
.marquee { overflow: hidden; margin-top: 4px; }
.marquee-track { display: flex; width: max-content; border-block: 1px solid var(--ink); animation: marquee 48s linear infinite; }
.marquee.is-js .marquee-track { animation: none; }
.marquee-group { display: flex; flex: none; }
.marquee-group li {
  display: flex; align-items: center; white-space: nowrap;
  font: italic 400 clamp(36px, 4.4vw, 68px)/1 var(--serif); letter-spacing: -.01em;
  padding: .28em 0;
}
.marquee-group li::after { content: "✦"; color: var(--accent); font: 400 .34em/1 var(--sans); margin-inline: 1.1em; transform: translateY(-.1em); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- cta ---------- */
.cta { margin-top: clamp(56px, 6vw, 96px); }
.cta-panel { background: var(--accent); color: #fff; }
.cta-inner {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: center;
  padding-block: clamp(36px, 4vw, 64px) clamp(44px, 5vw, 80px);
}
.cta-head { grid-column: 1 / span 8; padding-right: 24px; }
.cta-head .no { display: block; margin-bottom: 8px; }
.cta-title { font: 400 clamp(64px, 9.4vw, 150px)/.9 var(--serif); letter-spacing: -.03em; }
.cta-title em { padding-left: .1em; }
.cta-side { grid-column: 9 / span 4; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 28px 0 28px 40px; border-left: 1px solid rgba(255, 255, 255, .45); }
.cta-side p { font-size: 15px; max-width: 34ch; }
.cta-alt .u-link { font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, .55); }

/* ---------- footer ---------- */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap; padding-block: 26px 30px; font-size: 13px; }
.footer .wordmark { font-size: 26px; }
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); align-items: center; }
.footer-legal a { color: var(--ink); }

/* ---------- JS intro start state (removed by main.js / safety timeout) ---------- */
.js-anim .hero-title .w, .js-anim .sphere-scroll, .js-anim .hero-foot { opacity: 0; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .svc-grid, .steps, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .svc:nth-child(3) { padding-left: 0; }
  .svc:nth-child(3) .vrule { display: none; }
  .svc:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .step:nth-child(3), .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n+3), .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .step:nth-child(2) .step-arrow { display: none; }
  .sec-title { grid-column: 1 / -1; }
  .sec-sub { grid-column: 1 / span 8; margin-top: 16px; }
  .cta-head, .cta-side { grid-column: 1 / -1; }
  .cta-side { border-left: 0; padding: 28px 0 0; border-top: 1px solid rgba(255, 255, 255, .45); margin-top: 28px; }
  .hero-sub { grid-column: 1 / span 6; }
  .hero-ctas { grid-column: 7 / span 6; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  .wordmark { font-size: 26px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    background: none; border: 1px solid var(--ink); color: var(--ink);
    font: 500 13px/1 var(--sans); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 22px var(--pad) 28px; font-size: 22px; font-family: var(--serif);
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links .nav-cta { margin: 6px 0 0; font-family: var(--sans); }

  .hero { min-height: 0; padding-top: calc(var(--nav-h) + 18px); }
  .hero .kicker { align-items: flex-start; }
  .eyebrow { max-width: 30ch; }
  .hero-title { font-size: clamp(54px, 20.5vw, 110px); line-height: .88; margin-top: 18px; }
  .sphere-scroll { position: relative; right: auto; top: auto; width: 68vw; margin: -4vw 0 0 auto; }
  .hero-foot { display: flex; flex-direction: column; gap: 26px; margin-top: 2vw; padding-top: 0; border-bottom: 1px solid var(--rule); }
  .hero-ctas { border-left: 0; padding-left: 0; gap: 24px; }

  .sec-sub { grid-column: 1 / -1; }
  .svc-grid, .steps, .stat-grid { grid-template-columns: 1fr; }
  .svc, .svc:nth-child(3) { padding: 26px 0 0; min-height: 0; border-top: 1px solid var(--rule); }
  .svc:first-child { border-top: 0; }
  .vrule { display: none; }
  .glass { width: 74%; margin-left: auto; padding-top: 4px; }
  .glass-svg { height: 200px; }
  .svc:nth-child(even) .glass { margin-left: 0; margin-right: auto; }

  .step, .stat { border-left: 0; padding-left: 0; padding-right: 0; border-top: 1px solid var(--rule); }
  .step:first-child, .stat:first-child { border-top: 0; }
  .step { align-items: flex-start; }
  .step-num { width: 1.25em; }
  .step-arrow { display: none; }
  .stat { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: end; }
  .stat-val { font-size: clamp(52px, 15vw, 72px); }
  .stat-desc { font-size: 20px; margin: 0 0 .3em; }
  .stat:first-child .stat-val em { display: inline; }

  .cta { margin-top: 72px; }
  .cta-title { font-size: clamp(52px, 19vw, 96px); }
  .btn-paper { gap: 40px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .stat { grid-template-columns: 1fr; }
  .stat-desc { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee-group { flex-wrap: wrap; }
  .marquee-group[aria-hidden="true"] { display: none; }
}
