/* LemmeType website — one stylesheet, no build step.
   Tokens come from the app icon (scripts/make-app-icons.py in the app repo):
   jade #03A58D, night #0A1A17, white. Text colours are darkened/lightened for WCAG AA. */

:root {
  color-scheme: light dark;
  --jade: #03a58d;
  --night: #0a1a17;
  --red: #e5484d;

  --bg: #ffffff;
  --bg-soft: #f4faf8;
  --surface: #ffffff;
  --surface-2: #eef5f3;
  --text: #0a1a17;
  --muted: #5b6b67;
  --line: rgba(10, 26, 23, 0.1);
  --link: #02705f;
  --btn-bg: #02705f;
  --btn-text: #ffffff;
  --glow: rgba(3, 165, 141, 0.18);
  --shadow-sm: 0 1px 2px rgba(10, 26, 23, 0.06), 0 2px 8px rgba(10, 26, 23, 0.05);
  --shadow: 0 2px 6px rgba(10, 26, 23, 0.05), 0 18px 48px rgba(10, 26, 23, 0.1);
  --shadow-lg: 0 30px 80px rgba(10, 26, 23, 0.18);

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1a17;
    --bg-soft: #0c1f1b;
    --surface: #10241f;
    --surface-2: #15302a;
    --text: #e8f1ef;
    --muted: #a3b6b1;
    --line: rgba(232, 241, 239, 0.12);
    --link: #2fd3b4;
    --btn-bg: #2fd3b4;
    --btn-text: #0a1a17;
    --glow: rgba(47, 211, 180, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
}
p {
  margin: 0 0 1em;
}
button {
  font: inherit;
  color: inherit;
}
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}
.todo {
  background: #fff3c4;
  color: #4a3500;
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.92em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--surface-2);
}
.nav-cta {
  margin-left: 8px;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .nav .nav-cta {
    display: none;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links a {
    padding: 14px 8px;
    border-radius: 10px;
    font-size: 1.05rem;
  }
  .site-header.is-open .nav-links {
    display: flex;
  }
  .site-header.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 8px 24px var(--glow);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-small {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 0.92rem;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.store-badge {
  display: inline-block;
  border-radius: 12px;
}
.store-badge img {
  height: 54px;
  width: auto;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(72px, 10vw, 140px);
}
.section-soft {
  background: var(--bg-soft);
}
.section-head {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--link);
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.h2 {
  font-size: clamp(2rem, 2.6vw + 1.2rem, 3.4rem);
  font-weight: 700;
}
.lead {
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.3rem);
  color: var(--muted);
  line-height: 1.55;
}
.caption {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 110px) clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw + 0.6rem, 5.2rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--jade), #2fd3b4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: light) {
  .hero h1 .accent {
    background: linear-gradient(120deg, #02705f, #03a58d);
    -webkit-background-clip: text;
    background-clip: text;
  }
}
.hero .lead {
  max-width: 34ch;
  margin-bottom: 32px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.fine {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-icon {
    margin-inline: auto;
  }
  .hero .lead {
    margin-inline: auto;
  }
  .cta-row {
    justify-content: center;
  }
}

/* ---------- Device frames ---------- */
.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 644 / 1400;
  border-radius: 52px;
  padding: 11px;
  background: linear-gradient(145deg, #2a2f2e, #0d0f0f);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone::after {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  width: 30%;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #000;
  z-index: 3;
}
.phone .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #fff;
}
.phone .screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone.is-small {
  width: 230px;
  border-radius: 40px;
  padding: 8px;
}
.phone.is-small .screen {
  border-radius: 33px;
}
.phone.is-small::after {
  top: 16px;
  height: 20px;
}
.action-btn {
  position: absolute;
  left: -4px;
  top: 19%;
  width: 4px;
  height: 7%;
  border-radius: 3px 0 0 3px;
  background: #3a403e;
}
.side-btn {
  position: absolute;
  right: -4px;
  top: 27%;
  width: 4px;
  height: 11%;
  border-radius: 0 3px 3px 0;
  background: #3a403e;
}

/* ---------- Hero app demo (an illustration of the iPhone app) ---------- */
.app-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 64px 18px 20px;
  color: #0a1a17;
  background: #fff;
  font-size: 13px;
}
.app-ui .status {
  position: absolute;
  top: 18px;
  left: 30px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.app-ui h3 {
  font-size: 28px;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.app-ui .lang {
  text-align: center;
  color: #6b7875;
  font-size: 11px;
  margin-bottom: 16px;
}
.app-ui .stage {
  position: relative;
  flex: 1;
}
.app-ui .pane {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}
.demo-phone[data-state="idle"] .pane-idle,
.demo-phone[data-state="recording"] .pane-rec,
.demo-phone[data-state="result"] .pane-result,
.demo-phone[data-state="copied"] .pane-result {
  opacity: 1;
  transform: none;
}
.app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: #027a68;
}
.app-btn.stop {
  background: #ff3b3b;
}
.app-btn svg {
  width: 16px;
  height: 16px;
}
.pane-idle .hint {
  text-align: center;
  color: #6b7875;
  font-size: 11.5px;
  margin-top: 12px;
}
.rec-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}
.rec-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 3px solid #ff3b3b;
  animation: pulse 1.2s infinite;
}
.rec-time {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  margin-bottom: 14px;
}
.wave i {
  display: block;
  width: 4px;
  height: 30%;
  border-radius: 4px;
  background: var(--jade);
  animation: wave 1s ease-in-out infinite;
  animation-play-state: paused;
}
.is-live .wave i,
.wave.is-live i {
  animation-play-state: running;
}
.wave i:nth-child(2n) {
  animation-delay: -0.2s;
}
.wave i:nth-child(3n) {
  animation-delay: -0.45s;
  animation-duration: 0.8s;
}
.wave i:nth-child(4n) {
  animation-delay: -0.65s;
  animation-duration: 1.15s;
}
.wave i:nth-child(5n) {
  animation-delay: -0.3s;
  animation-duration: 0.9s;
}
.text-card {
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef0ef;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.text-card .w {
  opacity: 0;
  transition: opacity 0.25s;
}
.text-card .w.on {
  opacity: 1;
}
.row-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: #02705f;
}
.row-links .danger {
  color: #d92d2d;
}
.toast {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translate(-50%, 16px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(10, 26, 23, 0.88);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  white-space: nowrap;
}
.demo-phone[data-state="copied"] .toast {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tabbar {
  align-self: center;
  display: flex;
  gap: 28px;
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid #e3e7e6;
  font-size: 10px;
  font-weight: 600;
  color: #33403d;
}
.tabbar .on {
  color: #02705f;
}
.tap {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(3, 165, 141, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
.tap.go {
  animation: tap 0.6s var(--ease);
}

/* ---------- Typing vs talking ---------- */
.race {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.race-card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 330px;
  display: flex;
  flex-direction: column;
}
.race-card.is-talk {
  border-color: color-mix(in srgb, var(--jade) 45%, var(--line));
}
.race-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.race-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}
.race-title svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
}
.is-talk .race-title svg {
  color: var(--jade);
}
.timer {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
}
.race-text {
  flex: 1;
  font-size: 1.12rem;
  line-height: 1.55;
  min-height: 5.2em;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--link);
  animation: blink 1s steps(1) infinite;
}
.race-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}
.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--jade) 16%, transparent);
  color: var(--link);
  font-weight: 650;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.done-badge.on {
  opacity: 1;
  transform: none;
}
.done-badge svg {
  width: 16px;
  height: 16px;
}
.race-card .wave {
  justify-content: flex-start;
  height: 40px;
  margin: 0;
}
.race-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
@media (max-width: 760px) {
  .race {
    grid-template-columns: 1fr;
  }
  .race-card {
    min-height: 0;
  }
}

