:root {
  --navy-950: #0b1c2e;
  --ink: #0d2238;
  --navy-700: #173a5e;
  --navy-hover: #15304b;
  --navy-line: #1d3651;
  --navy-line-2: #2a4664;
  --navy-line-3: #3a5876;
  --green: #2a9d4b;
  --green-hover: #23863f;
  --green-text: #1f7a3b;
  --green-text-2: #1b6b33;
  --green-tint: #e3f4e8;
  --green-on-navy: #5fcf84;
  --blue: #3fa9df;
  --link: #1d63ad;
  --blue-on-navy: #7fcbf0;
  --text-2: #4b5f74;
  --text-3: #5a6b7d;
  --text-4: #33475b;
  --on-navy: #c9d6e3;
  --on-navy-2: #dbe5ef;
  --on-navy-3: #9fb3c8;
  --page: #f5f7fa;
  --track: #e6ebf1;
  --subtle: #eef2f6;
  --line: #e3e8ee;
  --line-2: #edf1f5;
  --input-line: #cfd8e2;
  --error: #a3321f;
  --error-tint: #fbe7e3;
  --serif: Newsreader, Georgia, serif;
  --gutter: clamp(18px, 4vw, 48px);
  --section-y: clamp(56px, 8vw, 104px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr)); }

.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--link); font-weight: 700; }
.eyebrow.on-navy { color: var(--green-on-navy); }
h1, h2, .serif { font-family: var(--serif); font-weight: 500; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -0.015em; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }

