/* =====================================================================
   Blackman Morgan Sachs Group — Shared Stylesheet
   Single source of truth for design tokens, typography, components.
   Every page imports this file — edit here, ship everywhere.
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Color system — navy/slate primary, restrained accent */
  --ink: #0f172a;            /* deep navy, primary text + dark surfaces */
  --ink-2: #1e293b;           /* slate-800, secondary surfaces */
  --ink-3: #334155;           /* slate-700, tertiary */
  --paper: #ffffff;
  --paper-2: #f8fafc;         /* slate-50, page bg variant */
  --paper-3: #f1f5f9;         /* slate-100, card bg */
  --line: #e2e8f0;            /* slate-200, borders */
  --line-strong: #cbd5e1;      /* slate-300 */
  --muted: #64748b;            /* slate-500, secondary text */
  --muted-2: #94a3b8;          /* slate-400 */

  --accent: #b45309;           /* amber-700, restrained warm accent */
  --accent-hover: #92400e;     /* amber-800 */
  --accent-soft: #fef3c7;      /* amber-100 for backgrounds */

  --success: #15803d;
  --warn: #b45309;
  --error: #b91c1c;

  /* Typography */
  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --container: 1180px;
  --container-narrow: 780px;
  --radius: 6px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
.h1, h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h2, h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.h3, h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--ink);
}
.h4, h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink);
}
p { color: var(--ink-2); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
}
.lead {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-3);
  font-weight: 400;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--container-narrow); }
.section { padding: clamp(4rem, 9vh, 7rem) 0; }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--paper); }
.section--ink p { color: rgba(255, 255, 255, 0.78); }

/* ---------- Top Navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.topbar__brand {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  padding-right: 10px;  /* room for the floating dot */
  transition: color .2s var(--ease);
}
.topbar__brand:hover { color: var(--accent); }
.topbar__brand-text {
  display: inline;
}
.topbar__brand-dot {
  position: absolute;
  top: -2px;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .2s var(--ease);
}
.topbar__brand:hover .topbar__brand-dot {
  transform: scale(1.2);
}
.topbar__nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.topbar__nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color .2s var(--ease);
  position: relative;
  padding: 6px 0;
}
.topbar__nav a:hover, .topbar__nav a.is-active {
  color: var(--ink);
}
.topbar__nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
  border-radius: 1px;
}
.topbar__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 500;
  background: var(--ink); color: var(--paper);
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.topbar__cta:hover { background: var(--accent); transform: translateY(-1px); }

/* Hamburger (mobile only) */
.nav-toggle { display: none; }
.nav-burger {
  display: none; cursor: pointer;
  width: 36px; height: 36px; position: relative;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.nav-burger:hover { background: var(--paper-3); }
.nav-burger span {
  position: absolute; left: 9px; right: 9px;
  height: 2px; background: var(--ink);
  border-radius: 1px;
  transition: transform .35s var(--ease), opacity .25s, top .35s var(--ease);
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 17px; }
.nav-burger span:nth-child(3) { top: 21px; }
.nav-toggle:checked ~ .topbar .nav-burger span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav-toggle:checked ~ .topbar .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .topbar .nav-burger span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: 88px 24px 32px;
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
  visibility: hidden;
  overflow-y: auto;
}
.nav-toggle:checked ~ .nav-drawer { transform: translateY(0); visibility: visible; }
.nav-drawer ul { display: flex; flex-direction: column; gap: 6px; }
.nav-drawer a {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.015em;
  transition: color .2s var(--ease), padding .2s var(--ease);
}
.nav-drawer a:hover { color: var(--accent); padding-left: 4px; }
.nav-drawer__footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.nav-drawer__footer a.contact-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  border: none;
  padding: 0;
}
.nav-drawer__footer .btn { align-self: flex-start; }
body:has(.nav-toggle:checked) { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--radius);
  transition: all .2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: var(--paper); }
