/* Dictate landing page — Apple-style, white, one accent gradient taken from the
   app icon: magenta (lows), blue (mids), cyan (highs). */

:root {
  --bg: #ffffff;
  --bg-elevated: #f5f5f7;
  --bg-card: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --text-dim: #86868b;
  --magenta: #ed17c7;
  --blue: #1a6bf2;
  --cyan: #14d1cc;
  --icon-bg-top: #e1e2e8;
  --icon-bg-bottom: #c9cad4;
  --radius: 28px;
  --nav-h: 52px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

/* Hidden for the few milliseconds i18n.js takes to put English in. */
html.i18n-pending body { visibility: hidden; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
/* Inline keys drawn as Mac keycaps: light face, a lip underneath, a soft drop. */
kbd {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font);
  font-size: 0.78em;
  font-weight: 500;
  line-height: 1;
  padding: 0.38em 0.62em 0.42em;
  margin: 0 0.1em;
  border-radius: 0.42em;
  background: linear-gradient(#ffffff, #f1f1f4);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 2px 0 #cfcfd6,
    0 3px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 #fff;
  white-space: nowrap;
  color: var(--text);
  vertical-align: 0.12em;
}
kbd .kbd-glyph { color: var(--text-muted); font-size: 0.95em; }

.gradient-text {
  background: linear-gradient(100deg, var(--magenta) 0%, #8a5cf6 40%, var(--blue) 65%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-dim); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100% - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: block;
}

.nav-links { display: flex; align-items: center; gap: 26px; color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.nav-gh { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.nav-github { display: block; flex: 0 0 auto; width: 16px; height: 16px; }
.nav-cta {
  color: #fff !important;
  background: var(--text);
  padding: 5px 13px;
  border-radius: 99px;
  font-weight: 500;
}
.nav-cta:hover { background: #000; }

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 560px) {
  section { padding-top: 88px; padding-bottom: 88px; }
  .section-lead { margin-bottom: 40px; }
}

/* ---------- Layout ---------- */

main { display: block; }

section {
  padding: 120px max(20px, calc((100% - var(--max)) / 2));
  text-align: center;
  scroll-margin-top: var(--nav-h);
}

.section-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 20px;
}

.section-lead {
  max-width: 620px;
  margin: 0 auto 56px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------- Hero ---------- */

/* What the product is, in a line above the catchphrase. */
.eyebrow {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Exactly one screen under the nav: the demo only shows up on scroll. */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 40px;
  position: relative;
}

.hero-title {
  font-size: clamp(56px, 10vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 24px;
}

.hero-subtitle {
  font-size: clamp(19px, 2.4vw, 26px);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 36px;
  line-height: 1.4;
}
.wide-only { display: none; }
@media (min-width: 700px) { .wide-only { display: inline; } }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.apple-mark { display: block; flex: 0 0 auto; margin-right: 9px; margin-top: -2px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  border-radius: 99px;
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.button:active { transform: scale(0.97); }
.button.primary {
  color: #fff;
  background: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.button.primary:hover { background: #000; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22); }
.button.ghost {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.button.ghost:hover { background: rgba(0, 0, 0, 0.09); }

.hero-meta {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}

.brew {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}
.brew code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: 6px;
  user-select: all;
}

/* The waves, edge to edge: thin at both ends, wide and tall in the middle. */
.hero-wave {
  width: 100vw;
  /* The hero centres its children, so a 100vw block overflows evenly on both
     sides: no negative margin, which would shift it by half the padding. */
  margin: 20px 0 10px;
  flex: 0 0 auto;
  height: clamp(170px, 26vw, 360px);
  position: relative;
}
.hero-wave canvas { width: 100%; height: 100%; display: block; }


/* ---------- Demo: a full-bleed desktop with one Mail window ---------- */

.demo {
  padding: 0;
  position: relative;
  scroll-margin-top: var(--nav-h);
  /* The icon's colours in the icon's order, left to right around the window:
     magenta, blue behind it, cyan. Same weight on both sides, so the colour
     sits under the window instead of pooling in a corner. */
  background:
    radial-gradient(45% 55% at 12% 58%, rgba(237, 23, 199, 0.16), transparent 70%),
    radial-gradient(55% 60% at 50% 50%, rgba(26, 107, 242, 0.22), transparent 70%),
    radial-gradient(45% 55% at 88% 58%, rgba(20, 209, 204, 0.18), transparent 70%),
    linear-gradient(180deg, #eceef7, #e1e4f0);
}
/* Fades in from the white hero above. */
.demo::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 320px;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0));
  pointer-events: none;
}
/* Fades out below the key and the timeline, straight and deep enough to see
   the colour go. Eased stops so the fade has no visible start or end. */
.demo::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 380px;
  background: linear-gradient(
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0.5) 52%,
    rgba(255, 255, 255, 0.75) 68%,
    rgba(255, 255, 255, 0.92) 84%,
    #fff 100%
  );
  pointer-events: none;
}

/* Exactly one screen under the sticky nav; the window, the key and the
   timeline form one block centred in it, kept above the fade at the bottom. */
.desktop {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 300px;
  text-align: left;
}

/* The demo's own heading, inside the fade from the white hero. */
.demo-head { text-align: center; margin-bottom: 40px; position: relative; z-index: 1; }
.demo-head .section-title { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 12px; }
.demo-head .section-lead { margin-bottom: 0; max-width: 560px; }
/* A broadcast badge: frosted capsule, red LIVE tag with a pulsing dot. */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 5px 14px 5px 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(30, 40, 80, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 99px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.live-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .live-tag i { animation: none; } }
@media (max-width: 560px) { .desktop { padding: 90px 20px 220px; } .demo-head { margin-bottom: 28px; } }

.window {
  width: 100%;
  max-width: 880px;
  margin: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 40px 80px rgba(30, 40, 80, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.window-bar {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  position: relative;
  background: #f6f6f8;
}
.window-title { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
.lights { display: flex; gap: 7px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.mail-head { padding: 6px 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 15px; }
/* Like Mail: the value follows its label, no column. */
.mail-head > div { display: flex; align-items: center; gap: 6px; padding: 7px 0; }
.mail-head > div + div { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.mail-head span { color: rgba(0, 0, 0, 0.45); }
.mail-chip { font-style: normal; background: rgba(26, 107, 242, 0.12); color: #0b4fc2; padding: 2px 10px; border-radius: 99px; font-size: 14px; }
.mail-head b { font-weight: 500; }

.window-body { padding: 18px 20px 84px; min-height: 270px; }

.field-text {
  font-size: 17px;
  line-height: 1.55;
  min-height: 72px;
  white-space: pre-wrap;
  word-break: break-word;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: currentColor;
  vertical-align: -0.15em;
  margin-left: 1px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* The pill: a capsule of frosted glass at the bottom of the window, like the real one
   sits at the bottom of the screen. */
.pill {
  position: absolute;
  left: 50%;
  bottom: 16px;
  height: 48px;
  min-width: 96px;
  padding: 0 18px;
  border-radius: 99px;
  background: rgba(246, 246, 250, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 30px rgba(30, 40, 80, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, 10px) scale(0.85);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  z-index: 2;
}
.pill.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.pill.static { position: static; opacity: 1; transform: none; height: 36px; min-width: 72px; padding: 0 14px; }
.pill.static .pill-waves { width: 72px; height: 26px; }
.pill-waves { width: 94px; height: 34px; display: none; }
.pill.recording .pill-waves, .pill.static .pill-waves { display: block; }
.pill-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #1d1d1f;
  border-right-color: #1d1d1f;
  border-bottom-color: #1d1d1f;
  animation: spin 0.8s linear infinite;
}
.pill.processing .pill-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The keycap, shared by the demo and the feature card. */
.key {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 92px;
  height: 64px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(#ffffff, #ededf1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 0 #c6c6ce, 0 10px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-size: 13px;
  color: var(--text);
}
.key { cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.key .key-glyph { font-size: 16px; align-self: flex-end; opacity: 0.7; }
.key .key-name { font-size: 12px; }
.key.pressed {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #c6c6ce, 0 4px 10px rgba(0, 0, 0, 0.12);
  background: linear-gradient(#f2f2f5, #e3e3e8);
}
.key.big { width: 150px; height: 100px; font-size: 16px; border-radius: 18px; padding: 12px 14px; }
.key.big .key-glyph { font-size: 24px; }
.key.big .key-name { font-size: 15px; }

/* The hero's key: the feature card's keycap, small enough to sit in the sentence. */
.key.inline {
  width: 84px;
  height: 58px;
  margin: 0 0.25em;
  padding: 7px 9px;
  gap: 0;
  border-radius: 11px;
  /* Only the name stays in the flow, so the key's baseline is the name's and it
     sits on the sentence's baseline; the glyph is pinned to the top right. */
  position: relative;
  justify-content: flex-end;
  vertical-align: baseline;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 5px 0 #c6c6ce, 0 9px 18px rgba(0, 0, 0, 0.12);
}
.key.inline .key-glyph { font-size: 15px; position: absolute; top: 7px; right: 9px; }
.key.inline .key-name { font-size: 13px; }
.key.inline.pressed { box-shadow: 0 1px 0 #c6c6ce, 0 3px 8px rgba(0, 0, 0, 0.12); transform: translateY(4px); }
@media (max-width: 560px) {
  .key.inline { width: 64px; height: 44px; padding: 5px 7px; border-radius: 9px; font-size: 12px; }
  .key.inline .key-glyph { font-size: 12px; top: 5px; right: 7px; }
  .key.inline .key-name { font-size: 11px; }
}

/* Under the window: the timeline, then the bottom of a Mac keyboard. */
.desk-bar {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

/* How it works: four steps, lit as the dictation goes. */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}
.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 148px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
  transition: color 0.25s ease;
}
/* The rail between the dots. */
.timeline li + li::before {
  content: "";
  position: absolute;
  top: 5px;
  right: calc(50% + 10px);
  width: calc(100% - 20px);
  height: 2px;
  background: rgba(0, 0, 0, 0.12);
  transition: background 0.3s ease;
}
.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tl-label { text-align: center; line-height: 1.3; }
.tl-label small { display: block; font-size: 12px; opacity: 0.75; }
/* The icon's gradient across the five steps: each dot shows its slice, and
   the rail between done steps carries the same colours. */
.timeline { --grad: linear-gradient(90deg, #ed17c7, #8a5cf6 30%, #1a6bf2 60%, #14d1cc); }
.timeline li:nth-child(1) { --pos: 0%; }
.timeline li:nth-child(2) { --pos: 25%; }
.timeline li:nth-child(3) { --pos: 50%; }
.timeline li:nth-child(4) { --pos: 75%; }
.timeline li:nth-child(5) { --pos: 100%; }
.timeline li.active .tl-dot, .timeline li.done .tl-dot {
  background: var(--grad);
  background-size: 500% 100%;
  background-position: var(--pos) 0;
  background-origin: border-box;
  background-repeat: no-repeat;
  border-color: transparent;
}
.timeline li.active .tl-dot { box-shadow: 0 0 0 5px rgba(138, 92, 246, 0.18); }
.timeline li.done + li::before, .timeline li.active + li.done::before {
  background: var(--grad);
  background-size: 500% 100%;
  background-position: calc(var(--pos) - 12.5%) 0;
}
.tl-caption .tl-context { display: flex !important; margin-top: 3px; }
.tl-icon { display: none; }
.tl-caption { display: none; margin: -14px 0 0; min-height: 40px; text-align: center; font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.3; }
.tl-caption small { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
/* The app the dictation is reviewed for, with its icon: Mail, like the demo. */
.tl-context { display: inline-flex !important; align-items: center; justify-content: center; gap: 5px; }
.tl-context img { width: 14px; height: 14px; border-radius: 3px; }
.timeline li.active { color: var(--text); }
.timeline li.done { color: rgba(0, 0, 0, 0.6); }

@media (max-width: 760px) {
  .window-body { min-height: 230px; }
  .desk-bar { gap: 28px; }
  /* One row of five icon dots, the current step named once underneath. */
  .timeline { width: 100%; max-width: 340px; }
  .timeline li { width: 20%; }
  .tl-label { display: none; }
  .tl-dot { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.85); }
  .tl-icon { display: flex; font-size: 15px; line-height: 1; color: rgba(0, 0, 0, 0.4); transition: color 0.25s ease; }
  .timeline li.active .tl-icon, .timeline li.done .tl-icon { color: #fff; }
  .timeline li + li::before { top: 16px; right: calc(50% + 19px); width: calc(100% - 38px); }
  .tl-caption { display: block; }
}

/* The keyboard: as wide as the Mail window above it. The row holds 7.1
   units (control, option, a 3.85-unit space bar, command) and 3 gaps, plus
   the gaps a wide key spans; each key takes its share, the height follows. */
.keyboard {
  width: 100%;
  max-width: 880px;
  container-type: inline-size;
  --g: 10px;
  --u: calc((100cqw - 6.1 * var(--g)) / 7.1);
}
.kb-row { display: flex; gap: var(--g); }
.keyboard .key.big {
  --w: 1;
  flex: 0 0 calc(var(--u) * var(--w) + var(--g) * (var(--w) - 1));
  width: auto;
  margin: 0;
  height: calc(var(--u) * 0.68);
  padding: calc(var(--u) * 0.09) calc(var(--u) * 0.11);
  border-radius: calc(var(--u) * 0.065); /* a real Mac keycap's corners are tight */
  font-size: calc(var(--u) * 0.13);
}
.keyboard .key.big .key-glyph { font-size: calc(var(--u) * 0.2); }
.keyboard .key.big .key-name { font-size: calc(var(--u) * 0.125); }
/* While control is held: a glow in the icon's colours around the key,
   magenta left, blue under, cyan right, and a ring that bursts outward at
   the moment of the press. Every other key paints above control, so both
   stay behind them. */
.keyboard .key.big { position: relative; z-index: 1; }
.keyboard .key[data-key] { z-index: 0; transition: transform 0.12s ease, box-shadow 0.4s ease, background 0.12s ease; }
.keyboard .key[data-key].pressed {
  animation: key-glow 0.9s ease-in-out infinite;
  transition-duration: 0.12s, 0.15s, 0.12s;
}
/* The glow breathes while the key is down. */
@keyframes key-glow {
  0%, 100% {
    box-shadow:
      0 1px 0 #c6c6ce,
      0 4px 10px rgba(0, 0, 0, 0.12),
      -4px 0 12px rgba(237, 23, 199, 0.45),
      0 5px 12px rgba(26, 107, 242, 0.45),
      4px 0 12px rgba(20, 209, 204, 0.45);
  }
  50% {
    box-shadow:
      0 1px 0 #c6c6ce,
      0 4px 10px rgba(0, 0, 0, 0.12),
      -7px 0 22px rgba(237, 23, 199, 0.8),
      0 8px 22px rgba(26, 107, 242, 0.8),
      7px 0 22px rgba(20, 209, 204, 0.8);
  }
}
.keyboard .key[data-key]::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(26, 107, 242, 0.7);
  opacity: 0;
  pointer-events: none;
}
.keyboard .key[data-key].pressed::after { animation: key-burst 0.7s ease-out; }
@keyframes key-burst {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.45); }
}
@media (prefers-reduced-motion: reduce) { .keyboard .key[data-key].pressed, .keyboard .key[data-key].pressed::after { animation: none; } }

/* On phones, only the control key, centred, at a fixed size. */
@media (max-width: 760px) {
  .keyboard { --g: 10px; --u: 124px; }
  .kb-row { justify-content: center; }
  .keyboard .key.big:not([data-key]) { display: none; }
}

/* ---------- Features ---------- */

/* Clear of the demo's fade: the title sits on white. */
.features { padding-top: 64px; }

/* Apple-style highlights: borderless tiles on white, every row the same
   height, the statement on top and the visual centred in whatever room is
   left below it, so a short statement never leaves a hole. Wide tiles put
   the text on the left and the visual on the right. One dark tile. */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Each row is as tall as its own tallest tile, not the page's. */
  grid-auto-rows: auto;
  gap: 16px;
  text-align: left;
}
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; } }

.card {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 28px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 340px;
  overflow: hidden;
}
.card h3 {
  order: 1;
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.card p {
  order: 2;
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.card-visual {
  order: 3;
  flex: 1 1 auto;
  min-height: 160px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: 32px;
  row-gap: 8px;
}
.card.wide h3 { grid-column: 1; grid-row: 2; }
.card.wide p { grid-column: 1; grid-row: 3; }
.card.wide .card-visual { grid-column: 2; grid-row: 1 / -1; padding-top: 0; }
@media (max-width: 900px) {
  .card.wide { display: flex; }
  .card.wide .card-visual { padding-top: 16px; }
  /* Two columns: the wide tile on top leaves seven singles, so the last one
     takes a whole row rather than leaving it half empty. */
  .card.fill { grid-column: span 2; }
}
@media (max-width: 560px) {
  .card { padding: 24px 22px 22px; min-height: 0; }
  .card.wide, .card.fill { grid-column: span 1; }
}
/* A wide tile that takes the whole row at every width: placed after a full
   row of singles, it keeps three columns and two columns free of holes. */
.card.full { grid-column: 1 / -1; }

.card.dark { background: #000; }
.card.dark h3 { color: #f5f5f7; }
.card.dark p { color: #86868b; }
.card.dark .stopwatch .timer { color: #1d1d1f; }
.card.dark .stopwatch svg { filter: drop-shadow(0 12px 30px rgba(26, 107, 242, 0.25)); }

.keycap-demo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.keycap-hint { font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; }

/* The keycap next to an aviation hand mic: both pressed together. */
.ptt-row { display: flex; align-items: center; gap: 44px; }
@media (max-width: 560px) { .ptt-row { gap: 24px; } }
.ptt-mic { display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18)); }
.ptt-mic .mic-button { transform-box: fill-box; transition: transform 0.12s ease; }
.ptt-mic.pressed .mic-button { transform: translateX(4px); }
.ptt-mic .mic-led { fill: #4a4a52; transition: fill 0.15s ease, filter 0.15s ease; }
.ptt-mic.pressed .mic-led { fill: #ff3b30; filter: drop-shadow(0 0 4px rgba(255, 59, 48, 0.9)); }
.ptt-mic .mic-waves path { opacity: 0; transition: opacity 0.2s ease; }
.ptt-mic.pressed .mic-waves path { animation: mic-wave 1.2s ease-in-out infinite; }
.ptt-mic.pressed .mic-waves path:nth-child(2) { animation-delay: 0.15s; }
.ptt-mic.pressed .mic-waves path:nth-child(3) { animation-delay: 0.3s; }
@keyframes mic-wave { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.clean-demo {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}
.clean-demo p { margin: 0; }
/* Airplane mode goes on, Wi-Fi goes off, and a sentence gets written all the
   same. One 9 s loop shared by every piece. */
.airplane-demo { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.airplane-panel {
  width: 100%;
  padding: 4px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}
.airplane-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.airplane-row + .airplane-row { border-top: 1px solid var(--line); }
.airplane-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
}
.airplane-icon.plane { background: #ff9500; }
.airplane-label { color: var(--text); font-weight: 500; }
.airplane-toggle {
  margin-left: auto;
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: #d1d1d6;
  animation: airplane-toggle 9s ease infinite;
}
.airplane-toggle i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  animation: airplane-knob 9s ease infinite;
}
.airplane-row.wifi { animation: airplane-dim 9s ease infinite; }
.airplane-state { margin-left: auto; color: var(--text-dim); display: grid; }
.airplane-state span { grid-area: 1 / 1; text-align: right; }
.airplane-state span:first-child { animation: airplane-on 9s step-end infinite; }
.airplane-state span:last-child { animation: airplane-off 9s step-end infinite; }
.airplane-typed {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text);
  min-height: 22px;
}
.airplane-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  animation: airplane-type 9s steps(46, end) infinite;
}
.airplane-caret {
  display: inline-block;
  width: 2px;
  height: 17px;
  margin-left: 1px;
  background: var(--blue);
  animation: airplane-caret 9s step-end infinite;
}
.offline-caption { font-size: 12px; color: var(--text-dim); }
@keyframes airplane-toggle { 0%, 10% { background: #d1d1d6; } 14%, 90% { background: #34c759; } 94%, 100% { background: #d1d1d6; } }
@keyframes airplane-knob { 0%, 10% { transform: translateX(0); } 14%, 90% { transform: translateX(14px); } 94%, 100% { transform: translateX(0); } }
@keyframes airplane-dim { 0%, 12% { opacity: 1; } 16%, 90% { opacity: 0.45; } 94%, 100% { opacity: 1; } }
@keyframes airplane-on { 0%, 13% { opacity: 1; } 13.1%, 92% { opacity: 0; } 92.1%, 100% { opacity: 1; } }
@keyframes airplane-off { 0%, 13% { opacity: 0; } 13.1%, 92% { opacity: 1; } 92.1%, 100% { opacity: 0; } }
@keyframes airplane-type { 0%, 22% { max-width: 0; } 58%, 92% { max-width: 100%; } 92.1%, 100% { max-width: 0; } }
@keyframes airplane-caret { 0%, 20% { opacity: 0; } 22%, 58% { opacity: 1; } 60% { opacity: 0; } 62% { opacity: 1; } 64% { opacity: 0; } 66% { opacity: 1; } 68%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .airplane-toggle, .airplane-toggle i, .airplane-row.wifi, .airplane-state span, .airplane-text, .airplane-caret { animation: none; }
  .airplane-toggle { background: #34c759; }
  .airplane-toggle i { transform: translateX(14px); }
  .airplane-row.wifi { opacity: 0.45; }
  .airplane-state span:first-child { opacity: 0; }
  .airplane-text { max-width: 100%; }
  .airplane-caret { opacity: 0; }
}
/* Time saved: the same message typed at 40 words per minute, then dictated.
   Dictate crosses the line first and the gap joins the running total. */
.saved-demo { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.race-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 9px;
  padding: 12px 14px 13px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
}
.race-label { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.race-label svg { flex: none; color: var(--text-dim); }
.race-row.dictate .race-label svg { color: var(--blue); }
.race-time { color: var(--text-dim); font-variant-numeric: tabular-nums; transition: color 0.2s ease; }
.race-row.done .race-time { color: var(--text); font-weight: 600; }
.race-track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.06); overflow: hidden; }
.race-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c7c7cc;
  width: 0;
}
.race-row.dictate .race-track i { background: linear-gradient(90deg, var(--magenta), var(--blue) 60%, var(--cyan)); }
.saved-total { display: flex; align-items: center; gap: 10px; padding: 6px 2px 0; }
.saved-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #5856d6;
  color: #fff;
}
.saved-caption { font-size: 13px; color: var(--text-muted); line-height: 1.3; }
.saved-value {
  position: relative;
  margin-left: auto;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.saved-gain {
  position: absolute;
  right: 0;
  bottom: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: #5856d6;
  opacity: 0;
}
.saved-gain.show { animation: saved-gain 1.3s ease forwards; }
@keyframes saved-gain {
  0% { opacity: 0; transform: translateY(6px); }
  20%, 55% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(16px); }
}

.clean-demo .raw { color: var(--text-dim); text-decoration: line-through; text-decoration-color: rgba(237, 23, 199, 0.6); }
.clean-demo .clean { color: var(--text); margin-top: 10px; }

.timer-demo { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.timer {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
/* A stopwatch: one turn of the dial is 2 s, so 1.5 s stops at three quarters. */
.stopwatch { position: relative; width: 150px; height: 165px; gap: 0; transform: scale(0.95); }
.stopwatch svg { display: block; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.1)); }
.stopwatch .timer {
  position: absolute;
  left: 50%;
  top: 121.9px; /* the readout window: 131 of 176 viewBox units */
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sw-ticks line { stroke: rgba(0, 0, 0, 0.22); stroke-width: 1.5; stroke-linecap: round; }
.sw-ticks line.major { stroke: rgba(0, 0, 0, 0.5); stroke-width: 2; }
.sw-crown { transition: transform 0.12s ease; }
.sw-crown.pressed { transform: translateY(4px); }
.sw-hand { transform-origin: 80px 100px; }

/* A shelf of apps gliding past, named underneath; the one passing the
   middle lifts and its name turns blue. The track holds the list twice and
   slides by half its width, so the loop never shows a seam; each chip
   carries its own spacing so that half is exact. main.js moves the track
   frame by frame: under a CSS animation, iOS Safari leaves tiles of this wide
   track unpainted as they glide in, cutting the icons off. The edges fade
   under two veils in the card's colour. */
.context-demo {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.context-demo::before,
.context-demo::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg-card), transparent);
}
.context-demo::after { inset: 0 0 0 auto; transform: scaleX(-1); }
.context-track { display: flex; width: max-content; padding: 8px 0 4px; }
.chip {
  margin-right: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s ease;
}
/* The icons keep their own shape (macOS icons come with their margins and
   rounded corners), so the shadow follows the pixels rather than a box. */
.chip img {
  display: block;
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.chip.lit { color: var(--blue); font-weight: 600; }
.chip.lit img { transform: translateY(-3px) scale(1.06); filter: drop-shadow(0 10px 14px rgba(26, 107, 242, 0.3)); }

.cursor-demo {
  width: 100%;
  padding: 14px 18px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: #1d1d1f;
  font-size: 15px;
  line-height: 1.5;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cursor-app {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}

.lang-demo { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lang-demo span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

.pill-demo {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background:
    radial-gradient(70% 70% at 25% 20%, rgba(26, 107, 242, 0.28), transparent 60%),
    radial-gradient(60% 60% at 85% 90%, rgba(237, 23, 199, 0.22), transparent 60%),
    linear-gradient(160deg, #e9ecf6, #d7dbea);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}

/* ---------- Comparison ---------- */

/* Feature table against the paid apps, Dictate in the last column. Every
   cell is one mark and one short word; the Dictate column is lifted with a
   tinted background. Scrolls sideways on narrow screens. */
.compare-scroll { max-width: 980px; margin: 0 auto 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  font-size: 15px;
  text-align: center;
}
.compare-table col.label { width: 150px; }
.compare-table th, .compare-table td { padding: 18px 10px; vertical-align: middle; }
.compare-table thead th { font-size: 14px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.01em; padding-top: 20px; padding-bottom: 16px; }
.compare-table thead th:first-child, .compare-table tbody th { width: 150px; }
.compare-table thead .us { color: var(--text); font-size: 16px; }
.compare-table thead .us span { display: inline-flex; align-items: center; gap: 8px; }
.compare-table thead .us img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--text); padding-left: 24px; }
.compare-table tbody th, .compare-table tbody td { border-top: 1px solid var(--line); }
.compare-table td { color: var(--text-muted); line-height: 1.25; }
.compare-table td span { display: inline-flex; align-items: center; gap: 7px; }
.compare-table td small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-dim); font-weight: 400; }
/* The mark: a filled disc for yes, a hollow one for no, half for partly. */
.compare-table td span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-sizing: border-box;
}
.compare-table td.yes span::before {
  background: #22a35a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4.5 8.3l2.3 2.3 4.7-4.9'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.compare-table td.no span::before { border: 1.5px solid rgba(0, 0, 0, 0.18); }
.compare-table td.some span::before { background: linear-gradient(90deg, #e8a200 50%, transparent 50%); border: 1.5px solid #e8a200; }
.compare-table td.plain span::before { display: none; }
.compare-table td.no { color: var(--text-dim); }
.compare-table td:last-child, .compare-table thead th:last-child {
  background: linear-gradient(180deg, rgba(26, 107, 242, 0.07), rgba(237, 23, 199, 0.05));
}
.compare-table td:last-child { color: var(--text); font-weight: 600; }
.compare-table td:last-child small { color: var(--text-muted); }

/* The point of the table, spelled out: nothing goes online with Apple Intelligence. */
.offline-callout {
  max-width: 760px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.offline-callout-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--magenta), var(--blue) 60%, var(--cyan));
}
.offline-callout p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.offline-callout b { color: var(--text); font-weight: 600; }
.compare .prices-note { max-width: 620px; }
@media (max-width: 560px) { .offline-callout { flex-direction: column; align-items: flex-start; } }

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  border-top: 1px solid var(--line);
}
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-list p { margin: 0 0 22px; color: var(--text-muted); font-size: 16px; line-height: 1.55; max-width: 640px; }
.faq-list code { font-family: var(--mono); font-size: 0.9em; background: rgba(0, 0, 0, 0.05); padding: 1px 6px; border-radius: 5px; }

/* Each flag waves from its bottom-left corner, like on a pole, one after
   the other so a ripple runs across the card. */
.flag {
  display: inline-block;
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  transform-origin: 0 100%;
  animation: flag-wave 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.14s);
}
@keyframes flag-wave {
  0%, 60%, 100% { transform: none; }
  15% { transform: rotate(-9deg) skewY(5deg); }
  30% { transform: rotate(5deg) skewY(-3deg); }
  45% { transform: rotate(-2deg) skewY(1deg); }
}
@media (prefers-reduced-motion: reduce) { .flag { animation: none; } }

/* ---------- Download ---------- */

.download { padding-top: 140px; padding-bottom: 140px; }
.download-icon {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 22.5%;
  overflow: hidden;
  margin: 0 auto 28px;
  background: linear-gradient(var(--icon-bg-top), var(--icon-bg-bottom));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.download-icon canvas { width: 100%; height: 100%; display: block; }

/* What the others charge, Dictate last. */
.prices {
  max-width: 460px;
  margin: 0 auto 14px;
  text-align: left;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 6px 22px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  font-size: 16px;
  color: var(--text-muted);
}
.price-row + .price-row { border-top: 1px solid var(--line); }
.price-row span:last-child { font-variant-numeric: tabular-nums; }
.price-row.us { color: var(--text); font-weight: 600; font-size: 17px; }
.price-row.us span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.price-row.us img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.price-row.us b { font-weight: 700; }
.prices-note { max-width: 460px; margin: 0 auto 44px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ---------- Footer ---------- */

.footer {
  padding: 40px 20px 60px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.footer p { margin: 6px 0; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
