/* ==========================================================================
   Gold Vault Group — Institutional Design System
   ========================================================================== */

:root {
  /* Default palette matches the default Tweaks state (light · stone-slate)
     so first paint is correct. The dark palette is opt-in via [data-theme="dark"]
     or a non-light palette set by shared.js. */
  --bg: #efece5;
  --bg-elev: #e6e2d8;
  --bg-inv: #0a0f1a;
  --fg: #2a3142;
  --fg-mute: #6a7184;
  --fg-inv: #e8e4dc;
  --fg-inv-mute: #8f8a80;
  --accent: #b89968;
  --accent-deep: #7d6a4a;
  --line: rgba(42, 49, 66, 0.14);
  --line-inv: rgba(232, 228, 220, 0.10);
  --line-strong: rgba(42, 49, 66, 0.26);

  /* Typography stacks */
  --font-serif: 'Fraunces', 'GT Super', Georgia, serif;
  --font-sans: 'Inter', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Headline font — switchable via Tweaks */
  --font-display: var(--font-serif);

  /* Density */
  --section-y: clamp(96px, 12vw, 176px);
  --gutter: clamp(24px, 4vw, 56px);
  --container: 1440px;

  /* Motion */
  --ease: cubic-bezier(.2, .6, .2, 1);
  --slow: 600ms;
  --med: 320ms;
  --fast: 180ms;
}

[data-theme="light"] {
  --bg: #f5f1ea;
  --bg-elev: #efeae1;
  --bg-inv: #0a0f1a;
  --fg: #0a0f1a;
  --fg-mute: #5a5853;
  --fg-inv: #e8e4dc;
  --fg-inv-mute: #8f8a80;
  --line: rgba(10, 15, 26, 0.12);
  --line-strong: rgba(10, 15, 26, 0.22);
}

/* Dark theme — opt-in. Mirrors the original :root defaults. */
[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-elev: #0e1524;
  --bg-inv: #f5f1ea;
  --fg: #e8e4dc;
  --fg-mute: #8f8a80;
  --fg-inv: #0a0f1a;
  --fg-inv-mute: #5a5853;
  --accent: #c9a961;
  --accent-deep: #8b6f3a;
  --line: rgba(232, 228, 220, 0.10);
  --line-strong: rgba(232, 228, 220, 0.22);
}

[data-density="compact"] {
  --section-y: clamp(64px, 8vw, 112px);
}

