/*
  MacroConsulting public site (generated by JWTClaims, docs/website.md). Copied to /assets/site.css on every build.
  The public site has its own brand tokens (--site-*), separate from the app's Carta tokens (--mc-*), like website.css.
  Mobile first: the base rules are the phone layout; wider screens add columns from 821px.
*/
:root {
  --site-bg: #F3F4F2;
  --site-surface: #FFFFFF;
  --site-ink: #14161A;
  --site-body: #3A3E44;
  --site-muted: #565B63;
  --site-line: #D6D9D7;
  --site-line-soft: #E1E3E1;
  --site-accent: #9C1F37;
  --site-dark: #14161A;
  --site-dark-line: #2E3238;
  --site-dark-text: #F3F4F2;
  --site-dark-body: #D3D6DA;
  --site-dark-muted: #B9BDC2;
  --site-dark-accent: #E58A9A;
  --site-font-head: Jost, "Futura", system-ui, sans-serif;
  --site-font-body: "IBM Plex Sans", system-ui, sans-serif;
  --site-font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --site-max: 1280px;
  --site-pad: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: var(--site-font-body);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--site-ink); text-decoration: none; }
a:hover { color: var(--site-accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--site-font-head); font-weight: 500; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--site-ink); color: #FFFFFF; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; color: #FFFFFF; }
.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; }
.wrap { max-width: var(--site-max); margin: 0 auto; padding-left: var(--site-pad); padding-right: var(--site-pad); }
.sec { padding-top: 56px; padding-bottom: 32px; }
.link { border-bottom: 1px solid #C9CCCA; }
.link:hover { border-color: var(--site-accent); }
.mono { font-family: var(--site-font-mono); }
.accent { color: var(--site-accent); }

/* Header */
.hdr { border-bottom: 1px solid var(--site-line); background: var(--site-bg); position: sticky; top: 0; z-index: 5; }
.hdr-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.hdr-logo img { height: 28px; width: auto; display: block; }
.nav, .langs { display: none; }
.nav a { font-size: 14.5px; font-weight: 500; }
.nav a[aria-current="page"] { color: var(--site-accent); border-bottom: 2px solid var(--site-accent); padding-bottom: 2px; }
.langs a { font-family: var(--site-font-mono); font-size: 13px; color: var(--site-muted); min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-bottom: 2px solid transparent; }
.langs a[aria-current="true"] { color: var(--site-ink); font-weight: 500; border-color: var(--site-accent); }
.burger { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--site-ink); cursor: pointer; padding: 0; }
.burger svg path { stroke: var(--site-ink); }
.menu { border-top: 1px solid var(--site-line); padding-bottom: 20px; }
.menu[hidden] { display: none; }
.menu a.menu-item { display: block; padding: 13px 0; border-bottom: 1px solid var(--site-line-soft); font-family: var(--site-font-head); font-size: 20px; }
.menu a.menu-item[aria-current="page"] { color: var(--site-accent); }
.menu .langs-m { display: flex; gap: 4px; margin-top: 14px; }
.menu .langs-m a { font-family: var(--site-font-mono); font-size: 14px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--site-muted); border-bottom: 2px solid transparent; }
.menu .langs-m a[aria-current="true"] { color: var(--site-ink); border-color: var(--site-accent); }

/* Hero */
.hero { padding-top: 48px; padding-bottom: 40px; }
.hero-inner { display: flex; flex-direction: column; gap: 22px; max-width: 980px; }
.eyebrow { display: flex; align-items: center; gap: 14px; font-family: var(--site-font-mono); font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--site-muted); }
.bars { display: inline-flex; gap: 4px; }
.bars span { width: 4px; height: 18px; background: var(--site-accent); transform: skewX(-28deg); }
.hero h1 { font-size: clamp(36px, 9vw, 72px); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--site-accent); }
.lead { font-size: 18px; color: var(--site-body); max-width: 36em; text-wrap: pretty; }
.crumbs { display: flex; gap: 8px; font-family: var(--site-font-mono); font-size: 12.5px; color: var(--site-muted); margin-bottom: 22px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; font-weight: 500; font-size: 15px; border: 1px solid var(--site-ink); }
.btn-dark { background: var(--site-ink); color: #FFFFFF; }
.btn-dark:hover { background: var(--site-accent); border-color: var(--site-accent); color: #FFFFFF; }

/* Map */
.map-card { background: var(--site-surface); border: 1px solid var(--site-line); }
.map-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; padding: 14px 16px; border-bottom: 1px solid var(--site-line); }
.map-head h2 { font-size: 19px; }
.map-img { padding: 16px 8px 4px; }
.map-img img { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; font-size: 13px; color: var(--site-muted); border-top: 1px solid var(--site-line); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; background: var(--site-accent); }
.sw-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--site-ink); }

