/* Colours, fonts and the dot grid follow the app's tokens (src/renderer/styles/tokens.css),
   so the page reads as the canvas the screenshots come from. */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --canvas: #f4f3f9;
  --panel: #ffffff;
  --text: #1d1b2c;
  --muted: #5f5c74;
  --line: #ebe9f3;
  --grid: #cfccdd;
  --accent: #6b4ce6;
  --accent-contrast: #ffffff;
  --accent-soft: #f0ebff;
  --accent-ink: #4b2fbf;
  --shadow: 0 1px 2px rgb(45 35 90 / 5%), 0 8px 24px rgb(45 35 90 / 8%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #121119;
    --panel: #1c1a26;
    --text: #eeecf6;
    --muted: #a8a4bf;
    --line: #2f2c3e;
    --grid: #3a3950;
    --accent: #b3a1ff;
    --accent-contrast: #1a1238;
    --accent-soft: #2f2757;
    --accent-ink: #ddd5ff;
    --shadow: 0 0 0 1px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--canvas) radial-gradient(var(--grid) 1px, transparent 1.5px) 0 0 / 24px 24px;
  color: var(--text);
  font: 400 1.0625rem/1.6 'Inter', system-ui, sans-serif;
}
body > header, main, body > footer { max-width: 1200px; margin-inline: auto; }

a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 750; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.85em; }

.skip { position: absolute; left: -999em; }
.skip:focus { left: 16px; top: 8px; z-index: 2; background: var(--panel); padding: 8px 12px; border-radius: 8px; }

/* Floating bars, as in the app */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; }
.brand, .top nav, .chapters {
  display: flex; align-items: center; gap: 4px;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
}
.brand { min-height: 56px; padding: 0 18px 0 12px; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.top nav, .chapters { padding: 8px; flex-wrap: wrap; }
.top nav a, .chapters a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 8px; color: var(--text); font-size: 0.9375rem; font-weight: 550; text-decoration: none;
}
.top nav a:hover, .chapters a:hover { background: var(--accent-soft); color: var(--accent-ink); }

.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(32px, 5vw, 56px); }
.hero h1 { max-width: 17ch; font-size: clamp(2.5rem, 6.4vw, 4.75rem); font-weight: 800; letter-spacing: -0.038em; line-height: 1.04; }
.lede { max-width: 60ch; margin: 24px 0 0; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.note { margin: 16px 0 0; font-size: 0.9375rem; color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: 14px; background: var(--panel); box-shadow: var(--shadow);
  color: var(--text); font-weight: 650; text-decoration: none;
}
.button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.button.primary { background: var(--accent); color: var(--accent-contrast); }
.button.primary:hover { filter: brightness(1.08); }

/* The one flourish: the film sits on the canvas as a selected element with its handles. */
.film { margin: 0; scroll-margin-top: 24px; }
.selected { position: relative; padding: 8px; border: 2px solid var(--accent); }
.selected video { width: 100%; aspect-ratio: 16 / 9; background: var(--panel); }
.selected i { position: absolute; width: 12px; height: 12px; background: var(--panel); border: 2px solid var(--accent); }
.selected i:nth-of-type(1) { top: -7px; left: -7px; }
.selected i:nth-of-type(2) { top: -7px; right: -7px; }
.selected i:nth-of-type(3) { bottom: -7px; left: -7px; }
.selected i:nth-of-type(4) { bottom: -7px; right: -7px; }
figcaption { max-width: 72ch; margin-top: 16px; font-size: 0.9375rem; color: var(--muted); }

#features { padding-top: clamp(64px, 10vw, 128px); }
.chapters { width: fit-content; max-width: 100%; }
.aside { margin: 16px 0 0; font-size: 0.9375rem; color: var(--muted); }

.chapter { padding-top: clamp(64px, 9vw, 112px); }
.feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 56px); align-items: start; margin-top: clamp(40px, 6vw, 72px); }
.feature p { margin: 12px 0 0; color: var(--muted); }
.feature .status { font-size: 0.875rem; }
.shot { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); }
.shot img { width: 100%; }

.table { overflow-x: auto; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; text-align: left; }
caption { text-align: left; padding: 16px 20px 8px; font-weight: 700; }
th, td { padding: 12px 20px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
thead th { font-weight: 600; color: var(--muted); }
tbody th { font-weight: 500; white-space: nowrap; }

.download { margin-top: clamp(80px, 11vw, 144px); padding: clamp(24px, 5vw, 56px); background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); }
.download ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 32px 0; padding: 0; list-style: none; }
.download li { display: flex; flex-direction: column; gap: 10px; }
.download li .button { box-shadow: none; background: var(--accent-soft); color: var(--accent-ink); }
.download li .button:hover { background: var(--accent); color: var(--accent-contrast); }
.download li.current .button { background: var(--accent); color: var(--accent-contrast); }
.download span, .download p { color: var(--muted); font-size: 0.9375rem; }
.download p { margin: 0; }

body > footer { padding: 56px 0 64px; font-size: 0.875rem; color: var(--muted); }
footer p { max-width: 80ch; }

@media (max-width: 840px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  /* Tool name above its description, so that names never break inside a word. */
  table, tbody, tbody tr, tbody th, tbody td, caption { display: block; }
  thead { position: absolute; clip-path: inset(50%); }
  tbody th { padding: 12px 16px 0; white-space: normal; overflow-wrap: anywhere; }
  tbody td { padding: 2px 16px 12px; border-top: 0; color: var(--muted); }
}
@media (max-width: 480px) {
  .top nav a { padding: 0 9px; }
  .actions .button { width: 100%; text-align: center; line-height: 1.3; }
}
