/* TuxTalk website styles.
   Layout concept: a blue "desk" up top where you can hold a real-looking F8
   key and watch words land in a window, then plain reading sections that
   alternate words and screenshots, ending on the download table. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-mono.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Tokens (light first) ---------- */
:root {
  --sky: #3aa8ff;          /* the app icon's blue: the hero field */
  --sky-ink: #0b1d2e;      /* text that sits on the sky field */
  --sky-ink-2: #133a5c;
  --paper: #f3f7fb;        /* page ground, a cool white leaning blue */
  --card: #ffffff;
  --ink: #0b1d2e;
  --ink-2: #3b5167;
  --line: #d3dfea;
  --link: #0a62b4;
  --rec: #e5484d;          /* the recording ring on TuxTalk's indicator */
  --ok: #23803a;           /* "it worked" green, from the app's arrows */
  --key-top: #fbfcfd;
  --key-side: #c4d1dd;
  --code-bg: #0e2236;
  --code-fg: #d9e9f7;
  --shadow: 0 18px 40px -18px rgb(11 29 46 / 0.35);

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Atkinson Hyperlegible Mono", ui-monospace, "DejaVu Sans Mono", monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0f2c49;
    --sky-ink: #e8f2fb;
    --sky-ink-2: #a9c6e2;
    --paper: #08131e;
    --card: #0f1f2f;
    --ink: #e6eef6;
    --ink-2: #9db2c6;
    --line: #1f3449;
    --link: #6cc0ff;
    --rec: #ff6369;
    --ok: #57c26c;
    --key-top: #e9eef3;
    --key-side: #8fa3b6;
    --code-bg: #050d15;
    --code-fg: #d9e9f7;
    --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0f2c49;
  --sky-ink: #e8f2fb;
  --sky-ink-2: #a9c6e2;
  --paper: #08131e;
  --card: #0f1f2f;
  --ink: #e6eef6;
  --ink-2: #9db2c6;
  --line: #1f3449;
  --link: #6cc0ff;
  --rec: #ff6369;
  --ok: #57c26c;
  --key-top: #e9eef3;
  --key-side: #8fa3b6;
  --code-bg: #050d15;
  --code-fg: #d9e9f7;
  --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 750; font-stretch: 105%; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
code, kbd, pre { font-family: var(--f-mono); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--sky) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  color: var(--sky-ink);
}
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-stretch: 110%; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { color: inherit; text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; font-size: 0.97rem; }
.top nav a:hover { background: color-mix(in srgb, var(--sky-ink) 10%, transparent); }
.top nav a.nav-dl { background: var(--sky-ink); color: var(--sky); padding-inline: 14px; }
/* The page you're on: underlined, still a working link */
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.top nav a.nav-dl:hover { background: color-mix(in srgb, var(--sky-ink) 88%, var(--sky)); }
.theme-btn {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
}
.theme-btn:hover { background: color-mix(in srgb, var(--sky-ink) 10%, transparent); }
.theme-btn svg { width: 20px; height: 20px; }
@media (max-width: 720px) {
  .top nav a.nav-hide { display: none; }
}

/* ---------- Hero: the desk ---------- */
.hero { background: var(--sky); color: var(--sky-ink); padding-block: clamp(32px, 6vw, 72px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: var(--step-4); font-weight: 850; font-stretch: 118%; letter-spacing: -0.03em; line-height: 0.98; }
.hero h1 .quiet { display: block; font-weight: 500; font-stretch: 100%; letter-spacing: -0.02em; font-size: 0.62em; line-height: 1.12; margin-top: 0.35em; color: var(--sky-ink-2); }
.hero .lede { margin-top: 22px; font-size: var(--step-1); line-height: 1.5; max-width: 34ch; color: var(--sky-ink); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.05rem/1 var(--f-body);
  padding: 15px 22px; border-radius: 12px; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-main { background: var(--sky-ink); color: var(--sky); box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.55); }
.btn-main:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgb(0 0 0 / 0.6); text-decoration: none; }
.btn-ghost { color: var(--sky-ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sky-ink) 55%, transparent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--sky-ink) 8%, transparent); text-decoration: none; }
.hero .facts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--step--1); font-weight: 600; color: var(--sky-ink-2); list-style: none; padding: 0; }
.hero .facts li { display: flex; align-items: center; gap: 7px; }
.hero .facts svg { width: 16px; height: 16px; }

