/* =========================================================
   pandlastite.top — 项目展示站
   设计：清爽留白 + 暖橙点缀，浅色 / 深色双主题
   ========================================================= */

:root {
  --bg: #fdfbf8;
  --bg-tint: #faf3ea;
  --surface: #ffffff;
  --surface-2: #faf6f0;
  --text: #2b2119;
  --text-soft: #5d5248;
  --muted: #8c7e73;
  --line: #eee3d7;
  --accent: #dd6a1c;
  --accent-deep: #c25712;
  --accent-soft: #fde9d6;
  --shadow-sm: 0 2px 10px rgba(90, 50, 20, 0.05);
  --shadow-md: 0 14px 40px rgba(90, 50, 20, 0.09);
  --shadow-lg: 0 30px 70px rgba(90, 50, 20, 0.13);
  --radius: 18px;
  --wrap: 1060px;
}

[data-theme="dark"] {
  --bg: #17120e;
  --bg-tint: #1d1712;
  --surface: #221b15;
  --surface-2: #2b221a;
  --text: #f6ede3;
  --text-soft: #d6c6b7;
  --muted: #a3907f;
  --line: #3b2f25;
  --accent: #ffa75c;
  --accent-deep: #ffc38c;
  --accent-soft: #3d2a18;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: 8px; transition: top 0.2s ease; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -0.02em; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); flex: none; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark.small { width: 24px; height: 24px; }
.brand-dot { color: var(--muted); font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 10px; color: var(--text-soft); font-size: 14px; font-weight: 550; transition: color 0.2s, background-color 0.2s; }
.nav-link:hover { color: var(--accent); background: var(--accent-soft); }
.nav-link.is-active { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-link { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text-soft); cursor: pointer; transition: all 0.2s ease; }
.icon-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-link svg { width: 19px; height: 19px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
.menu-toggle { display: none; }

/* ---------- 通用 ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-kicker { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: 0.11em; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; }
.accent-text { color: var(--accent); }
.text-link { color: var(--accent); font-size: 14px; font-weight: 650; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px;
  padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 650; border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(221, 106, 28, 0.24); }
[data-theme="dark"] .btn-primary { color: #2a1a0d; }
.btn-primary:hover { background: var(--accent-deep); box-shadow: 0 12px 28px rgba(221, 106, 28, 0.32); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 首屏 ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; }
.hero::before { content: ""; position: absolute; top: -320px; left: 50%; transform: translateX(-50%); width: 1240px; height: 920px; background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 82%); opacity: 0.42; pointer-events: none; }
.hero-top { position: relative; text-align: center; max-width: 760px; margin-bottom: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--text-soft); font-weight: 600; box-shadow: var(--shadow-sm); }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { margin: 24px 0 18px; font-size: clamp(38px, 5.2vw, 60px); line-height: 1.16; letter-spacing: -0.045em; font-weight: 800; }
.hero-lead { margin: 0 auto; color: var(--text-soft); font-size: 16.5px; max-width: 580px; }
#projects { position: relative; scroll-margin-top: 92px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 1000px; margin: 0 auto; }

/* ---------- 项目框 ---------- */
.project-box {
  position: relative; overflow: hidden; padding: 36px 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 20px;
}
.project-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.project-head { display: flex; align-items: center; gap: 18px; }
.project-icon svg { width: 48px; height: 48px; display: block; }
.project-heading h2 { margin: 6px 0 0; font-size: 27px; letter-spacing: -0.02em; line-height: 1.3; }
.version { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-active { background: var(--accent-soft); color: var(--accent); }
.project-desc { margin: 0; color: var(--text-soft); font-size: 15px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row span { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-soft); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }
.project-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.project-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ---------- 功能 ---------- */
.mini-head { text-align: center; margin-bottom: 40px; }
.mini-head h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.03em; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature-item { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.feature-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-no { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 10px; }
.feature-item h3 { margin: 0 0 8px; font-size: 17px; }
.feature-item p { margin: 0; color: var(--text-soft); font-size: 13.5px; }

/* ---------- 下载区 ---------- */
.download-box {
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
  padding: 42px 44px; border-radius: 22px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.download-text h2 { margin: 0 0 10px; font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -0.03em; }
.download-text p { margin: 0; color: var(--text-soft); font-size: 14px; }
.download-text strong { color: var(--accent); }
.download-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 联系聊天框 ---------- */
.mini-sub { max-width: 620px; margin: 14px auto 0; color: var(--text-soft); font-size: 14px; }
.chat-intro { max-width: 720px; margin: 22px auto 0; text-align: center; color: var(--text-soft); font-size: 14px; }
.chat-box { max-width: 720px; margin: 18px auto 30px; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.chat-bubble { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
.chat-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; }
.chat-bubble-text { display: inline-block; padding: 10px 14px; background: var(--accent-soft); border-radius: 4px 14px 14px 14px; font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }
.form-row { position: relative; margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 7px; color: var(--text-soft); }
.form-row label .req { color: var(--accent); }
.form-row label .opt { color: var(--muted); font-weight: 400; }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--muted); }
.char-count { position: absolute; right: 2px; bottom: -18px; font-size: 11px; color: var(--muted); }
.form-foot { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.form-note { font-size: 12px; color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- 联系作者 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 720px; margin: 0 auto; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.contact-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.contact-icon svg { width: 21px; height: 21px; }
.contact-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-body strong { font-size: 15px; }
.contact-body small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-arrow { margin-left: auto; color: var(--muted); font-size: 17px; }

/* ---------- 广告位 ---------- */
.ad-section { padding-top: 0; }
.ad-slot {
  position: relative; padding: 30px 34px 26px; border-radius: var(--radius);
  background: var(--bg-tint); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.ad-label { position: absolute; top: -11px; left: 30px; padding: 2px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.1em; }
.ad-content { min-height: 92px; display: grid; place-items: center; }
.ad-placeholder {
  width: 100%; min-height: 92px; display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; border-radius: 13px;
  background: var(--surface); border: 1px dashed var(--line);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.ad-placeholder:hover { border-color: var(--accent); }
.ad-badge { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 4px 7px; }
.ad-copy { display: flex; flex-direction: column; gap: 2px; }
.ad-copy strong { font-size: 15px; }
.ad-copy small { font-size: 12.5px; color: var(--muted); }
.ad-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { padding: 30px 0 40px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.back-top { color: var(--text-soft); font-size: 13px; font-weight: 650; }
.back-top:hover { color: var(--accent); }
.noscript-tip { padding: 16px; background: #fff6d8; color: #6b5311; text-align: center; font-size: 14px; }

/* ---------- 进场动画 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-box { padding: 34px; }
  .project-grid { grid-template-columns: 1fr; max-width: 760px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .section { padding: 68px 0; }
  .menu-toggle { display: grid; }
  .main-nav { position: absolute; top: 72px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .main-nav.is-open { display: flex; }
  .nav-link { padding: 12px 14px; }
  .hero { padding: 60px 0 72px; }
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .project-box { padding: 28px 24px; }
  .project-head { gap: 14px; }
  .project-heading h2 { font-size: 23px; }
  .project-foot { align-items: flex-start; flex-direction: column; }
  .download-box { padding: 28px 24px; }
  .download-cta .btn { width: 100%; }
  .ad-slot { padding: 28px 20px 22px; }
  .ad-label { left: 20px; }
  .ad-placeholder { gap: 12px; padding: 14px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 460px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
