/* 鸟类图鉴 Bird Atlas 官网 · 本地草稿（build_site.py 复制到 site/assets/site.css） */
:root {
  --ink: #10261b; --ink-2: #2f463a; --muted: #5d7267;
  --bg: #f2f6f1; --bg-2: #e5eee6; --card: #fff; --line: rgba(16, 38, 27, .1);
  --accent: #bfe5f3; --accent-hover: #d2eef8; --accent-ink: #0d2a35;
  --metal: linear-gradient(150deg, #3a3f45, #121417 35%, #2a2e33 70%, #0d0f12);
  --device-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), 0 30px 60px rgba(16, 39, 55, .24), 0 8px 18px rgba(16, 39, 55, .14);
  --wrap: 1200px; --gutter: clamp(16px, 4vw, 40px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --h-track: -.02em;
  color-scheme: light;
}
html:lang(zh-Hans) { --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif; --h-track: .01em; }
html:lang(zh-Hant) { --font: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; --h-track: .01em; }
html:lang(ja) { --font: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; --h-track: .01em; }
html:lang(ko) { --font: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --h-track: -.01em; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }  /* 韩语按词断行 */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.15; letter-spacing: var(--h-track); }
h2 { font-size: clamp(30px, 4.2vw, 52px); text-wrap: balance; }
.sub { margin: 14px auto 0; max-width: 720px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); text-wrap: pretty; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(860px, 100% - 2 * var(--gutter)); }
section { position: relative; }
section[id], details[id] { scroll-margin-top: 80px; }

/* ---------- 顶部导航 ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter);
  color: #fff; transition: background .3s, color .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(242, 246, 241, .84); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .02em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.links { margin-left: auto; display: flex; gap: clamp(18px, 2.4vw, 32px); font-size: 15px; font-weight: 500; }
.links a { text-decoration: none; opacity: .92; white-space: nowrap; }
.links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

/* ---------- 语言切换 ---------- */
.lang { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px 0 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); color: inherit; font: 500 14px/1 var(--font); white-space: nowrap; }
.nav.scrolled .lang-btn, .foot .lang-btn { background: #fff; border-color: var(--line); }
.lang-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lang-btn .chev { width: 16px; height: 16px; transition: transform .2s; }
.lang.open .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 210px; max-height: min(72vh, 540px); overflow: auto; margin: 0; padding: 6px;
  list-style: none; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 18px 50px rgba(16, 38, 27, .22), 0 0 0 1px var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.lang.up .lang-menu { top: auto; bottom: calc(100% + 8px); transform: translateY(6px); }
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--bg); outline: none; }
.lang-menu a[aria-current] { font-weight: 700; background: var(--bg-2); }
.lang-menu a[aria-current]::after { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }

/* ---------- 首屏 ---------- */
.hero { display: flex; align-items: center; min-height: clamp(640px, 100svh, 940px); overflow: hidden; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 45%; }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(8, 24, 14, .36), rgba(8, 24, 14, 0) 22%),
  linear-gradient(90deg, rgba(8, 24, 14, 0) 36%, rgba(8, 24, 14, .3) 66%, rgba(8, 24, 14, .36)),
  linear-gradient(180deg, rgba(242, 246, 241, 0) 74%, var(--bg) 99%); }
.hero-inner { position: relative; display: flex; justify-content: flex-end; padding: 96px 0 140px; }
.hero-copy { width: min(580px, 50%); }
.hero h1 { font-size: clamp(46px, 6.2vw, 92px); line-height: 1.08; text-shadow: 0 2px 30px rgba(0, 20, 10, .25); }
html:lang(ja) .hero h1 { font-size: clamp(40px, 5.4vw, 80px); }
html:lang(zh-Hans) .hero h1, html:lang(zh-Hant) .hero h1, html:lang(ja) .hero h1, html:lang(ko) .hero h1 { word-break: keep-all; }
.scene { display: contents; }
.lead { margin: 22px 0 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; text-shadow: 0 1px 16px rgba(0, 20, 10, .35); text-wrap: pretty; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 32px; border-radius: 999px; font-weight: 700; font-size: 17px; text-decoration: none; transition: background .2s, transform .2s; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px rgba(0, 30, 40, .18); }
.btn.primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn.link { height: auto; padding: 0; color: inherit; }
.btn.link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn.link:hover svg { transform: translateX(4px); }
.platforms { margin: 30px 0 0; font-size: 13px; letter-spacing: .08em; opacity: .85; }

