/*
 * Buggie v6, "See the difference".
 * Everything here is built on kit/tokens.css (the app's Theme.swift tokens). One extra colour:
 * the accent-picker blue (#3478D4), only for the film's active chapter and progress, the slider
 * handle, and Buggie's side of each comparison. Red only for recording and on-screen marks.
 */

@property --pos { syntax: '<percentage>'; inherits: true; initial-value: 30%; }

:root {
  --ink: var(--bk-ink);                 /* #242327 */
  --muted: var(--bk-muted);             /* #77757D, 4.5:1 on white */
  --line: var(--bk-line);               /* #DEDDE1 */
  --line-soft: var(--bk-project-row-line);
  --tint: var(--bk-project-window);     /* #F8F8F9, the project window's ground */
  --graphite: var(--bk-accent);         /* #39343D */
  --graphite-strong: var(--bk-accent-strong);
  --blue: var(--bk-swatch-blue);        /* #3478D4, the one extra colour */
  --blue-ink: #2862b3;                  /* the kit's strong blue, for small blue text (6:1) */
  --blue-soft: rgba(52, 120, 212, 0.1);
  --gut: clamp(16px, 4vw, 48px);
  --shadow-card: 0 0 0 1px var(--line), 0 1px 2px rgba(36, 35, 39, 0.04);
  --shadow-lift: 0 0 0 1px rgba(36, 35, 39, 0.07), 0 22px 56px -20px rgba(57, 52, 61, 0.34);
  --ease-out: cubic-bezier(0.22, 0.9, 0.24, 1);
  color-scheme: light;
}

