/* ==========================================================================
   Nelson Organization site — v4 redesign.
   Editorial style: Fraunces (display serif) + Inter (body). Tokens copied
   verbatim from the approved v4 preview (nelson-redesign-v4.html).
   The legacy friendly-bento classes (fb-*) are kept, scoped, so pages NOT
   rebuilt in this pass (apply/careers/contact/team/legal) keep rendering
   against tools/legacy-chrome.html + the fb block below.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- v4 tokens (verbatim from the approved preview) --- */
:root, html[data-theme='light'] {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --ink: #1a2029;
  --ink-2: #4a5568;
  --ink-3: #626c7e;
  --line: rgba(26, 32, 41, .08);
  --blue: #00548c;
  --blue-soft: rgba(0, 84, 140, .08);
  --blue-deep: #003d66;
  --green: #309c42;
  --green-soft: rgba(48, 156, 66, .08);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .12);
  --font-serif: 'Fraunces', ui-serif, Georgia, serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --content-max: 1160px;
  --side-pad: 32px;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2129;
  --ink: #e6e9ef;
  --ink-2: #9ba4b5;
  --ink-3: #98a3b6;
  --line: rgba(255, 255, 255, .08);
  --blue: #4da3d8;
  --blue-soft: rgba(77, 163, 216, .1);
  --blue-deep: #0d4972;
  --green: #4cc46a;
  --green-soft: rgba(76, 196, 106, .1);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 300; line-height: 1.1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
em { font-style: italic; }

.skip-link {
  position: absolute; left: 8px; top: -100%;
  background: var(--blue-deep); color: #fff;
  padding: 10px 18px; border-radius: 0 0 10px 10px;
  z-index: 200; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* --- shell --- */
.wrap { max-width: var(--content-max); margin: 0 auto; padding-left: var(--side-pad); padding-right: var(--side-pad); }

/* --- header --- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--content-max); margin: 0 auto; padding: 14px var(--side-pad);
  display: flex; align-items: center; gap: 28px;
}
.logo-badge {
  background: #fff; border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08), 0 0 0 1px var(--line);
  display: inline-flex; align-items: center; flex: none;
}
.logo-badge img { height: 72px; width: auto; }
.topnav { display: flex; gap: 28px; margin-left: auto; }
.topnav a {
  position: relative; color: var(--ink-2); font-weight: 500; font-size: 15px;
  padding: 4px 0; text-decoration: none;
}
.topnav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--blue); transition: width .25s cubic-bezier(.22, 1, .36, 1);
}
.topnav a:hover::after, .topnav a[aria-current="page"]::after { width: 100%; }
.topnav a:hover { color: var(--ink); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--ink); }

.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 10px 22px;
  font: 600 15px/1.2 var(--font-sans);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--blue) 60%, transparent); }
html[data-theme='dark'] .btn-primary { color: #071018; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
}
.btn-ghost:hover { box-shadow: 0 0 0 1px var(--ink-3); text-decoration: none; }
.btn-white { background: #fff; color: var(--blue-deep); font-weight: 600; }
.btn-white:hover { filter: brightness(.97); text-decoration: none; }

/* theme toggle (kept from v3 pattern) */
.theme-toggle {
  height: 36px; padding: 0 12px; border: 0; cursor: pointer;
  border-radius: 999px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  font: 600 13px var(--font-sans); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.75; }

/* mobile menu (same pattern as before, restyled) */
.menu-btn {
  display: none; border: 0; background: none; cursor: pointer;
  padding: 8px; color: var(--ink); margin-left: auto;
}
.menu-btn .bar { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor; margin: 5px 0; }
.mobile-menu { display: none; }
@media (max-width: 840px) {
  .menu-btn { display: block; min-width: 44px; min-height: 44px; padding: 10px; }
  .menu-btn .bar { margin: 4px auto; }
  .theme-toggle { min-height: 44px; }
  .topnav, .topbar__inner .btn, .topbar__inner .theme-toggle { display: none; }
  .mobile-menu {
    display: block; position: fixed; inset: 72px 0 auto 0; z-index: 60;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.25);
    transform: translateY(-130%); visibility: hidden; transition: transform .28s ease, visibility .28s;
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .mobile-menu.is-open { transform: translateY(0); visibility: visible; }
  .mobile-menu a {
    display: block; padding: 14px 4px; font-weight: 500; font-size: 16px;
    color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
  }
  .mobile-menu a[aria-current="page"] { color: var(--blue); }
  .mobile-menu .btn { margin-top: 14px; width: 100%; }
  .mobile-menu .theme-toggle { margin-top: 14px; }
}

/* --- type --- */
.eyebrow {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin: 0 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 32px; height: 1.5px; background: var(--blue); flex: none; }
.h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 300; line-height: 1.04; margin: 0 0 20px; }
.h1 em { color: var(--blue); }
.h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 300; line-height: 1.12; margin: 0 0 16px; }
.h2 em { color: var(--blue); }
.lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.kicker {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin: 0 0 16px;
}

