/* Sonata website: same tokens as the app (src/renderer/css/styles.css) */
:root {
  --bg: #0b0b10;
  --bg-raised: #15151d;
  --bg-card: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f3f3f8;
  --muted: #a0a0b6;
  --faint: #6c6c82;
  --accent: rgb(167, 139, 250);
  --accent-2: rgb(139, 160, 255);
  --accent-rgb: 167, 139, 250;
  --on-accent: #0b0b10;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', system-ui, sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background:
    radial-gradient(1200px 520px at 18% -160px, rgba(var(--accent-rgb), 0.22), transparent 70%),
    radial-gradient(800px 460px at 100% 0%, rgba(139, 160, 255, 0.08), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.12; }
:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.85); outline-offset: 3px; border-radius: 8px; }
code { font: 0.9em ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: rgba(255, 255, 255, 0.07); padding: 0.1em 0.4em; border-radius: 6px; }
kbd { font: 600 0.82em var(--font); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: 0.05em 0.45em; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg-raised); padding: 8px 14px; border-radius: 10px; }

/* ── header ── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 16, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font: 700 20px var(--font-display); letter-spacing: -0.03em; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; filter: drop-shadow(0 4px 12px rgba(var(--accent-rgb), 0.45)); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 7px 12px; border-radius: 10px; transition: color 0.15s, background 0.15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.055); text-decoration: none; }
.nav a[aria-current='page'] { color: var(--text); }
.nav .btn { margin-left: 6px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  font: 600 15px var(--font); color: var(--text); cursor: pointer; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08); transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s;
}
.btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.13); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  color: var(--on-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent));
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.8);
}
.btn.primary:hover { box-shadow: 0 14px 36px -10px rgba(var(--accent-rgb), 0.95); }
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn[aria-disabled='true'] { cursor: default; opacity: 0.65; box-shadow: none; }
.btn[aria-disabled='true']:active { transform: none; }
.btn svg { flex: none; }

/* ── hero ── */
.hero { position: relative; padding: 88px 0 40px; text-align: center; overflow-x: clip; }
.hero-orb {
  position: absolute; left: 50%; top: 10px; width: 720px; height: 380px; margin-left: -360px;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.32), transparent); filter: blur(40px); pointer-events: none; z-index: -1;
}
.kicker { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 {
  font-size: clamp(42px, 7.4vw, 84px); font-weight: 800; margin: 14px auto 20px; max-width: 14ch;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.62)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .grad { display: inline-block; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(17px, 2.1vw, 20px); max-width: 620px; margin: 0 auto; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.platforms { margin-top: 18px; color: var(--faint); font-size: 14px; }

.window {
  margin: 64px auto 0; max-width: 1080px; border-radius: 16px; overflow: hidden; position: relative;
  border: 1px solid var(--line-strong); background: var(--bg-raised);
  box-shadow: 0 40px 120px -30px rgba(var(--accent-rgb), 0.45), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.window::before {
  content: ''; display: block; height: 30px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18px 15px, #ff5f57 5.5px, transparent 6.5px),
    radial-gradient(circle at 38px 15px, #febc2e 5.5px, transparent 6.5px),
    radial-gradient(circle at 58px 15px, #28c840 5.5px, transparent 6.5px),
    #101017;
}

/* ── sections ── */
section { padding: 96px 0 0; }
.head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; margin: 10px 0 14px; }
.head p { color: var(--muted); font-size: 17.5px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
}
.feature .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.13); border: 1px solid rgba(var(--accent-rgb), 0.22);
}
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 15px; }

.keys { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; color: var(--muted); font-size: 14px; }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shot { margin: 0; }
.shot img { border-radius: 14px; border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9); aspect-ratio: 2048 / 1295; object-fit: cover; width: 100%; }
.shot figcaption { color: var(--muted); font-size: 14.5px; margin-top: 12px; text-align: center; }

.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dl .ico { color: var(--text); margin-bottom: 12px; }
.dl h3 { font-size: 19px; }
.dl .meta { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.dl .btn { margin-top: auto; width: 100%; }
.note { margin-top: 22px; color: var(--muted); font-size: 14.5px; }
.note strong { color: var(--text); }
.note ul { margin: 8px 0 0 20px; }
.note li + li { margin-top: 4px; }

.privacy-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; }
.privacy-band h3 { font-size: 21px; margin-bottom: 6px; }
.privacy-band p { color: var(--muted); font-size: 15px; max-width: 640px; }

