/* opensced brand: tokens and components. Black and white carry the page; magenta marks what you can act on;
   royal blue appears only inside charts. One typeface, Hanken Grotesk. No monospace, no glow, no decorative motion. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour */
  --ink: #000000;
  --paper: #ffffff;
  --grey-900: #1a1a1a;
  --grey-600: #5c5c5c;
  --grey-400: #9a9a9a;
  --grey-200: #dedede;
  --grey-100: #f3f3f3;
  --magenta: #ff0080;          /* interactive and highlight elements */
  --magenta-text: #e6006f;     /* magenta as small text on white */
  --chart-blue: #2b59ec;       /* charts only */
  --chart-grey: #b0b0b0;       /* the reference line in charts */

  /* type */
  --font: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: clamp(2.6rem, 6.2vw, 5.4rem);
  --h2: clamp(1.8rem, 3.4vw, 2.8rem);
  --h3: 1.25rem;
  --body: 1.0625rem;
  --small: 0.875rem;
  --label: 0.75rem;

  /* space */
  --page: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(64px, 9vw, 128px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--body); line-height: 1.55; font-weight: 400;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--grey-400); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--magenta); }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--grey-200); }
.dark { background: var(--ink); color: var(--paper); }
.dark .muted { color: var(--grey-400); }
.dark .section + .section, .dark .rule { border-color: #2a2a2a; }

/* type */
.display { font-size: var(--display); font-weight: 300; line-height: 1.04; letter-spacing: -0.025em; margin: 0; }
.h2 { font-size: var(--h2); font-weight: 300; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
.h3 { font-size: var(--h3); font-weight: 600; line-height: 1.3; margin: 0; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--grey-600); max-width: 40em; margin: 0; }
.dark .lead { color: var(--grey-400); }
.label { font-size: var(--label); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-600); }
.dark .label { color: var(--grey-400); }
.muted { color: var(--grey-600); }
.small { font-size: var(--small); }
.hl { color: var(--magenta); }
p { margin: 0 0 1em; }

/* header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.top img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: var(--small); font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--magenta-text); }
.foot { padding-block: 36px 48px; border-top: 1px solid var(--grey-200); font-size: var(--small); color: var(--grey-600);
        display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

html:has(body.dark) { background: var(--ink); }
.dark .foot { border-color: #2a2a2a; color: var(--grey-400); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--magenta-text); }
.dark .foot a:hover { color: var(--magenta); }
.dark a { text-decoration-color: #5c5c5c; }
.dark a:hover { text-decoration-color: var(--magenta); }
.dark .nav a:hover { color: var(--magenta); }

/* light/dark: show the logo that suits the page */
.on-dark { display: none; }
.dark .on-dark { display: block; }
.dark .on-light { display: none; }

/* the light/dark switch: the logo's staircase, with its magenta point as the knob */
.theme-switch { position: relative; width: 60px; height: 30px; padding: 0; border: 1px solid var(--grey-400); border-radius: 999px;
                background: transparent; color: inherit; cursor: pointer; flex: none; }
