:root {
  --bg: #08070c;
  --bg-2: #0f0e15;
  --card: rgba(255, 255, 255, 0.04);
  --card-b: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --dim: #6b6b76;
  --accent: #ff3b5c;
  --accent-2: #ff8a4c;
  --grad: linear-gradient(135deg, #ff3b5c 0%, #ff6a4c 55%, #ff9f4c 100%);
  --radius: 18px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
em { font-style: normal; }
svg { width: 1em; height: 1em; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, opacity .2s;
}
.btn.sm { height: 34px; padding: 0 16px; font-size: 14px; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -8px rgba(255, 59, 92, .6); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -8px rgba(255, 59, 92, .75); }
.btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--card-b); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn.soon { cursor: default; }
.btn.soon:hover { transform: none; }
.bi { width: 14px; height: 14px; }

/* --- Nav ------------------------------------------------------------------ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 7, 12, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-color: var(--card-b);
}
.nav-in {
  max-width: var(--max); margin: 0 auto; height: 64px; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang {
  background: none; border: 1px solid var(--card-b); border-radius: 999px;
  height: 34px; min-width: 52px; padding: 0 12px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.lang:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; text-align: center;
  padding: 150px 24px 56px; max-width: 900px; margin: 0 auto;
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -1; }
.g1 { width: min(520px, 80vw); height: 420px; background: rgba(255, 59, 92, .28); top: 40px; left: 50%; transform: translateX(-80%); }
.g2 { width: min(460px, 70vw); height: 380px; background: rgba(120, 80, 255, .22); top: 120px; left: 50%; transform: translateX(-10%); }
.eyebrow {
  display: inline-block; margin: 0 0 22px; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: #ffb4c0;
  background: rgba(255, 59, 92, .1); border: 1px solid rgba(255, 59, 92, .25);
}
h1 {
  margin: 0; font-size: clamp(42px, 7.4vw, 84px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800;
}
h1 em, h2 em {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 26px auto 0; max-width: 640px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.meta { margin: 20px 0 0; font-size: 13px; color: var(--dim); }

/* --- Demo frame (screen-recording style) ---------------------------------- */
.demo { max-width: 1180px; margin: 0 auto; padding: 24px 24px 40px; }
.frame {
  position: relative; padding: clamp(14px, 3.4vw, 44px); border-radius: 28px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 59, 92, .55), transparent 60%),
    radial-gradient(110% 90% at 100% 100%, rgba(110, 80, 255, .5), transparent 60%),
    linear-gradient(135deg, #2a1830, #141026);
  box-shadow: 0 40px 120px -30px rgba(255, 59, 92, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: #111; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .1);
}
.screen.has-media video, .screen.has-media img { width: 100%; height: 100%; object-fit: cover; }

/* Screenshot slideshow (used until a demo video is set) */
.slides img {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease;
}
.slides img.on { opacity: 1; }
.slides { cursor: pointer; }

/* Chapters under the demo */
.chapters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 18px; }
.chap {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; row-gap: 8px;
  text-align: left; padding: 0; background: none; border: 0; cursor: pointer; color: var(--muted);
}
.chap:disabled { cursor: default; }
.chap-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.chap-bar i { display: block; height: 100%; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.chap-n { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--dim); }
.chap-t { font-size: 14px; font-weight: 500; }
.chap.on .chap-t { color: var(--text); }
.chap:not(:disabled):hover .chap-t { color: var(--text); }
/* Slideshow progress: earlier chapters full, the current one fills while it plays. */
.chap.done i, .demo:not(.auto) .chap.on i { transform: scaleX(1); }
.demo.auto .chap.on i { animation: chapfill var(--shot-ms, 5000ms) linear forwards; }
.demo.auto.paused .chap.on i { animation-play-state: paused; }
@keyframes chapfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Sections ------------------------------------------------------------- */
.section { max-width: var(--max); margin: 0 auto; padding: 110px 24px 0; }
.kicker { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--accent); }
h2 { margin: 0; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; letter-spacing: -.03em; font-weight: 750; }
.sub { margin: 18px 0 0; max-width: 620px; color: var(--muted); font-size: 18px; }
.note { margin: 18px 0 0; font-size: 14px; color: var(--dim); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.card {
  padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-b);
  transition: border-color .25s, background .25s, transform .6s cubic-bezier(.2, .7, .2, 1), opacity .6s;
}
.card:hover { border-color: rgba(255, 59, 92, .35); background: rgba(255, 255, 255, .055); }
.card-ic {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; margin-bottom: 18px;
  background: rgba(255, 59, 92, .12); color: #ff6b84;
}
.card-ic svg { width: 21px; height: 21px; }
.card h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Customize split */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.split h2 em { display: block; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 30px; color: #d4d4d8; font-size: 16px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12'/%3E%3C/svg%3E");
}
.checks li::after {
  content: ""; position: absolute; left: 6px; top: calc(.3em + 4px); width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.split-media .screen.small {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(70% 70% at 80% 10%, rgba(138, 92, 255, .45), transparent 60%),
    radial-gradient(70% 70% at 10% 90%, rgba(255, 59, 92, .4), transparent 60%),
    #17121f;
}

/* Shortcuts */
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 44px; }
.krow {
  display: flex; align-items: center; gap: 20px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-b); font-size: 16px; font-weight: 500;
}
.caps { display: flex; gap: 6px; }
kbd {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px;
  font: 600 17px/1 var(--font); color: #e4e4e7;
  background: linear-gradient(#2c2b33, #1f1e25); border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 #0c0b10, 0 4px 10px rgba(0, 0, 0, .4);
}

/* Native stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.stat { padding: 30px 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-b); }
.stat b {
  display: block; font-size: 56px; line-height: 1; letter-spacing: -.04em; font-weight: 800; margin-bottom: 14px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--card-b); }
.qa { border-bottom: 1px solid var(--card-b); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 600;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { flex: none; width: 18px; height: 18px; color: var(--dim); transition: transform .25s; }
.qa[open] summary svg { transform: rotate(90deg); color: var(--accent); }
.qa p { margin: 0; padding: 0 4px 22px; color: var(--muted); max-width: 760px; }

/* Final CTA */
.final { text-align: center; padding: 140px 24px 120px; position: relative; }
.final::before {
  content: ""; position: absolute; left: 50%; top: 60px; width: min(560px, 90vw); height: 360px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 59, 92, .22), transparent); z-index: -1;
}
.final-icon { margin: 0 auto 30px; border-radius: 22px; box-shadow: 0 20px 60px -10px rgba(255, 59, 92, .55); }
.final .cta-row { margin-top: 30px; }