/* ---- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  transition: background var(--slow) var(--ease), color var(--slow) var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- typography ---------------------------------------------------------- */
.display-xl {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(56px, 7.2vw, 120px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(35px, 4.16vw, 67px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
}
.display-md {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 2.72vw, 45px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
}
.display-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(19px, 1.76vw, 29px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0;
}
.lead {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.55;
  font-weight: 380;
  color: var(--fg);
  max-width: 56ch;
  margin: 0;
}
.body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  max-width: 62ch;
}
.body-sm {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-mute);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* Serif font feature — subtle optical sizing */
.display-xl, .display-lg, .display-md, .display-sm {
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}

/* ---- layout primitives --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--tight {
  padding-top: calc(var(--section-y) * 0.55);
  padding-bottom: calc(var(--section-y) * 0.55);
}
.grid {
  display: grid;
  gap: var(--gutter);
}
.grid-12 { grid-template-columns: repeat(12, 1fr); }
.hairline { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* ---- inverted section (dark band on light page) -----------------------
   Drop into any page and child elements re-color automatically. */
.section--invert {
  background: #0a0f1a;
  color: #e8e4dc;
  --fg: #e8e4dc;
  --fg-mute: #8f8a80;
  --line: rgba(232,228,220,0.10);
  --line-strong: rgba(232,228,220,0.22);
  --bg: #0a0f1a;
  --bg-elev: #0e1524;
}
.section--invert .eyebrow { color: var(--accent); }
.section--invert .accent { color: var(--accent); }
.section--invert .pull em,
.section--invert h1 em,
.section--invert h2 em,
.section--invert h3 em { color: var(--accent); }
.section--invert .placeholder-img { background-color: #0e1524; }
.section--invert .btn { color: #e8e4dc; border-color: rgba(232,228,220,0.22); }
.section--invert .btn:hover { background: rgba(232,228,220,0.10); color: #ffffff; border-color: rgba(232,228,220,0.45); }
.section--invert .btn--gold { color: var(--accent); border-color: var(--accent); }
.section--invert .btn--gold:hover { background: var(--accent); color: #0a0e1a; border-color: var(--accent); }
.section--invert .stat__value { color: #e8e4dc; }

/* ---- navigation ---------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: #0a0f1a;
  border-bottom: 1px solid rgba(10, 15, 26, 0.08);
  box-shadow: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--med) var(--ease), background var(--med) var(--ease);
}
/* Reserve space for nav before partials.js injects it — prevents content jump on every page load */
[data-nav] {
  display: block;
  height: 76px;
}
@media (max-width: 720px) {
  [data-nav] { height: 60px; }
}
.nav.is-scrolled {
  border-bottom-color: rgba(10, 15, 26, 0.06);
  box-shadow: 0 2px 8px -8px rgba(10, 15, 26, 0.06);
}
/* Force dark text on white nav regardless of theme */
.nav .nav__brand,
.nav .nav__link,
.nav .nav__cta {
  color: #0a0f1a;
}
.nav .nav__brand .brand-wordmark,
.nav .nav__brand .brand-lockup { color: var(--accent); }
.nav .nav__cta {
  border-color: rgba(10, 15, 26, 0.22);
}
.nav .nav__cta:hover {
  background: #0a0f1a;
  color: #fff;
  border-color: #0a0f1a;
}
.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  line-height: 1;
  gap: 4px;
}
.brand-lockup__top {
  font-family: var(--font-display, var(--font-serif));
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.01em;
  font-variant: small-caps;
  text-transform: lowercase;
  /* Use real caps so "Gold Vault" reads as drop-cap + small-caps */
}
.brand-lockup__top {
  /* Real cap-on-smallcap effect via two transforms */
  text-transform: none;
}
.brand-lockup__bot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.brand-lockup__bot .rule {
  flex: 1 1 auto;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  min-width: 12px;
}
.brand-lockup__bot .word {
  font-family: var(--font-display, var(--font-serif));
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 2px;
}
.brand-wordmark {
  font-family: var(--font-display, var(--font-serif));
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.nav__brand {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.nav__brand .mark {
  width: 22px; height: 22px;
  border: 1px solid var(--accent);
  display: inline-grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0;
}
.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav__link {
  font-size: 13px;
  font-weight: 450;
  color: var(--fg);
  opacity: 0.5;
  position: relative;
  padding: 6px 0;
  transition: opacity var(--med) var(--ease);
}
.nav__link:hover { opacity: 0.85; }
.nav__link.is-active { opacity: 1; }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav__cta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  transition: background var(--med) var(--ease), border-color var(--med) var(--ease), color var(--med) var(--ease);
}
.nav__cta:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 18px 28px;
  border: 1px solid var(--fg);
  color: var(--fg);
  transition: background var(--med) var(--ease), color var(--med) var(--ease);
  cursor: pointer;
}
.btn:hover {
  background: var(--fg);
  color: var(--bg);
}
.btn--gold {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--gold:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn--ghost {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--fg);
  border-radius: 0;
}
.btn--ghost:hover {
  background: none;
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.btn .arrow {
  display: inline-block;
  transition: transform var(--med) var(--ease);
}
.btn:hover .arrow { transform: translateX(6px); }

/* ---- confidence figure (investments / portfolio) ----------------------- */
.confidence-figure {
  margin: 0 0 48px 0;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0f1a;
}
.confidence-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--gutter) 80px;
  overflow: hidden;
  color: #ffffff;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6,10,18,0.6) 0%, rgba(6,10,18,0.35) 45%, rgba(6,10,18,0.15) 75%, rgba(6,10,18,0.1) 100%),
    linear-gradient(180deg, rgba(6,10,18,0.25) 0%, rgba(6,10,18,0.15) 50%, rgba(6,10,18,0.55) 100%);
}
.hero__media > .placeholder-img { filter: saturate(0.7) contrast(1.02) brightness(0.8); }

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}
.hero__text { max-width: 920px; }
.hero__meta { max-width: 1100px; }
.hero .display-xl,
.hero .lead,
.hero .label { color: #ffffff !important; }
.hero .display-xl em { color: var(--accent) !important; }
.hero .display-xl {
  font-size: clamp(42px, 4.64vw, 77px);
  letter-spacing: -0.022em;
  line-height: 1.0;
}
.hero .display-xl,
.hero .lead { text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.4); }
.hero .eyebrow { color: var(--accent) !important; }
.hero__content::before {
  content: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 80px;
}

/* ---- real photography ---------------------------------------------------- */
.placeholder-img {
  position: relative;
  overflow: hidden;
  background-color: #0e1524;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  filter: saturate(0.85) contrast(1.02);
}
.placeholder-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,26,0.05) 0%, rgba(10,15,26,0.15) 100%);
  pointer-events: none;
}
.placeholder-img > span { display: none; }

