/* ============================================================
   耳机时光 · 设计系统
   方向：台式音频仪表 —— 安静、精确、有一点温度
   一个中色阶（暖石墨）+ 三个文字角色 + 一个强调色（琥珀）
   间距 4px 网格；字重只用 400 / 500 / 600；无渐变、无光晕
   ============================================================ */

:root {
  /* 中色阶（暖石墨） */
  --bg: #161513;
  --card: #1c1a18;
  --raised: #262421;
  --line: rgba(239, 233, 222, .09);
  --line-strong: rgba(239, 233, 222, .16);

  /* 三个文字角色 */
  --text: #efe9de;
  --text-2: #aaa398;
  --muted: #8a847a;

  /* 一个强调色：VU 表琥珀 */
  --accent: #e0a75e;
  --accent-dim: rgba(224, 167, 94, .28);

  /* 字号 */
  --fs-12: .75rem;
  --fs-13: .8125rem;
  --fs-14: .875rem;
  --fs-15: .9375rem;
  --fs-18: 1.125rem;
  --fs-28: 1.75rem;
  --fs-display: clamp(2.25rem, 4.4vw, 3.5rem);

  /* 间距（4 网格） */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 48px;
  --s9: 64px;
  --s10: 96px;

  /* 圆角：内 = 外 − padding */
  --r-card: 14px;
  --r-control: 10px;
  --r-small: 8px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --sans: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-15);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection { background: var(--accent-dim); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: inherit; }

/* ---------- 页头 ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s4);
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s5) var(--s6) 0;
}

.nav { display: flex; gap: var(--s5); font-size: var(--fs-14); }
.nav a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.nav a:hover { color: var(--text); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s6) var(--s8);
}

/* ---------- Hero：非对称分栏，右侧是产品画面 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s9);
  align-items: center;
  padding: var(--s9) 0 var(--s8);
}

.eyebrow {
  margin: 0 0 var(--s4);
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--text);
}

.lede {
  max-width: 30rem;
  margin: var(--s5) 0 0;
  font-size: var(--fs-15);
  line-height: 1.7;
  color: var(--text-2);
}

/* 上传区：安静的表面 + 一颗明确的按钮 */
.drop {
  margin-top: var(--s6);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  cursor: pointer;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
  outline: none;
}
.drop:hover { border-color: var(--line-strong); background: #1f1d1a; }
.drop.drag { border-color: var(--accent); }

.btn-primary,
.btn-secondary,
.btn-primary-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 40px;
  padding: 0 var(--s4);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.btn-primary,
.btn-primary-plain {
  background: var(--text);
  color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary svg { width: 18px; height: 18px; }
.drop:hover .btn-primary { background: #fff; }

.btn-secondary {
  background: var(--raised);
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--line-strong); }
.btn-secondary:active, .btn-primary-plain:active { transform: scale(.98); }
.btn-secondary.small { min-height: 36px; font-size: var(--fs-13); }

.drop-hint {
  margin: var(--s3) 0 0;
  font-size: var(--fs-14);
  color: var(--text-2);
}
.drop-sub {
  margin: var(--s1) 0 0;
  font-size: var(--fs-13);
  color: var(--muted);
}
.privacy {
  margin: var(--s4) 0 0;
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--muted);
}

/* ---------- 产品画面（本页唯一的“moment”） ---------- */

.preview {
  position: relative;
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, .9);
}

.preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}
.preview-dev { font-size: var(--fs-14); font-weight: 500; }
.preview-meta { font-family: var(--mono); font-size: var(--fs-12); color: var(--muted); }

.preview-figure {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-top: var(--s4);
}
.preview-figure .num {
  font-family: var(--mono);
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.preview-figure .unit { font-size: var(--fs-13); color: var(--text-2); }

/* 签名细节：刻度尺 */
.ruler {
  height: 9px;
  margin: var(--s4) 0;
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 40px);
  background-size: 100% 5px, 100% 9px;
  background-position: 0 100%, 0 100%;
  background-repeat: repeat-x;
  opacity: .9;
}

.preview-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--text-2);
}

.preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 56px;
  margin-top: var(--s4);
}
.preview-bars span {
  flex: 1 1 0;
  min-width: 0;
  height: calc(var(--v) * 100%);
  border-radius: 2px;
  background: rgba(239, 233, 222, .18);
}
.preview-bars span.peak { background: var(--accent); }

.preview-note {
  margin: var(--s3) 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 区块 ---------- */

.sec-title {
  margin: 0;
  font-size: var(--fs-18);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
}

.how, .result, .faq { margin-top: var(--s10); }

/* 三步 */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s7);
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.step-num {
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--muted);
}
.steps h3 {
  margin: var(--s2) 0 var(--s1);
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--text);
}
.steps p {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.65;
  color: var(--text-2);
}

/* ---------- 结果区 ---------- */

