/* Sketchnote landing page. Dark page, white UI, and the app's red for drawn marks only.
   Radius rule: buttons and commands are pills, panels are 14px, keys are 6px. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --surface: #131315;
  --surface-2: #1a1a1d;
  --line: rgb(255 255 255 / 0.08);
  --text: #ededea;
  --muted: #9b9ba0;
  --ink: #f4f4f1;
  --red: #ff3030;                       /* the app's annotation red, used only for drawn marks */
  --red-glow: rgb(255 48 48 / 0.45);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code, kbd, pre { font-family: var(--mono); }
p code, .req code, .update code {
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.1rem; }
section { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  height: 64px; padding: 0 max(24px, calc((100vw - var(--max)) / 2 + 24px));
  background: rgb(11 11 12 / 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand-mark { width: 34px; height: 24px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* Buttons and commands */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--ink); color: #111113; }
.btn-primary:hover { background: #ffffff; }
.btn-ghost { border: 1px solid rgb(255 255 255 / 0.18); color: var(--text); }
.btn-ghost:hover { border-color: rgb(255 255 255 / 0.4); }
.btn-small { height: 36px; padding: 0 16px; font-size: 14px; }

.command {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; max-width: 100%;
  padding: 6px 6px 6px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.command code { min-width: 0; font-size: 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.command .prompt { color: var(--muted); user-select: none; }
.copy {
  flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: 500 13px var(--sans); cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.copy:hover { background: #26262a; }
.copy:active { transform: scale(0.96); }
.copy.done { background: var(--ink); color: #111113; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 40px 56px; align-items: center; align-content: center;
  min-height: calc(100dvh - 64px); padding-top: 32px; padding-bottom: 56px;
}
.eyebrow { margin: 0 0 18px; color: var(--muted); font: 500 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.8rem); line-height: 1.02; letter-spacing: -0.035em; }
.lede { max-width: 30ch; margin: 22px 0 32px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-actions .command { width: 100%; }
.hero-actions .command code { font-size: 13px; }

/* Hero logo. Without JS only the logo shape shows. While main.js draws, the pen line is
   shown instead; it's the logo's centreline at the logo's width, so the swap is invisible. */
.hero-mark {
  grid-column: 1 / -1; justify-self: center;
  width: 132px; padding: 0; border: 0; background: none; cursor: pointer;
}
.hero-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-mark:focus-visible { outline: 1px solid rgb(255 255 255 / 0.4); outline-offset: 8px; border-radius: 14px; }
.pen {
  fill: none; stroke: var(--red); stroke-width: 21; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; opacity: 0;
}
.hero-mark.drawing .pen { opacity: 1; }
.hero-mark.drawing .shape { opacity: 0; }

/* Demo stage. Everything inside is sized in container units so it scales like an image. */
.stage {
  position: relative; margin: 0; container-type: inline-size;
  border-radius: 14px; border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
}
.desktop {
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 85% 10%, #1d1d22 0%, transparent 60%),
    radial-gradient(90% 80% at 0% 100%, #18181b 0%, transparent 55%),
    #0f0f11;
  font-size: 1.5cqw;
}
/* Edge glow while recording, the page's version of the app's screen-edge glow. */
.desktop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 0.25cqw rgb(255 48 48 / 0), inset 0 0 3cqw rgb(255 48 48 / 0);
  transition: box-shadow 0.6s var(--ease);
}
.stage[data-step="1"] .desktop::after,
.stage[data-step="2"] .desktop::after,
.stage[data-step="3"] .desktop::after {
  box-shadow: inset 0 0 0 0.25cqw rgb(255 48 48 / 0.45), inset 0 0 3cqw rgb(255 48 48 / 0.18);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.2cqw; padding: 0 1.6cqw;
  background: #050506; color: #c9c9c9; font-size: 1.15cqw; font-weight: 500;
}
.tray { width: 4cqw; height: 0.9cqw; border-radius: 1cqw; background: #2b2b2f; }

.window {
  position: absolute; overflow: hidden;
  border-radius: 1.1cqw; background: #1e1e21;
  border: 1px solid rgb(255 255 255 / 0.07);
  box-shadow: 0 2cqw 5cqw rgb(0 0 0 / 0.5);
}
.titlebar {
  position: relative; height: 12%; display: flex; align-items: center; justify-content: center;
  background: #252528; color: #d6d6d6; font-size: 1.2cqw; font-weight: 600;
}
.titlebar i { position: absolute; right: 1.2cqw; width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #38383c; }

/* The app window is a 400x260 grid: positions below are those coordinates in percent. */
.app { left: 5cqw; top: 9cqw; width: 58cqw; aspect-ratio: 400 / 260; }
.app h3 { position: absolute; left: 5.5%; top: 16%; font-size: 1.75cqw; color: #f0f0f0; }
.row {
  position: absolute; left: 4%; width: 92%; height: 12%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5%; border-bottom: 1px solid rgb(255 255 255 / 0.06);
  color: #cfcfcf; font-size: 1.45cqw;
}
.r1 { top: 27%; } .r2 { top: 40%; } .r3 { top: 53%; }
.r1 span { width: 49%; overflow: hidden; white-space: nowrap; }
.toggle { width: 3.2cqw; height: 1.8cqw; border-radius: 1cqw; background: #3a3a3e; position: relative; }
.toggle::after { content: ""; position: absolute; top: 0.25cqw; left: 0.25cqw; width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #e8e8e8; }
.toggle.on { background: #5b5b62; }
.toggle.on::after { left: auto; right: 0.25cqw; }
.btn-fake {
  position: absolute; top: 76%; height: 11%; display: flex; align-items: center; justify-content: center;
  border-radius: 0.7cqw; font-size: 1.35cqw; font-weight: 600;
}
.cancel { left: 50%; width: 18%; background: #2c2c30; color: #d8d8d8; }
.save { left: 77%; width: 16%; background: #d9d9d4; color: #141416; }

/* Ink: drawn with stroke-dashoffset, the only glowing element on the page. */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stroke, .crop path {
  fill: none; stroke: var(--red); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 0.35cqw var(--red-glow));
}
.stroke, .crop path { vector-effect: non-scaling-stroke; }
.stroke { stroke-width: 0.32cqw; transition: stroke-dashoffset 1.1s var(--ease), opacity 1s; }
.stage[data-step="2"] .s1,
.stage[data-step="3"] .s1, .stage[data-step="3"] .s2 { stroke-dashoffset: 0; }
/* Strokes fade a moment after drawing, as in the app; they're kept in the output. */
.stage[data-step="4"] .s1, .stage[data-step="4"] .s2 { stroke-dashoffset: 0; opacity: 0; }

/* Pause control for the looping demo (WCAG pause, stop, hide). */
.demo-pause {
  position: absolute; right: 12px; bottom: 12px; z-index: 4;
  height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgb(255 255 255 / 0.15); background: rgb(11 11 12 / 0.7);
  color: var(--muted); font: 500 12px var(--sans);
}
.demo-pause:hover, .demo-pause:focus-visible { color: var(--text); border-color: rgb(255 255 255 / 0.35); }
.stage.paused *, .stage.paused *::before, .stage.paused *::after { animation-play-state: paused !important; }

/* Recording pill */
.pill {
  position: absolute; left: 50%; top: 4.4cqw; z-index: 3;
  display: flex; align-items: center; gap: 0.8cqw;
  height: 3.4cqw; padding: 0 1.4cqw 0 1.2cqw; border-radius: 999px;
  background: rgb(28 28 30 / 0.95); border: 1px solid rgb(255 255 255 / 0.1);
  color: #fff; font-size: 1.3cqw; font-weight: 600; white-space: nowrap;
  opacity: 0; transform: translate(-50%, -1cqw);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.stage:not([data-step="0"]):not([data-step="7"]) .pill { opacity: 1; transform: translate(-50%, 0); }
.dot { width: 0.8cqw; height: 0.8cqw; border-radius: 50%; background: #ff453a; }
.pill-label { display: flex; align-items: center; gap: 0.8cqw; }
.timer { font-family: var(--mono); min-width: 3cqw; }
.meter { width: 3.4cqw; height: 0.55cqw; border-radius: 1cqw; background: rgb(255 255 255 / 0.15); overflow: hidden; }
.meter i { display: block; height: 100%; width: 40%; background: #30d158; animation: level 0.9s ease-in-out infinite alternate; }
@keyframes level { 0% { width: 20%; } 40% { width: 70%; } 100% { width: 45%; } }
.pill-state, .pill-ready { display: none; }
.stage[data-step="4"] .pill-label, .stage[data-step="5"] .pill-label, .stage[data-step="6"] .pill-label { display: none; }
.stage[data-step="4"] .pill-state { display: inline; }
.stage[data-step="4"] .dot { background: #ff9f0a; }
.stage[data-step="5"] .pill-ready, .stage[data-step="6"] .pill-ready { display: inline; }
.stage[data-step="5"] .dot, .stage[data-step="6"] .dot { background: #30d158; }

/* Spoken captions */
.caption {
  position: absolute; left: 50%; bottom: 3.5cqw; transform: translateX(-50%);
  font-size: clamp(11px, 1.7cqw, 18px); color: var(--text); white-space: nowrap;
}
.caption span {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 0.6cqw);
  padding: 0.6em 1.1em; border-radius: 999px; background: rgb(0 0 0 / 0.55);
  opacity: 0; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.stage[data-step="2"] .c1, .stage[data-step="3"] .c2 { opacity: 1; transform: translate(-50%, 0); }

/* Agent terminal */
.agent {
  right: 4cqw; top: 17cqw; width: 46cqw; height: 40cqw; z-index: 2;
  background: #141416;
  opacity: 0; transform: translateX(6cqw);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.stage[data-step="6"] .agent { opacity: 1; transform: none; }
.agent .titlebar { height: 3.6cqw; background: #1c1c1f; }
.agent-body { padding: 1.6cqw 2cqw; font: 1.2cqw/1.65 var(--mono); color: #d9d9d6; }
.agent-line { margin: 0; }
.paste-text span { display: block; opacity: 0; transition: opacity 0.3s; }
.paste-text span:first-child { display: inline; }
.stage[data-step="6"] .paste-text span { opacity: 1; }
.stage[data-step="6"] .paste-text span:nth-child(2) { transition-delay: 0.35s; }
.cursor { display: inline-block; width: 0.6cqw; height: 1.3cqw; vertical-align: -0.2cqw; margin-left: 0.3cqw; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sheet {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw; margin-top: 1.6cqw;
  opacity: 0; transform: translateY(1cqw);
  transition: opacity 0.5s var(--ease) 1.1s, transform 0.5s var(--ease) 1.1s;
}
.stage[data-step="6"] .sheet { opacity: 1; transform: none; }
.crop { position: relative; aspect-ratio: 5 / 3; border-radius: 0.7cqw; background: #222225; overflow: hidden; }
.crop em {
  position: absolute; left: 0.7cqw; top: 0.7cqw; z-index: 1;
  width: 2cqw; height: 2cqw; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: #111; font: normal 600 1.1cqw var(--sans);
}
.crop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop path { stroke-width: 0.25cqw; stroke-dashoffset: 0; }
.mini-save { position: absolute; left: 62%; top: 55%; width: 26%; height: 22%; border-radius: 0.5cqw; background: #d9d9d4; }
.mini-label { position: absolute; left: 10%; top: 42%; width: 78%; height: 12%; border-radius: 0.4cqw; background: #4a4a50; }

/* How it works: headline left, steps right */
.how {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px;
  padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line);
}
.how h2 { position: sticky; top: 120px; align-self: start; max-width: 12ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; }
.steps li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.steps p { margin: 8px 0 0; color: var(--muted); max-width: 52ch; }
.step-key { display: flex; gap: 6px; padding-top: 2px; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid rgb(255 255 255 / 0.12);
  border-bottom-width: 3px; color: var(--text); font-size: 13px; font-weight: 500;
}
.glyph svg { width: 96px; height: 40px; }
.glyph path { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--red-glow)); }

/* Output: full-width band with copy above the sample */
.output { padding-top: 40px; padding-bottom: 120px; }
.output-copy { max-width: 62ch; }
.output-copy p { color: var(--muted); }
.summary {
  margin: 32px 0 0; padding: 28px 32px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; line-height: 1.9; overflow-x: auto;
}
.summary .k { color: var(--ink); font-weight: 600; }
.summary .t, .summary .tag { color: var(--muted); }

/* Controls: two-column key list */
.controls { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; row-gap: 22px; margin: 48px 0 0; }
.keys div { display: flex; align-items: center; gap: 20px; }
.keys dt { display: flex; align-items: center; gap: 6px; min-width: 190px; color: var(--muted); font-size: 14px; }
.keys dd { margin: 0; }

/* Privacy: one big statement, facts in a row */
.privacy { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.statement { max-width: 18ch; margin: 0; font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.facts { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; margin-top: 56px; }
.facts p { margin: 0; color: var(--muted); }
.facts strong { display: block; margin-bottom: 6px; color: var(--text); font-weight: 600; }

/* Install */
.install { max-width: 820px; padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.req { color: var(--muted); max-width: 62ch; }
.install-steps { margin: 40px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.install-steps li { counter-increment: s; position: relative; padding-left: 52px; }
.install-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.25); font: 500 14px var(--mono);
}
.install-steps p { margin: 3px 0 12px; }
.update { margin-top: 36px; color: var(--muted); }

.footer {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
  max-width: var(--max); margin: 0 auto; padding: 32px 24px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.footer span:first-child { color: var(--text); font-weight: 600; }
.footer-github { margin-left: auto; }

/* Scroll reveal, added by main.js */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 40px; padding-top: 40px; }
  .how { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .how h2 { position: static; max-width: none; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .controls, .privacy, .install { padding-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 16px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .steps li { grid-template-columns: 1fr; gap: 14px; }
  .keys { grid-template-columns: 1fr; }
  .keys dt { min-width: 150px; }
  .command code { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-pause { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