/* Footer */
.foot { border-top: 1px solid var(--card-b); }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 36px 24px 48px; display: grid; gap: 10px; }
.foot p { margin: 0; font-size: 13px; color: var(--dim); max-width: 720px; }
.foot .brand { font-size: 16px; }
.foot .copy a { text-decoration: underline; text-underline-offset: 3px; }
.foot .copy a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

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

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .chapters { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav-in { padding: 0 16px; gap: 12px; }
  .hero { padding: 120px 16px 40px; }
  .demo { padding: 16px 16px 24px; }
  .frame { border-radius: 18px; }
  .screen { border-radius: 8px; }
  .section { padding: 80px 16px 0; }
  .grid, .stats, .keys { grid-template-columns: 1fr; }
  .chapters { grid-template-columns: repeat(2, 1fr); }
  .krow { gap: 14px; padding: 16px; }
  kbd { min-width: 36px; height: 36px; font-size: 15px; }
  .final { padding: 110px 16px 90px; }
}

/* Ditty Pro */
.pro-badge {
  display: inline-block; vertical-align: middle; margin-right: 8px; padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1.4; color: #fff; background: var(--grad);
}
.card h3 .pro-badge { margin: -2px 0 0 8px; font-size: 10px; }
.card.pro {
  background: linear-gradient(180deg, rgba(255, 59, 92, .08), rgba(255, 255, 255, .03));
  border-color: rgba(255, 59, 92, .22);
}

/* Free vs Pro */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.plan {
  display: flex; flex-direction: column;
  padding: 30px 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-b);
}
.plan.pro {
  background: linear-gradient(180deg, rgba(255, 59, 92, .1), rgba(255, 255, 255, .03));
  border-color: rgba(255, 59, 92, .3);
}
.plan h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.01em; color: var(--muted); }
.plan-price { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price b { font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.plan.pro .plan-price b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-price span { color: var(--muted); font-size: 15px; }
.plan .checks { margin: 22px 0 24px; gap: 10px; }
.plan .checks li { font-size: 15px; }
.plan-foot { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--card-b); font-size: 14px; color: var(--dim); }
.plan.pro .plan-foot { color: #ffb4c0; }
.faq-more a, .foot .copy a { text-decoration: underline; text-underline-offset: 3px; }
.faq-more a:hover { color: var(--text); }

@media (max-width: 600px) {
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 24px 20px; }
}

/* Document pages (privacy, support) */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 16px 72px; }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.doc .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.doc-lang {
  font-size: 13px; color: var(--muted); border: 1px solid var(--card-b); border-radius: 999px; padding: 6px 12px;
}
.doc-lang:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); }
.doc h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.2; margin: 0 0 8px; }
.doc h2 { font-size: 20px; margin: 36px 0 8px; }
.doc h3 { font-size: 17px; margin: 28px 0 6px; }
.doc p, .doc li { color: var(--muted); }
.doc ul, .doc ol { padding-left: 20px; }
.doc li + li { margin-top: 6px; }
.doc .date { color: var(--dim); font-size: 14px; margin: 0 0 24px; }
.doc hr { border: 0; border-top: 1px solid var(--card-b); margin: 56px 0; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.doc code {
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e4e4e7;
  background: rgba(255, 255, 255, .07); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere;
}
.contact {
  display: flex; align-items: center; gap: 16px; margin: 28px 0 8px; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 59, 92, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 59, 92, .3);
}
.contact .card-ic { margin: 0; flex: none; }
.contact .mail { display: inline-block; font-size: 18px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.contact .mail:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact p { margin: 4px 0 0; font-size: 14px; }
@media (max-width: 600px) {
  .contact { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .contact .mail { font-size: 17px; }
}
.doc-foot { margin-top: 56px; font-size: 14px; color: var(--dim); }
.doc-foot a { text-decoration: underline; text-underline-offset: 3px; }
