/* ============================================================
   XINSHENG · 苹果风格样式系统
   ============================================================ */
:root {
  /* 品牌色 */
  --brand: #E8833A;
  --brand-hover: #C9622A;
  --brand-soft: #FDEEE3;

  /* 中性色 */
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --faint: #AEAEB2;
  --line: #E8E8ED;

  /* 语义色 */
  --success: #34C759;
  --warning: #FF9F0A;
  --danger: #FF3B30;

  /* 圆角与阴影 */
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 28px rgba(0, 0, 0, .05);
  --shadow-pop: 0 8px 20px rgba(0, 0, 0, .08), 0 20px 60px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
img { display: block; max-width: 100%; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 820px; }

/* ===== 顶部导航：白色毛玻璃 ===== */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 32px; min-width: 0; }
.nav-links a {
  font-size: 14px; color: var(--ink); font-weight: 400;
  padding: 4px 0; white-space: nowrap;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  display: inline-flex; align-items: center;
  padding: 9px 20px; background: var(--brand); color: #fff;
  border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: all .15s ease;
}
.nav-cta:hover { background: var(--brand-hover); transform: translateY(-1px); }

/* ===== 导航右侧：语言下拉菜单 =====
   触发器做成"轻量幽灵按钮"（无边框，hover 才浮出底色），
   点击展开标准下拉面板；面板项右侧用 ✓ 标记当前语种。
   原生 <details> 实现，无需 JS 也能展开，键盘可聚焦，AI 爬虫可见全部链接。 */
.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.lang-switch { position: relative; }

.lang-switch > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  font-size: 13px; color: var(--ink); white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-globe {
  width: 15px; height: 15px; flex: none; opacity: .7;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.lang-switch > summary::after {
  content: ""; width: 5px; height: 5px; margin-left: 1px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px); opacity: .5;
  transition: transform .2s ease;
}
.lang-switch > summary:hover {
  background: var(--surface-2); border-color: var(--line); color: var(--brand);
}
.lang-switch[open] > summary {
  background: var(--surface-2); border-color: var(--line); color: var(--brand);
}
.lang-switch[open] > summary::after { transform: rotate(-135deg) translate(-2px, 0); }

.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  padding: 6px; min-width: 176px;
  animation: langMenuIn .16s ease-out both;
}
/* 透明安全带：填补 summary 与面板之间的 8px 空隙，避免鼠标移过去就"掉"出菜单 */
.lang-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px;
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.4; color: var(--ink);
  transition: background .14s ease, color .14s ease;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--brand); }
.lang-menu a.is-on { color: var(--brand); font-weight: 500; background: var(--brand-soft); }
.lang-menu a.is-on::after {
  content: "\2713"; font-size: 12px; font-weight: 700; color: var(--brand);
}
@media (prefers-reduced-motion: reduce) {
  .lang-menu { animation: none; }
}

/* ===== 产品详情页：产品卡片变成可点击链接 ===== */
a.product-card { display: block; color: inherit; }
a.product-card:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
.card-media-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--brand); margin-top: 4px;
}
a.product-card:hover .card-media-arrow { gap: 10px; }

