/* ============================================================
   WINTEL — shared stylesheet
   ------------------------------------------------------------
   为什么是静态文件而不是 Astro 构建期 CSS：
   本机这套 Astro 安装的样式/资源发射环节不产出任何东西
   （dist 下既无 _astro/*.css，HTML 里也没有 <style>；裸 vite 构建正常，
   @astrojs/compiler 也正常返回 css 数组 —— 问题卡在 Astro 的资源发射环节）。
   为保证站点在任何环境都能正确渲染，共享样式改为 public/ 下的普通静态文件，
   这同时省掉一次构建期 CSS 处理，样式可直接读改。

   本文件只放【全站共享】样式：基础排版 + 页头 + 页脚 + 共享组件。
   各页面自己的样式放在该页 <BaseLayout> 的 head 插槽里（见各页文件）。

   命名空间约定：组件样式一律挂在自己的根类下（.site-header / .site-footer /
   .draft-notice / .answer-block / .breadcrumb / .spec-card），
   避免 h4 / ul / li / details 这类裸元素选择器污染整页。
   ============================================================ */

/* ============================================================
   1) 基础 —— 变量与全局排版
   ============================================================ */
:root {
  --color-bg: #ffffff;
  --color-surface: #f5f7fa;
  --color-text: #1f2933;
  --color-muted: #5b6772;
  --color-primary: #1a6dff;
  --color-primary-dark: #0b4fc4;
  --color-primary-soft: #eaf1ff;
  --color-border: #e3e8ef;
  --color-accent: #ff6b35;
  /* 字体：Inter 已自托管 woff2 于 /fonts（免费 OFL）。不再依赖 Google Fonts，
     避免大陆网络下渲染阻塞、拖慢 LCP。系统字体作兜底。 */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --maxw: 1100px;
  --radius: 10px;
}

/* Inter 自托管（OFL，免费）。latin 子集，4 个常用字重。
   纯英文站 latin 足够；若日后要 CJK 再补 Noto Sans SC。 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background:
    radial-gradient(1100px 520px at 50% -160px, var(--color-primary-soft) 0%, rgba(255, 255, 255, 0) 70%),
    var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* main 的直接子级容器负责页面上下留白。
   首页的首个子级是 .hero（自带 56px 上内边距），不在此规则内，不会被叠加。 */
main > .container:first-child,
main > section.container:first-child,
main > article.container:first-child { padding-top: 36px; }

main > .container:last-child,
main > section.container:last-child,
main > article.container:last-child { padding-bottom: 60px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--color-text); }

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.6em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.3em 0 0.5em; }

/* 排版系统：eyebrow 小标签 + display 大标题（统一节奏，提升高级感） */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.display {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { margin: 0 0 1em; }

/* 线性图标（Inline SVG，currentColor 描边，免费 Lucide 路径） */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}
.icon svg { display: block; width: 100%; height: 100%; }
h3 .icon { width: 20px; height: 20px; margin-right: 7px; vertical-align: -3px; }

/* 滚动揭示（渐进增强：无 JS 时内容默认可见，不影响可读性与 SEO） */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal-ready [data-reveal].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
}

section { padding: 64px 0; }

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(26, 109, 255, 0.22);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(26, 109, 255, 0.3);
  transform: translateY(-2px);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  box-shadow: 0 10px 26px rgba(26, 109, 255, 0.14), 0 2px 8px rgba(16, 24, 40, 0.06);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 820px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

table { width: 100%; border-collapse: collapse; margin: 1em 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface); font-weight: 600; }

.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.spec-list li span:first-child { color: var(--color-muted); }

.faq-item { border-bottom: 1px solid var(--color-border); padding: 14px 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--color-muted); }

.lead { font-size: 1.15rem; color: var(--color-muted); }

.tldr {
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5em 0;
}

/* 占位符：资料缺失时可见、可辨、不可被机器误读。
   规则见 src/lib/placeholder.ts —— 占位符永不进入 JSON-LD / llms.txt。
   填入真值后，本样式自然不再被应用到任何元素。 */
