/*
  首页专属视觉：深色底 + 单一琥珀强调色。
  与内页刻意区分：女M(粉/像素)、男M(蓝)、S(红白)、档案(灰白粗边)均不复用。
*/
:root {
  --bg: #111318;
  --bg-raise: #171a20;
  --surface: #1c2027;
  --surface-hover: #21262e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecebe6;
  --text-muted: #a3a6ae;
  --text-dim: #6f727a;
  --accent: #e2a03f;
  --accent-hover: #edb45c;
  --accent-ink: #1a1305;
  --accent-tint: rgba(226, 160, 63, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }

/* 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17, 19, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.nav-logo svg { width: 22px; height: 22px; fill: var(--accent); }
.logo-text { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
.nav-links { display: flex; gap: 0.25rem; margin-inline-start: auto; }
.nav-link {
  color: var(--text-muted); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.mobile-nav { display: none; position: relative; margin-inline-start: auto; }
.mobile-nav summary {
  list-style: none; cursor: pointer; color: var(--text); font-weight: 600; font-size: 0.875rem;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg-raise);
}
.mobile-nav summary { min-height: 44px; display: flex; align-items: center; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px;
  display: grid; padding: 0.4rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.mobile-nav-panel a { display: block; padding: 0.65rem 0.75rem; color: var(--text); text-decoration: none; font-weight: 500; border-radius: 8px; }
.mobile-nav-panel a:hover { background: rgba(255, 255, 255, 0.05); }

/* 首屏：左文案，右入口 */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "copy entries" "notes entries";
  gap: 0 3rem; align-items: center;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-copy { grid-area: copy; max-width: 32rem; align-self: end; }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.15; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 1.1rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 30rem; }
.hero-notes { grid-area: notes; align-self: start; list-style: none; max-width: 32rem; margin-top: 2.25rem; border-top: 1px solid var(--line); }
.hero-notes li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.hero-notes strong { color: var(--text); font-weight: 600; }
.hero-notes span { color: var(--text-muted); }

.entries { grid-area: entries; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.entry {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.entry:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: translateY(-2px); }
.entry-wide { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent-tint), var(--surface) 70%); border-color: rgba(226, 160, 63, 0.28); }
.entry-wide:hover { border-color: rgba(226, 160, 63, 0.5); }
.entry-kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.entry h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.entry p { color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.entry-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 42px; padding: 0 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--text); background: transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { border-color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-half { flex: 1 1 8rem; }

/* 工具区：两条横向行 */
.tools { padding: 3.5rem 0; }
.tools h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
.tool-row {
  display: grid; grid-template-columns: 11rem 1fr auto; gap: 1.5rem; align-items: center;
  padding: 1.5rem 0; border-top: 1px solid var(--line);
}
.tool-row:last-child { border-bottom: 1px solid var(--line); }
.tool-row h3 { font-size: 1.1rem; font-weight: 700; }
.tool-row p { color: var(--text-muted); font-size: 0.95rem; max-width: 40rem; }

/* 安全提示 */
.safety {
  margin: 0 0 3.5rem; padding: 1.25rem 1.5rem;
  background: var(--accent-tint); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-size: 0.92rem;
}
.safety strong { color: var(--accent); }

/* 页脚 */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 2rem 0; background: var(--bg-raise); }
.footer-content { display: flex; flex-direction: column; gap: 1rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-link { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s var(--ease); }
.footer-link:hover { color: var(--text); }
.copyright { color: var(--text-dim); font-size: 0.8rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* 首屏入场：单次、克制 */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .entry { animation: rise 0.7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .entry:nth-child(1) { animation-delay: 0.12s; }
  .entry:nth-child(2) { animation-delay: 0.2s; }
  .entry:nth-child(3) { animation-delay: 0.26s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .mobile-nav { display: block; }
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "entries" "notes"; gap: 2.25rem 0; padding: 2.5rem 0 2.5rem; }
  .hero-copy, .hero-notes { max-width: none; }
  .hero-notes { margin-top: 0; }
  .tool-row { grid-template-columns: 1fr; gap: 0.6rem; }
}
@media (max-width: 600px) {
  .entries { grid-template-columns: 1fr; }
  .entry-wide { grid-column: auto; }
  .hero-notes li { grid-template-columns: 1fr; gap: 0.15rem; }
}

.nav-inner .site-language { margin-inline-start: 0; }
.nav-inner > .nav-logo + .site-language { margin-inline-start: auto; }
@media (max-width: 899px) { .nav-inner { height: 56px; } }
@media (max-width: 420px) { .nav-inner { gap: 0.5rem; } }
:lang(en) .hero h1 { font-size: clamp(2rem, 5vw, 4.25rem); }
html[lang="en"] .hero > *,
html[lang="en"] .entry { min-width: 0; }
html[lang="en"] .btn {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
html[lang="en"] .mobile-nav summary,
html[lang="en"] .mobile-nav-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 960px) {
  html[lang="en"] .hero { grid-template-columns: minmax(0, 1fr); }
}

.skip-link {
  position: absolute;
  z-index: 110;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  transform: translateY(calc(-100% - 1rem));
  color: var(--accent-ink);
  background: var(--accent);
}
.skip-link:focus { transform: none; }

.localized-preview .btn {
  max-width: 100%;
  min-height: 44px;
  padding-block: 0.4rem;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