/* The fake text window the demo types into */
.desk { position: relative; display: grid; gap: 22px; justify-items: center; }
.window {
  width: 100%; background: var(--card); color: var(--ink);
  border-radius: var(--radius); box-shadow: 0 30px 60px -28px rgb(4 20 38 / 0.55), 0 2px 6px rgb(4 20 38 / 0.12);
  overflow: hidden; position: relative;
}
.window-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-2); }
.window-bar .dots { display: flex; gap: 6px; }
.window-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); display: block; }
.window-bar .title { margin-inline: auto; font-weight: 600; }
.doc {
  height: 15.5em; overflow: hidden; padding: 22px 24px 26px;
  font-family: var(--f-body); font-size: 1.06rem; line-height: 1.65;
}
.doc p + p { margin-top: 0.9em; }
.doc .caret { display: inline-block; width: 2px; height: 1.15em; vertical-align: -0.2em; background: var(--ink); margin-left: 1px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* TuxTalk's own recording indicator: blue orb, red ring, timer */
.indicator {
  position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 8px) scale(0.96);
  display: flex; align-items: center; gap: 10px;
  background: #23272e; color: #f2f5f8; border: 2px solid var(--rec);
  border-radius: 999px; padding: 6px 16px 6px 6px;
  font: 700 1.05rem/1 var(--f-mono); font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.indicator.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.orb { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #ffffff 0 12%, #8fd8ff 28%, #1e9cff 58%, #0b4f9a 100%); box-shadow: 0 0 calc(10px + var(--lvl, 0) * 16px) rgb(80 180 255 / 0.85); transform: scale(calc(0.9 + var(--lvl, 0) * 0.22)); transition: transform 0.08s linear, box-shadow 0.08s linear; }

/* What you're saying, under the window */
.said { min-height: 3.2em; text-align: center; max-width: 34ch; font-size: 1.02rem; line-height: 1.45; color: var(--sky-ink); }
.said .label { display: block; font-size: var(--step--1); font-weight: 700; color: var(--sky-ink-2); }
.said q { font-style: italic; quotes: "\201C" "\201D"; }

/* The F8 key itself */
.keyrow { display: flex; align-items: center; gap: 18px; }
.key {
  --press: 0;
  position: relative; width: 112px; height: 104px; border: 0; padding: 0; cursor: pointer;
  background: transparent; color: #12202d; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.key::before { /* the skirt, the part of a keycap you see below the top */
  content: ""; position: absolute; inset: 10px 0 0 0; border-radius: 16px;
  background: linear-gradient(180deg, var(--key-side), color-mix(in srgb, var(--key-side) 70%, #000));
  box-shadow: 0 14px 22px -10px rgb(0 0 0 / 0.45);
}
.key .cap {
  position: absolute; left: 7px; right: 7px; top: 0; height: 86px; border-radius: 13px;
  background: radial-gradient(120% 90% at 50% 20%, var(--key-top), color-mix(in srgb, var(--key-top) 88%, var(--key-side)));
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.06), inset 0 2px 0 #fff;
  display: grid; align-content: space-between; padding: 10px 12px;
  transform: translateY(calc(var(--press) * 9px));
  transition: transform 0.07s ease-out;
}
.key .legend { font: 800 1.6rem/1 var(--f-display); font-stretch: 105%; text-align: left; }
.key .sub { font: 700 0.72rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; text-align: right; color: #4a5c6d; }
.key.down { --press: 1; }
.key:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 6px; border-radius: 18px; }
.keyhint { font-size: 0.95rem; line-height: 1.4; max-width: 17ch; color: var(--sky-ink); font-weight: 600; }
.keyhint kbd { font: 700 0.9em var(--f-mono); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .lede { max-width: 40ch; }
}

/* ---------- Sections ---------- */
section { padding-block: clamp(64px, 9vw, 120px); }
section + section { border-top: 1px solid var(--line); }
.intro { max-width: 60ch; display: grid; gap: 16px; }
.intro p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }
.prose { display: grid; gap: 14px; max-width: 62ch; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.note { font-size: var(--step--1); color: var(--ink-2); }

/* The four keys */
.keys { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.keys li { list-style: none; display: grid; gap: 14px; align-content: start; }
.keys ul, ul.keys { padding: 0; margin-block: 48px 0; }
.chord { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chord span.plus { color: var(--ink-2); font-weight: 700; }
kbd.k {
  display: inline-grid; place-items: center; min-width: 52px; height: 48px; padding: 0 12px;
  font: 800 1.05rem/1 var(--f-display); font-stretch: 105%; color: #12202d;
  background: linear-gradient(180deg, #ffffff, #e7edf3); border-radius: 10px;
  box-shadow: 0 4px 0 -1px #b5c4d2, 0 6px 12px -4px rgb(11 29 46 / 0.3);
}
.keys p { color: var(--ink-2); }
.keys h3 { margin-bottom: -4px; }
.tag { display: inline-block; font: 700 0.72rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: color-mix(in srgb, var(--link) 14%, transparent); color: var(--link); vertical-align: 0.15em; margin-left: 6px; }
@media (max-width: 980px) { .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .keys { grid-template-columns: minmax(0, 1fr); } }

/* "You say / it types" rows */
.says { margin-top: 44px; border-top: 2px solid var(--ink); }
.say-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 16px; align-items: center; padding-block: 22px; border-bottom: 1px solid var(--line); }
.say-row .heard { font-style: italic; color: var(--ink-2); font-size: var(--step-1); line-height: 1.4; }
.say-row .typed { font-weight: 700; font-size: var(--step-1); line-height: 1.35; }
.say-row .typed small { display: block; font-weight: 600; font-size: var(--step--1); color: var(--ok); margin-top: 4px; }
.say-row svg { width: 26px; height: 26px; color: var(--ok); }
.say-head { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 16px; padding-block: 14px; font-weight: 700; font-size: var(--step--1); color: var(--ink-2); border-bottom: 1px solid var(--line); }
.say-head span:nth-child(2) { visibility: hidden; }
@media (max-width: 640px) {
  .say-row, .say-head { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  [data-hide-narrow] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
  .say-row svg { transform: rotate(90deg); width: 20px; height: 20px; }
  .say-row .heard::before { content: "You say "; font-style: normal; font-weight: 700; font-size: var(--step--1); display: block; }
}

/* Alternating feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature.flip > :first-child { order: 2; }
.feature + .feature { margin-top: clamp(64px, 9vw, 112px); }
/* App screenshots already include their window's own soft shadow and a
   transparent margin, so they get no frame of their own. */
.shot { display: block; }
.opaque { border-radius: 10px; box-shadow: var(--shadow); }
.shot-frame { display: grid; justify-items: center; }
.shot-frame figcaption { margin-top: 12px; font-size: var(--step--1); color: var(--ink-2); text-align: center; max-width: 52ch; }
figure { margin: 0; }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature.flip > :first-child { order: 0; }
}

/* Speed bars, drawn to scale */
.bars { margin-top: 8px; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; align-items: center; font-size: var(--step--1); }
.bar .track { position: relative; height: 30px; }
.bar .fill { height: 100%; border-radius: 6px; background: var(--ink-2); width: var(--w); min-width: 4px; }
.bar.gpu .fill { background: var(--link); }
.bar .val { position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--w) + 10px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar.cpu .val { left: auto; right: 10px; color: var(--paper); }
.bars-cap { font-size: var(--step--1); color: var(--ink-2); margin-top: 4px; }

/* Transcribe a File illustration: a file becomes text and subtitles */
.tf { display: grid; gap: 14px; }
.tf-file, .tf-out { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tf-file { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.tf-file svg { width: 34px; height: 34px; color: var(--link); flex: none; }
.tf-file span { display: block; font-weight: 500; font-size: var(--step--1); color: var(--ink-2); }
.tf-arrow { justify-self: center; color: var(--ink-2); }
.tf-arrow svg { width: 22px; height: 22px; }
.tf-out { display: grid; gap: 10px; font-size: 0.98rem; }
.tf-out .t { font: 700 0.82rem var(--f-mono); color: var(--link); margin-right: 8px; font-variant-numeric: tabular-nums; }
.tf-out .files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tf-out .files span { font: 600 0.82rem var(--f-mono); padding: 5px 9px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.illus-note { font-size: 0.8rem; color: var(--ink-2); text-align: right; }

/* Voice editing table */
.edits { margin-top: 8px; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); align-items: start; }
.edit mark { background: color-mix(in srgb, var(--link) 22%, transparent); color: var(--ink); padding: 1px 4px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.edit q { font-style: italic; color: var(--ink-2); }
.edit .out { font-weight: 700; }
.edit .out small { display: block; font-weight: 600; font-size: var(--step--1); color: var(--ok); margin-top: 3px; }
.edit-head { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); padding-block: 12px; }
@media (max-width: 640px) {
  .edit { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* The smaller things: two loose columns */
.extras { margin-top: 44px; columns: 2 320px; column-gap: 56px; }
.extras div { break-inside: avoid; padding-block: 16px; border-top: 1px solid var(--line); }
.extras h3 { font-size: 1.08rem; margin-bottom: 6px; }
.extras p { color: var(--ink-2); }

/* Desktops */
.desktops { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.desktops { gap: 8px 28px; }
.desktops li { font: 800 var(--step-1)/1.2 var(--f-display); font-stretch: 112%; letter-spacing: -0.01em; }

/* Screenshot strip */
.strip { margin-top: 40px; display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 440px); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 18px; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
.strip figure { scroll-snap-align: start; display: grid; gap: 10px; align-content: start; }
.strip figure { grid-template-rows: 300px auto; }
.strip img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.strip img.opaque { height: auto; align-self: end; }
.strip figcaption { font-size: var(--step--1); color: var(--ink-2); }
.strip-wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; }
.strip:focus-visible { outline-offset: -3px; }

/* Videos */
.videos { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.video-side video { border-radius: var(--radius); box-shadow: var(--shadow); background: #000; width: 100%; max-height: 420px; object-fit: contain; }
.video-main video { border-radius: var(--radius); box-shadow: var(--shadow); background: #000; width: 100%; max-height: 80vh; object-fit: contain; }
.video-side { display: grid; gap: 18px; }
@media (max-width: 860px) { .videos { grid-template-columns: minmax(0, 1fr); } }

/* Privacy band */
.privacy-band { background: var(--sky); color: var(--sky-ink); border-top: 0; }
.privacy-band + section { border-top: 0; }
.privacy-band .promise { grid-column: 1 / -1; }
.privacy-band .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.privacy-band h2 { font-size: var(--step-3); }
.privacy-band .prose p { color: var(--sky-ink); }
.privacy-band a { color: var(--sky-ink); font-weight: 700; }
.privacy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.privacy-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.privacy-list svg { width: 22px; height: 22px; margin-top: 3px; }
@media (max-width: 860px) { .privacy-band .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Download */
.dl { margin-top: 44px; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.dl-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) 8.5rem; gap: 20px 28px; align-items: center; padding-block: 24px; border-bottom: 1px solid var(--line); }
.dl-row h3 { font-size: var(--step-2); }
.dl-row .for { color: var(--ink-2); font-size: var(--step--1); margin-top: 6px; }
.cmd { position: relative; display: flex; align-items: center; gap: 8px; background: var(--code-bg); color: var(--code-fg); border-radius: 10px; padding: 6px 6px 6px 16px; min-width: 0; }
.cmd code { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; padding-block: 8px; scrollbar-width: thin; }
.cmd code::before { content: "$ "; color: #7f97ad; }
.copy { flex: none; border: 0; cursor: pointer; font: 700 0.85rem/1 var(--f-body); color: var(--code-fg); background: rgb(255 255 255 / 0.1); border-radius: 7px; padding: 9px 11px; }
.copy:hover { background: rgb(255 255 255 / 0.18); }
.dl-row .btn-main { background: var(--ink); color: var(--paper); justify-content: center; }
.dl-after { margin-top: 28px; display: grid; gap: 10px; max-width: 70ch; color: var(--ink-2); }
@media (max-width: 860px) {
  .dl-row { grid-template-columns: minmax(0, 1fr); }
  .dl-row .btn { justify-self: start; }
}

/* Footer */
footer { padding-block: 56px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.97rem; }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; }
footer .links a { font-weight: 700; }
footer .made { display: grid; gap: 8px; max-width: 52ch; }
footer .brand { color: var(--ink); }
@media (max-width: 760px) { footer .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Privacy page ---------- */
.page-head { background: var(--sky); color: var(--sky-ink); padding-block: clamp(40px, 7vw, 88px); }
.page-head h1 { font-size: var(--step-4); font-weight: 850; font-stretch: 118%; letter-spacing: -0.03em; }
.page-head p { margin-top: 18px; font-size: var(--step-1); max-width: 46ch; }
.doc-page { padding-block: clamp(48px, 7vw, 88px); }
.doc-page .wrap { max-width: 820px; display: grid; gap: 44px; }
.doc-page h2 { font-size: var(--step-2); margin-bottom: 12px; }
.doc-page .prose { max-width: none; }
.doc-page ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--ink-2); }
.doc-page ul strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- The story: a sticky stage that changes as the steps scroll by ---------- */
.story-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.stage-wrap { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.stage {
  --s1: 0; --s2: 0; --s3: 0; --s4: 1;
  position: relative; height: clamp(320px, 34vw, 440px); border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--sky) 55%, var(--paper)), transparent 70%),
    color-mix(in srgb, var(--sky) 22%, var(--paper));
  box-shadow: var(--shadow);
}
.stage[data-step="1"] { --s1: 1; --s4: 0; }
.stage[data-step="2"] { --s2: 1; --s4: 0; }
.stage[data-step="3"] { --s3: 1; --s4: 0; }
.stage > * { position: absolute; transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* step 1 + 2: the key, pressed, and the indicator */
.st-key { left: 50%; top: 22%; width: 120px; height: 112px; transform: translate(-50%, calc((1 - max(var(--s1), var(--s2))) * -14px)) scale(calc(0.9 + max(var(--s1), var(--s2)) * 0.1)); opacity: var(--s1); }
.st-key::before { content: ""; position: absolute; inset: 10px 0 0 0; border-radius: 16px; background: linear-gradient(180deg, var(--key-side), color-mix(in srgb, var(--key-side) 70%, #000)); box-shadow: 0 14px 22px -10px rgb(0 0 0 / 0.45); }
.st-key .cap { position: absolute; left: 7px; right: 7px; top: 0; height: 92px; border-radius: 13px; background: radial-gradient(120% 90% at 50% 20%, var(--key-top), color-mix(in srgb, var(--key-top) 88%, var(--key-side))); box-shadow: inset 0 2px 0 #fff; padding: 12px 14px; transform: translateY(calc(max(var(--s1), var(--s2)) * 9px)); transition: transform 0.3s 0.25s ease-out; }
.st-key .legend { font: 800 1.7rem/1 var(--f-display); font-stretch: 105%; color: #12202d; }
.st-ind {
  left: 50%; top: 68%; display: flex; align-items: center; gap: 10px; background: #23272e; color: #f2f5f8; border: 2px solid var(--rec); border-radius: 999px; padding: 6px 16px 6px 6px; font: 700 1.05rem/1 var(--f-mono);
  opacity: max(var(--s1), var(--s2)); transform: translate(-50%, calc((1 - max(var(--s1), var(--s2))) * 16px));
  transition: opacity 0.45s ease, top 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s ease;
}
.stage[data-step="2"] .st-ind { top: 9%; }
.st-ind .orb { animation: orbpulse 0.9s ease-in-out infinite alternate; }
@keyframes orbpulse { from { transform: scale(0.9); } to { transform: scale(1.12); box-shadow: 0 0 24px rgb(80 180 255 / 0.9); } }

/* step 2: the voice, as a waveform, and the words being said */
.st-wave { left: 8%; right: 8%; top: 48%; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 4px; opacity: var(--s2); transform: translateY(-50%); }
.st-wave i { display: block; flex: 1; height: 100%; border-radius: 99px; background: var(--sky-ink); opacity: 0.85; transform: scaleY(0.12); }
.stage[data-step="2"] .st-wave i { animation: talk 0.9s ease-in-out infinite alternate; }
.st-wave i:nth-child(3n) { animation-delay: -0.3s !important; animation-duration: 0.7s !important; }
.st-wave i:nth-child(4n+1) { animation-delay: -0.55s !important; animation-duration: 1.1s !important; }
.st-wave i:nth-child(5n+2) { animation-delay: -0.15s !important; animation-duration: 0.6s !important; }
.st-wave i:nth-child(7n) { animation-delay: -0.8s !important; }
@keyframes talk { 0% { transform: scaleY(0.1); } 40% { transform: scaleY(0.75); } 70% { transform: scaleY(0.3); } 100% { transform: scaleY(0.95); } }
.st-heard { left: 8%; right: 8%; top: 66%; text-align: center; font-style: italic; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); color: var(--sky-ink); opacity: var(--s2); }
.st-heard span { display: inline-block; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s; }
.stage[data-step="2"] .st-heard span { opacity: 1; transform: none; }
.st-heard span:nth-child(2) { transition-delay: 0.25s; } .st-heard span:nth-child(3) { transition-delay: 0.5s; }
.st-heard span:nth-child(4) { transition-delay: 0.75s; } .st-heard span:nth-child(5) { transition-delay: 1s; }
.st-heard span:nth-child(6) { transition-delay: 1.25s; } .st-heard span:nth-child(7) { transition-delay: 1.5s; }
.st-heard span:nth-child(8) { transition-delay: 1.75s; } .st-heard span:nth-child(9) { transition-delay: 2s; }

/* step 3: speech becomes clean text */
.st-convert { left: 8%; right: 8%; top: 50%; transform: translateY(calc(-50% + (1 - var(--s3)) * 24px)); opacity: var(--s3); display: grid; gap: 14px; justify-items: start; }
.st-convert .chip { display: inline-flex; align-items: center; gap: 8px; font: 700 0.85rem/1 var(--f-body); padding: 8px 12px; border-radius: 99px; background: var(--sky-ink); color: var(--sky); }
.st-convert .chip svg { width: 16px; height: 16px; }
.st-convert .raw { font: 500 clamp(1rem, 0.9rem + 0.5vw, 1.2rem)/1.4 var(--f-mono); color: var(--sky-ink-2); }
.st-convert .raw s { text-decoration-thickness: 2px; text-decoration-color: var(--rec); }
.st-convert .clean { font: 700 clamp(1.25rem, 1rem + 1.1vw, 1.75rem)/1.3 var(--f-body); color: var(--sky-ink); }
.st-convert .clean b { color: var(--card); background: var(--sky-ink); border-radius: 5px; padding: 0 3px; margin-inline: 1px; }

/* step 4: typed into a window */
.st-window { left: 7%; right: 7%; top: 50%; background: var(--card); color: var(--ink); border-radius: 14px; box-shadow: 0 24px 50px -24px rgb(4 20 38 / 0.55); overflow: hidden; opacity: var(--s4); transform: translateY(calc(-50% + (1 - var(--s4)) * 30px)) scale(calc(0.96 + var(--s4) * 0.04)); }
.st-typed { padding: 22px 22px 30px; font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem); font-weight: 600; white-space: nowrap; overflow: hidden; }
.stage.js .st-typed { clip-path: inset(0 100% 0 0); }
.stage.js[data-step="4"] .st-typed { clip-path: inset(0 0 0 0); transition: clip-path 1.1s steps(34, end) 0.35s; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { min-height: 62vh; display: grid; align-content: center; gap: 10px; transition: opacity 0.4s ease; }
/* Dim the steps that aren't beside the panel, on wide screens only.
   On a phone every step stays fully readable. */
@media (min-width: 861px) {
  .steps.js li { opacity: 0.35; }
  .steps.js li.active { opacity: 1; }
}
.steps li:first-child { min-height: 40vh; align-content: start; padding-top: 6vh; }
.steps li:last-child { min-height: 50vh; }
.steps .num { font: 850 clamp(3rem, 2rem + 4vw, 5.5rem)/0.9 var(--f-display); font-stretch: 125%; color: var(--link); letter-spacing: -0.03em; }
.steps h3 { font-size: var(--step-2); }
.steps p { color: var(--ink-2); max-width: 36ch; font-size: var(--step-1); line-height: 1.5; }

@media (max-width: 860px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage-wrap { top: calc(env(safe-area-inset-top, 0px) + 68px); z-index: 2; }
  .stage { height: 260px; }
  .st-key { transform: translate(-50%, 0) scale(0.75); top: 10%; }
  .steps li, .steps li:first-child, .steps li:last-child { min-height: 70vh; align-content: end; padding-bottom: 8vh; padding-top: 0; }
  .steps p { font-size: var(--step-0); }
}

/* ---------- Scroll-linked touches (only where the browser supports them) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* "TuxTalk types" column types itself in as each row scrolls up */
    .say-row .typed { animation: typein linear both; animation-timeline: view(); animation-range: entry 30% cover 42%; }
    @keyframes typein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
    /* the privacy promise lights up a word at a time, like it's being read out */
    .promise span { animation: lightup linear both; animation-timeline: view(); animation-range: cover calc(18% + var(--i) * 3.2%) cover calc(24% + var(--i) * 3.2%); }
    @keyframes lightup { from { opacity: 0.22; } to { opacity: 1; } }
  }
}
.promise { font: 850 clamp(2.2rem, 1.2rem + 4.6vw, 5.2rem)/1 var(--f-display); font-stretch: 120%; letter-spacing: -0.03em; text-wrap: balance; margin: 0; max-width: 16ch; }

/* A YouTube embed, when there is one (see the comment in index.html) */
.yt { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Focus rings that stay visible on the blue hero and header */
.top :focus-visible, .hero :focus-visible, .privacy-band :focus-visible, .page-head :focus-visible { outline-color: var(--sky-ink); }

/* Screenshot strip: click to open full size, buttons to page through */
.strip .zoom { display: block; height: 100%; border-radius: 12px; cursor: zoom-in; }
.strip .zoom img { height: 100%; }
.strip .zoom img.opaque { height: auto; }
.strip .zoom:has(img.opaque) { display: flex; align-items: flex-end; }
.strip-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: -56px; position: relative; }
.strip-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.strip-btn:hover { background: var(--ink); color: var(--paper); }
.strip-btn:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--ink); }
.strip-btn svg { width: 20px; height: 20px; }
@media (hover: none) { .strip-nav { display: none; } }

/* In-page links land below the sticky header instead of under it */
section[id], #main, [tabindex="-1"] { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 72px); }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Screenshot viewer ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(4 12 20 / 0.9); color: #e8f2fb; overflow: hidden;
}
.lightbox::backdrop { background: rgb(4 12 20 / 0.92); }
.lightbox[open] { display: grid; place-items: center; }
.lb-figure { display: grid; justify-items: center; gap: 14px; padding: 64px clamp(16px, 7vw, 96px) 56px; max-width: 100%; max-height: 100%; }
.lb-figure img { max-width: 100%; max-height: calc(100dvh - 170px); width: auto; height: auto; object-fit: contain; }
.lb-figure figcaption { font-size: 1rem; text-align: center; max-width: 60ch; color: #e8f2fb; }
.lb-count { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 22px); left: 20px; margin: 0; font: 600 0.9rem var(--f-body); color: #a9c6e2; font-variant-numeric: tabular-nums; }
.lb-btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgb(255 255 255 / 0.12); color: #fff;
}
.lb-btn:hover { background: rgb(255 255 255 / 0.24); }
.lb-btn:focus-visible { outline: 3px solid #6cc0ff; outline-offset: 3px; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + 12px); right: 14px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); transform: none; }
  .lb-figure { padding: 64px 12px 76px; }
}
