/* Initiative tokens and base.
   Palette: Midnight #101216, Deep Navy #1A2230, Cloud #F5F6F8, White #FFFFFF, Signal Blue #528BFF.
   Light editorial is the default reading surface. Any element with .dark (plus the header and footer)
   switches the same variables to the Midnight set, so every component works on both.
   Blue is an accent: dots, rules, the primary button, links on dark. On light it darkens to --blue-ink for text. */
:root {
  /* Raw palette */
  --midnight: #101216;
  --navy: #1A2230;
  --cloud: #F5F6F8;
  --white: #FFFFFF;
  --blue: #528BFF;
  --blue-ink: #2B5FD0; /* blue text on light, 5.7:1 on white */

  /* Light surfaces (default) */
  --bg: var(--cloud);
  --surface: var(--white);
  --line: #E1E4EA;
  --line-strong: #C9CED8;
  --ink: var(--midnight);
  --ink-2: #3A404C; /* running text, 9.6:1 */
  --muted: #5B6270; /* labels and fine print, 5.7:1 */
  --accent: var(--blue-ink);
  --mark: var(--blue);

  /* Buttons */
  --btn-bg: var(--midnight);
  --btn-bg-hover: #000000;
  --btn-ink: var(--white);
  --btn-ink-soft: rgb(255 255 255 / 0.3);
  --cta-bg: var(--blue); /* the Group button, the one blue fill on the page */
  --cta-bg-hover: #6A9BFF;
  --cta-ink: var(--midnight); /* 5.8:1 on blue */

  /* States */
  --live: var(--blue);
  --error: #C2361F;
  --focus: var(--blue-ink);
  --field-bg: var(--white);
  --field-border: var(--line-strong);

  /* Type */
  --fs-micro: 0.8125rem;
  --fs-small: 0.9375rem;
  --fs-body: 1.125rem;
  --fs-lead: clamp(1.1875rem, 1.6vw, 1.375rem);
  --fs-h3: 1.3125rem;
  --fs-h2: clamp(2.125rem, 4.8vw, 3.5rem);
  --fs-h1: clamp(3rem, 8.4vw, 7rem);
  --fs-display: clamp(2.25rem, 5.6vw, 4.5rem);
  --fs-number: 2.5rem;
  --measure: 60ch;

  /* Space */
  --gutter: 1.25rem;
  --max: 1160px;
  --sec: clamp(88px, 11vw, 148px);
  --card-pad: clamp(24px, 3vw, 36px);

  /* Shape */
  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur: 240ms;
  --dur-reveal: 900ms;

  /* Fonts */
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

/* Midnight set */
.dark, .top, .foot {
  --bg: var(--midnight);
  --surface: var(--navy);
  --line: #242C3A;
  --line-strong: #364052;
  --ink: #F5F6F8;
  --ink-2: #C9D0DB; /* 10:1 on navy */
  --muted: #9AA3B2; /* 6.3:1 on navy */
  --accent: var(--blue);
  --btn-bg: var(--white);
  --btn-bg-hover: var(--cloud);
  --btn-ink: var(--midnight);
  --btn-ink-soft: rgb(16 18 22 / 0.25);
  --error: #FF8A7A;
  --focus: var(--blue);
  --field-bg: var(--midnight);
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink-2);
}
.navy { --bg: var(--navy); --surface: #222B3B; background: var(--bg); }

@media (prefers-contrast: more) {
  :root { --muted: #3A404C; --ink-2: #1F232B; --line: #B5BBC6; }
  .dark, .top, .foot { --muted: #C9D0DB; --ink-2: #E6EAF0; --line: #4A5568; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font: 400 var(--fs-body)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.04em; }
h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.028em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-weight: 400; font-variant-numeric: tabular-nums; }
.num, .amount, .price { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--midnight); color: var(--white); padding: 12px 16px; border-radius: var(--radius-sm); z-index: 30; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { .wrap { padding: 0 2rem; } }
@media (min-width: 1200px) { .wrap { max-width: calc(var(--max) + 4rem); } }