/* ---------- How it works (steps + scene) ---------- */
.how {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.how.is-flipped {
  grid-template-columns: 1.15fr 0.85fr;
}
.how.is-flipped .steps-wrap {
  order: 2;
}
.steps-wrap h3 {
  font-size: 1.5rem;
}
.steps {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 16px 18px 16px 64px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--muted);
  transition: background 0.35s, border-color 0.35s, color 0.35s;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.35s, color 0.35s;
}
.steps li strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  margin-bottom: 2px;
}
.steps li.is-active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.steps li.is-active::before {
  background: var(--btn-bg);
  color: var(--btn-text);
}
@media (max-width: 900px) {
  .how,
  .how.is-flipped {
    grid-template-columns: 1fr;
  }
  .how.is-flipped .steps-wrap {
    order: 0;
  }
}

/* Mac scene */
.mac {
  position: relative;
  width: 100%;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 15px;
}
.mac-menubar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  height: 30px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.mac-menubar .lt-glyph {
  display: grid;
  place-items: center;
  width: 22px;
  height: 18px;
  border-radius: 5px;
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}
.mac[data-state="rec"] .lt-glyph {
  background: var(--red);
  color: #fff;
}
.mac-menubar svg {
  width: 14px;
  height: 14px;
}
.mac-window {
  margin: 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.mac-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.mac-titlebar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.mac-titlebar i:nth-child(2) {
  background: #febc2e;
}
.mac-titlebar i:nth-child(3) {
  background: #28c840;
}
.mac-titlebar span {
  margin-left: 10px;
}
.mac-doc {
  padding: 20px 22px 28px;
  min-height: 270px;
  line-height: 1.6;
}
.mac-doc .meta {
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.inserted {
  background: color-mix(in srgb, var(--jade) 22%, transparent);
  border-radius: 3px;
  transition: background 1.6s;
}
.inserted.settled {
  background: transparent;
}
.mac-pill {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(10, 26, 23, 0.9);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.96);
  transition: opacity 0.3s, transform 0.35s var(--ease);
}
.mac[data-state="rec"] .mac-pill {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mac-pill .wave {
  height: 20px;
  gap: 3px;
  margin: 0;
}
.mac-pill .wave i {
  width: 3px;
  background: #2fd3b4;
}
.keys {
  position: absolute;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s;
}
.keys.on {
  opacity: 1;
}
.key {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 3px 0 var(--line), var(--shadow-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.keys.down .key {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--line);
}
.key.wide {
  min-width: 96px;
}

/* iPhone "Dictate Anywhere" scene */
.anywhere {
  display: flex;
  justify-content: center;
}
.anywhere .phone .screen {
  background: #f2f4f3;
}
.chat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 58px 12px 0;
  font-size: 12.5px;
  color: #0a1a17;
}
.chat-head {
  text-align: center;
  font-weight: 650;
  font-size: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfe4e2;
  margin: 0 -12px 10px;
}
.bubble {
  max-width: 78%;
  padding: 8px 11px;
  border-radius: 16px;
  margin-bottom: 6px;
  line-height: 1.35;
}
.bubble.in {
  background: #e3e7e6;
  align-self: flex-start;
}
.bubble.out {
  background: var(--jade);
  color: #fff;
  align-self: flex-end;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.bubble.out.on {
  opacity: 1;
  transform: none;
}
.chat-spacer {
  flex: 1;
}
.compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0;
}
.compose-field {
  flex: 1;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 16px;
  border: 1px solid #d3d9d7;
  background: #fff;
  line-height: 1.35;
}
.compose-field .placeholder {
  color: #8a9592;
}
.kb {
  position: relative;
  height: 150px;
  margin: 0 -12px;
  padding: 8px 6px 18px;
  background: #d6dcda;
}
.kb-keys {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  transition: opacity 0.3s;
}
.kb-keys i {
  height: 26px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.kb-keys i.space {
  grid-column: span 6;
}
.kb-keys i.mod {
  grid-column: span 2;
  background: #b7c0bd;
}
.kb-rec {
  position: absolute;
  inset: 8px 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  font-size: 11.5px;
  opacity: 0;
  transition: opacity 0.3s;
}
.kb-rec .wave {
  height: 28px;
  margin: 0;
}
.anywhere[data-state="rec"] .kb-rec {
  opacity: 1;
}
.anywhere[data-state="rec"] .kb-keys {
  opacity: 0.15;
}
.island {
  position: absolute;
  top: 19px;
  left: 50%;
  z-index: 5;
  height: 26px;
  width: 30%;
  transform: translateX(-50%);
  border-radius: 20px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  transition: width 0.45s var(--ease), height 0.45s var(--ease);
}
.island > * {
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
}
.anywhere[data-state="rec"] .island {
  width: 74%;
  height: 34px;
}
.anywhere[data-state="rec"] .island > * {
  opacity: 1;
  transition-delay: 0.2s;
}
.island .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #ff453a;
}
.anywhere .action-btn {
  transition: transform 0.15s, background 0.2s;
}
.anywhere .action-btn.press {
  transform: translateX(3px);
  background: var(--jade);
}
.phone.is-anywhere::after {
  display: none;
}

/* ---------- Clean mode toggle ---------- */
.clean-demo {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-bottom: 26px;
}
.segmented button {
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.said {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.clean-out {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.7rem);
  line-height: 1.5;
  font-weight: 550;
  letter-spacing: -0.01em;
  min-height: 3em;
}
.clean-out .drop {
  display: inline-block;
  max-width: 12em;
  overflow: hidden;
  vertical-align: bottom;
  white-space: pre;
  transition: max-width 0.6s var(--ease), opacity 0.4s, color 0.3s;
}
.clean-demo[data-mode="clean"] .clean-out .drop {
  max-width: 0;
  opacity: 0;
}
.clean-out .cap-lower,
.clean-out .cap-upper {
  transition: opacity 0.3s;
}
.clean-demo[data-mode="exact"] .cap-upper,
.clean-demo[data-mode="clean"] .cap-lower {
  display: none;
}
.clean-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  min-height: 34px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.88rem;
  color: var(--text);
}
.clean-demo[data-mode="exact"] .chip.only-clean,
.clean-demo[data-mode="clean"] .chip.only-exact {
  display: none;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature .ic {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--jade) 14%, transparent);
  color: var(--link);
}
.feature .ic svg {
  width: 22px;
  height: 22px;
}
.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 2px;
  letter-spacing: 0.02em;
}
@media (max-width: 980px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---------- Screenshot gallery ---------- */
.gallery {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 10px var(--gutter) 36px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.gallery figure {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}
.gallery figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}
@media (min-width: 1240px) {
  .gallery {
    justify-content: center;
  }
}

/* ---------- Local vs Cloud ---------- */
.modes {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.flow {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.flow svg {
  width: 100%;
  height: auto;
}
.flow .node rect {
  fill: var(--surface-2);
  stroke: var(--line);
}
.flow .node text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
}
.flow .node .sub {
  fill: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}
.flow .node.dev rect {
  stroke: var(--jade);
  stroke-width: 2;
}
.flow .note {
  fill: var(--text);
  font-family: var(--font);
  font-size: 19px;
  font-weight: 650;
}
.flow .note-sub {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 400;
}
.flow .path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}
.flow .packet {
  fill: var(--jade);
}
.flow .cloud-only {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.flow .local-only {
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
.modes[data-mode="cloud"] .flow .cloud-only {
  opacity: 1;
}
.modes[data-mode="cloud"] .flow .local-only {
  opacity: 0;
}
.mode-copy [data-for] {
  display: none;
}
.modes[data-mode="local"] .mode-copy [data-for="local"],
.modes[data-mode="cloud"] .mode-copy [data-for="cloud"] {
  display: block;
  animation: fadeUp 0.45s var(--ease);
}
.mode-copy ul {
  padding-left: 1.2em;
  color: var(--muted);
}
.mode-copy li {
  margin-bottom: 6px;
}
@media (max-width: 900px) {
  .modes {
    grid-template-columns: 1fr;
  }
}

/* ---------- Platforms ---------- */
.platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.platform {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.platform .pf-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}
.platform h3 {
  font-size: 1.6rem;
}
.platform ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  color: var(--muted);
}
.platform li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.platform li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--link);
  border-bottom: 2px solid var(--link);
  transform: rotate(-45deg);
}
.platform .cta-row {
  margin-top: auto;
  justify-content: flex-start;
}
@media (max-width: 820px) {
  .platforms {
    grid-template-columns: 1fr;
  }
}

