:root {
  --bg: #0b0c10;
  --bg-2: #111318;
  --surface: #15171d;
  --surface-2: #1c1f27;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef0f4;
  --muted: #a0a6b3;
  --faint: #6f7584;
  --accent: #7c5cff;
  --accent-2: #3b82f6;
  --grad: linear-gradient(135deg, #7c5cff 0%, #3b82f6 100%);
  --ok: #22c55e;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Motion tokens: strong custom curves; built-in easings are too weak. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-pill: cubic-bezier(0.2, 0.9, 0.3, 1.2); /* same curve as the app's pill */
  color-scheme: dark;
  interpolate-size: allow-keywords;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfc; --bg-2: #f2f4f7; --surface: #ffffff; --surface-2: #f3f4f7;
    --border: rgba(15, 18, 30, 0.08); --border-strong: rgba(15, 18, 30, 0.15);
    --text: #12141a; --muted: #565d6d; --faint: #8a90a0; color-scheme: light;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
::selection { background: rgba(124, 92, 255, 0.32); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; }
img, svg { display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px) saturate(140%); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; }
.logo-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a { transition: color 150ms ease; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px; font: 600 15px/1 var(--font); text-decoration: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; user-select: none; transition: transform 160ms var(--ease-out), background-color 150ms ease, filter 150ms ease; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background-color: var(--surface-2); }
  .btn.primary:hover { filter: brightness(1.08); }
  .nav-links a:hover, footer a:hover { color: var(--text); }
}
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* hero */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 640px; background: radial-gradient(520px 300px at 22% 30%, rgba(124, 92, 255, 0.28), transparent 70%), radial-gradient(520px 300px at 80% 20%, rgba(59, 130, 246, 0.22), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.eyebrow b { color: var(--text); font-weight: 600; }
h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; }
h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 19px; color: var(--muted); margin: 20px 0 30px; max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { width: 100%; font-size: 13.5px; color: var(--faint); margin-top: 6px; }
.reveal { animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* demo */
.demo { position: relative; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); overflow: hidden; }
.demo-bar { display: flex; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); }
.demo-chat { padding: 22px 20px 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; height: 360px; overflow: hidden; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; background: var(--surface-2); }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; transform-origin: bottom right; }
.bubble.enter { animation: bubble-in 300ms var(--ease-out) both; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.bubble.them { border-bottom-left-radius: 5px; }
.demo-input { position: absolute; left: 16px; right: 16px; bottom: 16px; min-height: 46px; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); font-size: 14.5px; }
.demo-input .typed { white-space: pre-wrap; }
/* Utterkey pastes the whole sentence at once, so the demo does too. */
.demo-input .typed.in { animation: insert 240ms var(--ease-out) both; }
@keyframes insert { from { opacity: 0; filter: blur(3px); } }
.demo-input .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
.demo-heard { position: absolute; left: 16px; right: 16px; bottom: 72px; font-size: 12.5px; color: var(--faint); font-style: italic; opacity: 0; transform: translateY(4px); transition: opacity 150ms ease, transform 150ms var(--ease-out); }
.demo-heard.show { opacity: 1; transform: none; transition-duration: 220ms; }
.pill { position: absolute; left: 50%; bottom: 108px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; border-radius: 22px; background: rgba(16, 17, 22, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transform-origin: bottom center; opacity: 0; transform: translate(-50%, 14px) scale(0.94); transition: transform 180ms var(--ease-out), opacity 140ms ease; }
.pill.on { opacity: 1; transform: translate(-50%, 0) scale(1); transition: transform 380ms var(--ease-pill), opacity 200ms var(--ease-out); }
.pill .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(124, 92, 255, 0.8); }
.pill .bars { display: flex; gap: 3px; align-items: center; height: 24px; }
.pill .bars span { width: 4px; height: 20px; border-radius: 2px; background: var(--grad); transform: scaleY(0.2); animation: wave 1100ms var(--ease-in-out) infinite; animation-delay: var(--d, 0ms); animation-play-state: paused; }
.pill.on .bars span { animation-play-state: running; }
.pill .label { color: #c9cdd6; font-size: 13px; }

/* sections */
section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
h2 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -0.025em; line-height: 1.12; font-weight: 720; }
.section-head p { color: var(--muted); font-size: 17.5px; margin-top: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step, .feature, .plan, .faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step { padding: 26px; }
.step-n { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 16px; }
.step h3, .feature h3 { font-size: 17px; font-weight: 650; margin-bottom: 6px; }
.step p, .feature p { color: var(--muted); font-size: 15px; }
kbd { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px; font: 600 12.5px var(--font); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 24px; }
.feature .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(124, 92, 255, 0.14); color: var(--accent); margin-bottom: 14px; }
.feature .ico svg { width: 20px; height: 20px; }
.example { margin-top: 12px; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); }
.example s { color: var(--faint); }
.example b { color: var(--text); font-weight: 600; }

.privacy { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.privacy .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.checks svg { width: 22px; height: 22px; color: var(--ok); flex: none; margin-top: 1px; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.plan { padding: 32px; display: flex; flex-direction: column; }
.plan.pro { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: 0 20px 60px rgba(124, 92, 255, 0.18); }
.plan-name { font-weight: 650; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tag { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: rgba(124, 92, 255, 0.15); color: var(--accent); }
.price { font-size: 46px; font-weight: 760; letter-spacing: -0.03em; margin: 14px 0 2px; }
.price small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; display: grid; gap: 10px; margin: 22px 0 28px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 3px; }
.plan .btn { width: 100%; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 260ms var(--ease-out), opacity 200ms ease, content-visibility 260ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; opacity: 1; }
.faq details p { color: var(--muted); margin-top: 10px; font-size: 15.5px; }

footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* document pages (install, legal, thanks) */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 10px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--muted); font-size: 16px; }
.doc ol, .doc ul { padding-left: 22px; display: grid; gap: 8px; margin: 10px 0; }
.doc strong { color: var(--text); }
.callout { padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin: 16px 0; }
.code { font-family: var(--mono); font-size: 13.5px; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); overflow-x: auto; white-space: pre; color: var(--text); }
.key-box { font-family: var(--mono); font-size: 13px; word-break: break-all; padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--border-strong); color: var(--text); margin: 12px 0; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(var(--peak, 0.9)); } }

@media (max-width: 900px) {
  .hero .wrap, .privacy .wrap, .plans { grid-template-columns: 1fr; }
  .steps, .features { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav .wrap > .btn { margin-left: auto; }
  .hero { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation-name: fade; }
  .bubble.enter { animation-name: fade; }
  .pill, .pill.on { transform: translate(-50%, 0); }
  .pill .bars span { animation: none; transform: scaleY(0.5); }
  .faq summary::after, .btn { transition: none; }
}
@keyframes fade { from { opacity: 0; } }
