/* The public site. Tokens, fonts and shapes are DESIGN.md's ("Public site" there). */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-weight: 700; font-display: swap; src: url('/fonts/inter-tight-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #F3F5F8; --surface: #FFFFFF; --ink: #12161C; --muted: #5F6B7A; --line: #DCE1E8;
  --accent: #C10116; --accent-text: #C10116; --swim: #3D6E9F;
  --shadow: 0 1px 2px rgb(18 22 28 / .05), 0 10px 28px -14px rgb(18 22 28 / .18);
  --inst-shadow: 0 1px 2px rgb(18 22 28 / .2), 0 28px 60px -24px rgb(18 22 28 / .5);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1115; --surface: #151A20; --ink: #E6EAF0; --muted: #8591A3; --line: #29313C;
    --accent-text: #D75A68; --swim: #7AA7D6;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 30px -14px rgb(0 0 0 / .7);
    --inst-shadow: 0 0 0 1px #29313C, 0 28px 60px -24px rgb(0 0 0 / .9);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  font: 400 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink);
  /* the canvas: two faint washes, red top right, swim top left */
  background:
    radial-gradient(60rem 34rem at 100% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    radial-gradient(52rem 30rem at 0% 0%, color-mix(in srgb, var(--swim) 8%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* one pair of content edges for every page: the same gutter left and right */
.wrap { --gutter: 20px; width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
@media (min-width: 640px) { .wrap { --gutter: 64px; } }
.page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding-block: max(20px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom)); }

/* links: the underline draws in under the pointer */
a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .25s ease, color .15s ease; }
.foot a, .lockup { background-size: 0 1px; }
.foot a:hover, .foot a:focus-visible { background-size: 100% 1px; }
a.lockup { background: none; }
a.btn { background: var(--accent); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
mark { background: #F5B93B; color: #12161C; padding: 0 3px; border-radius: 2px; }
.top { position: relative; }
.skip { position: absolute; left: 0; top: -80px; z-index: 5; padding: 10px 14px; border-radius: 8px; background: var(--surface); color: var(--ink); font-weight: 600; }
.skip:focus { top: 0; }

.label { font: 500 10.5px/1.4 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1, h2 { font-family: 'Inter Tight', ui-sans-serif, system-ui, sans-serif; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; margin: 0; }

.lockup { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/1 'Inter Tight', ui-sans-serif, system-ui, sans-serif; letter-spacing: -.01em; }
.lockup-mark { width: 28px; height: 28px; color: var(--accent); }
.top { display: flex; align-items: center; min-height: 44px; }

/* the button: steps up under the pointer, presses on a click */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 8px; background: var(--accent); color: #fff; font: 600 15px/1 Inter, ui-sans-serif, system-ui, sans-serif; box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 10px 24px -12px rgb(193 1 22 / .9); transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease; }
a.btn:hover { transform: translateY(-2px); background: #D40A21; box-shadow: 0 1px 0 rgb(255 255 255 / .22) inset, 0 16px 28px -12px rgb(193 1 22 / 1); }
a.btn:active { transform: translateY(1px) scale(.985); background: #A80113; }

/* ---- Start page: the instrument is the whole first screen, in light and dark mode */
body.dark { color: #EEF1F6; background: #0C0F13; }
body.dark .label { color: #9AA5B6; }
body.dark a:focus-visible, body.dark .btn:focus-visible { outline-color: #EEF1F6; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; font-size: 13.5px; color: #9AA5B6; background-size: 0 1px; background-position: 0 calc(50% + 11px); }
.quiet:hover, .quiet:focus-visible { color: #fff; background-size: 100% 1px; }
.nav { position: absolute; inset: 0 0 auto 0; z-index: 2; padding-top: max(20px, env(safe-area-inset-top)); }
.nav .top { justify-content: space-between; }
.hero {
  height: 100vh; height: 100svh; min-height: max-content; display: flex;
  padding-block: calc(max(20px, env(safe-area-inset-top)) + 44px) max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(46rem 40rem at 82% 44%, rgb(193 1 22 / .26), transparent 68%),
    radial-gradient(40rem 26rem at 0% 100%, rgb(61 110 159 / .20), transparent 70%),
    linear-gradient(rgb(255 255 255 / .024) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgb(255 255 255 / .024) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(#1D232C, #0C0F13);
}
.hero > .wrap { display: flex; flex-direction: column; }
.hero-text { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start; padding-block: clamp(32px, 9svh, 96px) 32px; }
.hero__text { grid-column: 1 / span 6; }
.hero__media { grid-column: 7 / span 6; display: flex; justify-content: flex-end; }
.hero h1 { font-size: clamp(42px, 6.4vw, 88px); line-height: .98; letter-spacing: -.035em; }
.lead { margin: 24px 0 0; max-width: 30em; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.5; color: #C3CBD8; }
.actions { margin: 32px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.draw { width: min(100%, 58svh, 540px); aspect-ratio: 1; color: var(--accent); filter: drop-shadow(0 0 42px rgb(193 1 22 / .35)); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .1); }
.facts { margin: 0; display: flex; gap: 12px 56px; }
.facts dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
.facts .ch { width: 1em; height: 1em; margin-right: .45em; vertical-align: -.14em; border-radius: 2px; }
.legal { margin: 0; display: flex; align-items: center; gap: 0 22px; }

@media (max-width: 1023px) {
  .hero-text { grid-template-columns: 1fr; align-content: center; row-gap: 40px; padding-block: 32px; }
  .hero__text, .hero__media { grid-column: 1; }
  .hero__media { justify-content: flex-start; order: -1; }
  .draw { width: min(58vw, 38svh, 440px); }
}
@media (max-width: 639px) {
  .hero-text { row-gap: 28px; padding-block: 16px 28px; }
  .draw { width: min(40vw, 22svh, 168px); filter: drop-shadow(0 0 24px rgb(193 1 22 / .35)); }
  .lead { margin-top: 16px; }
  .actions { margin-top: 24px; }
  .actions .btn { width: 100%; min-height: 50px; }
  .strip { flex-direction: column; align-items: stretch; padding-top: 8px; gap: 4px; }
  .legal { justify-content: space-between; }
  .facts { display: block; }
  .facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; }
  .facts dd { margin: 0; }
  .legal { min-height: 44px; }
}

/* the entrance, once: the words rise, the mark draws itself inner ring first (DESIGN.md: Reaction mark).
   Everything is there by itself; the motion only runs where motion runs. */
.hero h1, .hero .lead, .hero .actions, .hero .strip { animation: rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero .lead { animation-delay: .08s; }
.hero .actions { animation-delay: .16s; }
.hero .strip { animation-name: fade; animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
.draw path, .draw circle { animation: draw .55s cubic-bezier(.3, 0, .2, 1) backwards; }
.draw circle { animation-duration: 1s; }
@keyframes draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero *, .draw path, .draw circle { animation: none !important; }
  a, .btn { transition: none; }
  a.btn:hover, a.btn:active { transform: none; }
}

/* ---- Text pages */
.page .top { padding-bottom: 28px; }
.doc { flex: 1; max-width: 680px; }
.doc h1 { font-size: 28px; margin: 6px 0 20px; }
.doc h1 + p { margin: 0 0 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; box-shadow: var(--shadow); }
.card section { padding: 16px 0; }
.card section + section { border-top: 1px solid var(--line); }
.card h2 { font-size: 17px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.card p + p { margin-top: 8px; }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; padding-top: 6px; font-size: 13px; color: var(--muted); }
.page .foot { margin-top: 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; background-position: 0 calc(50% + 11px); }
.foot a:hover { color: var(--accent-text); }