/* Variants — real Unsplash photography matching brief */
.placeholder-img.var-skyline {
  background-image: url('images/photo-1522083165195-3424ed129620.jpg');
  /* NYC moody night — deep blue, dark cityscape */
}
.placeholder-img.var-park {
  background-image: url('images/photo-1568515387631-8b650bbcdb90.jpg');
  /* Central Park aerial / greenery */
}
.placeholder-img.var-arch {
  background-image: url('images/photo-1486406146926-c627a92ad1ab.jpg');
  /* Classical architecture / columns detail */
}
.placeholder-img.var-portrait {
  background-image: url('portrait-bruce-li.png');
  background-position: center 15%;
  background-color: #0a0f1a;
  filter: saturate(0.55) contrast(1.04) brightness(0.92);
}
.placeholder-img.var-portrait::after {
  background: linear-gradient(180deg, rgba(10,15,26,0.12) 0%, rgba(10,15,26,0.05) 45%, rgba(10,15,26,0.42) 100%);
  filter: grayscale(1) contrast(1.05);
  /* B&W editorial portrait */
}
.placeholder-img.var-portrait.p2 { background-image: url('images/photo-1573496359142-b8d87734a5a2.jpg'); }
.placeholder-img.var-portrait.p3 { background-image: url('images/photo-1507003211169-0a1dd7228f2d.jpg'); }
.placeholder-img.var-portrait.p4 { background-image: url('images/photo-1580489944761-15a19d654956.jpg'); }

.placeholder-img.var-gold {
  background-image: url('images/photo-1543716091-a840c05249ec.jpg');
  /* Manhattan aerial — institutional density, golden hour */
}
.placeholder-img.var-bridge {
  background-image: url('images/photo-1518391846015-55a9cc003b25.jpg');
  /* Williamsburg Bridge + Manhattan dusk — real assets / infrastructure */
}
.placeholder-img.var-wallst {
  background-image: url('images/photo-1518235506717-e1ed3306a89b.jpg');
  /* Financial district at night */
}
.placeholder-img.var-industrial {
  background-image: url('images/photo-1586528116311-ad8dd3c8310d.jpg');
  /* Logistics / industrial */
}
.placeholder-img.var-datacenter {
  background-image: url('images/photo-1558494949-ef010cbdcc31.jpg');
  /* Data center server corridor */
}
.placeholder-img.var-contract {
  background-image: url('images/photo-1450101499163-c8848c66ca85.jpg');
  /* Documents / contracts close-up */
}
.placeholder-img.var-editorial {
  background-image: url('images/photo-1480714378408-67cf0d13bc1b.jpg');
  /* NYC editorial */
}
.placeholder-img.var-aerial {
  background-image: url('images/photo-1546436836-07a91091f160.jpg');
  /* Midtown Manhattan structure — Empire State + skyline at golden hour */
}

/* Subtle ken-burns on hero */
@keyframes kenburns {
  from { transform: scale(1.04) translate(0, 0); }
  to { transform: scale(1.12) translate(-1%, -1%); }
}
.hero__media .placeholder-img {
  width: 100%; height: 100%;
  animation: kenburns 24s var(--ease) both;
}

