/* KineLab site. Colour tokens first; dark mode follows the system setting. */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-alt: #f2f2f0;
  --ink: #16171b;
  --ink-2: #464953;
  --muted: #6b6e78;
  --line: #e4e5e8;
  --accent: #fc6414;          /* brand orange, sampled from the logo */
  --accent-ink: #16171b;      /* text on orange: dark, for contrast */
  --accent-line: #e8550f;     /* orange for thin marks on light surfaces (>= 3:1) */
  --accent-text: #c2410c;     /* orange for small text on light surfaces (>= 4.5:1) */
  --chart-neutral: #5b5d66;
  --focus: #1f6feb;
  --ok: #1a7f4b;
  --err: #c0362c;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171b;
    --surface: #1e2026;
    --surface-alt: #1b1c21;
    --ink: #f3f4f6;
    --ink-2: #c4c7ce;
    --muted: #9a9da6;
    --line: #2e3139;
    --accent-line: #fc6414;
    --accent-text: #fc6414;
    --chart-neutral: #a9acb5;
    --focus: #6ea8ff;
    --ok: #4cc38a;
    --err: #ff7b72;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 640px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: auto; height: 40px; }
.brand picture + picture img { height: 18px; }
@media (max-width: 400px) {
  .brand { gap: 6px; }
  .brand img { height: 32px; }
  .brand picture + picture img { height: 15px; }
}
@media (max-width: 359px) {
  .header-row { gap: 8px; }
  .nav .btn-small { padding: 0 10px; font-size: 13px; }
}
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav a:not(.btn) { display: none; }
@media (min-width: 720px) { .nav a:not(.btn) { display: inline; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 16px/1 var(--font); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.nav .btn-small { color: var(--accent-ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding: 56px 0 40px; }
@media (min-width: 900px) { .hero { padding: 96px 0 72px; } }
.hero-text { max-width: 760px; }
.eyebrow { margin: 0 0 12px; color: var(--accent-text); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(40px, 7vw, 68px); line-height: 1.04; letter-spacing: -0.02em; font-weight: 800; font-style: italic; }
.lead { margin: 20px 0 0; font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-alt { background: var(--surface-alt); }
h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.01em; font-weight: 800; }
h3 { margin: 0 0 6px; font-size: 19px; }
.section-lead { margin: 16px 0 0; color: var(--ink-2); max-width: 44em; }

.cards { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--ink-2); }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps p { margin: 0; color: var(--ink-2); }
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800;
}

.timeline { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; max-width: 720px; }
.timeline li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline p { margin: 0; color: var(--ink-2); }
.tl-when { font-weight: 800; }
.timeline li:first-child .tl-when { color: var(--accent-text); }

/* Chart */
.chart-figure { margin: 32px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px 16px; }
@media (min-width: 720px) { .chart-figure { padding: 28px 28px 20px; } }
.chart { position: relative; min-height: 320px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text, .chart .panel-title { fill: var(--muted); font: 12px var(--font); font-variant-numeric: tabular-nums; }
.chart .panel-title { fill: var(--ink-2); font-weight: 600; font-size: 13px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-pitch { stroke: var(--accent-line); }
.chart .line-acc { stroke: var(--chart-neutral); }
.chart .event line { stroke: var(--ink-2); stroke-width: 1; }
.chart .event text, .chart .note { fill: var(--ink-2); font: 600 12px var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .air { fill: var(--accent); opacity: .08; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot-pitch { fill: var(--accent-line); }
.chart .dot-acc { fill: var(--chart-neutral); }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px;
  font: 13px/1.4 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
}
.chart-tip[hidden] { display: none; }
figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.numbers { margin-top: 12px; font-size: 15px; }
.numbers summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.numbers table { margin-top: 8px; border-collapse: collapse; }
.numbers th, .numbers td { text-align: left; padding: 6px 24px 6px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.numbers td { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Form */
.form { display: grid; gap: 8px; margin-top: 28px; }
.form label { font-weight: 600; font-size: 15px; margin-top: 8px; }
.optional { font-weight: 400; color: var(--muted); }
.form input, .form select {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.form input:focus, .form select:focus { border-color: var(--accent-line); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.form .btn { margin-top: 12px; justify-self: start; }
.cf-turnstile { margin-top: 12px; min-height: 65px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.form-status { margin: 4px 0 0; font-weight: 600; min-height: 1.6em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 15px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }

/* Text pages (/app, /privacy) */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc h3 { margin-top: 24px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .meta { color: var(--muted); font-size: 15px; margin-top: 8px; }
.doc table { border-collapse: collapse; width: 100%; margin-top: 12px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink); }
.doc td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