.btn--accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); color: var(--accent); }
.btn--ghost-light {
  background: transparent; color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn--ghost-light:hover { border-color: var(--paper); background: rgba(255, 255, 255, 0.08); }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(4rem, 9vh, 7rem) 0 clamp(3rem, 7vh, 5rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  position: relative;
  overflow: hidden;
}
.hero__inner { max-width: 880px; }
.hero__title { margin: 18px 0 24px; }
.hero__sub {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 700px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 32px;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.footer__tag {
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 320px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.footer__personal {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}
.footer__personal a {
  color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer__personal a:hover { color: var(--accent); border-color: var(--accent); }
.footer__col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a, .footer__col li {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  transition: color .2s var(--ease);
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer__bottom a { color: rgba(255, 255, 255, 0.6); margin: 0 4px; }
.footer__bottom a:hover { color: var(--accent); }
.footer__copyright {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.footer__social {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  margin: 0 !important;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.footer__social:hover {
  background: var(--accent);
  color: var(--paper) !important;
  transform: translateY(-1px);
}
.footer__social svg { width: 14px; height: 14px; }

/* ---------- Cards / Tiles ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card--hover:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.grid {
  display: grid;
  gap: 20px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Icon tile ---------- */
.icon-tile {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.icon-tile svg { width: 22px; height: 22px; }
.section--ink .icon-tile { background: rgba(180, 83, 9, 0.18); color: var(--accent); }

/* ---------- Two-track (audience split) ---------- */
.audiences {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.audiences__track {
  padding: 60px 48px;
  position: relative;
}
.audiences__track:first-child { border-right: 1px solid var(--line); }
.audiences__track--blue { background: var(--paper); }
.audiences__track--white { background: var(--paper-2); }
.audiences__track .eyebrow { color: var(--accent); }
.audiences__track h2 { margin: 12px 0 16px; font-size: clamp(1.5rem, 2.2vw, 1.95rem); }
.audiences__track p { font-size: 0.98rem; color: var(--ink-3); margin-bottom: 18px; }
.audiences__track ul {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.audiences__track li {
  font-size: 0.78rem;
  background: var(--paper-3);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- Partners carousel ---------- */
.partners {
  padding: 56px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.partners__label {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 500;
}
.partners__viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.partners__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  will-change: transform;
}
.partners__item {
  display: flex; align-items: center; justify-content: center;
  height: 48px;
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 1.1rem; font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color .25s var(--ease), opacity .25s var(--ease);
  opacity: 0.7;
}
.partners__item:hover { opacity: 1; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .partners__viewport { overflow-x: auto; mask-image: none; -webkit-mask-image: none; }
  .partners__track { transform: none !important; }
}

/* ---------- CTA Strip ---------- */
.cta-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0;
  text-align: center;
}
.cta-strip h2 { color: var(--paper); margin-bottom: 16px; }
.cta-strip p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 580px; margin: 0 auto 32px;
  font-size: 1.05rem;
}
.cta-strip__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: clamp(3rem, 7vh, 5rem) 0 clamp(2rem, 4vh, 3rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}
.page-header h1 { margin: 14px 0 20px; max-width: 800px; }
.page-header .lead { max-width: 720px; }

/* ---------- Prose (legal/blog/text-heavy pages) ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin: 40px 0 16px; font-size: 1.6rem; }
.prose h3 { margin: 28px 0 12px; font-size: 1.2rem; }
.prose p { margin-bottom: 16px; line-height: 1.7; color: var(--ink-2); }
.prose ul { margin: 16px 0 16px 22px; list-style: disc; }
.prose ul li { margin-bottom: 8px; line-height: 1.7; color: var(--ink-2); }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { border-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- FAQ (accordion-style) ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
  transition: background .2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--sans);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 300;
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--paper-2); }
.faq-item__body {
  padding: 0 24px 22px;
  color: var(--ink-3);
  line-height: 1.65;
}
.faq-item__body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* ---------- Form embed ---------- */
.form-embed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.form-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  min-height: 1400px;
  background: var(--paper);
}

/* ---------- Stat row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.stat__num {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 4px;
}
.section--ink .stat__num { color: var(--paper); }
.section--ink .stat__label { color: rgba(255, 255, 255, 0.55); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topbar__nav, .topbar__cta { display: none; }
  .nav-burger { display: block; }

  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .audiences { grid-template-columns: 1fr; }
  .audiences__track:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .audiences__track { padding: 44px 28px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand-col { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}

@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-drawer a { font-size: 1.5rem; }
}

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: var(--paper); }