/* ---- stat row ----------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 48px 32px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(44px, 4.4vw, 72px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat__value .unit {
  font-size: 0.45em;
  color: var(--accent);
  margin-left: 4px;
  vertical-align: top;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0;
}
.stat__label {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ---- capability / sector cards (editorial tiles) ------------------------ */
.tile {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  transition: background var(--med) var(--ease);
  cursor: pointer;
  position: relative;
}
.tile:hover .tile__title { color: var(--accent); }
.tile:hover .tile__arrow { transform: translate(6px, -6px); }
.tile:hover .tile__media { transform: scale(1.03); }
.tile__media {
  width: 100%;
  height: 100%;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.15) contrast(1.02);
  transition: transform 600ms var(--ease);
}
.tile__media-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-elev);
}
.tile__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
}
.tile__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -0.018em;
  transition: color var(--med) var(--ease);
}
.tile__desc {
  color: var(--fg-mute);
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.6;
}
.tile__arrow {
  position: absolute;
  top: 40px; right: 0;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  transition: transform var(--med) var(--ease);
  color: var(--fg-mute);
}

/* ---- quote / pull ------------------------------------------------------- */
.pull {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.72vw, 43px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 300;
  color: var(--fg);
}
.pull .accent { color: var(--accent); }

/* ---- footer ------------------------------------------------------------- */
.footer {
  padding: 120px var(--gutter) 48px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--accent);
  line-height: 1;
  gap: 6px;
  font-family: var(--font-display, var(--font-serif));
}
.brand-mark__main {
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-style: italic;
  font-feature-settings: "ss01", "liga", "dlig";
  line-height: 1;
  white-space: nowrap;
}
.brand-mark__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}
.brand-mark__rule {
  flex: 1 1 auto;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  min-width: 16px;
}
.brand-mark__word {
  font-weight: 400;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 2px;
  transform: translateY(-0.5px);
}
.brand-mark--xl {
  gap: 14px;
  align-items: flex-start;
}
.brand-mark--xl {
  /* Keep all parts of the lockup (main wordmark, GROUP rule, tagline below)
     starting at the same x. We previously pulled __main left to optically
     compensate for the italic G's side-bearing, but at large sizes that made
     the G's visual edge land left of the GROUP rule below it — alignment
     reads cleaner when everything shares the same origin. */
}
.brand-mark--xl .brand-mark__main {
  font-size: clamp(56px, 6.4vw, 104px);
  letter-spacing: -0.025em;
  line-height: 0.92;
}
.brand-mark--xl .brand-mark__sub {
  gap: 18px;
  margin-top: 6px;
}
.brand-mark--xl .brand-mark__word {
  font-size: 13px;
  letter-spacing: 0.52em;
}
.brand-mark--xl .brand-mark__rule {
  min-width: 40px;
  opacity: 0.45;
}
.footer__brand {
  color: var(--accent);
  display: flex;
  align-items: flex-start;
  width: fit-content;
}
.footer__tagline {
  margin-top: 28px;
  max-width: none;
  color: var(--fg-soft, var(--fg));
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 20px;
  font-weight: 500;
}
.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--fg);
  opacity: 0.8;
  padding: 6px 0;
  transition: opacity var(--med) var(--ease), color var(--med) var(--ease);
}
.footer__col a:hover { opacity: 1; color: var(--accent); }
.footer__col .footer__contact-line {
  display: block;
  font-size: 14px;
  color: var(--fg);
  opacity: 0.8;
  padding: 6px 0;
  line-height: 1.6;
  white-space: nowrap;
}
.footer__legal-text {
  margin: 48px 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.75;
  color: var(--fg-mute);
  max-width: 90ch;
}
.footer__bottom {
  margin-top: 24px;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ---- page header (inner pages) ----------------------------------------- */
.page-header {
  padding: 200px var(--gutter) 96px;
  max-width: var(--container);
  margin: 0 auto;
}
.page-header .eyebrow { margin-bottom: 32px; }
.page-header h1.display-xl {
  font-size: clamp(38px, 4.32vw, 70px);
  letter-spacing: -0.022em;
  line-height: 1.02;
}

/* ---- two-col editorial ------------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 96px;
  align-items: start;
}
.two-col--stacked {
  display: block;
}
.two-col--stacked > div + div { margin-top: 48px; max-width: 72ch; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav__links { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ---- mobile nav burger + drawer ---------------------------------------- */
.nav__burger {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid rgba(10, 15, 26, 0.22);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 110;
}
.nav__burger span {
  display: block;
  width: 18px; height: 1.5px;
  background: #0a0f1a;
  transition: transform var(--med) var(--ease), opacity var(--med) var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 105;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms var(--ease);
  display: flex;
  flex-direction: column;
}
.nav-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nav-drawer__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 96px 28px 32px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.nav-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.nav-drawer__link {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  color: var(--fg);
  text-decoration: none;
  padding: 12px 0;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease), color var(--med) var(--ease);
  position: relative;
}
.nav-drawer__link.is-active { color: var(--accent); }
.nav-drawer__link.is-active::before {
  content: "◆";
  font-family: var(--font-mono);
  font-size: 10px;
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
}
.nav-drawer.is-open .nav-drawer__link { opacity: 1; transform: none; }
.nav-drawer.is-open .nav-drawer__link:nth-child(1) { transition-delay: 80ms; }
.nav-drawer.is-open .nav-drawer__link:nth-child(2) { transition-delay: 140ms; }
.nav-drawer.is-open .nav-drawer__link:nth-child(3) { transition-delay: 200ms; }
.nav-drawer.is-open .nav-drawer__link:nth-child(4) { transition-delay: 260ms; }
.nav-drawer.is-open .nav-drawer__link:nth-child(5) { transition-delay: 320ms; }

