/* ===========================================================
   尘埃画境 · MoteArt / MTVF 法律站
   体系：黑白灰 + 单点缀色（暖琥珀 accent）
   明暗双模式 · 静态站，无 JS 依赖
   =========================================================== */

/* ---------- 设计 token ---------- */
:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --surface: #FAF8F3;                 /* 暖纸面（卡片/hero） */
  --ink: #15140F;                     /* 主墨色 */
  --muted: rgba(21, 20, 15, 0.62);
  --line: rgba(21, 20, 15, 0.12);
  --accent: #B6793C;                  /* 影视暖琥珀点缀 */
  --accent-ink: #FFFFFF;              /* 点缀底上的文字 */
  --accent-soft: rgba(182, 121, 60, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --font: "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D0D0B;
    --surface: #1A1916;
    --ink: #F2F0EB;
    --muted: rgba(242, 240, 235, 0.62);
    --line: rgba(242, 240, 235, 0.16);
    --accent: #D4944E;
    --accent-soft: rgba(212, 148, 78, 0.16);
  }
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  overflow-wrap: anywhere;
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--accent); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- 排版 ---------- */
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; }
h1 { margin: 16px 0 4px; font-size: 20px; text-align: center; }
h2 { margin: 44px 0 14px; font-size: 17px; }
h3 { margin: 0 0 10px; font-size: 16px; }
p, li { margin-top: 0; font-size: 16px; line-height: 1.75; word-break: break-word; }
p { margin-bottom: 12px; }
ol { padding-left: 24px; }

/* ---------- 布局 ---------- */
main {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 32px 32px 80px;
}
.home-main { width: min(1120px, 100%); }

/* ---------- 共享：品牌 header ---------- */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--ink);          /* 内联 SVG 用 currentColor，自动适配暗色 */
}
.brand-name em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82em;
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.brand-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.brand-header nav a,
.back-home {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color .15s ease;
}
.brand-header nav a:hover,
.back-home:hover { color: var(--ink); }
.back-home { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 首页：hero ---------- */
.hero {
  margin: 44px 0 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero h1 {
  max-width: 16ch;
  margin: 8px 0 18px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: left;
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.lead {
  max-width: 46ch;
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.primary-link,
.secondary-link {
  display: inline-block;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s ease, border-color .15s ease, transform .1s ease;
}
.primary-link {
  color: var(--accent-ink);
  background: var(--accent);
}
.primary-link:hover { filter: brightness(0.92); }
.secondary-link {
  color: var(--ink);
  border: 1px solid var(--line);
}
.secondary-link:hover { border-color: var(--ink); }
.primary-link:active,
.secondary-link:active { transform: translateY(1px); }

/* APP 图标展示 */
.hero-media { display: flex; justify-content: center; }
.app-icon-tile {
  width: clamp(132px, 15vw, 196px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22%;
  background: #000;
  box-shadow:
    0 22px 50px -22px rgba(182, 121, 60, 0.34),
    0 8px 22px -14px rgba(0, 0, 0, 0.4);
}

/* ---------- 首页：区块 ---------- */
.feature-grid,
.agreement-links {
  display: grid;
  gap: 16px;
}
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agreement-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.feature-card,
.company-section,
.agreements-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s ease;
}
.feature-card:hover { border-color: var(--accent); }

.agreement-links a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: border-color .18s ease, transform .12s ease;
}
.agreement-links a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.company-section,
.agreements-section { margin-top: 28px; }
.company-section h2,
.agreements-section h2,
#features-title { margin-top: 0; }

.company-details {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}
.company-details div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
}
.company-details dt { color: var(--muted); }
.company-details dd { margin: 0; }

/* ---------- 法律页 ---------- */
.legal-icon {
  color: var(--ink);
  font-size: 0;
  text-align: center;
}
.legal-icon svg { width: 56px; height: 56px; }
.meta { color: var(--muted); text-align: center; }
.language-switch { margin: 12px 0 6px; text-align: center; }
.notice {
  margin: 32px 0;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.notice, .notice a { font-weight: 700; }
.notice a { color: var(--accent); }
.open-source-boundary { font-weight: 400; }
.open-source-boundary p { margin-bottom: 10px; }
.open-source-boundary p:last-child { margin-bottom: 0; }
.open-source-boundary strong { font-weight: 700; }
.component-list {
  display: grid;
  gap: 12px;
}
.component-list section {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.component-list section p:last-child { margin-bottom: 0; }
code {
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

/* ---------- 页脚 ---------- */
footer,
.site-footer { color: var(--muted); }
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.site-footer { text-align: center; }
.beian-row { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px; }
.mps-beian { display: inline-flex; align-items: center; gap: 6px; }
.mps-beian img { width: 14px; height: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-media { order: -1; }          /* 移动端：图标在上 */
}

@media (max-width: 640px) {
  main { padding: 24px 20px 64px; }
  .brand-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .feature-grid,
  .agreement-links { grid-template-columns: 1fr; }
  .company-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

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