/* PokeMemoir 官网样式 —— 亚麻白底、青灰墨字、雾蓝点缀；衬线标题、留白与细线。无依赖，纯 CSS。 */

/* ---------- 字体 ---------- */
/* 拉丁标题：EB Garamond（可变字重 400–800，拉丁子集） */
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
}
/* 中文标题：思源宋体（Noto Serif SC）的子集，只带页面用到的字 + 常用字，约 170 KB */
@font-face {
  font-family: "PM Serif CN";
  src: url("../fonts/PMSerifCN-core.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #f1f0eb;          /* 亚麻白 */
  --bg-2: #e8e7e0;        /* 浅灰麻，用于间隔区块 */
  --bg-3: #dedcd3;
  --ink: #1e2426;         /* 青灰墨 */
  --ink-2: #4a5254;
  --muted: #7f878a;
  --line: rgba(30, 36, 38, .10);
  --line-2: rgba(30, 36, 38, .20);
  --accent: #5c7a94;      /* 雾蓝 */
  --accent-2: #3f5b73;
  --accent-soft: #dde5eb;
  --green: #6f8f6a;       /* 苔绿，只用于「开发中」状态点 */
  --shadow: 0 30px 60px -28px rgba(30, 36, 38, .38), 0 2px 6px rgba(30, 36, 38, .06);
  --radius: 22px;
  --wrap: 1180px;
  --serif: "EB Garamond", "PM Serif CN", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -.005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.skip {
  position: absolute; left: -999px; top: 10px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: 14px;
}
.skip:focus { left: 12px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 240, 235, .84);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { flex: none; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1; letter-spacing: -.005em; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav > a:not(.btn) { color: var(--ink-2); font-size: 15px; transition: color .15s; }
.nav > a:not(.btn):hover { color: var(--ink); }
.lang {
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 12.5px; letter-spacing: .06em;
  transition: border-color .15s, color .15s;
}
.lang:hover { color: var(--ink); border-color: var(--ink); }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 6px; width: 40px; height: 40px;
  background: transparent; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- 按钮与链接 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-size: 15px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.link-arrow i { font-style: normal; display: inline-block; transition: transform .2s; }
.link-arrow:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- 首屏 ---------- */
.hero { padding: 36px 0 88px; }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 10fr) minmax(0, 11fr); gap: clamp(32px, 5vw, 80px);
  align-items: center; min-height: min(700px, calc(100svh - 68px - 124px));
}
.hero-copy { padding: 24px 0; max-width: 600px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .06em; color: var(--muted);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(111, 143, 106, .18); }
.hero-title { font-size: clamp(36px, 3.75vw, 54px); line-height: 1.16; margin-top: 26px; text-wrap: balance; }
:lang(en) .hero-title { font-size: clamp(34px, 3.4vw, 50px); line-height: 1.12; }
.hero-sub { margin-top: 24px; font-size: 17.5px; color: var(--ink-2); max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 36px; }
.hero-spec { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); letter-spacing: .02em; }

.frame { margin: 0; }
.frame-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); box-shadow: var(--shadow); isolation: isolate;
}
.frame-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(30, 36, 38, .08); pointer-events: none; }
.frame-media > img { width: 100%; height: 100%; object-fit: cover; }
.frame-pending {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: var(--muted); font-size: 14px; letter-spacing: .02em;
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(92, 122, 148, .14), transparent 70%),
    linear-gradient(160deg, var(--bg-2), var(--bg-3));
}
.frame-pending img { opacity: .9; }
.frame.pending .frame-pending { display: flex; }
.frame.pending .frame-media > img { visibility: hidden; }
.frame figcaption { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* 进场 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.hero-copy > :nth-child(5) { animation-delay: .24s; }
.frame { animation: rise 1s cubic-bezier(.2, .7, .2, 1) .1s both; }

/* ---------- 通用区块 ---------- */
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: end; }
.section-title { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.15; }
.section-title .num { display: block; font-style: italic; font-size: 17px; color: var(--accent); letter-spacing: .02em; margin-bottom: 16px; }
.section-sub { color: var(--ink-2); font-size: 17px; max-width: 34em; padding-bottom: 6px; }
.section-foot { margin-top: 36px; display: flex; justify-content: flex-end; }

/* ---------- 特性 ---------- */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 40px; margin-top: 72px; }
.feature-list li { border-top: 1px solid var(--line-2); padding-top: 24px; }
.f-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-list h3 { font-size: 23px; margin-top: 20px; }
.feature-list p { color: var(--ink-2); margin-top: 10px; font-size: 15.5px; }