.theme-switch:hover { border-color: var(--magenta); }
.theme-switch svg { position: absolute; top: 5px; left: 7px; width: 18px; height: 18px; transform: translateX(28px); transition: transform .16s ease; }
.theme-switch .knob { position: absolute; top: 5px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--magenta); transition: transform .16s ease; }
.dark .theme-switch { border-color: #6b6b6b; }
.dark .theme-switch:hover { border-color: var(--magenta); }
.dark .theme-switch svg { transform: translateX(0); }
.dark .theme-switch .knob { transform: translateX(28px); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px;
       font: 600 1rem var(--font); border: 1px solid var(--magenta); background: var(--magenta); color: #fff;
       border-radius: 0; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, color .12s; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.dark .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.small { height: 40px; padding: 0 18px; font-size: var(--small); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.dark .btn.ghost { color: var(--paper); border-color: var(--paper); }
.dark .btn.ghost:hover { background: var(--paper); color: var(--ink); }

/* form */
.field { height: 52px; width: 100%; padding: 0 16px; font: 400 1rem var(--font); color: var(--ink); background: var(--paper);
         border: 1px solid var(--ink); border-radius: 0; appearance: none; }
.field::placeholder { color: var(--grey-400); }
.field:focus { outline: 2px solid var(--magenta); outline-offset: 0; border-color: var(--magenta); }
select.field { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
               background-position: calc(100% - 22px) 23px, calc(100% - 16px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.dark .field { background: transparent; color: var(--paper); border-color: #6b6b6b; }
.dark .field::placeholder { color: var(--grey-400); }
.dark .field:focus { border-color: var(--magenta); }
.dark .field:-webkit-autofill { -webkit-text-fill-color: var(--paper); box-shadow: 0 0 0 100px #111 inset; caret-color: var(--paper); }
.signup { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 10px; max-width: 760px; }
.signup .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { margin-top: 12px; font-size: var(--small); color: var(--grey-600); min-height: 1.4em; }
.dark .form-note { color: var(--grey-400); }
.form-note.ok { color: var(--ink); font-weight: 600; }
.dark .form-note.ok { color: var(--paper); }
.form-note.err { color: var(--magenta-text); font-weight: 600; }
.dark .form-note.err { color: var(--magenta); }

/* a page that is only a headline and a form */
.solo { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.solo > .wrap { width: 100%; }
.solo .foot { border-top: 0; }                                       /* no rule above the copyright line on this page */
.solo-main { flex: 1; display: flex; align-items: center; width: 100%; padding-block: clamp(32px, 6vw, 72px); }
.solo-main > * { width: 100%; }
/* the page's background: a fine square grid, and on it the logo's staircase as one line across the whole page.
   Every corner of the staircase sits on a grid crossing. */
.solo { position: relative; overflow-x: clip; }
.solo > header, .solo > main, .solo > footer { position: relative; z-index: 1; }
.backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.backdrop svg { width: 100%; height: 100%; }
.backdrop .grid { color: #ececec; }
.backdrop .stairs { color: #c9c9c9; }
.dark .backdrop .grid { color: #1a1a1a; }
.dark .backdrop .stairs { color: #3d3d3d; }
@media (max-width: 700px) { .backdrop .stairs { display: none; } }   /* on a phone the line would run through the text; the grid stays */

.signup.simple { grid-template-columns: minmax(0, 1fr) auto; max-width: 560px; }
.signup.pair { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; max-width: 760px; }     /* email, organisation, button */

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.stat { padding: 28px 28px 8px 0; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--grey-200); }
.stat .n { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.stat .n small { font-size: .45em; font-weight: 400; letter-spacing: 0; color: var(--grey-600); }
.stat p { margin: 14px 0 0; color: var(--grey-600); font-size: var(--small); max-width: 26em; }

/* typographic index */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.index li { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 32px; padding: 28px 0; border-bottom: 1px solid var(--grey-200); align-items: baseline; }
.index .no { font-size: var(--small); font-weight: 600; color: var(--magenta-text); }
.index .what { font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.index .why { color: var(--grey-600); margin: 0; }
.dark .index { border-color: var(--paper); }
.dark .index li { border-color: #2a2a2a; }
.dark .index .no { color: var(--magenta); }
.dark .index .why { color: var(--grey-400); }

/* figures */
.figure { margin: 0; }
.figure img { width: 100%; border: 1px solid var(--grey-200); background: var(--paper); }
.figure figcaption { margin-top: 12px; font-size: var(--small); color: var(--grey-600); max-width: 60em; }

/* small pieces */
.code { display: inline-block; padding: 14px 18px; border: 1px solid var(--paper); font: 500 1.0625rem var(--font); letter-spacing: 0.01em; }
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.cols > div { border-top: 1px solid var(--ink); padding-top: 16px; }
.cols p { color: var(--grey-600); font-size: var(--small); margin: 8px 0 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: clamp(28px, 4vw, 48px); }

@media (max-width: 820px) {
  .signup, .signup.simple, .signup.pair { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 24px 0 8px; border-left: 0; border-top: 1px solid var(--grey-200); }
  .stat:first-child { border-top: 0; }
  .index li { grid-template-columns: 44px minmax(0, 1fr); }
  .index .why { grid-column: 2; }
  .cols { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .nav .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .theme-switch svg, .theme-switch .knob { transition: none; } }
