/* 分轨 Demusic — site styles. Palette follows the app icon: a deep night
   field with the four stem colours (vocals, drums, bass, other). */

:root {
  color-scheme: dark;
  --night-0: #07060e;
  --night-1: #0c0b18;
  --night-2: #15132a;
  --ink: #f3f1ff;
  --ink-2: rgba(243, 241, 255, 0.72);
  --ink-3: rgba(243, 241, 255, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --vocals: #ff6b8c;
  --drums: #ffa840;
  --bass: #9e80ff;
  --other: #4dd9bf;
  --brand: #40ad7a;
  --radius: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  --display: "Instrument Serif", "Songti SC", "Noto Serif SC", serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night-0);
  color: var(--ink);
  font: 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* The tilted hero phones poke past the edge; never let them scroll the page sideways. */
  overflow-x: hidden;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(158, 128, 255, 0.45); }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: linear-gradient(to bottom, rgba(7, 6, 14, 0.82), rgba(7, 6, 14, 0.55));
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .latin { font-family: var(--display); font-size: 21px; font-weight: 400; color: var(--ink-2); margin-left: 2px; }
.nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Buttons & pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--night-0); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Stem bars (the app's mark) ---------- */

.stem-mark { display: inline-flex; align-items: flex-end; gap: 0.16em; height: 0.8em; }
.stem-mark i { display: block; width: 0.2em; border-radius: 1em; }
.stem-mark i:nth-child(1) { height: 75%; background: var(--vocals); }
.stem-mark i:nth-child(2) { height: 100%; background: var(--drums); }
.stem-mark i:nth-child(3) { height: 60%; background: var(--bass); }
.stem-mark i:nth-child(4) { height: 85%; background: var(--other); }

/* ---------- Phone frame ---------- */

.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  aspect-ratio: 1320 / 2868;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.17);
  background: linear-gradient(145deg, #2a2838, #111019 40%, #1d1b28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--w) * 0.14);
  overflow: hidden;
  background: #000;
}
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */

section { position: relative; }
.section { padding-block: clamp(80px, 12vw, 150px); }
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.h2 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 0;
}
.h2 em { font-family: var(--display); font-style: italic; font-weight: 400; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 36em; text-wrap: pretty; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc-hero { padding: clamp(56px, 9vw, 110px) 0 32px; position: relative; overflow: hidden; }
.doc-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 420px;
  background:
    radial-gradient(closest-side, rgba(158, 128, 255, 0.28), transparent) 20% 50% / 50% 100% no-repeat,
    radial-gradient(closest-side, rgba(77, 217, 191, 0.18), transparent) 80% 60% / 45% 100% no-repeat;
  filter: blur(20px);
  pointer-events: none;
}
.doc-hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.1; margin: 12px 0 14px; letter-spacing: -0.01em; }
.doc-hero h1 em { font-family: var(--display); font-style: italic; font-weight: 400; color: var(--ink-2); }
.doc-hero p { color: var(--ink-3); margin: 0; }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-bottom: 120px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-3); text-decoration: none; }
.toc a:hover { color: var(--ink); border-left-color: var(--ink-2); }

.prose { max-width: 720px; color: var(--ink-2); }
.prose h2 { color: var(--ink); font-size: 22px; line-height: 1.4; margin: 56px 0 14px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--ink); font-size: 17px; margin: 28px 0 8px; }
.prose p, .prose li { font-size: 16px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.prose code { font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 72px 0; }

.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(158, 128, 255, 0.1), rgba(77, 217, 191, 0.05) 60%, transparent);
  padding: 24px 26px;
  margin-bottom: 48px;
}
.summary-card h2 { margin: 0 0 12px !important; font-size: 17px; }
.summary-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary-card li { display: flex; gap: 12px; align-items: baseline; margin: 0; }
.summary-card li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--other); transform: translateY(-1px); }
.summary-card li:nth-child(4n + 2)::before { background: var(--drums); }
.summary-card li:nth-child(4n + 3)::before { background: var(--bass); }
.summary-card li:nth-child(4n + 4)::before { background: var(--vocals); }

.lang-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; margin-top: 22px; font-size: 13px; }
.lang-switch a { padding: 4px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-3); }
.lang-switch a.on { background: var(--surface-2); color: var(--ink); }

@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; margin: 0; }
}

@media (max-width: 560px) {
  .nav a.hide-sm { display: none; }
  .brand .latin { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