/* --- hero --- */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
/* The homepage wraps the hero's two columns in .hero-grid; make it transparent to
   the grid so the columns land in .hero's tracks (was an unstyled div → stacked). */
.hero-grid { display: contents; }
.hero__lead { margin: 0 0 28px; max-width: 52ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__media { position: relative; }
.img-slot {
  border: 2px dashed var(--line);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding: 24px; min-width: 0;
  color: var(--ink-3); width: 100%;
}
.img-slot__label { font-family: var(--font-serif); font-weight: 400; font-size: 15px; color: var(--ink-2); }
.img-slot__what { font-size: 13px; color: var(--ink-2); max-width: 26ch; }
.hero__img { aspect-ratio: 4 / 4.6; }
/* portrait cutout panel — transparent PNG of London on a soft blue-washed panel */
.portrait-cutout {
  position: relative; border-radius: 22px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  background:
    radial-gradient(95% 75% at 50% 38%, var(--blue-soft), transparent 72%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 26px 60px -34px color-mix(in srgb, var(--blue) 55%, transparent);
}
.portrait-cutout img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; display: block; }
@media (max-width: 840px) { .portrait-cutout { max-width: 340px; margin-left: auto; margin-right: auto; } }
/* dark mode: lift the backdrop behind the subject so the dark blazer edge reads */
html[data-theme='dark'] .portrait-cutout {
  background:
    radial-gradient(82% 78% at 50% 52%, rgba(255, 255, 255, .13), transparent 76%),
    radial-gradient(95% 75% at 50% 38%, var(--blue-soft), transparent 72%),
    linear-gradient(160deg, #2a323d, #1a2029);
}
.float-badge {
  position: absolute;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--ink); border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 12px 32px -12px rgba(0,0,0,.25), 0 0 0 1px var(--line);
  font-size: 13px; line-height: 1.45;
  animation: floaty 7s ease-in-out infinite;
}
.float-badge strong { display: block; font-weight: 600; font-size: 14px; }
.float-badge span { color: var(--ink-2); }
.float-badge--a { top: 6%; right: -18px; }
.float-badge--b { bottom: 8%; left: -22px; animation-delay: -3.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
html[data-theme='dark'] .float-badge { background: rgba(22, 27, 34, .88); color: var(--ink); }

/* hero word-mask rise */
.wm { display: inline-block; overflow: hidden; vertical-align: bottom; }
.wm > span { display: inline-block; transform: translateY(110%); animation: wm-rise .9s cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: var(--wm-delay, 0s); }
@keyframes wm-rise { to { transform: translateY(0); } }

/* --- brand marquee --- */
.marquee {
  background: var(--blue); color: #fff; overflow: hidden;
  padding: 18px 0; white-space: nowrap;
}
.marquee__track { display: inline-block; animation: marquee 28s linear infinite; }
.marquee__track span {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: 20px; padding: 0 18px;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- editorial break / section rows --- */
.ed-break { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; padding: 80px 0 48px; }
.ed-break p { margin: 0; }
.side-note { color: var(--ink-2); font-size: 16px; }
.section { padding: 48px 0; }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head .side { margin: 0; }

/* --- stat strip --- */
.stats { display: grid; grid-template-columns: repeat(var(--stat-count, 4), 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-family: var(--font-serif); font-weight: 300; font-size: clamp(36px, 4.4vw, 56px); line-height: 1; margin: 0 0 8px; }
.stat__num sup { font-size: .45em; color: var(--ink-2); font-weight: 400; }
.stat__label { font-size: 14px; color: var(--ink-2); margin: 0; }

/* --- bento --- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  background: var(--surface); border-radius: 20px;
  border: 1px solid var(--line);
  padding: 28px;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, border-color .25s ease;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.tile--tint { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 18%, transparent); }
.tile--green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 18%, transparent); }
.tile h3 { font-size: 22px; font-weight: 400; margin: 0 0 12px; }
.tile p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.tile p:last-child { margin-bottom: 0; }
.tile__num { font-family: var(--font-serif); font-size: 14px; color: var(--blue); font-style: italic; margin: 0 0 12px; display: block; }
.tile__arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--blue); }
.tile__arrow:hover { text-decoration: none; gap: 12px; }
.tile__arrow::after { content: '→'; transition: none; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.tile__img { min-height: 320px; }
.tile__img--short { min-height: 300px; }
.tile__img--wide { min-height: 280px; }
.tile__img, .tile__img--short, .tile__img--wide { position: relative; overflow: hidden; padding: 0; }
.tile .tile__caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 16px 24px 18px; background: #00253f; color: #fff; font-family: var(--font-serif); font-size: 19px; line-height: 1.3; }
.tile .tile__caption .kicker { display: block; color: #fff; margin: 0 0 4px; }

/* --- quote band --- */
.quote-band { padding: 72px 0; max-width: 880px; }
.quote-band__mark { font-family: var(--font-serif); font-size: 110px; line-height: .6; color: var(--blue); opacity: .25; display: block; margin-bottom: 8px; }
.quote-band__text { font-family: var(--font-serif); font-weight: 300; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.25; margin: 0 0 24px; }
.quote-band__text em { color: var(--blue); }
.quote-band cite { font-variant: small-caps; font-style: normal; font-size: 14px; letter-spacing: .08em; color: var(--ink-2); }

/* --- crests --- */
.crests { text-align: center; padding: 56px 0; }
.crest-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; max-width: 900px; margin: 0 auto 20px; }
.crest-chip {
  width: 80px; height: 80px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; padding: 10px;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
}
.crest-chip:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.crest-chip img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Union logos have white backgrounds — keep chips white in dark mode so logos stay legible */
html[data-theme='dark'] .crest-chip { background: #fff; border-color: rgba(255,255,255,.15); }
.crests__note { font-size: 14px; color: var(--ink-3); margin: 0; }

/* --- CTA panel --- */
.cta-panel {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: #fff; border-radius: 26px; padding: 64px 40px;
  text-align: center; margin: 56px 0;
  position: relative;
}
/* The gradient's bright end is the --blue token; in dark mode that leaves the
   small white text under AA (4.26:1 measured). A subtle dark scrim brings the
   worst corner above 4.5:1 while keeping the v4 look. */
.cta-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(0, 0, 0, .5); pointer-events: none;
}
.cta-panel > * { position: relative; } /* keep content above the scrim */
html[data-theme='light'] .cta-panel::before { background: rgba(0, 0, 0, .18); }
.cta-panel .h2 { color: #fff; }
.cta-panel .h2 em { color: #fff; opacity: .85; }
.cta-panel p { color: #fff; }
.cta-panel .btn { margin-top: 24px; }

/* --- footer --- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0; }
.footer__inner { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--side-pad); display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; justify-content: space-between; }
.footer .logo-badge img { height: 36px; }
.footer p { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); max-width: 46ch; }
.footer__nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.footer__nav a { color: var(--ink-2); }
.footer__nav a:hover { color: var(--ink); }

/* --- about --- */
.about-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 56px 0 64px; }
.about-hero__img { aspect-ratio: 4 / 5; }
.story-quote blockquote { margin: 0; }
.story-quote p { font-family: var(--font-serif); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.story-quote cite { font-size: 13px; color: var(--ink-3); font-style: normal; }

/* --- scroll reveal --- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1); transition-delay: 0s; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.in, .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   LEGACY — friendly-bento styles for pages NOT redesigned in this pass
   (apply/careers/contact/team/legal). Rendered from tools/legacy-chrome.html.
   ========================================================================== */
.fb-container { max-width: 1160px; margin: 0 auto; padding: 40px 32px 96px; }
.fb-display { font-size: clamp(40px, 6.4vw, 76px); font-weight: 300; font-family: var(--font-serif); line-height: 1.02; letter-spacing: -.02em; margin: 0; color: var(--ink); }
.fb-h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 300; font-family: var(--font-serif); margin: 0; }
.fb-lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.fb-label { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--ink-3); }
.fb-caption { font-size: 13px; color: var(--ink-3); }
.fb-hero { margin: 8px 0 28px; max-width: 760px; }
.fb-hero .fb-lead { margin: 16px 0 24px; max-width: 560px; }
.fb-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fb-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.fb-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border-radius: 999px;
  padding: 6px 14px; box-shadow: 0 0 0 1px var(--line);
}
.fb-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.fb-topbar {
  position: sticky; top: 0; z-index: 20;
  min-height: 56px; display: flex; align-items: center; gap: 16px;
  padding: 8px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
.fb-topbar .brand-logo { height: 48px; width: auto; }
.fb-topbar .links { display: flex; gap: 18px; }
.fb-topbar .links a { color: var(--ink-2); font-weight: 600; }
.fb-topbar .links a[aria-current="page"] { color: var(--ink); }
.fb-topbar .sp { flex: 1; }
.fb-btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.fb-menu-btn { display: none; border: 0; background: none; cursor: pointer; padding: 8px; color: var(--ink); }
.fb-menu-btn .bar { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor; margin: 5px 0; }
.fb-mobile-menu { display: none; }
@media (max-width: 960px) {
  .fb-menu-btn { display: block; }
  .fb-topbar .links, .fb-topbar .fb-btn, .fb-topbar .theme-toggle { display: none; }
  .fb-mobile-menu {
    display: block; position: fixed; inset: 64px 0 auto 0; z-index: 30;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.25);
    transform: translateY(-130%); transition: transform .28s ease;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .fb-mobile-menu.is-open { transform: translateY(0); }
  .fb-mobile-menu a {
    display: block; padding: 14px 4px; font-weight: 600; font-size: 16px;
    color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
  }
  .fb-mobile-menu a[aria-current="page"] { color: var(--blue); }
  .fb-mobile-menu .fb-btn { margin-top: 14px; width: 100%; justify-content: center; }
}
.fb-btn {
  appearance: none; border: 0; cursor: pointer;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--font-sans); letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: filter .2s ease, box-shadow .2s ease;
}
.fb-btn:active { transform: translateY(1px); }
.fb-btn-primary { background: var(--blue); color: #fff; }
html[data-theme='dark'] .fb-btn-primary { color: #071018; }
.fb-btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
/* Any primary/ghost button sitting on the dark CTA panel: give white text a dark enough backdrop */
.cta-panel .btn-primary, .cta-panel .btn-ghost { background: rgba(0, 0, 0, .45); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
/* The white CTA button: darker blue text so it reads AA on the white pill */
.cta-panel .btn-white { color: #002f4f; }
.cta-panel .btn-primary:hover, .cta-panel .btn-ghost:hover { background: rgba(0, 0, 0, .55); filter: none; }
.fb-btn-secondary { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.fb-btn-secondary:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--ink-3); }
.fb-page-head { margin: 8px 0 28px; max-width: 720px; }
.fb-page-head .fb-lead { margin: 14px 0 0; max-width: 560px; }
.fb-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.fb-bento .span-3 { grid-column: span 3; } .fb-bento .span-4 { grid-column: span 4; }
.fb-bento .span-5 { grid-column: span 5; } .fb-bento .span-6 { grid-column: span 6; }
.fb-bento .span-7 { grid-column: span 7; } .fb-bento .span-8 { grid-column: span 8; }
.fb-bento .span-12 { grid-column: span 12; }
.fb-tile { background: var(--surface); border-radius: 20px; padding: 22px; border: 1px solid var(--line); min-width: 0; }
.fb-tile h3 { font-size: 18px; font-weight: 500; margin: 0 0 6px; font-family: var(--font-sans); letter-spacing: 0; }
.fb-tile > .fb-label { display: block; margin-bottom: 12px; }
.fb-tile p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.fb-tile-hero { background: linear-gradient(160deg, var(--blue-deep), var(--blue)); color: #fff; border-radius: 20px; padding: 22px; position: relative; overflow: hidden; }
.fb-tile-hero .fb-label { color: rgba(255,255,255,.75); }
.fb-tile-hero .fb-lead { color: rgba(255,255,255,.85); }
.fb-tile-hero h2 { color: #fff; }
.fb-tile-mint { background: var(--green-soft); }
html[data-theme='dark'] .fb-tile-mint { color: var(--ink); }
.fb-icon { width: 22px; height: 22px; stroke-width: 1.75; stroke: var(--blue); fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.photo-placeholder {
  border: 2px dashed var(--line); border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding: 20px; min-width: 0; height: 100%;
  color: var(--ink-3); background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.photo-placeholder__label { font-family: var(--font-serif); font-weight: 400; font-size: 13px; letter-spacing: .01em; color: var(--ink-2); }
.photo-placeholder__what { font-size: 13px; color: var(--ink-3); max-width: 24ch; }
.manager { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.manager .photo-placeholder { width: 180px; aspect-ratio: 4 / 5; flex: none; border-radius: 20px; }
.manager-photo { width: 180px; flex: none; border-radius: 20px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; height: auto; }
.manager-feature { align-items: flex-start; gap: 26px; }
.manager-photo-cutout { width: clamp(260px, 42%, 380px); flex: none; height: auto; }
.manager-feature > div { min-width: 220px; flex: 1; }
.fb-form { max-width: 620px; display: grid; gap: 16px; }
.fb-form h2 { font-size: 22px; margin: 8px 0 -6px; }
.fb-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.fb-field .fb-hint { font-size: 13px; color: var(--ink-3); margin: -2px 0 6px; }
.fb-field input[type="text"], .fb-field input[type="email"], .fb-field input[type="tel"],
.fb-field select, .fb-field textarea {
  height: 48px; width: 100%; padding: 0 14px;
  border: 0; border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font: 400 15px var(--font-sans);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .15s ease;
}
.fb-field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.fb-field input:focus, .fb-field select:focus, .fb-field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--blue), 0 0 0 4px var(--blue-soft);
}
.fb-field input[aria-invalid="true"] { box-shadow: 0 0 0 1px #d70015, 0 0 0 4px rgba(215,0,21,.15); }
.fb-field .fb-error, .fb-fieldset .fb-error { display: none; font-size: 13px; font-weight: 600; color: #d70015; margin-top: 6px; }
html[data-theme='dark'] .fb-field .fb-error, html[data-theme='dark'] .fb-fieldset .fb-error { color: #ff6961; }
.fb-field.has-error .fb-error, .fb-fieldset.has-error .fb-error { display: block; }
.fb-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-choice {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.fb-choice:hover { box-shadow: 0 0 0 1px var(--ink-3); }
.fb-choice input { accent-color: var(--blue); margin: 0; }
.fb-choice:has(input:checked) { box-shadow: 0 0 0 2px var(--blue); }
.fb-choice:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.fb-file input[type="file"] {
  width: 100%; font-size: 14px; padding: 12px;
  border: 1.5px dashed var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
}
.fb-file input[type="file"]::file-selector-button {
  font: 600 13px var(--font-sans); padding: 8px 14px; margin-right: 10px;
  border: 0; border-radius: 999px; background: var(--blue); color: #fff; cursor: pointer;
}
.fb-consent { background: var(--surface-2); border-radius: 16px; padding: 8px 16px 16px; }
.fb-consent__row { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 6px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.fb-consent input[type="checkbox"] { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--blue); cursor: pointer; }
.fb-consent .fb-small { font-size: 13px; color: var(--ink-3); margin: 2px 0 0 36px; line-height: 1.5; }
.fb-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fb-status { font-size: 14px; font-weight: 600; }
.fb-status[data-state="error"] { color: #d70015; }
html[data-theme='dark'] .fb-status[data-state="error"] { color: #ff6961; }
.fb-status[data-state="sending"] { color: var(--ink-3); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-turnstile-note { font-size: 13px; color: var(--ink-3); }
.fb-prose { max-width: 720px; }
.fb-prose h2, .fb-prose h3 { scroll-margin-top: 96px; }
.fb-prose h2 { font-size: 22px; margin: 28px 0 10px; }
.fb-prose h3 { font-size: 17px; margin: 22px 0 8px; }
.fb-prose p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.fb-prose ul { margin: 0 0 12px 20px; color: var(--ink-2); font-size: 15px; }
.fb-prose li { margin-bottom: 4px; }
.fb-prose strong { color: var(--ink); }
.fb-prose .updated { font-size: 13px; color: var(--ink-3); }
.fb-prose__callout { background: var(--green-soft); border-radius: 16px; padding: 14px 18px; margin: 18px 0; }
.fb-prose__callout p { color: var(--ink); margin: 0; }
.fb-template-banner { background: color-mix(in srgb, #d70015 8%, var(--surface)); border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: #d70015; }
html[data-theme='dark'] .fb-template-banner { color: #ff6961; background: color-mix(in srgb, #ff6961 10%, var(--surface)); }
.fb-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 24px 40px; }
.fb-footer__inner { max-width: var(--content-max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; justify-content: space-between; }
.fb-footer__logo { width: 200px; }
.fb-footer p { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); max-width: 46ch; }
.fb-footer__nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.fb-footer__nav a { color: var(--ink-2); }
.fb-footer__nav a:hover { color: var(--ink); }
.fb-section-head { margin: 44px 0 16px; }
.fb-section-head .fb-label { display: block; margin-bottom: 8px; }
.crest-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.6rem; }
.crest { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0.6rem; min-width: 0; }
.crest img { max-width: 100%; max-height: 100%; object-fit: contain; }
.crest:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.2); }
.crest { transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 26rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.carousel > * { scroll-snap-align: start; }
.carousel iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 16px; }

/* logo swap for legacy pages */
.logo-swap { display: none; }
html[data-theme='dark'] .logo-swap.logo--white { display: block; }
html[data-theme='dark'] .logo-swap.logo--blue { display: none; }
.logo-swap.logo--blue { display: block; }

/* legacy interbto responsive + reduced motion + responsive stacking */
@media (max-width: 960px) {
  .fb-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fb-bento > * { grid-column: span 2; }
  .fb-bento > .span-3, .fb-bento > .span-4 { grid-column: span 1; }
  .fb-container { padding: 28px 14px 72px; }
}

/* --- responsive (v4 pages) --- */
@media (max-width: 840px) {
  .fb-choice { min-height: 44px; }
  .hero, .about-hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 48px; }
  .hero__media { order: -1; width: 100%; max-width: 340px; margin: 0 auto; }
  .float-badge { display: none; }
  .ed-break { grid-template-columns: 1fr; gap: 20px; padding: 48px 0 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 14px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: auto !important; }
  .tile__img, .tile__img--short, .tile__img--wide { min-height: 220px; }
  .marquee__track span { font-size: 16px; }
  .cta-panel { padding: 40px 20px; }
  .footer__inner { flex-direction: column; }
  .footer__nav { column-gap: 20px; row-gap: 0; }
  .footer__nav a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --- reduced motion: everything static, reveals visible by default --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .wm > span { transform: none; animation: none; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .float-badge { animation: none; }
}