/* ---------- 设备外框 ---------- */
.phone { --w: 240px; position: relative; width: var(--w); padding: calc(var(--w) * .03); border-radius: calc(var(--w) * .148); background: var(--metal); box-shadow: var(--device-shadow); }
.phone img { width: 100%; border-radius: calc(var(--w) * .118); }
.phone::after { content: ""; position: absolute; top: calc(var(--w) * .056); left: 50%; transform: translateX(-50%); width: 28%; height: calc(var(--w) * .082); background: #000; border-radius: 99px; }
.phone.stack { display: grid; }
.phone.stack img { grid-area: 1 / 1; transition: opacity .6s ease; }
.phone.stack img:not(.on) { opacity: 0; }
.ipad { --w: 600px; width: var(--w); padding: calc(var(--w) * .017); border-radius: calc(var(--w) * .042); background: var(--metal); box-shadow: var(--device-shadow); }
.ipad img { width: 100%; border-radius: calc(var(--w) * .026); }
.duo { filter: drop-shadow(0 28px 34px rgba(16, 39, 55, .22)) drop-shadow(0 8px 10px rgba(16, 39, 55, .12)); }
.tv { --w: 460px; width: var(--w); padding: calc(var(--w) * .013); background: #0c0d0f; border-radius: calc(var(--w) * .016);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 26px 50px rgba(16, 39, 55, .24), 0 8px 16px rgba(16, 39, 55, .12); }
.tv img { width: 100%; border-radius: 2px; }
.watch { --w: 150px; position: relative; width: var(--w); margin-block: calc(var(--w) * .42); }
.watch .band { position: absolute; left: 15%; right: 15%; top: -42%; bottom: -42%; border-radius: calc(var(--w) * .16); background: linear-gradient(90deg, #1a1d21, #2d3238 50%, #1a1d21); }
.watch .case { position: relative; padding: calc(var(--w) * .075); border-radius: calc(var(--w) * .27);
  background: linear-gradient(150deg, #4a4f56, #16181b 40%, #2c3036 75%, #0e0f11); box-shadow: var(--device-shadow); }
.watch .case::after { content: ""; position: absolute; right: calc(var(--w) * -.04); top: 22%; width: calc(var(--w) * .055); height: 16%; border-radius: 4px; background: linear-gradient(90deg, #2b2f35, #5d636b); }
.watch img { width: 100%; border-radius: calc(var(--w) * .2); }

/* ---------- 设备展示 ---------- */
.devices { padding: clamp(36px, 5vw, 72px) 0 clamp(72px, 9vw, 120px); text-align: center; overflow: hidden; }
.mist { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.devices::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0, rgba(242, 246, 241, .85) 12%, rgba(242, 246, 241, .3) 34%, rgba(242, 246, 241, .2) 72%, var(--bg)); }
.devices .wrap { position: relative; z-index: 1; }
.dev-row { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; justify-content: center; column-gap: clamp(20px, 3.2vw, 48px); row-gap: 22px; margin-top: clamp(36px, 5vw, 64px); }
.dev { display: contents; }
.dev > :first-child { align-self: end; justify-self: center; }
.dev figcaption { display: flex; flex-direction: column; gap: 4px; max-width: 300px; justify-self: center; }
.dev b { font-size: 20px; }
.dev span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.dev-iphone .phone { --w: clamp(180px, 18.5vw, 232px); }
.dev-duo .duo { width: clamp(300px, 36vw, 468px); }
.dev-ipad .ipad { --w: clamp(300px, 36vw, 468px); }

/* ---------- 拟真与手绘 ---------- */
.plates { min-height: 860px; padding: clamp(80px, 9vw, 130px) 0 clamp(90px, 10vw, 140px); overflow: hidden; }
.plates-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.plates-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, var(--bg) 0, rgba(242, 246, 241, 0) 20%),
  linear-gradient(90deg, rgba(242, 246, 241, .88) 0, rgba(242, 246, 241, .66) 36%, rgba(242, 246, 241, 0) 60%),
  linear-gradient(0deg, var(--bg) 0, rgba(242, 246, 241, 0) 14%); }
.plates-inner { position: relative; }
.plates-copy { max-width: 720px; }
.plates h2 { font-size: clamp(30px, 3.6vw, 46px); }
.plates-copy .sub { margin-left: 0; color: var(--ink-2); }
.plates-stage { display: flex; align-items: flex-end; gap: clamp(24px, 3vw, 40px); width: fit-content; margin-top: 52px; }
.plates-stage .ipad { --w: clamp(320px, 40vw, 580px); }
.switcher { order: -1; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.switcher .phone { --w: clamp(140px, 14vw, 196px); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 18px rgba(16, 39, 55, .16); }
.seg button { border: 0; background: transparent; font: 600 14px/1 var(--font); padding: 9px 16px; border-radius: 999px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- 功能卡片 ---------- */
.features { padding: clamp(70px, 8vw, 120px) 0; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; text-align: left; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 30px 30px 0; border-radius: 28px; background: var(--card);
  box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(16, 38, 27, .06); }
.card h3 { font-size: 22px; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.peek { display: flex; justify-content: center; height: 380px; margin-top: auto; padding-top: 30px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
.peek .phone { --w: 230px; align-self: flex-start; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), 0 18px 40px rgba(16, 39, 55, .18); }

/* ---------- 更多设备 ---------- */
.more { padding: clamp(56px, 7vw, 92px) 0; background: var(--bg-2); }
.more-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: clamp(40px, 6vw, 96px); row-gap: 8px; }
.more h2 { grid-column: 1 / -1; font-size: clamp(28px, 3.4vw, 44px); }
.more-item:not(.tv-item) { justify-self: start; }
.tv-item { justify-self: end; }
.more-item { display: flex; align-items: center; gap: 28px; margin: 0; }
.more-item figcaption { display: flex; flex-direction: column; gap: 6px; max-width: 250px; }
.more-item b { font-size: 19px; }
.more-item span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.tv-item { flex-direction: column; align-items: flex-start; gap: 20px; }
.tv-item figcaption { max-width: 460px; }
.tv-item .tv { --w: clamp(300px, 34vw, 460px); }

/* ---------- 常见问题 ---------- */
.faq { padding: clamp(70px, 8vw, 110px) 0 clamp(40px, 5vw, 70px); }
.faq h2 { text-align: center; margin-bottom: 36px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 4px; cursor: pointer; list-style: none; font-weight: 650; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; margin: 8px 6px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg); margin-top: 13px; }
details p { margin: 0 4px 24px; color: var(--ink-2); line-height: 1.75; }

/* ---------- 支持与联系 ---------- */
.support { padding: clamp(50px, 6vw, 80px) 0 clamp(70px, 8vw, 110px); text-align: center; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 34px; text-align: left; }
.contact { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 20px; background: var(--card); text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(16, 38, 27, .05); transition: transform .2s; }
a.contact:hover { transform: translateY(-2px); }
.contact .k { font-size: 13px; color: var(--muted); }
.contact .v { font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.contact .hint { font-size: 13px; color: var(--muted); }
.credits { margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* ---------- 页脚 ---------- */
.foot { padding: 24px 0; background: var(--bg-2); border-top: 1px solid var(--line); }
.foot-inner { display: flex; align-items: center; gap: 28px; }
.foot .brand { font-size: 17px; }
.foot .brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: none; }
.foot-links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- 语言选择页 / 404 ---------- */
body.chooser { display: grid; place-items: center; min-height: 100svh; padding: 24px; }
.chooser-bg { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.chooser-card { width: 100%; max-width: 520px; padding: 36px; border-radius: 28px; text-align: center; background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.chooser-card > img { margin: 0 auto 14px; border-radius: 16px; }
.chooser-card h1 { font-size: 28px; }
.chooser-card h1 span { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--muted); }
.chooser-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chooser-list a { display: block; padding: 12px; border-radius: 14px; background: var(--bg); text-decoration: none; font-weight: 600; }
.chooser-list a:hover { background: var(--bg-2); }

/* ---------- 进场动画（只在支持且未要求减少动态效果时） ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone.stack img { transition: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .more-inner { grid-template-columns: 1fr; row-gap: 24px; }
  .tv-item { justify-self: start; }
  .plates { min-height: 0; }
  .plates-shade { background:
    linear-gradient(180deg, var(--bg) 0, rgba(242, 246, 241, .75) 26%, rgba(242, 246, 241, .45) 60%, var(--bg) 100%); }
}
@media (max-width: 820px) {
  .links { display: none; }
  .nav .lang { margin-left: auto; }
  .brand { font-size: 17px; }
  .brand img { width: 36px; height: 36px; }
  .hero { display: block; min-height: 0; color: var(--ink); }
  .hero-img { position: relative; height: clamp(400px, 62svh, 600px); object-position: 22% 50%; }
  .hero-shade { bottom: auto; height: clamp(400px, 62svh, 600px); background:
    linear-gradient(180deg, rgba(8, 24, 14, .4), rgba(8, 24, 14, 0) 24%),
    linear-gradient(180deg, rgba(242, 246, 241, 0) 62%, var(--bg) 99%); }
  .hero-inner { display: block; margin-top: -72px; padding: 0 0 48px; }
  .hero-copy { width: auto; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 60px); text-shadow: none; }
  .lead { color: var(--ink-2); text-shadow: none; }
  .platforms { color: var(--muted); }
  .dev-row { display: flex; align-items: flex-end; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 12px; justify-content: flex-start; }
  .dev-row::-webkit-scrollbar { display: none; }
  .dev { display: flex; flex: none; flex-direction: column; align-items: center; gap: 18px; scroll-snap-align: center; }
  .dev-iphone .phone { --w: 200px; }
  .dev-duo .duo { width: min(80vw, 400px); }
  .dev-ipad .ipad { --w: min(80vw, 400px); }
  .plates { padding-top: 64px; }
  .plates-bg { object-position: 80% 50%; }
  .plates-stage { display: block; width: 100%; margin: 36px 0 0; }
  .plates-stage .ipad { --w: calc(100vw - 2 * var(--gutter)); }
  .switcher { position: relative; left: auto; bottom: auto; margin: -48px auto 0; width: fit-content; }
  .switcher .phone { --w: 170px; }
  .grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .peek { height: 320px; }
  .more-inner { grid-template-columns: 1fr; }
  .more-item:not(.tv-item) { gap: 22px; }
  .tv-item .tv { --w: calc(100vw - 2 * var(--gutter)); }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-inner { flex-wrap: wrap; gap: 16px 24px; }
  .foot-links { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; gap: 10px 22px; }
  .foot .lang { margin-left: auto; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .btn { height: 50px; padding: 0 26px; font-size: 16px; }
  .watch { --w: 120px; }
  .chooser-card { padding: 28px 20px; }
}