.nav-drawer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg);
  text-decoration: none;
  border: 1px solid var(--fg);
}
.nav-drawer__cta::after {
  content: "→";
  margin-left: 16px;
}
.nav-drawer__foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

html.nav-open, html.nav-open body { overflow: hidden; }

/* ===== Mobile polish (<=720px) ===== */
@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --section-y: clamp(64px, 14vw, 96px);
  }
  /* Type scale — tighter for small screens */
  .display-xl { font-size: clamp(36px, 10vw, 54px); line-height: 1.04; }
  .display-lg { font-size: clamp(26px, 6.88vw, 38px); line-height: 1.06; }
  .display-md { font-size: clamp(21px, 5.6vw, 29px); line-height: 1.12; }
  .display-sm { font-size: clamp(16px, 4.32vw, 21px); }
  .lead { font-size: 16px; line-height: 1.55; }
  .body { font-size: 15px; }
  .pull { font-size: clamp(18px, 4.48vw, 22px); line-height: 1.3; }

  /* Nav — show burger, hide desktop links + CTA */
  .nav { padding: 14px var(--gutter); }
  .nav__brand { font-size: 11px; gap: 10px; }
  .brand-wordmark { font-size: 13px; letter-spacing: 0.14em; }
  .nav__links { display: none; }
  .nav__cta--desktop { display: none; }
  .nav__burger { display: flex; }

  /* Hero — reduce top padding, stack meta */
  .hero { min-height: 92vh; }
  .hero__content { padding: 120px var(--gutter) 64px !important; }
  .hero__text { max-width: 100%; }
  .hero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero .display-xl { font-size: clamp(32px, 8.8vw, 51px) !important; }

  /* Page header */
  .page-header { padding: 120px var(--gutter) 64px; }
  .page-header h1 { max-width: 100%; }
  .page-header h1.display-xl { font-size: clamp(27px, 7.68vw, 42px); line-height: 1.04; }

  /* Grids → stack on mobile */
  [class*="col-"] { grid-column: span 12; }
  .grid, .grid-12 { gap: 32px !important; }

  /* Stats → 2-col with tighter padding */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat { padding: 24px 16px; }
  .stat__value { font-size: clamp(32px, 9vw, 48px); }
  .stat__label { font-size: 10px; }

  /* Footer — stack to single column, reduce padding */
  .footer { padding: 80px var(--gutter) 32px; }
  .footer__grid { grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }
  .footer__brand .brand-mark__main { font-size: clamp(48px, 14vw, 72px); line-height: 0.95; }
  .footer__bottom { flex-direction: column; gap: 12px; align-items: flex-start; padding-top: 24px; }
  .footer__legal-text { margin-top: 32px; }

  /* Confidence figure — cap on mobile */
  .confidence-figure { max-width: 240px; aspect-ratio: 1 / 1; margin-bottom: 32px; }

  /* Portfolio rows — stacked cards */
  .portfolio-row {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    grid-template-areas:
      "num name"
      "num sector"
      "meta1 meta2"
      "meta3 arr" !important;
    row-gap: 6px !important;
    column-gap: 16px !important;
    padding: 24px 0 !important;
  }
  .portfolio-num { grid-area: num; align-self: start; }
  .portfolio-name { grid-area: name; font-size: 20px; }
  .portfolio-sector { grid-area: sector; }
  .portfolio-row .portfolio-meta:nth-of-type(1) { grid-area: meta1; }
  .portfolio-row .portfolio-meta:nth-of-type(2) { grid-area: meta2; text-align: right; }
  .portfolio-row .portfolio-meta:nth-of-type(3) { grid-area: meta3; }
  .portfolio-row .arr { grid-area: arr; justify-self: end; }

  /* Filter bar — scroll horizontally */
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar button { flex: 0 0 auto; white-space: nowrap; }

  /* Ticker — smaller */
  .ticker { padding: 14px 0; }
  .ticker__item { font-size: 10px; gap: 40px; }
  .ticker__track { gap: 40px; animation-duration: 45s; }

  /* Tweaks panel — full-width bottom sheet */
  .tweaks {
    left: 12px; right: 12px; bottom: 12px;
    width: auto;
    max-height: 75vh;
    overflow-y: auto;
    padding: 16px;
  }

  /* Buttons — full-width on small */
  .btn { padding: 14px 18px; font-size: 12px; }

  /* Two-col editorial stack */
  .two-col { grid-template-columns: 1fr !important; gap: 32px !important; }

  /* Reduce inline huge gaps */
  [style*="gap:96px"], [style*="gap: 96px"] { gap: 40px !important; }
  [style*="gap:56px"], [style*="gap: 56px"] { gap: 32px !important; }
  [style*="gap:48px"], [style*="gap: 48px"] { gap: 28px !important; }
  [style*="margin-top:56px"] { margin-top: 28px !important; }
  [style*="padding:80px 0"] { padding: 48px 0 !important; }

  /* Images — cap aspect ratios */
  .placeholder-img { aspect-ratio: 4/3 !important; }
}