/* ===== Hero：苹果式大标题 + 大量留白 ===== */
.hero {
  padding: 100px 0 80px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(232, 131, 58, .10), transparent 60%),
    var(--bg);
}
.hero-wrap { text-align: center; max-width: 880px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--brand); background: var(--brand-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 {
  font-size: 56px; line-height: 1.15; color: var(--ink);
  font-weight: 600; letter-spacing: -0.025em; margin: 0 0 24px;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-sub { font-size: 18px; color: var(--muted); margin: 0 0 36px; line-height: 1.6; }
.hero-actions { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-meta { margin-top: 28px; font-size: 13px; color: var(--faint); }
.hero-num { font-weight: 600; color: var(--ink); margin: 0 4px; }

/* 按钮：胶囊 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: all .15s ease; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(232, 131, 58, .30); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ===== 数据条 ===== */
.stats-bar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin: -40px auto 0;
  max-width: 1140px;
  padding: 36px 0;
  box-shadow: var(--shadow-card);
  position: relative; z-index: 2;
}
.stats-wrap { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px; }
.stats-wrap .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stats-wrap .stat strong { font-size: 32px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.stats-wrap .stat span { font-size: 13px; color: var(--muted); }

/* ===== Section 通用 ===== */
.section { padding: 96px 0; }
.section:nth-child(even) { background: var(--surface); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: 40px; color: var(--ink); font-weight: 600;
  margin: 0 0 14px; letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ===== 产品卡片 ===== */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-icon { font-size: 32px; color: var(--brand); margin-bottom: 20px; }
.product-card h3 { font-size: 22px; color: var(--ink); margin: 0 0 14px; font-weight: 600; letter-spacing: -0.01em; }
.product-card p { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.product-card ul li {
  font-size: 14px; color: var(--ink); padding: 8px 0 8px 22px; position: relative;
}
.product-card ul li::before {
  content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 600;
}

/* ===== 解决方案卡片 ===== */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.solution-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--brand);
}
.solution-card h3 { font-size: 20px; color: var(--ink); margin: 0 0 10px; font-weight: 600; }
.solution-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ===== 客户云 ===== */
.customer-cloud {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.customer-cloud span {
  padding: 12px 22px; background: var(--surface);
  border-radius: 999px; font-size: 14px; color: var(--ink);
  font-weight: 500; box-shadow: var(--shadow-card);
}

/* ===== 荣誉 ===== */
.honor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.honor-item {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow-card);
}
.honor-item strong { display: block; font-size: 22px; color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.honor-item span { font-size: 13px; color: var(--muted); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.faq-item summary {
  cursor: pointer; padding: 20px 24px; font-weight: 500; font-size: 16px;
  color: var(--ink); list-style: none; position: relative; padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--brand); font-weight: 400; transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 24px 22px; color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }

/* ===== 关于 + 联系 ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 32px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 15px; }
.contact-card {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 32px;
}
.contact-card h3 { font-size: 22px; margin: 0 0 20px; font-weight: 600; letter-spacing: -0.01em; }
.contact-card ul li {
  font-size: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.contact-card ul li:last-child { border-bottom: none; }
.contact-card ul li span { display: block; font-size: 11px; color: rgba(255, 255, 255, .55); margin-bottom: 4px; }
.contact-card .btn { margin-top: 22px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--surface-2); padding: 60px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 420px; }
.footer-logo { height: 30px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.footer-meta p { font-size: 13px; color: var(--faint); margin: 0 0 4px; }

/* ===== 响应式 ===== */
/* 非中文语种字号微调：拉丁/西里尔/假名字符视觉宽度大于汉字，
   同样的 56px 在英文/俄语/日语下会折行或撑破导航，按语种收一档。 */
html:not([lang="zh-CN"]) .hero h1 { font-size: 48px; }
html[lang="ja"] .hero h1 { font-size: 46px; letter-spacing: -0.012em; }
html[lang="ru"] .hero h1 { font-size: 43px; letter-spacing: -0.012em; }
html:not([lang="zh-CN"]) .section-head h2 { font-size: 36px; }

/* 中等宽度：导航项间距收窄，避免长语种文案把导航挤成两行 */
@media (max-width: 1420px) and (min-width: 901px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .nav-right { gap: 10px; }
  .lang-switch summary { padding: 6px 12px; font-size: 12.5px; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .nav-links { gap: 11px; }
  .nav-links a { font-size: 12.5px; }
  .nav-cta { padding: 7px 14px; font-size: 13px; }
}

/* ===== 卡片配图（真实产品实拍） ===== */
.card-media {
  margin: -36px -32px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}
/* 模糊填充背景：图片比例各异（1:1 ~ 3.85:1），用同图放大的模糊底填充留白，
   前景 object-fit:contain 保证产品既不被拉伸也不被裁切 */
.card-media::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--img); background-size: cover; background-position: center;
  filter: blur(18px) saturate(1.15); transform: scale(1.25);
  opacity: .5;
}
.card-media img {
  display: block; width: 100%; height: 216px;
  object-fit: contain; object-position: center;
  position: relative;
  transition: transform .6s ease;
}
.product-card:hover .card-media img { transform: scale(1.05); }
.product-card .product-icon { display: none; }
.product-card h3 { margin-top: 0; }

/* 场景卡配图 */
.solution-card { padding-bottom: 24px; }
.solution-card .card-media {
  margin: -28px -28px 18px -31px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--surface-2);
}
.solution-card .card-media img {
  display: block; width: 100%; height: 170px;
  object-fit: contain; transition: transform .6s ease;
  position: relative;
}
.solution-card:hover .card-media img { transform: scale(1.05); }

/* ===== 实拍图廊 ===== */
.shot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px;
}
.shot-grid figure {
  margin: 0; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card);
  position: relative;
}
.shot-grid figure::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--img); background-size: cover; background-position: center;
  filter: blur(18px) saturate(1.15); transform: scale(1.25);
  opacity: .5;
}
.shot-grid img {
  display: block; width: 100%; height: 190px; object-fit: contain;
  position: relative;
  transition: transform .6s ease;
}
.shot-grid figure:hover img { transform: scale(1.05); }
.shot-grid figcaption {
  padding: 12px 14px; font-size: 13px; color: var(--muted);
  text-align: center; border-top: 1px solid var(--line);
}