.ph {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1.45;
  color: #6b7683;
  background: #f1f4f7;
  border: 1px dashed #b9c3cd;
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: 0.01em;
}
a .ph,
.ph a { color: #6b7683; text-decoration: none; }

/* ============================================================
   2) 布局 —— BaseLayout.astro
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 10px 16px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================================================
   3) 共享组件
   ============================================================ */

/* --- SiteHeader.astro --- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.site-header .brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.site-header .brand img { display: block; }
/* 页头用品牌方形标记 + HTML 文本（真 LOGO 的字标在小尺寸下会糊） */
.site-header .brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 1.6px;
  color: var(--color-primary);
  white-space: nowrap;
}
.site-header .main-nav {
  display: flex;
  gap: 18px;
  flex: 1 1 auto;
  font-size: 0.95rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.site-header .main-nav::-webkit-scrollbar { display: none; }
.site-header .main-nav a { color: var(--color-text); flex: 0 0 auto; }
.site-header .main-nav a.active { color: var(--color-primary); font-weight: 600; }
.site-header .header-cta {
  flex: 0 0 auto;
  padding: 9px 16px;
  font-size: 0.9rem;
}
@media (max-width: 900px) {
  .site-header .header-cta { display: none; }
}
@media (max-width: 640px) {
  .site-header .header-inner {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
  }
  .site-header .main-nav { font-size: 0.9rem; gap: 14px; }
}

/* --- SiteFooter.astro --- */
.site-footer {
  background: linear-gradient(135deg, #0b1622 0%, #102a4c 55%, #0b3a7a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  margin-top: 40px;
  padding: 22px 0 14px;
}
.site-footer .footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 24px;
}
.site-footer .footer-brand {
  max-width: 320px;
}
.site-footer .f-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 4px;
}
.site-footer h4 { margin: 0 0 10px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.62); text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer .footer-contact h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 5px 0; font-size: 0.9rem; }
.site-footer li a { color: rgba(255, 255, 255, 0.85); }
.site-footer li a:hover { color: #fff; }
.site-footer .muted { color: rgba(255, 255, 255, 0.68); font-size: 0.88rem; }
.site-footer .addr { margin-top: 6px; }
.site-footer .footer-contact {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 18px;
  padding-top: 18px;
}
.site-footer .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
}
.site-footer .contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}
.site-footer a.contact-item:hover { text-decoration: none; }
.site-footer a.contact-item:hover .contact-value { color: #bcd4ff; }
.site-footer .contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}
.site-footer .contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}
.site-footer .contact-item.contact-meta .contact-value {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.site-footer .copyright {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 14px;
  padding-top: 10px;
}
/* 占位符在蓝色 footer 里需要反白，否则灰底突兀 */
.site-footer .ph {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}
@media (max-width: 980px) {
  .site-footer .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .site-footer .footer-brand { grid-column: 1 / -1; max-width: none; }
  .site-footer .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-footer .footer-inner { grid-template-columns: 1fr; }
  .site-footer .contact-grid { grid-template-columns: 1fr; }
}

/* --- DraftNotice.astro --- */
.draft-notice {
  background: #fff8e1;
  border-bottom: 1px solid #ffe082;
  color: #6d4c00;
  font-size: 0.86rem;
  line-height: 1.5;
}
.draft-notice .draft-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.draft-notice .tag {
  flex: 0 0 auto;
  background: #6d4c00;
  color: #fff8e1;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.draft-notice .txt { flex: 1 1 320px; }
.draft-notice .txt code {
  background: rgba(109, 76, 0, 0.1);
  border-radius: 3px;
  padding: 0 4px;
}
.draft-notice details { flex: 0 0 auto; }
.draft-notice summary { cursor: pointer; font-weight: 600; white-space: nowrap; }
.draft-notice details ul {
  margin: 8px 0 4px;
  padding-left: 18px;
  columns: 2;
  column-gap: 28px;
}
.draft-notice details li { margin: 2px 0; break-inside: avoid; }
.draft-notice details code {
  font-size: 0.82rem;
  background: rgba(109, 76, 0, 0.1);
  border-radius: 3px;
  padding: 1px 4px;
}
@media (max-width: 640px) {
  .draft-notice details ul { columns: 1; }
}

/* --- AnswerBlock.astro --- */
.answer-block {
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 0 0 8px;
}
.answer-block .label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.answer-block p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* --- Breadcrumbs.astro --- */
.breadcrumb {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 20px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb .sep { color: var(--color-border); }
.breadcrumb .current { color: var(--color-text); }

/* --- ProductSpecTable.astro --- */
.spec-card h3 { font-size: 1rem; margin: 22px 0 6px; }
.spec-card h3:first-child { margin-top: 0; }
.spec-card .note { color: var(--color-muted); font-size: 0.88rem; text-align: right; }