/* ── legal pages ── */
.doc { max-width: 760px; padding: 72px 0 24px; }
.doc h1 { font-size: clamp(36px, 6vw, 54px); font-weight: 800; margin: 10px 0 12px; }
.doc .updated { color: var(--faint); font-size: 14px; margin-bottom: 36px; }
.doc .summary { padding: 20px 24px; margin-bottom: 40px; color: var(--text); font-size: 16.5px; }
.doc h2 { font-size: 23px; font-weight: 700; margin: 44px 0 12px; }
.doc p, .doc li { color: #c9c9d8; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 10px 0 0 22px; }
.doc li + li { margin-top: 7px; }
.doc strong { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.doc td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* ── footer ── */
.foot { margin-top: 110px; border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--faint); font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--muted); }

/* ── 404 ── */
.lost { text-align: center; padding: 140px 0 40px; }
.lost h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 800; margin: 10px 0 14px; }
.lost p { color: var(--muted); margin-bottom: 30px; }

/* ── responsive ── */
@media (max-width: 960px) {
  .features, .downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  .hero { padding-top: 56px; }
  .window { margin-top: 44px; border-radius: 12px; }
  .window::before { height: 22px; background:
    radial-gradient(circle at 14px 11px, #ff5f57 4px, transparent 5px),
    radial-gradient(circle at 28px 11px, #febc2e 4px, transparent 5px),
    radial-gradient(circle at 42px 11px, #28c840 4px, transparent 5px), #101017; }
  section { padding-top: 72px; }
  .features, .downloads { grid-template-columns: 1fr; }
  .privacy-band { flex-direction: column; align-items: flex-start; padding: 24px; }
  .doc { padding-top: 48px; }
  .doc td:first-child { white-space: normal; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .top .wrap { height: 58px; }
  .brand { font-size: 18px; }
  .nav a { padding: 7px 8px; font-size: 14px; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.doc .after-table { margin-top: 16px; }
.doc ul + p, .doc ol + p { margin-top: 14px; }

.doc .translation-note { color: var(--faint); font-size: 14px; margin: -24px 0 28px; }

/* Chinese: CJK needs no negative tracking and a little more line height */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
:lang(zh) .hero h1 { line-height: 1.2; }
:lang(zh) body, :lang(zh) .lede { line-height: 1.75; }
:lang(zh) .kicker { letter-spacing: 0.08em; }
:lang(zh) .kicker { text-transform: none; }
h1, h2 { text-wrap: balance; }
.lede, .head p { text-wrap: pretty; }

/* ── language start page (/) ── */
.start-body { min-height: 100vh; display: grid; place-items: center; }
.start { position: relative; width: min(1040px, 100% - 40px); padding: 56px 0 40px; }
.start-orb {
  position: absolute; left: 50%; top: 0; width: min(640px, 100%); height: 340px; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.3), transparent); filter: blur(40px);
}
.start-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.start-logo { width: 72px; height: 72px; filter: drop-shadow(0 14px 34px rgba(var(--accent-rgb), 0.55)); }
.start-head h1 {
  font-size: clamp(40px, 6vw, 56px); font-weight: 800; margin: 18px 0 6px;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.62)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.start-meta { color: var(--faint); font-size: 14px; letter-spacing: 0.02em; }

.start-prompt {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px;
  margin: 44px 0 22px; color: var(--muted); font-size: 14px; font-weight: 600;
}
.start-prompt span { white-space: nowrap; }
.start-prompt i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

.lang-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lang-panel {
  display: flex; flex-direction: column; padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-strong); border-radius: 20px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s var(--ease);
}
.lang-panel:hover, .lang-panel:focus-within {
  border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-2px);
  box-shadow: 0 22px 50px -26px rgba(var(--accent-rgb), 0.85);
}
.lang-head { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.lang-head .badge {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font: 800 14px var(--font-display); color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.lang-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.lang-tag { font: 700 18px/1.35 var(--font-display); color: var(--text); margin-bottom: 8px; }
.lang-text { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; flex: 1; text-wrap: pretty; }
.lang-go { width: 100%; }
.lang-go svg { transition: transform 0.18s var(--ease); }
.lang-go:hover svg { transform: translateX(3px); }
.lang-legal { margin-top: 14px; text-align: center; color: var(--faint); font-size: 13px; }
.lang-legal a { color: var(--muted); }
.start-foot { margin-top: 36px; text-align: center; color: var(--faint); font-size: 13px; }
:lang(zh) .lang-tag { letter-spacing: 0; }
:lang(zh) .lang-text { line-height: 1.75; }
@media (max-width: 860px) {
  .lang-panels { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .lang-text { flex: none; }
}
@media (max-width: 420px) {
  .start { padding-top: 40px; }
  .start-prompt { margin-top: 34px; flex-direction: column; gap: 4px; }
  .start-prompt i { display: none; }
  .lang-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .lang-panel, .lang-go svg { transition: none; } }
