/* styles.css — 纸墨黑白，和 iOS App 的 Theme.swift 同一套底座。
   深色底硬标准 #141414、前景 #ededed；浅色底 #ffffff、前景 #141414。
   这两组值不要改 —— 整套线条视觉建立在它们上面（App 侧同注释）。 */

:root {
  --ink: #141414;
  --paper: #ffffff;
  --muted: rgba(20, 20, 20, 0.5);
  --hair: rgba(20, 20, 20, 0.12);
  --surface: rgba(255, 255, 255, 0.72);
  --bg-0: #ffffff;
}

:root[data-theme="dark"] {
  --ink: #ededed;
  --paper: #141414;
  --muted: rgba(237, 237, 237, 0.5);
  --hair: rgba(237, 237, 237, 0.16);
  --surface: rgba(28, 28, 28, 0.72);
  --bg-0: #141414;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 首屏语言未定时先藏住文案，避免简体闪一下再变英文 */
.lang-pending main, .lang-pending footer { opacity: 0; }
main, footer { transition: opacity .18s ease; }

/* ── 背景 Canvas ─────────────────────────────────────────── */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero__icon {
  width: 116px;
  height: 116px;
  border-radius: 26px;
  display: block;
  animation: breathe 3.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(.97); }
  50%      { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__icon { animation: none; }
}

.hero__name {
  margin: 1.4rem 0 0;
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__tagline {
  margin: .55rem 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.hero__desc {
  margin: .35rem 0 0;
  font-size: .875rem;
  color: var(--muted);
  opacity: .8;
}

.cta {
  margin-top: 2.4rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 52px;
  padding: 0 1.75rem;
  border: 1.5px solid var(--hair);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: default;
}

.cta svg { width: 18px; height: 18px; fill: currentColor; }

/* ── 页脚 ────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hair);
  padding: 2.5rem 0 3.5rem;
  font-size: .85rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.foot a { color: var(--ink); opacity: .7; text-decoration: none; }
.foot a:hover { opacity: 1; text-decoration: underline; }

.foot__links { display: flex; flex-wrap: wrap; gap: 1.1rem; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: .2rem;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: .55;
  font: inherit;
  font-size: .78rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.switch button:hover { opacity: .85; }
.switch button[aria-pressed="true"] {
  opacity: 1;
  background: var(--ink);
  color: var(--paper);
}

.foot__meta { color: var(--muted); }

.switches { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ── 法律页 ───────────────────────────────────────────────── */
.doc {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  min-height: 100svh;
}

.doc h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 1.2rem; }
.doc p  { color: var(--muted); }
.doc__back { display: inline-block; margin-top: 2.5rem; color: var(--ink); opacity: .7; }
.doc__copy { margin-top: 3.5rem; font-size: .8rem; opacity: .55; }

/* ── 窄屏 ────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero__name { font-size: 1.8rem; }
  .foot { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