/* Figures */
.figs-gap { margin-top: 40px; }
.figs { border-top: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); background: var(--site-surface); }
.figs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig { padding: 20px 12px 18px 0; display: flex; flex-direction: column; gap: 4px; }
.fig-n { font-family: var(--site-font-head); font-weight: 500; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.fig-l { font-size: 14px; color: var(--site-muted); }

/* Section heads */
.sh { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; }
.sh-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 16px; margin-bottom: 26px; }
.sh-row .sh { margin-bottom: 0; }
.sh-n { font-family: var(--site-font-mono); font-size: 13px; color: var(--site-accent); }
.sh h2 { font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; }

/* What we do */
.pillars { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pillar { min-width: 0; padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; flex: 1 1 100%; }
.pillar-core { background: var(--site-surface); border: 1px solid var(--site-ink); }
.pillar-side { background: var(--site-dark); color: var(--site-dark-text); }
.tag { font-family: var(--site-font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--site-accent); }
.pillar-side .tag { color: var(--site-dark-muted); }
.pillar-core h3 { font-size: 30px; line-height: 1.1; }
.pillar-side h3 { font-size: 26px; line-height: 1.15; }
.pillar-core p { font-size: 16.5px; color: var(--site-body); max-width: 36em; }
.pillar-side p { font-size: 15.5px; color: var(--site-dark-body); }
.numlist { display: grid; grid-template-columns: 1fr; column-gap: 28px; border-top: 1px solid var(--site-line-soft); }
.numlist li { padding: 11px 0; border-bottom: 1px solid var(--site-line-soft); font-size: 15.5px; display: flex; gap: 14px; }
.numlist li span:first-child { font-family: var(--site-font-mono); font-size: 12px; color: var(--site-accent); padding-top: 3px; }
.pillar-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--site-font-mono); font-size: 13px; color: var(--site-muted); }
.syslist { border-top: 1px solid var(--site-dark-line); }
.syslist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--site-dark-line); font-size: 15px; }
.syslist li span:last-child { font-family: var(--site-font-mono); font-size: 12px; color: var(--site-dark-muted); text-align: right; }
.pillar-side a.more { margin-top: auto; align-self: flex-start; color: var(--site-dark-text); font-weight: 500; font-size: 15px; border-bottom: 1px solid #6A6E75; padding-bottom: 2px; }

/* Works list */
.works { border-top: 1px solid var(--site-ink); }
.work { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--site-line); }
.work-year { font-family: var(--site-font-mono); font-size: 13px; color: var(--site-muted); font-variant-numeric: tabular-nums; }
.work-place { font-size: 14.5px; font-weight: 500; }
.work-name { grid-column: 1 / -1; font-family: var(--site-font-head); font-size: 17px; line-height: 1.3; }
.work-client { grid-column: 1 / -1; font-size: 14px; color: var(--site-muted); }
.work-sec { display: none; font-family: var(--site-font-mono); font-size: 12.5px; color: var(--site-muted); text-align: right; }
.work details { grid-column: 1 / -1; font-size: 15px; color: var(--site-body); }
.work summary { cursor: pointer; font-size: 14px; color: var(--site-muted); list-style: none; }
.work summary::-webkit-details-marker { display: none; }
.work summary::before { content: "+ "; color: var(--site-accent); }
.work details[open] summary::before { content: "– "; }
.work details p { margin-top: 8px; max-width: 60em; white-space: pre-line; }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button { min-height: 40px; padding: 0 14px; background: var(--site-surface); border: 1px solid var(--site-line); font: inherit; font-size: 14px; cursor: pointer; color: var(--site-ink); }
.filters button[aria-pressed="true"] { background: var(--site-ink); border-color: var(--site-ink); color: #FFFFFF; }

/* Clients */
.clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--site-line); border-left: 1px solid var(--site-line); background: var(--site-surface); }
.client { height: 96px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); padding: 16px; }
.client img { max-height: 42px; max-width: 140px; width: auto; filter: grayscale(1); opacity: 0.9; }
.note { margin-top: 16px; font-size: 14.5px; color: var(--site-muted); }

/* News */
.news { border-top: 1px solid var(--site-ink); }
.news-item { display: flex; flex-direction: column; gap: 6px; padding: 18px 4px; border-bottom: 1px solid var(--site-line); }
.news-date { font-family: var(--site-font-mono); font-size: 12.5px; color: var(--site-muted); }
.news-title { font-family: var(--site-font-head); font-size: 20px; line-height: 1.3; }
.news-brief { font-size: 15px; color: var(--site-body); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.member { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; filter: grayscale(1); background: var(--site-line-soft); }
.member-name { font-family: var(--site-font-head); font-weight: 500; font-size: 19px; }
.member-role { font-size: 14px; color: var(--site-muted); }
.member-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; font-size: 14px; }
.team-text { grid-column: 1 / -1; border-top: 1px solid var(--site-ink); padding-top: 16px; font-size: 16px; color: var(--site-body); }