.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s6);
}
.range-note {
  margin: var(--s1) 0 0;
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(52px, 1fr));
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--card);
}
.segmented button {
  min-height: 32px;
  padding: 0 var(--s2);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-13);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.segmented button:hover { color: var(--text); }
.segmented button.on {
  background: var(--raised);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* KPI：宽度有节奏，数字统一等宽 */
.kpis {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.kpi {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}
.kpi-label {
  margin: 0;
  font-size: var(--fs-13);
  color: var(--muted);
}
.kpi-value {
  margin: var(--s2) 0 0;
  font-family: var(--mono);
  font-size: var(--fs-28);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.kpi-value small {
  margin-left: 4px;
  font-family: var(--sans);
  font-size: var(--fs-13);
  font-weight: 400;
  color: var(--text-2);
}
.kpis .kpi:first-child .kpi-value { font-size: 2rem; }

/* 面板 */
.panel {
  padding: var(--s5) var(--s6) var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
}
.panel + .panel { margin-top: 0; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.panel-head h3 {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--text);
}
.panel-note {
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--muted);
}

/* 趋势图：一条线，峰值是唯一的强调色 */
.chart {
  position: relative;
  height: 260px;
  margin-top: var(--s4);
}
.chart svg { display: block; width: 100%; height: 100%; }

.axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.two {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--s3);
  margin-top: var(--s3);
  align-items: stretch;
}

/* 耳机排行 */
.devices {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s5);
}
.device-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}
.device-name {
  min-width: 0;
  font-size: var(--fs-14);
  color: var(--text);
  overflow-wrap: anywhere;
}
.device-meta {
  min-width: 0;
  font-family: var(--mono);
  font-size: var(--fs-12);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.device-track {
  height: 4px;
  margin-top: var(--s2);
  border-radius: 2px;
  background: rgba(239, 233, 222, .08);
  overflow: hidden;
}
.device-fill {
  height: 100%;
  border-radius: 2px;
  background: rgba(239, 233, 222, .28);
}
.devices .device:first-child .device-fill { background: var(--accent); }

/* 时段分布 */
.hours {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 128px;
  margin-top: var(--s5);
}
.hours .h {
  flex: 1 1 0;
  min-height: 2px;
  border-radius: 2px;
  background: rgba(239, 233, 222, .16);
}
.hours .h.peak { background: var(--accent); }

.hour-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.again-wrap {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-top: var(--s6);
}

/* ---------- FAQ ---------- */

.faq details {
  margin-top: var(--s2);
  border-top: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 56px;
  padding: var(--s4) 0;
  font-size: var(--fs-15);
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: var(--fs-18);
  line-height: 1;
  color: var(--muted);
}
.faq details[open] summary::after { content: "−"; color: var(--text-2); }
.faq p {
  max-width: 62ch;
  margin: 0 0 var(--s5);
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- 页脚 ---------- */

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s6) var(--s6) var(--s8);
  border-top: 1px solid var(--line);
  font-size: var(--fs-13);
  color: var(--muted);
}
footer p { margin: 0; }
footer .credit { margin-top: var(--s1); font-family: var(--mono); font-size: 11px; }

/* ---------- 浮层 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--s6);
  background: rgba(12, 11, 10, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay[hidden] { display: none; }

.dialog {
  width: min(380px, 100%);
  padding: var(--s7) var(--s6) var(--s6);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .95);
}
.dialog h2 {
  margin: var(--s4) 0 var(--s2);
  font-size: var(--fs-15);
  font-weight: 500;
}
.dialog-note {
  margin: 0;
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--text-2);
}
.dialog button { margin-top: var(--s5); }

.ring {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0deg, rgba(239, 233, 222, .1) 0deg);
}
.ring span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  font-family: var(--mono);
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

/* ---------- 响应式 ---------- */

@media (max-width: 940px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s8);
    padding: var(--s8) 0 var(--s7);
  }
  .preview { order: 2; }
  .hero-copy { order: 1; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:first-child .kpi-value { font-size: var(--fs-28); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .how, .result, .faq { margin-top: var(--s8); }
  .chart { height: 200px; }
}

@media (max-width: 640px) {
  .top { padding: var(--s4) var(--s4) 0; }
  main { padding: 0 var(--s4) var(--s6); }
  footer { padding: var(--s5) var(--s4) var(--s6); }
  .nav { gap: var(--s4); }

  .segmented {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }
  .segmented button { min-height: 40px; padding: 0 2px; }

  .panel { padding: var(--s4) var(--s4) var(--s5); }
  .kpi { padding: var(--s4); }
  .kpi-value { font-size: 1.5rem; }
  .kpis .kpi:first-child .kpi-value { font-size: 1.5rem; }

  .preview { padding: var(--s5); }
  .preview-figure .num { font-size: 2.75rem; }
  .hours { height: 104px; }
  .dialog { padding: var(--s6) var(--s5) var(--s5); }
}

@media (max-width: 380px) {
  .segmented button { font-size: var(--fs-12); }
  .device-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .device-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