.btn {
  display: inline-block; text-decoration: none; padding: 15px 26px; border-radius: 6px;
  font-weight: 600; font-size: 16px; color: #fff;
}
.btn-primary { background: var(--green); }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-outline { border: 1px solid var(--navy-line-3); padding: 14px 26px; }
.btn-outline:hover { background: var(--navy-hover); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Navy top block */
.top { background: var(--navy-950); color: var(--on-navy); }
.ticker { border-bottom: 1px solid var(--navy-line); overflow-x: auto; }
.ticker .wrap {
  padding-top: 10px; padding-bottom: 10px; display: flex; gap: 28px; align-items: center;
  font-size: 13px; white-space: nowrap;
}
.ticker-q { font-weight: 700; color: #fff; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.ticker-item { display: flex; gap: 8px; }
.ticker-item b { color: #fff; font-variant-numeric: tabular-nums; }
.ticker-item.bcm b { color: var(--green-on-navy); }

.site-header { padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.logo { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #fff; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark b { font-size: 19px; letter-spacing: .14em; }
.wordmark span { font-size: 12px; letter-spacing: .06em; color: var(--on-navy-3); }
.nav { display: flex; gap: 26px; align-items: center; font-size: 15px; overflow-x: auto; max-width: 100%; }
.nav a { color: var(--on-navy-2); text-decoration: none; }
.nav a:hover { color: #fff; }
.nav a.nav-cta {
  color: var(--navy-950); background: #fff; padding: 10px 18px; border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.nav a.nav-cta:hover { background: #dff1fa; color: var(--navy-950); }

.hero {
  --min: 440px;
  padding-top: clamp(36px, 7vw, 96px); padding-bottom: clamp(48px, 8vw, 112px);
  gap: clamp(36px, 6vw, 80px); align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero h1 {
  font-size: clamp(44px, 6.6vw, 84px); line-height: 1; letter-spacing: -0.02em; color: #fff; text-wrap: balance;
}
.hero-copy p { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; max-width: 36ch; text-wrap: pretty; }

.perf-card {
  background: #fff; color: var(--ink); border-radius: 12px; padding: clamp(22px, 3vw, 34px);
  display: flex; flex-direction: column; gap: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.perf-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.perf-card-top span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--text-2); }
.perf-card-top a { font-size: 14px; font-weight: 600; }
.perf-big { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.perf-big .big {
  font-family: var(--serif); font-weight: 500; font-size: clamp(60px, 8vw, 92px); line-height: .85;
  letter-spacing: -0.02em; color: var(--green-text); font-variant-numeric: tabular-nums;
}
.perf-big .big.down { color: var(--ink); }
.perf-big .cap { font-size: 15px; line-height: 1.35; padding-bottom: 4px; max-width: 15ch; color: var(--text-2); }
.cmp {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px;
}
.cmp .val { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pill {
  min-width: 112px; text-align: center; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: var(--subtle); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.pill.ahead { background: var(--green-tint); color: var(--green-text-2); }
.fine { font-size: 12px; color: var(--text-3); }

/* Performance history */
.history { padding-top: var(--section-y); padding-bottom: var(--section-y); display: flex; flex-direction: column; gap: 32px; }
.history-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.history-head .stack { max-width: 640px; }
.toggle { display: flex; background: var(--track); border-radius: 8px; padding: 4px; gap: 4px; }
.toggle button {
  border: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 18px;
  border-radius: 6px; background: transparent; color: var(--ink);
}
.toggle button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(13, 34, 56, .15); }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 34px);
  display: flex; flex-direction: column; gap: 24px;
}
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--text-4); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }

.chart { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.y-axis { position: relative; height: 300px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.plot-scroll { overflow-x: auto; }
.plot { position: relative; height: 300px; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.gridline.zero { border-top-color: var(--ink); }
.groups, .x-labels { display: flex; gap: clamp(14px, 4vw, 56px); padding: 0 6px; }
.groups { position: absolute; inset: 0; }
.group { flex: 1; display: flex; gap: 5px; }
.bar { flex: 1; position: relative; }
.bar i { position: absolute; left: 0; right: 0; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.neg i { border-radius: 0 0 3px 3px; }
.bar b {
  position: absolute; left: 50%; transform: translate(-50%, calc(-100% - 6px)); font-size: 12px;
  white-space: nowrap; color: var(--green-text);
}
.bar.neg b { transform: translate(-50%, 6px); }
.x-labels { padding-top: 12px; }
.x-labels span { flex: 1; text-align: center; font-size: 14px; font-weight: 600; }

.table-scroll { overflow-x: auto; }
.perf-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; min-width: 520px; }
.perf-table th {
  text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  padding: 10px 8px; border-bottom: 1px solid var(--input-line);
}
.perf-table td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); }
.perf-table td:first-child { font-weight: 600; }
.perf-table .bcm { font-weight: 700; color: var(--green-text); }
.disclaimer { font-size: 13px; line-height: 1.6; color: var(--text-3); max-width: 900px; }

/* Services */
.services { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.services > .wrap { padding-top: var(--section-y); padding-bottom: var(--section-y); display: flex; flex-direction: column; gap: 44px; }
.section-head { max-width: 660px; }
.service-grid { --min: 280px; border-top: 2px solid var(--ink); }
.service { padding: 28px 28px 28px 0; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.service .tag { font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: .06em; }
.service h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }
.service p, .why p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.positions {
  --min: 380px; gap: clamp(24px, 5vw, 64px); align-items: center; background: var(--navy-950);
  color: var(--on-navy); border-radius: 12px; padding: clamp(26px, 4vw, 52px);
}
.positions h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; color: #fff; letter-spacing: 0; }
.positions ul { list-style: none; margin: 0; padding: 0; }
.positions li { padding: 14px 0; border-bottom: 1px solid var(--navy-line); font-size: 18px; color: #fff; font-weight: 500; }
.positions li:last-child { border-bottom: none; }

/* Why */
.why-section { padding-top: var(--section-y); padding-bottom: var(--section-y); display: flex; flex-direction: column; gap: 40px; }
.why-grid { --min: 240px; gap: 32px; }
.why { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 3px solid var(--c); }
.why h3 { font-size: 20px; font-weight: 700; }

/* Team */
.team { padding-bottom: var(--section-y); }
.team-copy { display: flex; flex-direction: column; gap: 14px; max-width: 660px; }
.team-copy .lead { max-width: 52ch; }
.person { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--green); background: #fff; flex: none; }
.person-name { display: flex; flex-direction: column; gap: 2px; }
.person-name .serif { font-size: 26px; }
.person-name span:last-child { font-size: 15px; color: var(--text-2); font-weight: 600; }

/* Contact */
.contact { background: var(--navy-950); color: var(--on-navy); }
.contact .grid { --min: 340px; padding-top: var(--section-y); padding-bottom: var(--section-y); gap: 40px; align-items: end; }
.contact .stack { gap: 16px; }
.contact h2 { font-size: clamp(38px, 5vw, 62px); line-height: 1.02; color: #fff; }
.contact .stack > p { font-size: 17px; line-height: 1.6; max-width: 44ch; }
.address { display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.55; padding-left: 20px; border-left: 1px solid var(--navy-line-2); }
.address .w { color: #fff; }
.address a { color: var(--blue-on-navy); margin-top: 8px; }
.site-footer {
  padding-top: 22px; padding-bottom: 32px; display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; font-size: 13px; border-top: 1px solid var(--navy-line);
}
.site-footer a { color: var(--on-navy-3); }
.site-footer a:hover { color: #fff; }

/* ---- Motion ----
   Entrance effects only apply under html.js-motion, which is set in <head> unless the visitor
   prefers reduced motion. Without it (or without JS) everything renders in its final state. */

.js-motion .reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
.js-motion .reveal.in { opacity: 1; transform: none; }

/* Hero card: card rises, number counts up (JS), rows follow, pills land. */
.js-motion .perf-card { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js-motion .perf-card.in { opacity: 1; transform: none; }
.js-motion [data-comparisons] .cmp { opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
.js-motion [data-comparisons].in .cmp { opacity: 1; transform: none; }
.js-motion [data-comparisons].in .pill { animation: pill-in .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.js-motion [data-comparisons].in .cmp:nth-child(2), .js-motion [data-comparisons].in .cmp:nth-child(2) .pill { transition-delay: 90ms; animation-delay: 90ms; }
.js-motion [data-comparisons].in .cmp:nth-child(3), .js-motion [data-comparisons].in .cmp:nth-child(3) .pill { transition-delay: 180ms; animation-delay: 180ms; }
.js-motion [data-comparisons].in .cmp:nth-child(4), .js-motion [data-comparisons].in .cmp:nth-child(4) .pill { transition-delay: 270ms; animation-delay: 270ms; }
@keyframes pill-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* Chart: bars grow from the zero line in sequence; the BCM label fades in after its bar. */
.js-motion .bar i { transform: scaleY(0); transform-origin: bottom; transition: transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.js-motion .bar.neg i { transform-origin: top; }
.js-motion .bar b { opacity: 0; transition: opacity .4s ease calc(var(--d, 0ms) + 500ms); }
.js-motion .chart.in .bar i { transform: none; }
.js-motion .chart.in .bar b { opacity: 1; }

/* Ticker marquee (JS builds two identical halves; -50% loops seamlessly). */
.ticker.marquee { overflow: hidden; }
.ticker.marquee .wrap {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker-half { display: flex; gap: 28px; padding-right: 28px; align-items: center; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Hover touches (mouse/trackpad only). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn, .nav a.nav-cta { transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
  .btn:hover, .nav a.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
  .service { position: relative; }
  .service::before {
    content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: 0;
    background: var(--green); transition: width .45s cubic-bezier(.2, .7, .2, 1);
  }
  .service:hover::before { width: 100%; }
  .positions li { transition: transform .2s ease, color .2s ease; }
  .positions li:hover { transform: translateX(6px); color: var(--green-on-navy); }
  .why { transition: transform .25s ease; }
  .why:hover { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

[hidden] { display: none !important; }
