/* ───────────────────────────────────────────────────────────
   HorseMD 官网 — 無印良品风
   生成り色平面 + 炭墨文字 + 一点酒红。直角、细线、留白。
   ─────────────────────────────────────────────────────────── */
:root {
  --bg:    #f7f5f0;            /* 生成り（未漂白棉白） */
  --fg:    #2d2b27;            /* 炭墨 */
  --muted: #6b675e;
  --rule:  #dcd8cf;            /* 细线 */
  --rule-strong: #b8b3a8;
  --red:   #7f0019;            /* 無印酒红，整页唯一的颜色 */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial,
    'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', 'Noto Sans SC',
    'Microsoft YaHei', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
}

h1, h2, h3 { font-weight: 300; margin: 0; }
strong { font-weight: 500; color: var(--fg); }
a { color: inherit; text-decoration: none; }

::selection { background: #e9e5db; }

/* 小号宽字距标签（替代原 mono） */
.label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

/* 酒红小方块 — 無印式的标点 */
.sq::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--red);
  margin-right: 12px;
  vertical-align: 1px;
}

.rule-b { border-bottom: 1px solid var(--rule); }
.rule-t { border-top: 1px solid var(--rule); }

/* ───────────────────────────────────────────────────────────
   导航
   ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 6vw, 72px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { display: block; }
.brand-name {
  font-size: 16px; font-weight: 400;
  letter-spacing: 0.18em;
}
.brand-ver { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13px; letter-spacing: 0.18em;
  color: var(--muted);
  transition: color .3s;
}
.nav-links a:hover { color: var(--fg); }
.lang-toggle {
  font-family: inherit;
  font-size: 12px; letter-spacing: 0.18em;
  background: transparent; color: var(--fg);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.lang-toggle:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

@media (max-width: 720px) { .nav-links { display: none; } }

/* ───────────────────────────────────────────────────────────
   Hero — 居中、安静
   ─────────────────────────────────────────────────────────── */
.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(72px, 13vh, 130px) clamp(20px, 6vw, 72px) 0;
  text-align: center;
}
.kicker { margin: 0 0 36px; }
.hero-title {
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.6;
  letter-spacing: 0.12em;
}
.hero-title .accent-italic { color: inherit; font-style: normal; }
.hero-sub {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: 15.5px;
  color: var(--muted);
}
.hero-sub strong { font-weight: 500; }

.hero-cta {
  display: flex; gap: 12px; margin-top: 44px;
  justify-content: center; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 34px;
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.14em;
  border-radius: 0;
  transition: background .3s, color .3s, border-color .3s, opacity .3s;
}
.btn-solid { background: var(--red); color: #f7f5f0; }
.btn-solid:hover { background: #650014; }
.btn-ghost { border: 1px solid var(--rule-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.arrow-pull { display: inline-block; transition: transform .3s ease; }
a:hover .arrow-pull { transform: translateY(2px); }

.hero-note {
  margin: 22px 0 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* 商品照式截图：细框平铺，无影 */
.photo {
  max-width: 1080px;
  margin: clamp(56px, 9vh, 96px) auto 0;
  padding: 0 clamp(20px, 6vw, 72px);
}
.photo img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.photo figcaption {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-align: center;
}

/* hero 信息行 */
.hero-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px 18px;
  margin: clamp(40px, 6vh, 64px) auto 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.hero-strip .sep { color: var(--rule-strong); }

/* ───────────────────────────────────────────────────────────
   通用 section
   ─────────────────────────────────────────────────────────── */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(88px, 14vh, 140px) clamp(20px, 6vw, 72px) 0;
  scroll-margin-top: 72px;
}
.section-head { margin-bottom: clamp(36px, 5vh, 52px); }
.section-head .index { display: none; }
.section-head h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.2em;
}
.section-head h2::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--red);
  margin-right: 16px;
  vertical-align: 2px;
}

/* ───────────────────────────────────────────────────────────
   特性 — 规格表（像商品标签）
   ─────────────────────────────────────────────────────────── */
.feature-grid { border-top: 1px solid var(--rule-strong); }
.card {
  display: grid;
  grid-template-columns: 56px 168px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background .3s;
}
.card:hover { background: #f1eee7; }
.card-index {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.card h3 {
  font-size: 17px; font-weight: 500;
  letter-spacing: 0.1em;
}
.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}
.card kbd {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 3px 10px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .card { grid-template-columns: 40px 1fr; }
  .card p { grid-column: 2; }
  .card kbd { grid-column: 2; justify-self: start; }
}

/* ───────────────────────────────────────────────────────────
   主题 — 平铺图 + 方形色票
   ─────────────────────────────────────────────────────────── */
.theme-stage { }
.theme-shot { display: grid; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.theme-shot img {
  grid-area: 1 / 1;
  width: 100%; height: auto; display: block;
  opacity: 0;
  transition: opacity .5s ease;
}
.theme-shot img.on { opacity: 1; }

.theme-picker {
  display: flex; flex-wrap: wrap; gap: 0;
  margin-top: 24px;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 0;
  width: fit-content;
  margin-left: auto; margin-right: auto;
}
.swatch {
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  border-radius: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  cursor: pointer;
  transition: background .3s, color .3s;
}
.swatch:last-child { border-right: none; }
.swatch::before {
  content: "";
  width: 12px; height: 12px;
  background: var(--sw);
  border: 1px solid var(--rule-strong);
}
.swatch:hover { color: var(--fg); background: #f1eee7; }
.swatch.active { color: var(--bg); background: var(--fg); }
.swatch.active::before { border-color: var(--bg); }

/* 手机端：色票换成 3 列网格，换行不再破边框 */
@media (max-width: 640px) {
  .theme-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .swatch {
    justify-content: center;
    padding: 12px 8px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .swatch:nth-child(3n) { border-right: none; }
  .swatch:nth-child(n+4) { border-bottom: none; }
}

/* ───────────────────────────────────────────────────────────
   页脚
   ─────────────────────────────────────────────────────────── */
.footer {
  max-width: 880px;
  margin: clamp(96px, 16vh, 160px) auto 0;
  padding: 28px clamp(20px, 6vw, 72px) 48px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.footer-left { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { transition: color .3s; }
.footer-links a:hover { color: var(--fg); }

/* ───────────────────────────────────────────────────────────
   动效 — 只留淡入
   ─────────────────────────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .8s ease, transform .8s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

.split-line { display: inline-block; }
.split-line > span { display: inline-block; }
.js .split-line > span { opacity: 0; transition: opacity 1s ease; }
.js .split-line.in > span { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .split-line > span { transition: none; transform: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