/* ===== Extra small (<=420px) ===== */
@media (max-width: 420px) {
  .hero__meta { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: 1fr; }
  .footer__grid { padding-bottom: 32px; }
}

/* ---- tweaks panel ------------------------------------------------------- */
.tweaks {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 300px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 18px 20px 20px;
  font-family: var(--font-sans);
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
  transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.tweaks.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.tweaks h4 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks h4 .close {
  cursor: pointer;
  color: var(--fg-mute);
  font-size: 16px;
  line-height: 1;
}
.tweak-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.tweak-row:first-of-type { border-top: 0; }
.tweak-row > label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-family: var(--font-mono);
}
.tweak-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tweak-chip {
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  cursor: pointer;
  transition: all var(--med) var(--ease);
  font-family: var(--font-mono);
}
.tweak-chip:hover { border-color: var(--accent); color: var(--accent); }
.tweak-chip.is-on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ---- marquee (ticker) --------------------------------------------------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.ticker__track {
  display: flex;
  gap: 64px;
  animation: ticker 60s linear infinite;
  white-space: nowrap;
}
.ticker__item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 64px;
}
.ticker__item::after {
  content: "◆";
  color: var(--accent);
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- subtle reveal ------------------------------------------------------ */
/* Only hide reveals after JS has confirmed it can manage them. Default state is visible
   so content is never stuck invisible if JS fails. */
html.js-reveal .reveal { opacity: 0; transform: translateY(24px); }
html.js-reveal .reveal.is-in { opacity: 1; transform: none; transition: opacity 900ms var(--ease), transform 900ms var(--ease); }

/* ---- utility ------------------------------------------------------------ */
.muted { color: var(--fg-mute); }
.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); }
.uppercase { text-transform: uppercase; letter-spacing: 0.12em; }
.caps-s { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-mono); }

/* col spans */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }
@media (max-width: 900px) {
  [class*="col-"] { grid-column: span 12; }
}
