:root {
  --bg: #f5f2ea;
  --bg-raised: #efebe1;
  --ink: #16191a;
  --ink-2: #4a4f4c;
  --ink-3: #7c807b;
  --rule: rgba(22, 25, 26, 0.14);
  --rule-strong: rgba(22, 25, 26, 0.32);
  --accent: #1f4a3a;
  --accent-deep: #133126;
  --accent-ink: #1f4a3a;
  --on-accent: #f5f2ea;
  --grain-opacity: 0.06;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1311;
    --bg-raised: #151a17;
    --ink: #ece8de;
    --ink-2: #b4b3aa;
    --ink-3: #85877f;
    --rule: rgba(236, 232, 222, 0.13);
    --rule-strong: rgba(236, 232, 222, 0.3);
    --accent: #2c6650;
    --accent-deep: #173a2d;
    --accent-ink: #8cc5aa;
    --on-accent: #f1ede3;
    --grain-opacity: 0.08;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; filter: invert(1); }
}

a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none; border-radius: 6px;
}
.skip:focus { top: 12px; }

section[id] { scroll-margin-top: 72px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.brand__mark text { font-family: var(--serif); font-size: 17px; fill: currentColor; letter-spacing: .02em; }
.brand__name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 32px); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav__cta { color: var(--ink) !important; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; }

/* Shared type */
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 28px;
}

/* Hero */
.hero { padding-top: clamp(56px, 10vw, 140px); padding-bottom: clamp(72px, 11vw, 160px); }
.hero__grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero__name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(76px, 15vw, 212px); line-height: 0.86; letter-spacing: -0.035em;
  margin: 0 0 clamp(28px, 4vw, 48px);
}
.hero__name em { font-style: italic; color: var(--accent-ink); padding-left: 0.42em; }
.hero__thesis {
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--ink-2);
  max-width: 34ch; margin: 0 0 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.monogram { margin: 0; width: clamp(200px, 24vw, 320px); }
.monogram svg { display: block; width: 100%; height: auto; }
.monogram__letters { font-family: var(--serif); font-size: 150px; fill: var(--on-accent); letter-spacing: -0.02em; }
.monogram__ring { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.42em; fill: var(--on-accent); fill-opacity: .75; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn--solid { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--ghost { color: var(--ink); border: 1px solid var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 16px; }

/* Sections */
.section { padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(32px, 4vw, 48px); }
.section__head {
  display: flex; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--rule-strong); padding-top: 20px; margin-bottom: clamp(36px, 5vw, 64px);
}
.section__num { font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0.1em; color: var(--ink-3); min-width: 2.5em; }
.section__title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1; letter-spacing: -0.02em; margin: 0;
}

/* About */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.about > * { grid-column: 4 / span 8; margin: 0; }
.about .lede {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); line-height: 1.22; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 12px;
}
.about p:not(.lede) { color: var(--ink-2); font-size: 18px; max-width: 58ch; }
.about a { text-decoration-color: var(--rule-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.about a:hover { text-decoration-color: var(--accent-ink); }

/* Companies table */
.table { border-bottom: 1px solid var(--rule); }
.table__row {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(0, 1fr) 40px;
  gap: 24px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--rule);
  text-decoration: none; color: inherit; position: relative;
}
.table__row--head {
  padding: 0 0 14px; border-top: 0;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
a.table__row { transition: background-color .3s var(--ease); }
a.table__row::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5);
  background: var(--bg-raised); opacity: 0; transition: opacity .3s var(--ease); z-index: -1; border-radius: 4px;
}
a.table__row:hover::before, a.table__row:focus-visible::before { opacity: 1; }
.co__name { display: block; font-family: var(--serif); font-size: clamp(28px, 2.8vw, 38px); line-height: 1.05; letter-spacing: -0.015em; }
.co__note { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-left: 8px; letter-spacing: 0; white-space: nowrap; }
.co__desc { display: block; margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.co__cell { font-size: 15px; color: var(--ink-2); }
.co__meta { display: contents; }
.co__list { list-style: none; margin: 0; padding: 0; }
.co__status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.co__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.co__status[data-live="true"]::before { background: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 18%, transparent); }
.co__arrow {
  justify-self: end; font-size: 20px; color: var(--ink-3);
  transition: transform .3s var(--ease), color .3s var(--ease);
}
a.table__row:hover .co__arrow, a.table__row:focus-visible .co__arrow { color: var(--accent-ink); transform: translate(3px, -3px); }
.nojs-list { columns: 2; padding-left: 18px; }

/* Focus */
.focus { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.focus__col:first-child { grid-column: 1 / span 6; }
.focus__col:last-child { grid-column: 7 / span 6; }
.focus__label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.focus__list { list-style: none; margin: 0; padding: 0; }
.focus__list li {
  font-family: var(--serif); font-size: clamp(34px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -0.02em;
  padding: 10px 0 14px; border-bottom: 1px solid var(--rule);
}
.focus__list li:first-child { border-top: 1px solid var(--rule); }

/* Contact */
.contact { padding-top: clamp(96px, 12vw, 176px); padding-bottom: clamp(96px, 12vw, 176px); }
.contact__inner { text-align: center; max-width: 820px; margin: 0 auto; }
.contact__title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 8vw, 112px);
  line-height: 0.95; letter-spacing: -0.03em; margin: 0 0 24px;
}
.contact__text { color: var(--ink-2); font-size: 18px; margin: 0 0 40px; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 32px; }
.link-arrow { font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; transition: border-color .2s; }
.link-arrow:hover { border-color: var(--ink); }
.contact__email { margin: 36px 0 0; font-size: 14px; color: var(--ink-3); }
.contact__email a { color: var(--ink-3); text-decoration: none; }
.contact__email a:hover { color: var(--ink); }

/* Footer */
.footer { border-top: 1px solid var(--rule); }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-size: 13px; color: var(--ink-3); }
.footer a { color: var(--ink-3); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .about > * { grid-column: 1 / -1; }
  .table__row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .co__market { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .brand__name { display: none; }
  .nav { gap: 18px; }
  .hero__grid { grid-template-columns: 1fr; }
  .monogram { order: -1; width: 112px; }
  .hero__name em { padding-left: 0.3em; }

  .table__row--head { display: none; }
  .table__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name arrow" "meta meta";
    gap: 12px 16px; padding: 22px 0;
  }
  .co__market { display: block; }
  .co__main { grid-area: name; }
  .co__arrow { grid-area: arrow; align-self: start; }
  .co__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .co__cell:empty { display: none; }
  .focus__col:first-child, .focus__col:last-child { grid-column: 1 / -1; }
  .footer__inner { flex-direction: column; }
}

@media (max-width: 400px) {
  .nav li:nth-child(3) { display: none; }
}
