/*
 * 宣传页色板取自 App 暗房令牌（src/renderer/styles.css :root）。
 * --background          ← --cs-bg          oklch(0.155 0.004 70)
 * --foreground          ← --cs-fg          oklch(0.95 0.004 80)
 * --muted               ← --cs-panel       oklch(0.19 0.004 70)
 * --muted-foreground    ← --cs-fg-2        oklch(0.79 0.006 80)
 * --border              ← --cs-line        oklch(0.27 0.005 70)
 * --border-strong       ← --cs-line-2      oklch(0.35 0.006 70)
 * --stage               ← --cs-stage       oklch(0.115 0.003 70)
 * --raise               ← --cs-raise       oklch(0.225 0.005 70)
 * --primary             ← --cs-accent      oklch(0.8 0.135 72)   只用于下载
 * --primary-hover       ← --cs-accent-hover
 * --primary-foreground  ← --cs-accent-ink  oklch(0.2 0.02 70)
 * --playhead            ← --cs-playhead    oklch(0.97 0 0)
 * --cut                 ← --cs-cut
 */

:root {
  color-scheme: dark;
  --background: oklch(0.155 0.004 70);
  --foreground: oklch(0.95 0.004 80);
  --muted: oklch(0.19 0.004 70);
  --muted-foreground: oklch(0.79 0.006 80);
  --border: oklch(0.27 0.005 70);
  --border-strong: oklch(0.35 0.006 70);
  --stage: oklch(0.115 0.003 70);
  --raise: oklch(0.225 0.005 70);
  --primary: oklch(0.8 0.135 72);
  --primary-hover: oklch(0.84 0.13 74);
  --primary-foreground: oklch(0.2 0.02 70);
  --playhead: oklch(0.97 0 0);
  --cut: oklch(0.5 0.006 80 / 0.45);
  --shadow: 0 8px 20px oklch(0 0 0 / 0.18);
  --ring: var(--foreground);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", "Droid Sans Fallback", sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "Sarasa Mono SC", ui-monospace, "Liberation Mono", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header: 5.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; }

:focus { outline: none; }

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

::selection {
  background: var(--raise);
  color: var(--foreground);
}

.skip {
  position: absolute;
  left: 16px;
  top: 8px;
  z-index: 3;
  transform: translateY(-150%);
  background: var(--foreground);
  color: var(--background);
  text-decoration: none;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip:focus { transform: none; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.measure { max-width: 38em; }

.measure p { margin: 16px 0 0; }
.measure p:first-child { margin-top: 24px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--background);
  box-shadow: inset 0 -1px 0 var(--border);
}

.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand cta" "nav nav";
  align-items: center;
  gap: 0 12px;
  padding: 8px 0;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.mark { width: 22px; height: 22px; flex: none; }

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  color: var(--muted-foreground);
}

.top .btn { grid-area: cta; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:active { transform: scale(0.98); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 3px;
}

.hero { margin-top: 48px; }

.hero-layout {
  display: grid;
  gap: 32px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 2.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 24px;
}

.meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.meta div {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.meta dt {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.5;
}

.meta dd { margin: 0; min-width: 0; }

.file {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.hash {
  display: grid;
  gap: 8px;
  max-width: 38em;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hash-row span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.hash code {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  user-select: all;
}

.copy {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
  touch-action: manipulation;
}

.copy-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.fine {
  margin: 16px 0 0;
  max-width: 38em;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.fine a,
.foot a,
.measure a {
  color: var(--foreground);
  text-underline-offset: 3px;
}

.measure a,
.legal a {
  display: inline-block;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 2px;
}

.hero-shot {
  margin-top: 48px;
  padding: 12px;
  background: var(--stage);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.hero-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 2878 / 1800;
  border-radius: 4px;
  background: var(--raise);
}

.hero-shot figcaption,
.bench figcaption {
  max-width: 38em;
  margin: 12px 4px 4px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

section[id] { scroll-margin-top: 9rem; }

section { margin-top: 96px; }

h2 {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

kbd {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--raise);
  box-shadow: inset 0 0 0 1px var(--border);
}

.pair {
  display: grid;
  gap: 32px;
  margin-top: 8px;
}

.pair h3 { margin-top: 24px; }

.pair p,
.limits { margin: 16px 0 0; }

.limits {
  max-width: 38em;
  padding-left: 1.2em;
}

.limits li { padding-left: 4px; }

.limits li::marker { color: var(--muted-foreground); }

.group { margin-top: 32px; }

.count {
  margin-left: 8px;
  color: var(--muted-foreground);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.plist {
  display: grid;
  gap: 16px;
  max-width: 38em;
  margin: 12px 0 0;
}

.plist div { display: grid; gap: 4px; }

.plist dt { font-weight: 600; }

.plist dd {
  margin: 0;
  color: var(--muted-foreground);
}

.formats table {
  width: 100%;
  max-width: 38em;
  margin-top: 20px;
  border-collapse: collapse;
  table-layout: fixed;
}

.formats thead th:nth-child(1) { width: 46%; }
.formats thead th:nth-child(2),
.formats thead th:nth-child(3) { width: 27%; }

.formats th,
.formats td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.formats thead th {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.formats tbody th { font-weight: 600; }

.follow { margin-top: 16px; }

.bench { margin-top: 28px; }

.bench figcaption { margin: 0 0 16px; }

.bench-visual {
  --lane-video: 72px;
  --lane-audio: 40px;
  --lane-sub: 28px;
  --lane-gap: 6px;
  background: var(--stage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.scene + .scene {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.scene-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.scene-label {
  margin: 0;
  font-weight: 600;
}

.scrub-wrap { width: 132px; }

.scrub-k {
  margin: 0 0 6px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.scrub {
  width: 132px;
  padding: 4px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.scrub-frame {
  height: 72px;
  border-radius: 4px;
  background: var(--raise);
}

.scrub-time {
  margin: 4px 0 2px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.scene-body {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 6px;
}

.ruler {
  position: relative;
  grid-column: 2;
  height: 22px;
  color: var(--muted-foreground);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.ruler span { position: absolute; top: 0; white-space: nowrap; }

@media (max-width: 700px) {
  .ruler span:nth-child(2),
  .scene:first-child .ruler span:nth-child(3) { display: none; }
}

.names {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: var(--lane-gap);
  padding-top: 14px;
}

.names span {
  display: flex;
  align-items: center;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.3;
}

.names span:nth-child(1) { height: var(--lane-video); }
.names span:nth-child(2) { height: var(--lane-audio); }
.names span:nth-child(3) { height: var(--lane-sub); }

.lane-col {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: var(--lane-gap);
  min-width: 0;
  padding-top: 14px;
}

.lane {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--background);
  box-shadow: inset 0 0 0 1px var(--border);
}

.lane.video { height: var(--lane-video); }
.lane.audio { height: var(--lane-audio); }
.lane.sub { height: var(--lane-sub); }

.film {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
}

.film.short { width: 66.666%; }

.frames {
  display: flex;
  height: 100%;
  gap: 2px;
  padding: 2px;
}

.frames i {
  flex: 1 1 0;
  border-radius: 1px;
  background: var(--raise);
}

.frames i:nth-child(3n) { background: var(--muted); }
.frames i:nth-child(3n+2) { background: var(--border); }

.wave {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--muted-foreground);
  fill: currentColor;
}

.wave.short { width: 66.666%; }

.cut {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 33.333%;
  width: 33.333%;
  background: repeating-linear-gradient(135deg, var(--cut) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cut span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 6px;
  border-radius: 3px;
  background: var(--background);
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border-strong);
}

.cue {
  position: absolute;
  top: 2px;
  bottom: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--foreground);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.shorter {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--playhead);
  transform: translateX(-0.5px);
  pointer-events: none;
}

.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  width: 13px;
  height: 14px;
  background: var(--playhead);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}

.foot {
  margin-top: 96px;
  border-top: 1px solid var(--border);
}

.foot-in {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 24px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--muted-foreground);
}

.foot-in p { margin: 0; }

.foot-in .legal { max-width: 38em; }

.foot-in > p > a:only-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--primary-hover); }
  .nav a:hover { color: var(--foreground); }
  .copy:hover { background: var(--raise); }
}

@media (min-width: 960px) {
  :root { --header: 4.5rem; }
  section[id] { scroll-margin-top: 5.5rem; }

  .top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav cta";
  }

  .nav { justify-content: flex-end; margin: 0 8px 0 0; }

  .hero-layout {
    grid-template-columns: minmax(0, 38em) minmax(18rem, 24rem);
    gap: 48px;
    align-items: start;
    justify-content: space-between;
  }

  .pair {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  .pair article + article {
    border-left: 1px solid var(--border);
    padding-left: 48px;
  }

  .pair h3 { margin-top: 8px; }
}

@media (max-width: 959px) {
  .hero { margin-top: 32px; }
  section { margin-top: 64px; }
  .foot { margin-top: 64px; }
  .pair article + article {
    border-top: 1px solid var(--border);
    padding-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn-primary:active { transform: none; }
}