/* 通栏实拍：超宽幅图（3.85:1）全宽铺开，由 width/height 属性推导比例，
   既不裁切也不拉伸，避免塞进固定高度卡片时被放大变形 */
.wide-shot {
  margin: 28px 0 0; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.wide-shot img { display: block; width: 100%; height: auto; transition: transform .6s ease; }
.wide-shot:hover img { transform: scale(1.02); }
.wide-shot figcaption {
  padding: 14px 18px; font-size: 13px; color: var(--muted);
  text-align: center; border-top: 1px solid var(--line);
}

/* ===== 关于区工厂实拍 ===== */
.about-shots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 32px;
}
.about-shots img {
  width: 100%; height: 190px; object-fit: contain;
  background: var(--surface-2);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  transition: transform .6s ease;
}
.about-shots img:hover { transform: scale(1.04); }

@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-right { gap: 8px; }
  .lang-switch summary { padding: 6px 11px; font-size: 12px; }
  .nav-cta { padding: 7px 14px; font-size: 13px; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 36px; }
  /* 移动端覆盖上面的按语种字号（属性选择器优先级更高，必须同权重再写一次） */
  html:not([lang="zh-CN"]) .hero h1,
  html[lang="ja"] .hero h1,
  html[lang="ru"] .hero h1 { font-size: 30px; letter-spacing: -0.01em; }
  html:not([lang="zh-CN"]) .section-head h2 { font-size: 26px; }
  .hero-sub { font-size: 16px; }
  .stats-wrap { gap: 20px; }
  .stats-wrap .stat strong { font-size: 26px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 28px; }
  .section-head p { font-size: 15px; }
  .product-grid, .solution-grid { grid-template-columns: 1fr; }
  .honor-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
  .about-shots { grid-template-columns: repeat(2, 1fr); }
  .card-media img { height: 200px; }
}

/* ===== 小屏手机（≤640px）=====
   俄语/英文的导航 CTA 文案较长（如 "Запросить цену"），会和语言切换器一起
   把导航挤出行宽。此处收起导航 CTA（Hero 与联系区仍各有入口），
   保留语言切换器——这是多语言站的必备控件。 */
@media (max-width: 640px) {
  .nav-wrap { height: 58px; }
  .nav-cta { display: none; }
  .brand-img { height: 26px; }
  .lang-switch > summary { padding: 5px 7px; font-size: 12px; gap: 5px; }
  .lang-globe { width: 14px; height: 14px; }
  .lang-menu { min-width: 164px; }
  .hero { padding: 48px 0 42px; }
  .hero h1 { font-size: 26px; }
  html:not([lang="zh-CN"]) .hero h1,
  html[lang="ja"] .hero h1,
  html[lang="ru"] .hero h1 { font-size: 25px; }
  .hero-sub { font-size: 15px; }
  .section-head h2 { font-size: 24px; }
  html:not([lang="zh-CN"]) .section-head h2 { font-size: 23px; }
  .stats-wrap { gap: 14px; }
  .stats-wrap .stat strong { font-size: 22px; }
  .product-card { padding: 26px 22px; }
  .product-card .card-media { margin: -26px -22px 20px; }
}