/* ==========================================================================
   MMetrix — site styles
   Colours and fonts live in the tokens below; change them here and the
   whole site follows. Layout is mobile-first (min-width breakpoints).

   Palettes
   - MMetrix (every page except Lancer): blues from the logo, #1E56A0 → #2CB5D9.
   - Lancer (lancer.html sets <html data-brand="lancer">): Lancer's app palette.
   - .band sections use Lancer's deep teal wherever Lancer is promoted.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f5f7fa;
  --paper-2: #eaf0f6;
  --surface: #ffffff;
  --ink: #0b1b2f;
  --ink-2: #34465c;
  --muted: #56677d;
  --rule: #d3dce7;
  --rule-strong: #0b1b2f;
  --brand: #1e56a0;
  --brand-hover: #174684;
  --brand-ink: #ffffff;
  --brand-tint: #e2ecf8;
  --accent: #1d6fb0;                /* small labels */
  --accent-deco: #2cb5d9;           /* decorative lines and bullets */
  --line-grad: linear-gradient(90deg, #1e56a0, #2cb5d9);
  --text-grad: linear-gradient(90deg, #1e56a0, #178dbe);
  --glow: rgba(44, 181, 217, 0.16);
  --logo-a: #1e56a0;
  --logo-b: #2cb5d9;
  --danger: #b42318;
  --focus: #1d6fb0;
  --header-bg: rgba(245, 247, 250, 0.86);
  --shadow: 0 1px 2px rgba(11, 27, 47, 0.05), 0 22px 44px -26px rgba(11, 27, 47, 0.28);

  /* Lancer band */
  --band: #1c4d44;
  --band-ink: #ffffff;
  --band-muted: #e0e6e4;
  --band-accent: #9ccbbb;
  --band-rule: rgba(156, 203, 187, 0.28);

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: 20px;
  --max: 1240px;
  --radius: 10px;
  --radius-sm: 4px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* MMetrix — dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #08111e;
    --paper-2: #0b1727;
    --surface: #0f1d30;
    --ink: #e7eef7;
    --ink-2: #bcc9da;
    --muted: #8a9bb2;
    --rule: #1e2f47;
    --rule-strong: #bcc9da;
    --brand: #3dbde3;
    --brand-hover: #67cdeb;
    --brand-ink: #08111e;
    --brand-tint: #102a44;
    --accent: #5cc8ea;
    --accent-deco: #2cb5d9;
    --line-grad: linear-gradient(90deg, #3f84d6, #36c1e6);
    --text-grad: linear-gradient(90deg, #5a9be6, #3dc3e8);
    --glow: rgba(44, 181, 217, 0.12);
    --logo-a: #3f84d6;
    --logo-b: #36c1e6;
    --danger: #f97066;
    --focus: #5cc8ea;
    --header-bg: rgba(8, 17, 30, 0.84);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 26px 50px -30px rgba(0, 0, 0, 0.75);
    --band-ink: #e0e6e4;
    --band-muted: #c0cec9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #08111e;
  --paper-2: #0b1727;
  --surface: #0f1d30;
  --ink: #e7eef7;
  --ink-2: #bcc9da;
  --muted: #8a9bb2;
  --rule: #1e2f47;
  --rule-strong: #bcc9da;
  --brand: #3dbde3;
  --brand-hover: #67cdeb;
  --brand-ink: #08111e;
  --brand-tint: #102a44;
  --accent: #5cc8ea;
  --accent-deco: #2cb5d9;
  --line-grad: linear-gradient(90deg, #3f84d6, #36c1e6);
  --text-grad: linear-gradient(90deg, #5a9be6, #3dc3e8);
  --glow: rgba(44, 181, 217, 0.12);
  --logo-a: #3f84d6;
  --logo-b: #36c1e6;
  --danger: #f97066;
  --focus: #5cc8ea;
  --header-bg: rgba(8, 17, 30, 0.84);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 26px 50px -30px rgba(0, 0, 0, 0.75);
  --band-ink: #e0e6e4;
  --band-muted: #c0cec9;
}

/* Lancer — light (from Lancer's design tokens) */
:root[data-brand="lancer"] {
  color-scheme: light;
  --paper: #e0e6e4;
  --paper-2: #d0dbd8;
  --surface: #ffffff;
  --ink: #0b0e0d;
  --ink-2: #3a4a44;
  --muted: #505f59;
  --rule: #c0cec9;
  --rule-strong: #2a3d36;
  --brand: #1c4d44;
  --brand-hover: #2a3d36;
  --brand-ink: #ffffff;
  --brand-tint: #d0dbd8;
  --accent: #1c4d44;
  --accent-deco: #f08a24;
  --line-grad: linear-gradient(90deg, #f08a24, #f08a24);
  --text-grad: linear-gradient(90deg, #1c4d44, #1c4d44);
  --glow: rgba(156, 203, 187, 0.3);
  --logo-a: #1c4d44;
  --logo-b: #5c857e;
  --danger: #dc2626;
  --focus: #1c4d44;
  --header-bg: rgba(224, 230, 228, 0.86);
  --shadow: 0 1px 2px rgba(11, 14, 13, 0.05), 0 22px 44px -26px rgba(11, 14, 13, 0.25);
  --band-ink: #ffffff;
  --band-muted: #e0e6e4;
}

/* Lancer — dark */
@media (prefers-color-scheme: dark) {
  :root[data-brand="lancer"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #121b1a;
    --paper-2: #182521;
    --surface: #1e2922;
    --ink: #e0e6e4;
    --ink-2: #c0cec9;
    --muted: #7a9085;
    --rule: #2a3d36;
    --rule-strong: #7a9085;
    --brand: #9ccbbb;
    --brand-hover: #b4dbc9;
    --brand-ink: #0b0e0d;
    --brand-tint: #1a2926;
    --accent: #9ccbbb;
    --accent-deco: #f5a623;
    --line-grad: linear-gradient(90deg, #f5a623, #f5a623);
    --text-grad: linear-gradient(90deg, #9ccbbb, #9ccbbb);
    --glow: rgba(156, 203, 187, 0.08);
    --logo-a: #9ccbbb;
    --logo-b: #7aa19a;
    --danger: #f87171;
    --focus: #9ccbbb;
    --header-bg: rgba(18, 27, 26, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 26px 50px -30px rgba(0, 0, 0, 0.75);
    --band-ink: #e0e6e4;
    --band-muted: #c0cec9;
  }
}
:root[data-brand="lancer"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #121b1a;
  --paper-2: #182521;
  --surface: #1e2922;
  --ink: #e0e6e4;
  --ink-2: #c0cec9;
  --muted: #7a9085;
  --rule: #2a3d36;
  --rule-strong: #7a9085;
  --brand: #9ccbbb;
  --brand-hover: #b4dbc9;
  --brand-ink: #0b0e0d;
  --brand-tint: #1a2926;
  --accent: #9ccbbb;
  --accent-deco: #f5a623;
  --line-grad: linear-gradient(90deg, #f5a623, #f5a623);
  --text-grad: linear-gradient(90deg, #9ccbbb, #9ccbbb);
  --glow: rgba(156, 203, 187, 0.08);
  --logo-a: #9ccbbb;
  --logo-b: #7aa19a;
  --danger: #f87171;
  --focus: #9ccbbb;
  --header-bg: rgba(18, 27, 26, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 26px 50px -30px rgba(0, 0, 0, 0.75);
  --band-ink: #e0e6e4;
  --band-muted: #c0cec9;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 48px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--brand); color: var(--brand-ink); }

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--line-grad);
  flex: none;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.55rem + 4.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display em, .h2 em {
  font-style: italic;
  color: var(--brand);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .display em, .h2 em {
    padding: 0 0.12em 0.06em 0.08em;
    margin: 0 -0.12em -0.06em -0.08em;
    background-image: var(--text-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 40rem;
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }

.note {
  max-width: 44rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- Buttons & links ---------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--rule-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 1rem/1.2 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:hover svg.ext { transform: translate(2px, -2px); }

.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--brand-ink); --btn-bd: var(--brand); }
.btn-primary:hover { --btn-bg: var(--brand-hover); --btn-bd: var(--brand-hover); }
.btn-ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9375rem; }

.btn-light { --btn-bg: var(--band-accent); --btn-fg: #0c1514; --btn-bd: var(--band-accent); }
.btn-light:hover { --btn-bg: #bfe0d4; --btn-bd: #bfe0d4; }
.btn-outline-light { --btn-fg: var(--band-ink); --btn-bd: rgba(238, 244, 241, 0.45); }
.btn-outline-light:hover { --btn-bg: rgba(238, 244, 241, 0.08); --btn-bd: var(--band-ink); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--brand); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-scrolled,
.nav-open .site-header { border-bottom-color: var(--rule); }
/* With JavaScript, the header is see-through until the page scrolls */
html.js .site-header:not(.is-scrolled) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.js.nav-open .site-header,
.nav-open .site-header { background: var(--paper); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo { height: 32px; width: auto; aspect-ratio: 654.96 / 158.5; flex: none; }
.brand-logo-stacked { width: 136px; height: auto; aspect-ratio: 653.42 / 276.46; }
.lg-a { stop-color: var(--logo-a); }
.lg-b { stop-color: var(--logo-b); }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.icon-btn:hover { background: var(--brand-tint); }
.icon-btn svg { width: 20px; height: 20px; }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.burger { position: relative; display: block; width: 20px; height: 12px; }
.burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.burger span:first-child { top: 0; }
.burger span:last-child { top: 10.5px; }
.nav-open .burger span:first-child { top: 5.25px; transform: rotate(45deg); }
.nav-open .burger span:last-child { top: 5.25px; transform: rotate(-45deg); }

.nav-list { list-style: none; }
.nav-list a { color: var(--ink); text-decoration: none; }

/* Without JavaScript the menu simply shows as a row of links */
html:not(.js) .header-inner { flex-wrap: wrap; }
html:not(.js) .header-actions { display: none; }
html:not(.js) .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  width: 100%;
  padding-bottom: 0.9rem;
}
html:not(.js) .nav-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* Mobile menu (JavaScript on) */
html.js .site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem var(--gutter) 2.5rem;
  overflow-y: auto;
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
/* Lock scrolling on body, not html: body has overflow-x: hidden, so hiding overflow on html would
   turn body into its own scroll box and the sticky header (and this menu) would jump off-screen. */
html.js.nav-open body { overflow: hidden; }
html.js.nav-open .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s;
}
html.js .nav-list { border-top: 1px solid var(--rule); }
html.js .nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
html.js .nav-list a[aria-current="page"] { color: var(--brand); }
html.js .nav-cta { align-self: flex-start; min-height: 48px; padding: 0.75rem 1.35rem; font-size: 1rem; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }
  html.js .site-nav,
  html:not(.js) .site-nav {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
    padding: 0;
    overflow: visible;
    background: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  html:not(.js) .header-inner { flex-wrap: nowrap; }
  html.js .nav-list,
  html:not(.js) .nav-list { display: flex; gap: 1.85rem; border: 0; }
  html.js .nav-list a,
  html:not(.js) .nav-list a {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    border: 0;
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 0.975rem;
    letter-spacing: 0;
    transition: color 0.2s var(--ease);
  }
  .nav-list a:hover,
  html.js .nav-list a[aria-current="page"] { color: var(--ink); }
  .nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.2rem;
    height: 1px;
    background: var(--line-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }
  .nav-list a:hover::after,
  .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
  html.js .nav-cta { align-self: auto; min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4rem, 2.5rem + 6vw, 8rem);
  border-top: 1px solid var(--rule);
}
.section-tight { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section.flush { border-top: 0; padding-top: 0; }

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.section-index {
  margin: 0;
  font: 500 0.75rem/1.6 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-intro {
  max-width: 44rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--ink-2);
  text-wrap: pretty;
}
.section-foot { margin-top: 2.5rem; }
.split { display: grid; gap: 1.25rem; }

@media (min-width: 960px) {
  .section-head { grid-template-columns: 3fr 9fr; gap: 2rem; }
  .split { grid-template-columns: 3fr 9fr; gap: 2rem; }
  .split > :first-child { padding-top: 0.35rem; }
}

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(3rem, 2rem + 6vw, 7.5rem) clamp(3.5rem, 2rem + 5vw, 6.5rem); }

/* Soft brand glow behind the top of the home page (shows through the translucent header) */
.page-home {
  background-image: radial-gradient(circle min(640px, 80vw) at 86% 150px, var(--glow), transparent 72%);
  background-repeat: no-repeat;
}
.hero .display { max-width: 15ch; font-size: clamp(2.7rem, 1.5rem + 5.2vw, 6rem); }
.hero .lede { margin-top: 1.75rem; }
.hero-proof {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Rotating hero taglines: slides share one grid cell and cross-fade */
.hero-slides { display: grid; touch-action: pan-y; }
.hero-slide { grid-area: 1 / 1; min-width: 0; }
html.js .hero-slide {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0s linear 0.8s;
}
html.js .hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0s;
}
html:not(.js) .hero-slide:not(:first-child) { display: none; }
.hero-nav {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: clamp(2.25rem, 1.75rem + 2vw, 3.25rem);
}
.hero-tabs { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 1rem; }
.hero-tab {
  position: relative;
  min-height: 44px;
  padding: 0.9rem 0 0.35rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 0.72rem/1.35 var(--font-mono);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.hero-tab:hover, .hero-tab[aria-current="true"] { color: var(--ink); }
.hero-tab::before, .hero-tab::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
}
.hero-tab::before { background: var(--rule); }
.hero-tab::after { background: var(--line-grad); transform: scaleX(0); transform-origin: left; }
.hero-tab[aria-current="true"]::after { transform: scaleX(1); }
.hero-slider.is-playing .hero-tab[aria-current="true"]::after { animation: slide-progress var(--slide-time, 8s) linear both; }
.hero-slider.is-held .hero-tab[aria-current="true"]::after { animation-play-state: paused; }
@keyframes slide-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-pause { flex: none; margin-top: 0.1rem; }
.hero-pause .i-play { display: none; }
.hero-slider:not(.is-playing) .hero-pause .i-play { display: block; }
.hero-slider:not(.is-playing) .hero-pause .i-pause { display: none; }
@media (min-width: 768px) {
  .hero-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .hero-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.figures-note { margin-top: 1.5rem; }
.cell.cell-cta .link-arrow { margin-top: auto; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes page-enter { from { opacity: 0; } to { opacity: 1; } }

.rise { animation: rise 0.9s var(--ease) both; }
.rise-2 { animation-delay: 0.08s; }
.rise-3 { animation-delay: 0.16s; }
.rise-4 { animation-delay: 0.24s; }
.rise-5 { animation-delay: 0.32s; }

/* ---------- Figures strip ---------- */

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule-strong);
  list-style: none;
}
.figure { padding: 1.5rem 1rem 1.5rem 0; border-bottom: 1px solid var(--rule); }
.figure:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--rule); }
.figure-num {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}
.figure-num span { color: var(--accent); }
.figure-label { max-width: 24ch; margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }
@media (min-width: 900px) {
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .figure, .figure:nth-child(even) { padding: 1.75rem 1.5rem 0.5rem; border-bottom: 0; border-left: 1px solid var(--rule); }
  .figure:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- Cells (ruled grid of items) ---------- */

.cells { display: grid; gap: 0 2.5rem; list-style: none; }
@media (min-width: 700px) { .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cells-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cells-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cell {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule-strong);
}
.cell-num {
  margin-bottom: 1.1rem;
  font: 500 0.8rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--accent);
}
.cell .h3 { margin-bottom: 0.6rem; }
.cell p:not(.cell-num) { color: var(--ink-2); }
.cell .link-arrow { margin-top: 1.25rem; align-self: flex-start; }
.cell .jump { margin-top: auto; }
button.link-arrow {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  font: 600 1rem/1.4 var(--font-sans);
  cursor: pointer;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.1rem;
  list-style: none;
}
.tags li {
  padding: 0.42rem 0.62rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font: 0.72rem/1 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* ---------- Ledger (sector rows) ---------- */

.ledger { list-style: none; border-bottom: 1px solid var(--rule); }
.ledger-row {
  display: grid;
  gap: 0.4rem 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
}
.ledger-row h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.ledger-items { margin: 0; color: var(--ink-2); }
.ledger-count {
  margin: 0;
  font: 0.75rem/1.6 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}
@media (min-width: 800px) {
  .ledger-row { grid-template-columns: 4fr 7fr 1.4fr; align-items: baseline; }
  .ledger-count { text-align: right; }
}

/* ---------- Steps ---------- */

.steps { display: grid; list-style: none; }
.step {
  position: relative;
  margin-left: 0.4rem;
  padding: 0 0 2.25rem 2.25rem;
  border-left: 1px solid var(--rule);
}
.step:last-child { padding-bottom: 0; border-left-color: transparent; }
.step::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.3rem;
  width: 11px;
  height: 11px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: var(--paper);
}
.step-num {
  margin: 0;
  font: 500 0.75rem/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.step .h3 { margin: 0.35rem 0 0.5rem; }
.step p:not(.step-num) { font-size: 1rem; color: var(--ink-2); }
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem; }
  .step, .step:last-child { margin: 0; padding: 2rem 0 0; border-left: 0; border-top: 1px solid var(--rule); }
  .step::before { left: 0; top: -6px; }
}

.principles {
  display: grid;
  gap: 2rem;
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  list-style: none;
}
.principle { padding-top: 1.25rem; border-top: 1px solid var(--rule-strong); }
.principle .h3 { margin-bottom: 0.5rem; }
.principle p { color: var(--ink-2); }
@media (min-width: 800px) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}

/* ---------- Dark band (Lancer promo, CTAs) ---------- */

.band { background: var(--band); color: var(--band-ink); border-top: 0; }
.band .eyebrow { color: var(--band-accent); }
.band { --text-grad: linear-gradient(90deg, var(--band-accent), var(--band-accent)); }
.band .h2 em, .band .display em { color: var(--band-accent); }
.band .eyebrow::before { background: currentColor; }
.band p { color: var(--band-muted); }
.band a:not(.btn) { color: var(--band-ink); }

.promo-grid { display: grid; gap: 2.5rem; align-items: center; }
.promo-grid .h2 { max-width: 18ch; }
.promo-grid p:not(.eyebrow) { max-width: 36rem; margin-top: 1.25rem; font-size: 1.125rem; }
.promo-logo { width: min(420px, 100%); justify-self: center; }
@media (min-width: 960px) {
  .promo-grid { grid-template-columns: 7fr 5fr; gap: 4rem; }
  .promo-logo { justify-self: end; }
}

.lancer-logo { color: var(--band-ink); }
.lancer-logo .swoosh { fill: var(--band-accent); }
.lancer-logo .letters { fill: currentColor; }

/* ---------- Closing CTA ---------- */

.cta-grid { display: grid; gap: 2rem; }
.cta .h2 { max-width: 16ch; font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.2rem); }
.cta-side p { color: var(--ink-2); font-size: 1.125rem; }
.cta-mail {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.cta-mail:hover { color: var(--brand); }
.band .cta-side p { color: var(--band-muted); }
@media (min-width: 960px) {
  .cta-grid { grid-template-columns: 7fr 5fr; gap: 4rem; align-items: end; }
}

/* ---------- Inner page hero ---------- */

.page-hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(2.75rem, 2rem + 3vw, 4.75rem); }
.page-hero .display { max-width: 17ch; font-size: clamp(2.5rem, 1.6rem + 4vw, 4.75rem); }
.page-hero .lede { margin-top: 1.5rem; }
.page-hero .note { margin-top: 1.5rem; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
  list-style: none;
}
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font: 0.8rem/1 var(--font-mono);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.toc a:hover { border-color: var(--brand); color: var(--ink); }

/* ---------- Services page ---------- */

.service {
  display: grid;
  gap: 1.25rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule-strong);
}
.service:first-child { border-top-color: var(--rule-strong); }
.service-head .cell-num { margin-bottom: 0.9rem; }
.service-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.service-head .platform {
  margin-top: 0.75rem;
  font: 0.8rem/1.5 var(--font-mono);
  color: var(--muted);
}
.service-body > p:first-child { font-size: 1.15rem; color: var(--ink); max-width: 42rem; }
@media (min-width: 960px) {
  .service { grid-template-columns: 4fr 8fr; gap: 3rem; padding-block: 3.5rem; }
}

.checklist { display: grid; gap: 0.65rem; margin: 1.5rem 0 0; list-style: none; }
.checklist li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
.checklist li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent-deco);
}
@media (min-width: 700px) {
  .checklist-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 2rem; }
}

.aside-panel {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.aside-panel .h3 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; letter-spacing: -0.01em; }
.aside-panel p { color: var(--ink-2); }
@media (min-width: 900px) {
  .aside-panel { grid-template-columns: 5fr 7fr; gap: 3rem; align-items: center; }
}

/* ---------- Experience page ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: 500 0.9375rem/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip .n { font: 0.75rem/1 var(--font-mono); opacity: 0.7; }
.filter-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0.15rem 0 0.85rem;
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-status {
  margin: 0 0 2rem;
  font: 0.8rem/1.5 var(--font-mono);
  color: var(--muted);
}

.cases { list-style: none; }
.case {
  display: grid;
  gap: 1.25rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--rule-strong);
}
.case-meta { display: grid; gap: 0.6rem; align-content: start; }
.case-sector {
  margin: 0;
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-industry {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.case-title { font-size: 1.3rem; margin-bottom: 0.75rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; list-style: none; }
.badges li {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font: 600 0.75rem/1 var(--font-sans);
  letter-spacing: 0.01em;
}
.case-body > p { color: var(--ink-2); max-width: 46rem; }
.case-cols { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.case-label {
  margin: 0 0 0.65rem;
  font: 500 0.72rem/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.case .checklist { margin-top: 0; }
.impact {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-deco);
  color: var(--ink);
}
.case .tags { margin-top: 1.5rem; padding-top: 0; }
@media (min-width: 700px) {
  .case-cols { grid-template-columns: 1.45fr 1fr; gap: 2.5rem; }
}
@media (min-width: 960px) {
  .case { grid-template-columns: 4fr 8fr; gap: 3rem; padding-block: 3rem; }
}

.table-wrap { border-top: 1px solid var(--rule-strong); }
.ledger-table .empty-row td,
.ledger-table .empty-row td:first-child {
  font: 400 1rem/1.5 var(--font-sans);
  color: var(--muted);
}
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.ledger-table tr { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.ledger-table td { display: block; padding: 0.1rem 0; color: var(--ink-2); }
.ledger-table td:first-child { margin-bottom: 0.2rem; color: var(--ink); font-weight: 600; }
.ledger-table td:last-child { margin-top: 0.45rem; font: 0.78rem/1.5 var(--font-mono); color: var(--muted); }
@media (min-width: 760px) {
  .ledger-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .ledger-table tr { display: table-row; padding: 0; border: 0; }
  .ledger-table th {
    padding: 0.9rem 1.5rem 0.9rem 0;
    border-bottom: 1px solid var(--rule);
    font: 500 0.72rem/1.4 var(--font-mono);
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
    color: var(--muted);
  }
  .ledger-table td,
  .ledger-table td:first-child,
  .ledger-table td:last-child {
    display: table-cell;
    margin: 0;
    padding: 1.1rem 1.5rem 1.1rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
  }
  .ledger-table td:first-child { width: 24%; }
  .ledger-table td:last-child { width: 26%; padding-right: 0; }
}

/* ---------- About page ---------- */

.story-body p { max-width: 44rem; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.6; }
.story-body .pullquote {
  max-width: 30ch;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  font-style: italic;
  line-height: 1.25;
  color: var(--brand);
}

.founder { display: grid; gap: 2.5rem; }
.founder-card {
  align-self: start;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.founder-card .name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.founder-card .role { margin: 0.4rem 0 0; color: var(--muted); }
.facts { display: grid; margin: 1.5rem 0 0; }
.facts > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}
.facts dt {
  font: 500 0.7rem/1.7 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 0; font-size: 0.975rem; line-height: 1.5; }
.founder-card .link-arrow { margin-top: 1.25rem; }
.founder-bio > p { font-size: 1.125rem; color: var(--ink-2); max-width: 44rem; }
.founder-bio > p:first-of-type {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.credentials { display: grid; gap: 1.75rem 2.5rem; margin-top: 2.5rem; list-style: none; }
.credentials li { padding-top: 1rem; border-top: 1px solid var(--rule); }
.credentials .case-label { margin-bottom: 0.4rem; }
.credentials p:not(.case-label) { color: var(--ink-2); font-size: 1rem; }
@media (min-width: 700px) {
  .credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .founder { grid-template-columns: 4fr 8fr; gap: 3.5rem; }
  .founder-card { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- Lancer page ---------- */

.lancer-hero { position: relative; isolation: isolate; padding-block: clamp(3rem, 2rem + 5vw, 6.5rem); overflow: hidden; }
.lancer-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  right: -25%;
  width: min(900px, 110vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(156, 203, 187, 0.2), transparent 72%);
  pointer-events: none;
}
.lancer-hero .lancer-logo { width: min(250px, 66%); height: auto; margin-bottom: 2.25rem; }
.lancer-hero .display { max-width: 16ch; }
.lancer-hero .lede { margin-top: 1.5rem; color: var(--band-muted); }
.lancer-hero .hero-proof { color: var(--band-muted); }

.flow {
  display: grid;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  list-style: none;
}
.flow li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--band-rule);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--band-ink);
  font-weight: 500;
}
.flow .k { font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; color: var(--band-accent); }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
  .flow li {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 118px;
    padding: 1.1rem;
    border-right-width: 0;
    border-radius: 0;
  }
  .flow li:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .flow li:last-child { border-right-width: 1px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
}

.feature .ic {
  width: 28px;
  height: 28px;
  margin-bottom: 1.1rem;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature { border-top-color: var(--rule); }

/* ---------- Contact page ---------- */

.contact-grid { display: grid; gap: 3rem; }
.contact-cards { display: grid; gap: 0.5rem; align-content: start; }
.contact-card { padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--rule-strong); }
.contact-card .h3 { margin: 0.55rem 0 0.35rem; }
.contact-card p:not(.section-index) { font-size: 1rem; color: var(--ink-2); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.85rem; }
.email-link {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.25;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.email-link:hover { color: var(--brand); }
.copy-btn {
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.copy-btn.is-done { border-color: var(--brand); color: var(--brand); }
html:not(.js) .copy-btn { display: none; }

.form-card {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form-card h2 { font-family: var(--font-display); font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); line-height: 1.1; }
.form-card > p { margin-top: 0.6rem; color: var(--ink-2); }
.field-row { display: grid; gap: 0 1rem; }
.field { display: grid; gap: 0.45rem; margin-top: 1.25rem; }
.field label { font-size: 0.95rem; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.input {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-sans);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:hover { border-color: var(--muted); }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 24%, transparent);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
textarea.input { min-height: 170px; resize: vertical; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field-error { margin: 0; font-size: 0.875rem; color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: grid; gap: 1rem; margin-top: 1.75rem; }
.form-actions .btn { width: 100%; }
.form-note { margin: 0; font-size: 0.875rem; color: var(--muted); }
.form-note a { color: var(--ink-2); }
.form-status {
  margin-top: 1.25rem;
  padding: 0.95rem 1.1rem;
  border-left: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
  font-size: 0.95rem;
  color: var(--ink);
}
.form-status.is-error { border-left-color: var(--danger); }
.form-status a { color: inherit; font-weight: 600; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { grid-template-columns: auto 1fr; align-items: center; gap: 1.5rem; }
  .form-actions .btn { width: auto; }
}
@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}

/* ---------- Prose (privacy) ---------- */

.prose { max-width: 44rem; }
.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { margin: 0 0 1em; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--brand); }

/* ---------- 404 ---------- */

.notfound { min-height: 58vh; display: grid; align-content: center; }
.notfound .code { margin: 0 0 1rem; font: 500 0.85rem/1 var(--font-mono); letter-spacing: 0.12em; color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3.5rem 2rem;
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: 0.975rem;
}
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand p { max-width: 32ch; margin-top: 1rem; color: var(--muted); }
.footer-h {
  margin: 0 0 0.75rem;
  font: 500 0.72rem/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-links { display: grid; list-style: none; }
.footer-links a,
.footer-links span {
  display: inline-block;
  padding: 0.45rem 0;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-links span { color: var(--muted); }
.footer-links a:hover { text-decoration: underline; }
.footer-base {
  display: grid;
  gap: 0.6rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-base:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.footer-base p { margin: 0; }
.footer-base a { color: var(--ink-2); }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; }
  .footer-base { grid-template-columns: auto auto 1fr; gap: 0.6rem 2rem; align-items: baseline; }
  .footer-base > p:last-child { justify-self: end; }
}

/* ---------- Page transitions ---------- */
/* Pages cross-fade in browsers with cross-document view transitions. Journeys to or
   from the Lancer page are tagged "lancer" (theme.js) and fade more slowly, so the
   switch between the MMetrix and Lancer colours is gradual. */

@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
html:active-view-transition-type(lancer)::view-transition-group(*),
html:active-view-transition-type(lancer)::view-transition-old(*),
html:active-view-transition-type(lancer)::view-transition-new(*) {
  animation-duration: 0.8s;
}

/* Fallback fade for browsers without view transitions (main.js and theme.js) */
html.page-leave body { opacity: 0; transition: opacity 0.38s ease; }
html.page-enter body { animation: page-enter 0.6s ease both; }

/* ---------- Scroll reveal (enabled by main.js) ---------- */

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .header-actions, .skip-link, .filters, .form-card, .band .actions { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
}