/* ---------------------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; background: #fff; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.55 var(--bk-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3, p { margin: 0; }
q { quotes: "“" "”"; }

.wrap { width: min(100% - 2 * var(--gut), 1200px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--graphite); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid rgba(52, 120, 212, 0.6); outline-offset: 2px; }

kbd {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 5px; margin: 0 1px;
  border-radius: 6px; background: #fff;
  box-shadow: inset 0 0 0 1px #d3cfd5, 0 1px 0 #d3cfd5;
  font: 600 12px/1 var(--bk-font); color: var(--graphite); vertical-align: 1px;
}
.keys { white-space: nowrap; }
code { font: 12.5px/1.4 var(--bk-font-mono); }

/* ---------------------------------------------------------------------------------- type */
.eyebrow {
  margin: 0 0 14px;
  font: 700 12px/1.2 var(--bk-font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.h2 {
  font-family: var(--bk-font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--bk-mkt-ink);
  text-wrap: balance;
}
.lead {
  margin-top: 16px;
  max-width: 40em;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.head { max-width: 780px; margin: 0 0 clamp(32px, 4vw, 48px); }
.head--sub { margin-top: clamp(64px, 8vw, 104px); }

/* ---------------------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 0; border-radius: var(--bk-radius-medium);
  background: var(--graphite); color: #fff;
  font: 600 15px/1 var(--bk-font); letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 16px -6px var(--bk-accent-shadow);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--graphite-strong); }
.btn:active { transform: translateY(1px); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 50px; padding: 0 28px; border-radius: var(--bk-radius-large); font-size: 17px; }

.cta { display: grid; justify-items: center; gap: 8px; }
.cta__note { font-size: 13px; line-height: 1.3; color: var(--muted); white-space: nowrap; }

.btn-quiet {
  display: inline-flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--bk-radius-large);
  background: #fff; color: var(--ink);
  font: 600 15px/1 var(--bk-font); cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.btn-quiet svg { width: 14px; height: 14px; color: var(--graphite); }
.btn-quiet:hover { border-color: #c9c6cc; background: #fbfbfc; }
.btn-quiet__sub { font-weight: 400; color: var(--muted); font-size: 14px; }

.tbtn {
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--bk-radius-medium);
  background: #fff; color: var(--graphite);
  font: 600 13px/1 var(--bk-font); cursor: pointer;
}
.tbtn:hover { background: var(--bk-selected-fill); }

.demo-note { margin-top: 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.demo-note--center { text-align: center; margin-top: 20px; }

/* ---------------------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: inset 0 -1px 0 transparent;
  transition: box-shadow 0.2s ease;
}
.nav.is-scrolled { box-shadow: inset 0 -1px 0 var(--line-soft); }
.nav__in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__name { font: 700 17px/1 var(--bk-font-display); letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; }
.nav__links a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; white-space: nowrap; }
.nav__links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------------------------- hero */
/* Stacked and centred: the promise, then the real footage with its chapters beside it.
   Sized on the viewport height too, so the circled total is on the first screen at 1440x900
   and 1280x720. */
.hero { padding: clamp(14px, 2.4svh, 30px) 0 clamp(48px, 6vw, 80px); }
.hero__copy { max-width: 48rem; margin: 0 auto; text-align: center; }
.hero__kicker { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: clamp(8px, 1.4svh, 14px); }
.hero__kicker .eyebrow { margin: 0; }
.hero__kicker .bk-appicon { margin: -3px -1px -3px -3px; }
.hero__title {
  font-family: var(--bk-font-display);
  font-weight: 700;
  font-size: clamp(36px, min(4.4vw, 7.4svh), 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--bk-mkt-ink);
  text-wrap: balance;
}
.hero__title span { display: block; color: var(--muted); }
.hero__lead { max-width: 42rem; margin: clamp(10px, 1.6svh, 16px) auto 0; font-size: clamp(16.5px, min(1.35vw, 2.5svh), 19px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: clamp(14px, 2.4svh, 24px); }
.hero__meta { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---- the player */
.player {
  --pw: 780px;
  margin: clamp(18px, 3svh, 36px) auto 0;
  display: grid; grid-template-columns: minmax(0, var(--pw)) 320px; justify-content: center; gap: 20px; align-items: start;
}
.player .demo-note { grid-column: 1 / -1; text-align: center; margin-top: 4px; }
.player__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--bk-radius-window);
  overflow: hidden;
  background: #f4f3ef;                  /* the film's own ground */
  box-shadow: var(--shadow-lift);
}
.player__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; background: #f4f3ef; }
.player__video::cue { font: 500 15px/1.35 var(--bk-font); background: rgba(44, 39, 48, 0.9); color: #fff; }
.player__tag {
  position: absolute; left: 12px; top: 12px;
  padding: 5px 9px; border-radius: var(--bk-radius-small);
  background: rgba(255, 255, 255, 0.92); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 11.5px/1 var(--bk-font); color: var(--bk-icon-strong);
  pointer-events: none;
}
/* The full film is square: in film mode the frame grows to fit it, letterboxed in the film's ground. */
.player.is-film .player__screen { aspect-ratio: 1 / 1; max-height: calc(100svh - 96px); }
.player.is-film .player__video { object-fit: contain; }
.player.is-film .player__tag { display: none; }
.player.is-loading .player__screen::after {
  content: "Loading the film…";
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(244, 243, 239, 0.72);
  font: 600 14px/1 var(--bk-font); color: var(--bk-icon-strong);
}

.player__row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
.player__ctrl { display: flex; flex-direction: column; gap: 6px; }
.pbtn {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--graphite); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pbtn:hover { background: var(--bk-selected-fill); }
.pbtn svg { width: 16px; height: 16px; }
.pbtn--text { font: 700 11px/1 var(--bk-font); letter-spacing: 0.04em; }
.pbtn[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.pbtn .i-play, .pbtn .i-muted { display: none; }
.player.is-paused .pbtn[data-play] .i-pause { display: none; }
.player.is-paused .pbtn[data-play] .i-play { display: block; }
.pbtn[data-mute][aria-pressed="true"] { background: #fff; border-color: var(--line); color: var(--graphite); }
.pbtn[data-mute][aria-pressed="true"] .i-sound { display: none; }
.pbtn[data-mute][aria-pressed="true"] .i-muted { display: block; }
.player__time { font: 600 11px/1 var(--bk-font); font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; padding-top: 4px; white-space: nowrap; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.chapters li { display: flex; }
.chip {
  position: relative; overflow: hidden;
  display: block; width: 100%;
  padding: 8px 11px 10px;
  border: 1px solid var(--line); border-radius: var(--bk-radius-medium);
  background: #fff; color: var(--ink);
  text-align: left; cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.chip:hover { border-color: #c9c6cc; }
.chip::before {                         /* the Retcon fill: the active chip fills as it plays */
  content: ""; position: absolute; inset: 0; right: auto;
  width: calc(var(--p, 0) * 100%);
  background: var(--blue-soft);
  pointer-events: none;
}
.chip > span { position: relative; }
.chip__meta { display: flex; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip__time { font-weight: 600; color: var(--ink); }
.chip__label { display: block; margin-top: 2px; font-size: 14px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.chip__bar { position: absolute !important; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--blue); }
.chip.is-active { border-color: var(--blue); }
.chip.is-active .chip__time { color: var(--blue-ink); }
.chip.is-past .chip__time::after { content: " ✓"; color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------------------------- sections */
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--tint { background: var(--tint); box-shadow: inset 0 1px 0 var(--line-soft), inset 0 -1px 0 var(--line-soft); --muted: var(--bk-icon); }

/* ---- how it works */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.how__card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--bk-radius-window); background: #fff; box-shadow: var(--shadow-card); --muted: var(--bk-muted); }
.how__text { padding: 26px 28px 22px; }
.how__n { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 14px; border-radius: var(--bk-radius-medium); background: var(--graphite); color: #fff; font: 700 14px/1 var(--bk-font); }
.how__title { margin-bottom: 8px; font: 700 22px/1.2 var(--bk-font-display); letter-spacing: -0.02em; }
.how__text p:not(.how__n) { font-size: 16px; line-height: 1.55; color: var(--muted); }
.how__play {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line); border-radius: var(--bk-radius-medium);
  background: #fff; color: var(--graphite);
  font: 600 13.5px/1 var(--bk-font); cursor: pointer;
}
.how__play::before { content: ""; width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.how__play:hover { background: var(--bk-selected-fill); }
.how__vis { position: relative; flex: 1 0 auto; min-height: 250px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 26px; background: var(--tint); box-shadow: inset 0 1px 0 var(--line-soft); overflow: hidden; }

/* 1: menu bar + rolling buffer */
.how__vis--rec { place-items: stretch; align-content: center; gap: 30px; }
.menubar-wrap { border-radius: var(--bk-radius-medium); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 6px 18px -8px rgba(57, 52, 61, 0.25); zoom: 1.15; }
.menubar-wrap .bk-menubar { background: #f6f5f7; box-shadow: none; }
.buffer__track { position: relative; height: 40px; border-radius: var(--bk-radius-medium); background: #ecebee; box-shadow: inset 0 0 0 1px #e1dfe3; }
.buffer__gone { position: absolute; left: 0; top: 0; bottom: 0; width: 40%; display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--muted); }
.buffer__kept { position: absolute; top: 0; bottom: 0; left: 40%; width: 60%; border-radius: var(--bk-radius-medium); background: #fff; box-shadow: inset 0 0 0 1.5px var(--graphite); }
.buffer__label { display: block; padding: 0 12px; font-size: 13px; font-weight: 600; line-height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buffer__now { position: absolute; right: -6px; top: -22px; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--bk-red-ink); }
.buffer__now i { width: 8px; height: 8px; border-radius: 50%; background: var(--bk-red); }
.buffer__scale { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 2: talk and point */
.talk { display: grid; justify-items: center; gap: 18px; }
.talk__total { display: flex; align-items: baseline; gap: 40px; padding: 16px 30px 16px 24px; border-radius: var(--bk-radius-large); background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 17px; }
.talk__total b { position: relative; font-size: 26px; letter-spacing: -0.02em; }
/* The ring encloses the number, as the app's circle does (the film, action-ring.png). */
.bk-mark.talk__ring { position: absolute; left: -17%; top: -46%; width: 134%; height: 192%; max-width: none; stroke-width: 5; stroke-dasharray: 760; stroke-dashoffset: 0; }
.talk__bar { zoom: 1.5; }
.talk__said { font-size: 17px; font-weight: 600; text-align: center; }
.talk__said span { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* 3: the remark, cleaned up (iA's Style Check) */
.how__vis--write { display: flex; flex-direction: column; justify-content: center; background: #fff; }
.write__label { margin-bottom: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.write__said { margin-bottom: 18px; font-size: 18px; line-height: 1.5; }
.write__said s {
  text-decoration: none;
  color: var(--muted);
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 100% 1.5px;
  transition: background-size 0.45s ease, color 0.45s ease;
}
.js [data-strike]:not(.is-on) .write__said s { background-size: 0 1.5px; color: var(--ink); }
[data-strike].is-on .write__said s:nth-of-type(2) { transition-delay: 0.55s; }
[data-strike].is-on .write__said s:nth-of-type(3) { transition-delay: 1.1s; }
.write__task { position: relative; padding: 14px 16px; border-radius: var(--bk-radius-large); background: var(--bk-surface-panel); box-shadow: 0 0 0 1px var(--line); transition: box-shadow 0.4s ease 1.6s; }
[data-strike].is-on .write__task { box-shadow: 0 0 0 1px var(--line), 0 10px 26px -12px rgba(57, 52, 61, 0.35); }
.write__kind { display: inline-block; padding: 3px 8px; border-radius: var(--bk-radius-small); background: var(--bk-accent-soft); color: var(--bk-selected-ink); font-size: 11px; font-weight: 700; }
.write__title { margin-top: 8px; font: 700 19px/1.25 var(--bk-font-display); letter-spacing: -0.02em; }
.write__meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.write__note { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* 4: Latest, shown whole */
.how__vis--latest { padding-block: 24px; }
.latest-fit { width: min(100%, 390px); zoom: 1.08; }
.latest-fit .bk-latest { width: 100%; box-shadow: inset 0 0 0 1px var(--bk-line), 0 14px 36px -12px rgba(57, 52, 61, 0.35); }

/* ---- the agent's side (illustrated) */
.agent { overflow: hidden; border-radius: var(--bk-radius-window); background: #fff; box-shadow: var(--shadow-lift); }
.agent__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: #f6f5f7; box-shadow: inset 0 -1px 0 var(--line); }
.agent__lights { display: flex; gap: 7px; }
.agent__lights i { width: 11px; height: 11px; border-radius: 50%; background: #d9d7dc; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.agent__name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--bk-icon-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent__badge { flex: none; padding: 4px 8px; border-radius: var(--bk-radius-small); background: var(--bk-selected-fill); color: var(--bk-selected-ink); font: 700 10.5px/1 var(--bk-font); letter-spacing: 0.1em; text-transform: uppercase; }
.agent__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }

.calls { list-style: none; counter-reset: c; margin: 0; padding: 22px 22px 24px; display: grid; gap: 6px; align-content: start; }
.calls li { counter-increment: c; position: relative; display: grid; gap: 4px; padding: 10px 12px 11px 46px; border-radius: var(--bk-radius-medium); }
.calls li::before {
  content: counter(c);
  position: absolute; left: 12px; top: 10px;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--bk-accent-soft); color: var(--bk-selected-ink); font: 700 12px/1 var(--bk-font);
}
.calls li.is-open { background: var(--bk-selected-fill); box-shadow: inset 0 0 0 1px var(--line-soft); }
.calls li.is-open::before { background: var(--graphite); color: #fff; }
.calls__tools { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.calls code { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.calls__what { font-size: 14.5px; line-height: 1.45; color: var(--muted); }

.payload { padding: 22px 24px 8px; background: var(--tint); box-shadow: inset 1px 0 0 var(--line); --muted: var(--bk-icon); }
.payload__head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.payload__head code { font-size: 13px; font-weight: 600; color: var(--ink); }
.payload__code {
  margin: 8px 0 18px; padding: 14px 16px;
  border-radius: var(--bk-radius-medium); background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  font: 12.5px/1.65 var(--bk-font-mono); color: var(--bk-icon-strong);
  white-space: pre; overflow-x: auto;
}
.payload__code code { font: inherit; }
.payload__code b { font-weight: 600; color: var(--ink); }
.payload__code i { font-style: normal; color: #5a4f66; }

/* ---- compare: the step count (Retcon) */
.count { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
.count__title { margin-bottom: 20px; font: 700 clamp(19px, 1.6vw, 22px)/1.2 var(--bk-font-display); letter-spacing: -0.02em; }
.count__col--buggie .count__title { color: var(--blue-ink); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; font-size: 17px; line-height: 1.45; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -1px;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bk-accent-soft); color: var(--bk-selected-ink);
  font: 700 13px/1 var(--bk-font);
}
.count__col--buggie .steps li::before { background: var(--blue-ink); color: #fff; }
.count__col--buggie .steps li { font-weight: 600; }
.count__done { margin-top: 20px; font-size: 16px; line-height: 1.45; color: var(--muted); }

/* ---- compare: the before/after slider (iA)
   Each side is laid out so it reads whole where it rests: the hand-written form fills the left
   (100% - rest), the Buggie capture the right (from rest). The handle rests at --rest. */
.cmp {
  --pos: 30%;
  --rest: 30%;
  position: relative;
  height: clamp(520px, 42vw, 560px);
  border-radius: var(--bk-radius-window);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lift);
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  cursor: ew-resize;
}
.cmp.is-anim { transition: --pos 0.55s var(--ease-out); }
.cmp.is-sweep { transition: --pos 1.1s cubic-bezier(0.45, 0, 0.3, 1); }
.cmp__stage { position: absolute; inset: 0; }
.cmp__pane { position: absolute; inset: 0; }
.cmp__pane--hand { background: #eeeef1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp__pane--buggie { background: #fff; clip-path: inset(0 0 0 var(--pos)); }
.cmp__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--blue); pointer-events: none; }
.cmp__handle {
  position: absolute; top: 50%; left: var(--pos);
  display: grid; place-items: center;
  width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--blue); color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92), 0 8px 22px rgba(40, 98, 179, 0.38);
  cursor: grab; touch-action: none;
  transition: transform 0.15s ease;
}
.cmp__handle svg { width: 24px; height: 24px; }
.cmp__handle:hover { transform: scale(1.06); }
.cmp.is-dragging .cmp__handle { cursor: grabbing; transform: scale(1.1); }
.cmp__tag {
  position: absolute; top: 14px;
  padding: 6px 10px; border-radius: var(--bk-radius-small);
  background: rgba(255, 255, 255, 0.94);
  font: 700 11px/1 var(--bk-font); letter-spacing: 0.12em; text-transform: uppercase;
  pointer-events: none; transition: opacity 0.2s ease;
}
.cmp__tag--l { left: 14px; color: var(--bk-icon-strong); box-shadow: inset 0 0 0 1px var(--line); }
.cmp__tag--r { right: 14px; color: var(--blue-ink); box-shadow: inset 0 0 0 1px rgba(52, 120, 212, 0.45); }
.cmp.hide-l .cmp__tag--l, .cmp.hide-r .cmp__tag--r { opacity: 0; }
.cmp__jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

/* the hand-written ticket: deliberately not the app's look */
.form {
  position: absolute; top: 54px; bottom: 22px; left: 22px; right: calc(var(--rest) + 10px);
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #d6d6dc; border-radius: 5px;
  font-size: 12.5px; color: #3a3a40; overflow: hidden;
}
.form__bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-bottom: 1px solid #e3e3e8; background: #fafafb; font-size: 13px; white-space: nowrap; }
.form__crumb { color: #6b6b72; }
.form__x { margin-left: auto; color: #6b6b72; font-size: 18px; }
.form__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px 18px; }
.form__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.form__row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form__row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span:first-child { font-size: 11px; font-weight: 600; color: #55555c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld i { font-style: normal; color: #6b6b72; }
.in { display: block; height: 30px; padding: 0 9px; border: 1px solid #cdcdd4; border-radius: 4px; background: #fff; color: #2a2a30; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in--empty { color: #8a8a92; }
.in--sel { position: relative; padding-right: 22px; }
.in--sel::after { content: "▾"; position: absolute; right: 8px; top: 0; color: #6b6b72; }
.in--area { position: relative; height: auto; min-height: 118px; padding: 38px 10px 8px; line-height: 1.6; white-space: normal; }
.tools { position: absolute; left: 0; right: 0; top: 0; height: 28px; padding: 0 10px; border-bottom: 1px solid #e3e3e8; background: #f6f6f8; color: #5f5f66; font-size: 11px; line-height: 28px; letter-spacing: 0.08em; }
.in--drop { height: 70px; line-height: 68px; border-style: dashed; text-align: center; color: #6b6b72; }
.form__foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #e3e3e8; background: #fafafb; }
.form__count { margin-right: auto; color: #55555c; font-size: 12px; font-weight: 600; }
.fbtn { height: 28px; padding: 0 12px; border: 1px solid #cdcdd4; border-radius: 4px; background: #fff; font-size: 12px; line-height: 26px; }
.fbtn--main { background: #5b5b63; border-color: #5b5b63; color: #fff; }

/* the Buggie capture: the app's panel look */
.cap {
  position: absolute; top: 54px; bottom: 22px; left: calc(var(--rest) + 26px); right: 26px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: center;
}
.cap__clip { margin: 0; min-width: 0; }
.cap__frame { display: block; aspect-ratio: 700 / 520; border-radius: var(--bk-radius-large); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 12px 30px -10px rgba(57, 52, 61, 0.3); }
.cap__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cap__len { display: flex; align-items: center; gap: 6px; margin-top: 10px; font: 500 12px/1.2 var(--bk-font); color: var(--muted); }
.cap__len .bk-sf { width: 13px; height: 11px; color: var(--bk-icon); }
.cap__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cap__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.cap__proj { font-weight: 600; color: var(--ink); }
.cap__kind { padding: 3px 8px; border-radius: var(--bk-radius-small); background: var(--bk-accent-soft); color: var(--bk-selected-ink); font-size: 11px; font-weight: 700; }
.cap__title { font: 700 22px/1.2 var(--bk-font-display); letter-spacing: -0.025em; color: var(--ink); }
.cap__desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.cap__facts { display: grid; gap: 8px; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.cap__facts div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.4; }
.cap__facts dt { padding-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cap__facts dd { margin: 0; }
.cap__send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; padding-top: 4px; }
.cap__send .bk-actions { zoom: 1.1; }
.cap__to { font-size: 12.5px; font-weight: 600; color: var(--blue-ink); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); margin-top: 36px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.duo b { color: var(--ink); font-weight: 600; }

/* ---- where it goes */
.where { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.where__menu { position: sticky; top: 84px; display: grid; justify-items: center; padding: 36px 24px 22px; border-radius: var(--bk-radius-window); background: #fff; box-shadow: var(--shadow-card); }
.menu-zoom { zoom: 1.45; }
.menu-zoom .bk-fixmenu { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), var(--bk-shadow-menu); border-radius: 12px; }
.where__cap { margin-top: 22px; font-size: 13px; color: var(--bk-muted); }
.where__list { display: grid; gap: 16px; }
.dest { padding: 24px 26px; border-radius: var(--bk-radius-window); background: #fff; box-shadow: var(--shadow-card); --muted: var(--bk-muted); }
.dest__logos { display: flex; gap: 8px; margin-bottom: 14px; }
.tile { display: block; width: 36px; height: 36px; border-radius: 9px; }
.tile--mark { display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.tile--mark svg { width: 20px; height: 20px; }
.dest__title { margin-bottom: 6px; font: 700 20px/1.25 var(--bk-font-display); letter-spacing: -0.02em; }
.dest p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.dest__link { display: inline-block; margin-top: 2px; color: var(--graphite); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.dest__link:hover { text-decoration-color: currentColor; }
.faq code { padding: 3px 7px; border-radius: var(--bk-radius-small); background: var(--bk-selected-fill); box-shadow: inset 0 0 0 1px var(--line-soft); color: var(--bk-selected-ink); }

/* ---- privacy */
.priv { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.priv__col { padding: 28px; border-radius: var(--bk-radius-window); background: #fff; box-shadow: inset 0 0 0 1px var(--line-soft); --muted: var(--bk-muted); }
.priv__col--out { box-shadow: var(--shadow-card); }
.priv__title { margin-bottom: 16px; font: 700 21px/1.2 var(--bk-font-display); letter-spacing: -0.02em; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; font-size: 16.5px; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 6px; height: 11px; border-right: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite); transform: rotate(40deg); }
.priv__col--out .ticks li::before { width: 9px; height: 9px; top: 7px; left: 2px; border-right: 2px solid var(--graphite); border-top: 2px solid var(--graphite); border-bottom: 0; transform: rotate(45deg); }
.priv__more { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px 28px; }
.priv__more li { font-size: 15px; line-height: 1.5; color: var(--muted); }
.priv__more b { display: block; margin-bottom: 2px; color: var(--ink); font-weight: 600; }

/* ---- try band */
.try__in { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.try .h2 { max-width: 16em; }
.try .lead { margin: 0; }
.try__tile { margin-bottom: 6px; }
.try .cta { margin-top: 4px; }
.try__keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ---- FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 20px 40px 20px 0; list-style: none; cursor: pointer; font: 600 18px/1.35 var(--bk-font-display); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { max-width: 40em; margin: -4px 0 22px; font-size: 16.5px; line-height: 1.55; color: var(--muted); }

/* ---- footer */
.foot { padding: 40px 0 48px; box-shadow: inset 0 1px 0 var(--line); }
.foot__in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 40px; align-items: center; }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__name { font-weight: 700; }
.foot__line { font-size: 14px; color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; font-size: 14px; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }
.foot__small { grid-column: 1 / -1; padding-top: 20px; box-shadow: inset 0 1px 0 var(--line-soft); font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------------------------- scroll-in motion
   Restrained and one-shot, only with motion allowed: the buffer rolls to "now", the ring draws
   itself around the total, the agent's calls step in. Without JS or with Reduce Motion, every
   one of them simply shows its finished state. */
@media (prefers-reduced-motion: no-preference) {
  .js .buffer:not(.is-in) .buffer__kept { transform: translateX(-66.667%); }
  .js .buffer:not(.is-in) .buffer__gone > span { opacity: 0; }
  .buffer__kept { transition: transform 1.6s var(--ease-out) 0.2s; }
  .buffer__gone > span { transition: opacity 0.6s ease 1.1s; }

  .js .talk:not(.is-in) .talk__ring { stroke-dashoffset: 760; }
  .talk__ring { transition: stroke-dashoffset 0.9s cubic-bezier(0.45, 0, 0.3, 1) 0.35s; }

  .js .agent:not(.is-in) .calls li { opacity: 0; transform: translateY(8px); }
  .calls li { transition: opacity 0.45s ease, transform 0.45s var(--ease-out); }
  .calls li:nth-child(2) { transition-delay: 0.12s; }
  .calls li:nth-child(3) { transition-delay: 0.24s; }
  .calls li:nth-child(4) { transition-delay: 0.36s; }
  .calls li:nth-child(5) { transition-delay: 0.48s; }
  .calls li:nth-child(6) { transition-delay: 0.6s; }
}

/* ---------------------------------------------------------------------------------- responsive */
@media (max-width: 1120px) {
  .player { --pw: 640px; grid-template-columns: minmax(0, var(--pw)) 300px; }
  .priv__more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menubar-wrap, .latest-fit { zoom: 1; }
  .mb-more { display: none; }
  .nav__links { gap: 18px; }
}
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav .btn--sm { margin-left: auto; }
  .player { --pw: 620px; grid-template-columns: minmax(0, var(--pw)); }
  .player__ctrl { flex-direction: row; }
  .player__time { padding: 0 0 0 6px; align-self: center; }
  .player__row { grid-template-columns: minmax(0, 1fr); }
  .chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .agent__body { grid-template-columns: minmax(0, 1fr); }
  .payload { box-shadow: inset 0 1px 0 var(--line); }
  .where { grid-template-columns: minmax(0, 1fr); }
  .where__menu { position: static; justify-self: stretch; }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .cmp { height: 600px; }
  .cap { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 16px; }
  .cap__clip { max-width: 360px; }
  .cap__title { font-size: 19px; }
}
@media (max-width: 760px) {
  .count { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .priv { grid-template-columns: minmax(0, 1fr); }
  .priv__more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp { --rest: 18%; --pos: 18%; height: 700px; }
  .form__body { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .form__foot { display: none; }
  .cap { align-content: start; top: 58px; }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .foot__links { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .hero { padding-top: 16px; }
  .hero__copy { text-align: left; }
  .hero__kicker, .hero__cta { justify-content: flex-start; }
  .hero__title { font-size: clamp(34px, 10vw, 44px); }
  .hero__lead { margin-left: 0; font-size: 17px; }
  .hero__cta { margin-top: 18px; gap: 10px; }
  .hero__cta .btn--lg { flex: 1 1 auto; }
  .btn-quiet { height: 50px; padding: 0 14px; }
  .btn-quiet__sub { display: none; }
  .player { margin-top: 22px; }
  .player__tag { display: none; }
  .player .demo-note { order: 1; grid-column: auto; text-align: left; margin: 0; }
  .player__row { order: 2; }
  .chapters { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 4px; }
  .chapters li { flex: 0 0 72%; scroll-snap-align: start; }
  .section { padding-block: 56px; }
  .how__text { padding: 22px 20px 18px; }
  .how__vis { padding: 22px 16px; min-height: 220px; }
  .menubar-wrap .bk-menubar__left > :nth-child(n+3), .menubar-wrap .bk-menubar__sys:first-of-type { display: none; }
  .talk__bar { zoom: 1.3; }
  .talk__total { gap: 30px; }
  .calls { padding: 14px 10px 16px; }
  .calls li { padding: 9px 8px 10px 40px; }
  .calls li::before { left: 8px; }
  .payload { padding: 18px 14px 4px; }
  .payload__code { padding: 12px; font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .agent__name { font-size: 12px; }
  .cmp { --rest: 12%; --pos: 12%; height: 740px; border-radius: var(--bk-radius-large); }
  .cmp__handle { top: calc(100% - 52px); }   /* below the capture's text, not on its title */
  .form { top: 50px; bottom: 12px; left: 12px; right: calc(var(--rest) + 8px); }
  .cap { top: 50px; bottom: 12px; left: calc(var(--rest) + 14px); right: 12px; }
  .form__row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__row3 .fld:nth-child(3) { display: none; }
  .cap__clip { max-width: none; }
  .cap__title { font-size: 18px; }
  .cap__facts div { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .cap__send .bk-actions { zoom: 0.92; }
  .priv__col { padding: 22px; }
  .priv__more { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .faq summary { font-size: 17px; }
}
@media (max-width: 400px) {
  .menubar-wrap .bk-menubar__left > :nth-child(n+2) { display: none; }   /* keep the clock whole */
}

/* ---------------------------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .cmp.is-anim, .cmp.is-sweep { transition: none; }
}