/* ---------- Privacy promise ---------- */
.promise {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.promise div {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.promise strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}
.promise span {
  color: var(--muted);
  font-size: 0.95rem;
}
@media (max-width: 980px) {
  .promise {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .promise {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 780px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  position: relative;
  padding: 22px 44px 22px 0;
  font-weight: 620;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(225deg);
  margin-top: -2px;
}
.faq details > div {
  padding: 0 0 22px;
  color: var(--muted);
}
.faq-more {
  text-align: center;
  margin-top: 36px;
}

/* ---------- Final CTA ---------- */
.final {
  text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  border-radius: 36px;
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--jade) 22%, var(--surface)), var(--surface));
  border: 1px solid var(--line);
}
.final img {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.final .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.93rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--text);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-note {
  margin-top: 28px;
  font-size: 0.86rem;
}

/* ---------- Long-form documents ---------- */
.doc-hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 44px);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.doc-hero h1 {
  font-size: clamp(2.3rem, 3vw + 1.3rem, 3.8rem);
  letter-spacing: -0.035em;
}
.doc-hero .lead {
  max-width: 60ch;
}
.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 70ch);
  gap: clamp(32px, 5vw, 72px);
  justify-content: center;
  padding-block: clamp(36px, 5vw, 64px) clamp(64px, 8vw, 110px);
}
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 0.92rem;
}
.toc h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover,
.toc a.is-current {
  color: var(--text);
  border-left-color: var(--link);
}
.prose {
  max-width: 70ch;
}
.prose h2 {
  font-size: 1.65rem;
  margin-top: 2.2em;
  padding-top: 0.2em;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 0.45em;
}
.prose .summary {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 2em;
}
.prose .summary p:last-child {
  margin-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
  margin: 1.2em 0 1.6em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  line-height: 1.5;
}
.prose th,
.prose td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose th {
  background: var(--surface-2);
  font-weight: 650;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
}
.callout {
  padding: 16px 18px;
  border-left: 4px solid var(--jade);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
  margin: 1.4em 0;
}
.support-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 2.4em;
}
.support-cards a {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.support-cards a:hover {
  border-color: var(--link);
}
.support-cards strong {
  display: block;
  margin-bottom: 4px;
}
.support-cards span {
  color: var(--muted);
  font-size: 0.92rem;
}
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    position: static;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--line);
  }
  .support-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}
.not-found .big {
  font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--link);
  margin-bottom: 8px;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js .reveal.d1 {
  transition-delay: 0.08s;
}
.js .reveal.d2 {
  transition-delay: 0.16s;
}
.js .reveal.d3 {
  transition-delay: 0.24s;
}

/* ---------- Keyframes ---------- */
@keyframes wave {
  0%,
  100% {
    height: 22%;
  }
  50% {
    height: 100%;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes tap {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.hero-visual .phone {
  animation: float 7s ease-in-out infinite;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .wave i {
    height: 60%;
  }
  .caret {
    animation: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .toc,
  .skip-link {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
