:root {
  color-scheme: light;
  --bg: #faf7ec;
  --paper: #ffffff;
  --divider: #eae0c6;
  --text: #2e2a1d;
  --muted: #7b7362;
  --accent: #f6de8d;
  --accent-soft: #fcf2cb;
  --accent-line: #c9a227;
  --ink: #6b5310;
  --contrast: #3a3009;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171614;
  --paper: #201f1c;
  --divider: #332f26;
  --text: #f0ecdf;
  --muted: #a39d8c;
  --accent: #e8cc7a;
  --accent-soft: #5a4a1e;
  --accent-line: #b9963c;
  --ink: #f0d585;
  --contrast: #231e08;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 560px;
  background: radial-gradient(
    52% 72% at 50% 0%,
    color-mix(in srgb, var(--accent) 36%, transparent) 0%,
    transparent 72%
  );
  pointer-events: none;
}

html[data-theme="dark"] body::before {
  opacity: 0.55;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent-line) 40%, transparent);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent-line) 65%, transparent);
  border: 2px solid transparent;
  background-clip: content-box;
}

.wrap {
  width: min(1060px, 100% - 48px);
  margin: 0 auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--divider);
  color: var(--ink);
}
.skip:focus {
  top: 12px;
}

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.06);
  border-bottom: 1px solid var(--divider);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--contrast);
  font-size: 15px;
  font-weight: 600;
}

.spacer {
  flex: 1;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  border-color: var(--divider);
  color: var(--ink);
}

.when-dark {
  display: none;
}

html[data-theme="dark"] .when-dark {
  display: block;
}

html[data-theme="dark"] .when-light {
  display: none;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 82%, var(--accent-line) 18%);
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-lg {
  min-height: 48px;
  padding: 0 26px;
  font-size: 15px;
}

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

/* ---------- 首屏 ---------- */

.hero {
  width: min(720px, 100% - 48px);
  margin: 0 auto;
  padding: 88px 0 52px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-line);
}

.hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 5.4vw, 56px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.lead {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: 15px;
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.meta b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.platform {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sha {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  word-break: break-all;
}

.sha code {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

/* ---------- 简单介绍 ---------- */

.brief {
  width: min(900px, 100% - 48px);
  margin: 0 auto 72px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

.brief b {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 600;
}

.brief span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

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

.foot {
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 11px;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 26px;
}

/* ---------- 入场 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

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

@media (max-width: 720px) {
  .hero {
    padding-top: 58px;
    padding-bottom: 42px;
  }
  .brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 56px;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .hero {
    width: calc(100% - 32px);
  }
  .brief {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .actions .btn {
    width: 100%;
  }
  .meta {
    gap: 18px;
  }
}