/* Services (economics) */
.services { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--site-ink); border-left: 1px solid var(--site-line); background: var(--site-surface); }
.service { padding: 24px 20px 20px; border-right: 1px solid var(--site-line); border-bottom: 1px solid var(--site-line); display: flex; flex-direction: column; gap: 12px; }
.service h3 { font-size: 22px; line-height: 1.2; }
.service p { font-size: 15.5px; color: var(--site-body); text-wrap: pretty; }
.service-ex { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--site-line-soft); }
.service-ex span:first-child { font-family: var(--site-font-mono); font-size: 12px; color: var(--site-muted); }
.service-ex span:last-child { font-size: 14.5px; font-weight: 500; }

/* Systems */
.featured { background: var(--site-dark); color: var(--site-dark-text); padding: 28px 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.featured-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-family: var(--site-font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-new { background: var(--site-dark-text); color: var(--site-ink); padding: 3px 8px; }
.featured-top .place { color: var(--site-dark-accent); }
.featured h3 { font-size: 28px; line-height: 1.15; }
.featured p { font-size: 16px; color: var(--site-dark-body); max-width: 44em; text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--site-font-mono); font-size: 12px; padding: 3px 8px; border: 1px solid var(--site-line); color: var(--site-body); }
.featured .chip { border-color: #4A4E55; color: var(--site-dark-text); }
.systems { display: grid; grid-template-columns: 1fr; gap: 20px; }
.system { background: var(--site-surface); border: 1px solid var(--site-line); padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.system-top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--site-font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--site-accent); }
.system-top span:last-child { color: var(--site-muted); }
.system h3 { font-size: 22px; line-height: 1.2; }
.system p { font-size: 15px; color: var(--site-body); text-wrap: pretty; }
.system .chips { margin-top: auto; }
.also { margin-top: 22px; font-size: 15px; color: var(--site-muted); }

/* Band + footer */
.band { border-top: 1px solid var(--site-ink); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.band p { font-family: var(--site-font-head); font-size: 24px; line-height: 1.2; max-width: 22em; }
.ftr { background: var(--site-dark); color: var(--site-dark-text); margin-top: 48px; }
.ftr a { color: var(--site-dark-text); }
.ftr a:hover { color: var(--site-dark-accent); }
.ftr-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.ftr-brand { display: flex; flex-direction: column; gap: 16px; }
.ftr-brand img { width: 180px; height: auto; }
.ftr-brand a { border-bottom: 1px solid #4A4E55; align-self: flex-start; font-weight: 500; }
.ftr-label { font-family: var(--site-font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--site-dark-muted); }
.ftr-office { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: #DADDE0; }
.ftr-bottom { border-top: 1px solid var(--site-dark-line); padding-top: 18px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--site-dark-muted); }
.ftr-bottom nav { display: flex; gap: 12px; font-family: var(--site-font-mono); }
.ftr-bottom nav a { color: var(--site-dark-muted); }

/* Root language chooser + 404 */
.site-chooser-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; }
.site-chooser-main ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.site-chooser-main a { display: inline-flex; min-height: 48px; align-items: center; padding: 0 20px; border: 1px solid var(--site-ink); font-weight: 500; }

/* Wider screens */
@media (min-width: 821px) {
  :root { --site-pad: 40px; }
  .sec { padding-top: 88px; padding-bottom: 40px; }
  .hdr { position: static; }
  .hdr-bar { padding-top: 18px; padding-bottom: 18px; gap: 16px 32px; flex-wrap: wrap; }
  .hdr-logo img { height: 30px; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px 26px; }
  .langs { display: flex; gap: 2px; }
  .burger, .menu { display: none !important; }
  .hero { padding-top: 72px; padding-bottom: 48px; }
  .lead { font-size: 19px; }
  .map-head { padding: 16px 22px; }
  .map-img { padding: 20px 16px 8px; }
  .legend { padding: 12px 18px; }
  .figs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fig { padding: 30px 24px 28px 0; }
  .fig-n { font-size: 52px; }
  .sh h2 { font-size: 38px; }
  .pillar { padding: 40px; }
  .pillar-core { flex: 2 1 560px; }
  .pillar-side { flex: 1 1 320px; padding: 40px 32px; }
  .pillar-core h3 { font-size: 36px; }
  .numlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work { grid-template-columns: 96px minmax(120px, 180px) minmax(0, 1fr) minmax(110px, 170px); gap: 6px 24px; padding: 18px 8px; }
  .work:hover { background: var(--site-surface); }
  .work-name { grid-column: auto; font-size: 19px; }
  .work-sec { display: block; }
  .work-client, .work details { grid-column: 3 / 5; }
  .clients { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .client { height: 112px; padding: 20px; }
  .client img { max-height: 46px; max-width: 150px; }
  .news-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .team { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
  .team-text { grid-column: auto; }
  .services { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
  .service { padding: 28px 26px 24px; }
  .featured { padding: 40px; }
  .featured h3 { font-size: 32px; }
  .systems { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .system { padding: 26px 26px 24px; }
  .band p { font-size: 28px; }
  .ftr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
