:root {
  --bg: #F5F6F8;
  --bg-elevated: #FFFFFF;
  --text: #15171C;
  --muted: #5B6270;
  --hairline: rgba(20, 23, 28, 0.08);
  --left: #3B82F6;
  --right: #F0479A;
  --bottom: #A78BFA;
  --pad-top: #FDFDFE;
  --pad-bottom: #E2E6EC;
  --track-alpha: 0.18;
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.06), 0 12px 40px rgba(20, 23, 28, 0.08);
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121317;
    --bg-elevated: #1C1E24;
    --text: #F2F3F5;
    --muted: #9AA1AD;
    --hairline: rgba(255, 255, 255, 0.08);
    --pad-top: #2A2D35;
    --pad-bottom: #20232A;
    --track-alpha: 0.22;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 13px 26px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--left), color-mix(in srgb, var(--left) 55%, var(--bottom)));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--left) 35%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px color-mix(in srgb, var(--left) 45%, transparent); }
.btn-small { padding: 7px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.btn-wide { display: block; text-align: center; }

/* Hero */
.hero { text-align: center; padding: 72px 20px 24px; max-width: 760px; margin: 0 auto; }
.hero-icon { filter: drop-shadow(0 12px 24px rgba(20, 23, 28, 0.18)); }
h1 { font-size: clamp(44px, 8vw, 76px); letter-spacing: -0.03em; line-height: 1.05; margin: 18px 0 14px; }
.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); margin: 0 auto 28px; max-width: 620px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Demo */
.demo { padding: 32px 20px 40px; }
.demo-stage { position: relative; max-width: 720px; margin: 0 auto; }
#pad { width: 100%; display: block; touch-action: none; cursor: grab; filter: drop-shadow(0 18px 40px rgba(20, 23, 28, 0.14)); }
.pad-top { stop-color: var(--pad-top); }
.pad-bottom { stop-color: var(--pad-bottom); }
.pad { stroke: var(--hairline); stroke-width: 1.5; }
.track.left, .fill.left { fill: var(--left); }
.track.right, .fill.right { fill: var(--right); }
.track.bottom, .fill.bottom { fill: var(--bottom); }
.track { opacity: var(--track-alpha); }
.finger { fill: color-mix(in srgb, var(--text) 22%, transparent); stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-width: 1.5; }
.ripple { fill: none; stroke: var(--text); stroke-width: 4; }
.ripple.left { stroke: var(--left); }
.ripple.right { stroke: var(--right); }
.ripple.bottom { stroke: var(--bottom); }
.tap-ring { fill: none; stroke: var(--text); stroke-width: 2.5; }
.track.flash { opacity: .55; transition: opacity .15s ease; }
.caption rect { fill: var(--text); }
.caption text { fill: var(--bg); font: 600 16px -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
.tap-dot { fill: none; stroke: var(--bg); stroke-width: 2; }
.tap-dot.on { fill: var(--bg); }
/* macOS-style on-screen indicator, drawn inside the SVG so it scales with the pad. */
.osd { opacity: 0; transition: opacity .3s ease; transform-box: fill-box; transform-origin: center; }
.osd.show { opacity: 1; transition-duration: .12s; }
.osd-bg { fill: color-mix(in srgb, var(--bg-elevated) 88%, transparent); stroke: var(--hairline); stroke-width: 1.5; }
.osd-shadow { fill: rgba(20, 23, 28, 0.14); }
.osd-glyph * { fill: var(--text); stroke: var(--text); }
.osd-glyph .o-fill { stroke: none; }
.osd-glyph .o-line { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.osd-glyph .dim { opacity: .22; }
.chiclet { fill: color-mix(in srgb, var(--text) 16%, transparent); }
.chiclet.on { fill: var(--text); }
.demo-hint { text-align: center; color: var(--muted); font-size: 14px; }

/* Sections */
.section { max-width: 1080px; margin: 0 auto; padding: 72px 20px; }
.section.narrow { max-width: 760px; }
h2 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 40px; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-elevated); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.glyph svg { width: 24px; height: 24px; }
.glyph svg * { fill: currentColor; }
.glyph svg .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-left { color: var(--left); background: color-mix(in srgb, var(--left) 14%, transparent); }
.g-right { color: var(--right); background: color-mix(in srgb, var(--right) 14%, transparent); }
.g-bottom { color: var(--bottom); background: color-mix(in srgb, var(--bottom) 18%, transparent); }

/* Menu section */
.menu-shot { display: flex; gap: 40px; align-items: center; justify-content: center; flex-wrap: wrap; }
.menu-shot img { border-radius: 16px; box-shadow: var(--shadow); width: 340px; }
.menu-notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; }
.dot.left { background: var(--left); }
.dot.right { background: var(--right); }
.dot.bottom { background: var(--bottom); }

/* Price card */
.price-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: var(--bg-elevated); border-radius: 24px; padding: 36px 32px; box-shadow: var(--shadow);
}
.price-card h2 { font-size: 28px; margin: 12px 0 0; }
.price { font-size: 64px; font-weight: 700; letter-spacing: -0.03em; margin: 4px 0 0; }
.price-note { color: var(--muted); margin: 0 0 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; display: grid; gap: 8px; }
.checks li::before { content: "✓"; color: var(--left); font-weight: 700; margin-right: 10px; }

/* Download form */
#downloadForm { display: grid; gap: 10px; text-align: left; }
.email-label { font-weight: 600; font-size: 15px; }
.email {
  width: 100%; padding: 13px 16px; border-radius: 12px; font: inherit;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.email:focus { border-color: var(--left); box-shadow: 0 0 0 4px color-mix(in srgb, var(--left) 20%, transparent); }
.email[aria-invalid="true"] { border-color: var(--right); }
.form-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form-status.error { color: var(--right); }
.form-status.ok { color: var(--text); }
.consent { margin-top: 0; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
button.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* FAQ */
details { background: var(--bg-elevated); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Changelog */
.release h3 { font-size: 20px; margin: 0 0 8px; }
.release h3 span { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 8px; }
.release ul { color: var(--muted); padding-left: 20px; }

/* Footer */
.footer { text-align: center; padding: 48px 20px 64px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--hairline); }
.footer p { margin: 6px 0; }
.legal { font-size: 12px; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner .btn-small { margin-left: auto; }
}

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