/* ---------- 下载 ---------- */
.dl-list { margin-top: 64px; border-top: 1px solid var(--line-2); }
.dl { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.dl-name { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.dl-name h3 { font-size: 26px; }
.dl-meta { color: var(--muted); font-size: 14px; }
.status {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px;
}
.status.is-soon { color: var(--accent-2); border-color: transparent; background: var(--accent-soft); }
.status.is-soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.notice { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; margin-top: 64px; }
.notice h3 { font-size: 24px; }
.notice ul li { color: var(--ink-2); font-size: 15.5px; padding: 14px 0; border-top: 1px solid var(--line); }
.notice ul li:first-child { border-top: 0; padding-top: 0; }

/* ---------- 新闻 ---------- */
.news-list { margin-top: 64px; border-top: 1px solid var(--line-2); }
.news-item { display: grid; grid-template-columns: 200px 1fr; gap: 12px 40px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.news-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.news-date { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.news-tag { font-size: 13px; color: var(--accent-2); }
.news-item h3 { font-size: 24px; }
.news-item p { color: var(--ink-2); margin-top: 10px; font-size: 15.5px; max-width: 40em; }
.news-item .link-arrow { margin-top: 14px; font-size: 14px; }
.news-empty { padding: 30px 0; color: var(--muted); }

/* ---------- 画面 ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; }
.shot { display: block; }
.shot-media { border-radius: 14px; overflow: hidden; background: var(--bg-3); box-shadow: 0 1px 0 rgba(31, 30, 27, .06); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.03); }
.shot span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.gallery-empty { margin-top: 48px; color: var(--muted); }
.gallery-empty[hidden] { display: none; }

/* ---------- 社区 ---------- */
.community-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; }
.community-card { position: relative; display: block; border-top: 1px solid var(--line-2); padding: 24px 40px 8px 0; transition: color .15s; }
.community-card h3 { font-size: 24px; }
.community-card p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.community-card i { position: absolute; right: 0; top: 24px; font-style: normal; font-size: 22px; line-height: 1; color: var(--ink); transition: transform .2s; }
.community-card:hover i { transform: translateX(4px); }
.community-card:hover h3 { color: var(--accent-2); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 36px; }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-name { font-size: 24px; }
.footer-brand p { color: var(--muted); margin-top: 16px; font-size: 14.5px; max-width: 26em; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.footer-col a { color: var(--ink-2); font-size: 15px; width: fit-content; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: grid; gap: 10px; }
.footer > .footer-bottom:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- 看大图 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(30, 36, 38, .94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { color: rgba(241, 240, 235, .7); margin-top: 14px; font-size: 14px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(241, 240, 235, .1); color: var(--bg); border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; display: grid; place-items: center;
  transition: background .15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(241, 240, 235, .22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 95;
  background: var(--ink); color: var(--bg); border-radius: 999px;
  padding: 10px 18px; font-size: 14px; box-shadow: 0 10px 30px rgba(30, 36, 38, .2);
}
.toast[hidden] { display: none; }

/* ---------- 法律页 ---------- */
.doc { padding: 72px 0 110px; max-width: 760px; }
.doc .back { margin-bottom: 28px; font-size: 14px; color: var(--muted); }
.doc .back:hover { color: var(--ink); }
.doc .back:hover i { transform: translateX(-4px); }
.doc h1 { font-size: clamp(36px, 4vw, 48px); }
.doc .lead { color: var(--muted); margin-top: 14px; font-size: 16px; }
.doc h2 { font-size: 28px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.doc p, .doc li { color: var(--ink-2); font-size: 15.5px; margin-top: 12px; }
.doc ul { padding-left: 1.2em; list-style: disc; }
.doc ul li::marker { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .feature-list, .community-row, .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .wrap { width: min(var(--wrap), calc(100% - 40px)); }
  .hero { padding: 24px 0 72px; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero-copy { padding: 16px 0 0; max-width: none; }
  .hero-title { font-size: clamp(34px, 8vw, 48px); }
  .section { padding: 72px 0; }
  .section-head, .notice { grid-template-columns: 1fr; gap: 20px; }
  .section-sub { padding-bottom: 0; }
  .feature-list, .dl-list, .news-list, .gallery, .community-row, .notice { margin-top: 44px; }
  .feature-list { gap: 40px 28px; }
  .news-item { grid-template-columns: 1fr; gap: 6px; padding: 24px 0; }
  .news-meta { flex-direction: row; align-items: baseline; gap: 14px; padding-top: 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; gap: 0;
  }
  .nav.open { display: flex; }
  .nav > a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav .lang { align-self: flex-start; margin-top: 16px; }
  .nav .btn { margin-top: 14px; }
  .feature-list, .community-row, .gallery, .footer-in { grid-template-columns: 1fr; }
  .dl { align-items: flex-start; flex-direction: column; gap: 12px; }
  .dl-name { gap: 12px; }
  .hero-cta { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .frame { animation: none; }
  .btn, .link-arrow i, .shot img, .community-card i { transition: none; }
}
