/* ==========================================================================
   Xiangying Precision — CNC Machining Manufacturer
   Design System v1.5 — Deep Navy + Safety Orange
   Components inspired by: Protolabs, Xometry, Hubs
   ========================================================================== */

/* ----- Google Font Import ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400&display=swap');

/* ----- Design Tokens (v1 palette) ----- */
:root {
  --color-brand-deep:      #0A2239;
  --color-brand-mid:       #1B3A5B;
  --color-brand-light:     #2C5F8A;
  --color-accent:          #FF6B1A;
  --color-accent-hover:    #E85D0E;
  --color-accent-light:    #FFF1E6;
  --color-white:           #FFFFFF;
  --color-gray-50:         #F7F9FC;
  --color-gray-100:        #EBEFF5;
  --color-gray-200:        #D5DDE7;
  --color-gray-400:        #6B7A8D;
  --color-gray-600:        #4A5568;
  --color-gray-800:        #1A202C;
  --color-gray-900:        #0A2239;
  --color-black:           #050D17;
  --color-success:         #16A34A;
  --color-warning:         #F59E0B;
  --color-error:           #DC2626;
  --color-info:            #2C5F8A;

  --shadow-sm:   0 1px 3px rgba(10,34,57,0.06);
  --shadow-md:   0 4px 16px rgba(10,34,57,0.08);
  --shadow-lg:   0 8px 32px rgba(10,34,57,0.12);
  --shadow-xl:   0 16px 48px rgba(10,34,57,0.18);

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --font-heading: 'Space Grotesk', 'Arial', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  --container-max: 1280px;
  --container-pad: 32px;
  --header-height: 72px;
  --section-pad: 100px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease);
  --transition-fast: 0.15s var(--ease);
}

/* ----- Reset & Base ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-gray-800);
  background: var(--color-white);
  overflow-x: hidden;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-brand-deep);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }
/* 响应式图片：<picture> 作为普通块级容器撑满其父容器，
   保证 .gallery-item img / .product-cat-card img 等既有规则（object-fit / aspect-ratio）继续生效。
   不使用 display:contents —— 少一层隐式依赖，布局更可预测。 */
picture { display: block; }
.product-cat-card picture,
.product-img picture,
.gallery-item picture,
.cap-intro-img picture,
.hero-visual picture {
  width: 100%;
  height: 100%;
}
.product-cat-card picture { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-brand-deep);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ----- Layout Utilities ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section { padding: var(--section-pad) 0; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--color-gray-50); }
.section-dark {
  background: var(--color-brand-deep);
  color: rgba(255,255,255,0.7);
}
.section-dark h2 { color: var(--color-white); }

.text-center { text-align: center; }

/* ===== Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-100);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
}

.site-logo img { height: 38px; width: auto; }

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-brand-deep);
  line-height: 1.1;
}
.logo-text span { color: var(--color-accent); }

.logo-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-600);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-brand-mid);
  background: var(--color-gray-50);
}
.main-nav a.active { font-weight: 600; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s var(--ease);
  z-index: 200;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 4px;
  white-space: nowrap;
}
.dropdown a:hover { background: var(--color-gray-50); }

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  padding: 2px;
  margin-left: 8px;
  background: var(--color-gray-50);
  box-shadow: var(--shadow-sm);
}
.lang-switch a {
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-gray-400);
  border-radius: 4px;
  transition: all 0.2s;
}
.lang-switch a.active {
  color: var(--color-white);
  background: var(--color-brand-mid);
  box-shadow: var(--shadow-sm);
}
.lang-switch a:hover:not(.active) {
  color: var(--color-gray-600);
  background: var(--color-white);
}

/* 语言菜单：地球按钮 + 自定义弹层（取代原生 <select>，避免系统弹层遮挡页面） */
.lang-more { position: relative; display: flex; }
.lang-more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 4px;
  color: var(--color-gray-400);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang-more > summary::-webkit-details-marker { display: none; }
.lang-more > summary::marker { content: ""; }
.lang-more > summary:hover,
.lang-more[open] > summary {
  color: var(--color-brand-mid);
  background: var(--color-white);
}
.lang-globe-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-globe-caret {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}
.lang-more[open] .lang-globe-caret { transform: rotate(180deg); }

/* 悬停提示：这里有其它语言可选（挂在 <details> 上，定位基准更可靠） */
.lang-more::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--color-brand-deep);
  color: var(--color-white);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
  pointer-events: none;
  z-index: 210;
}
.lang-more:hover::after,
.lang-more:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-more[open]::after { opacity: 0; visibility: hidden; }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 300;
  min-width: min(216px, calc(100vw - 32px));
  padding: 10px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}
.lang-menu-hint {
  margin: 0 0 8px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-400);
}
.lang-menu-list { list-style: none; margin: 0; padding: 0; }
.lang-menu-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--color-gray-400);
  cursor: default;
}
.lang-menu-list li:hover {
  background: var(--color-gray-50);
  color: var(--color-gray-600);
}
.lang-menu-list .lang-soon {
  flex: none;
  padding: 1px 7px;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-gray-400);
}

/* Header CTA */
.header-cta { display: flex; align-items: center; gap: 12px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-gray-800);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Section Header ===== */
.section-header { margin-bottom: 64px; }
.section-header.center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}
.section-header.center .section-eyebrow { justify-content: center; }
.section-header.center .section-eyebrow::after {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-header p {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  line-height: 1.7;
}

/* ===== Section Label (v1 compat) ===== */
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--color-brand-deep);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 18px;
  color: var(--color-gray-600);
  max-width: 640px;
  line-height: 1.6;
}

/* ===== Hero ===== */
.hero {
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero .hero-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.hero-text { max-width: 800px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--color-accent-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.hero h1 {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-brand-deep);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .highlight,
.hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}
.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-gray-600);
  margin-bottom: 36px;
  max-width: 560px;
}
.hero-actions,
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero split layout (v1 style) */
.hero-split .hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-visual {
  position: relative;
  height: 520px;
  background: linear-gradient(135deg, var(--color-brand-deep) 0%, var(--color-brand-mid) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual svg { width: 80%; height: auto; opacity: 0.95; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(44,95,138,0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255,107,26,0.15) 0%, transparent 50%);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hero Trust Indicators */
.hero-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--color-gray-100);
}
.hero-trust-item { text-align: left; }
.hero-trust-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-brand-deep);
  line-height: 1.1;
  margin-bottom: 4px;
}
.hero-trust-value span { color: var(--color-accent); }
.hero-trust-label {
  font-size: 13px;
  color: var(--color-gray-400);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  padding: 14px 32px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  color: var(--color-brand-mid);
  border-color: var(--color-brand-mid);
}
.btn-secondary:hover {
  background: var(--color-brand-mid);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-gray-600);
  border-color: var(--color-gray-200);
}
.btn-outline:hover {
  border-color: var(--color-brand-mid);
  color: var(--color-brand-mid);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.3);
}
.btn-outline-white:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
  border-color: transparent;
  padding: 10px 16px;
}
.btn-ghost:hover {
  background: var(--color-gray-50);
  color: var(--color-brand-mid);
}

.btn-sm { padding: 10px 22px; font-size: 14px; }
.btn-lg { padding: 18px 40px; font-size: 18px; border-radius: 8px; }

/* ===== Cards ===== */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm), var(--shadow-md);
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-sm), var(--shadow-lg);
  transform: translateY(-2px);
}
.card-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--color-accent);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 8px;
}
.card p {
  font-size: 16px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-accent { background: var(--color-accent-light); color: var(--color-brand-deep); }

/* ===== Capability Grid (v1) ===== */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

/* ===== Stats ===== */
.stats {
  padding: 80px 0;
  background: var(--color-brand-deep);
  color: var(--color-white);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item { padding: 0 16px; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-number .suffix { color: var(--color-accent); }
.stat-label {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* v1 stats row variant */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-100);
}
.stat {
  padding: 48px 24px;
  text-align: center;
  border-right: 1px solid var(--color-gray-100);
}
.stat:last-child { border-right: none; }
.stat .stat-number { color: var(--color-brand-deep); }
.stat .stat-number span { color: var(--color-accent); }
.stat .stat-label { color: var(--color-gray-400); }
.stat-detail {
  font-size: 13px;
  color: var(--color-gray-600);
  margin-top: 4px;
}

/* ===== Industry Tags (v1) ===== */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.industry-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-800);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.industry-tag:hover {
  border-color: var(--color-brand-light);
  box-shadow: var(--shadow-sm);
}
.industry-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* ===== Featured Products Grid (v1) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.product-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-gray-100);
  background: var(--color-white);
  transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-img {
  aspect-ratio: 4/3;
  background: var(--color-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-200);
  font-size: 48px;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: 20px 24px 24px; }
.product-body .badge { margin-bottom: 8px; display: inline-block; }
.product-body h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 4px;
}
.product-body p { font-size: 15px; color: var(--color-gray-600); }

/* ===== Trust Bar ===== */
.trust-bar {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-gray-100);
  overflow: hidden;
}
.trust-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-gray-600);
}
.trust-item svg {
  width: 20px;
  height: 20px;
  fill: var(--color-accent);
  flex-shrink: 0;
}
.trust-item-text { display: flex; flex-direction: column; line-height: 1.3; }
.trust-item-text span {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Features Grid (why choose us) ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: var(--shadow-sm);
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--color-accent);
}
.feature-icon svg { width: 22px; height: 22px; fill: currentColor; }
.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 15px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* ===== About Features (checklist grid) ===== */
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}
.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--color-gray-50);
  border-radius: var(--radius-sm);
}
.about-feature-item svg {
  width: 20px;
  height: 20px;
  fill: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.about-feature-item span {
  font-size: 15px;
  color: var(--color-gray-800);
  font-weight: 500;
}

/* ===== Product Categories (v2 style cards) ===== */
.product-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.product-cat-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-gray-100);
  background: var(--color-white);
  transition: box-shadow 0.3s, transform 0.3s;
  display: block;
}
.product-cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-cat-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: contain;
}
.product-cat-info {
  padding: 20px 24px 24px;
}
.product-cat-info h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 4px;
}
.product-cat-info p {
  font-size: 14px;
  color: var(--color-gray-600);
  margin-bottom: 12px;
}
.cat-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.2s;
}

/* ===== Factory Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.gallery-grid .gallery-item:first-child {
  grid-column: 1 / -1;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-gray-100);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(10,34,57,0.8));
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 120px 0;
  background: linear-gradient(to bottom, var(--color-brand-deep), #09182B);
  color: var(--color-white);
}
.cta-section h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.cta-section p {
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-brand-deep);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 12px;
}
.footer-brand span { color: var(--color-accent); }
.footer p { font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.footer h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  padding: 10px 0;
  transition: color 0.2s;
}
.footer a:hover { color: var(--color-white); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  text-align: center;
}

/* ===== Floating Inquiry Button ===== */
.float-inquiry {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,26,0.35);
  transition: all 0.3s var(--ease);
}
.float-inquiry:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,107,26,0.4);
}
.float-inquiry svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-deep);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-lg);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--color-brand-mid); }
.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== Capabilities Page ===== */
.cap-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
.cap-intro-text h2 { margin-bottom: 16px; }
.cap-intro-text p { font-size: 16px; color: var(--color-gray-600); line-height: 1.7; }
.cap-intro-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-gray-100);
}
.cap-intro-img img { width: 100%; height: 100%; object-fit: contain; }

/* Equipment Table */
.equipment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}
.equipment-table th {
  text-align: left;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gray-400);
  border-bottom: 2px solid var(--color-gray-100);
}
.equipment-table td {
  padding: 14px 20px;
  font-size: 15px;
  color: var(--color-gray-800);
  border-bottom: 1px solid var(--color-gray-100);
}
.equipment-table tr:hover td { background: var(--color-gray-50); }

/* Capability Cards */
.cap-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.cap-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow 0.3s;
}
.cap-card:hover { box-shadow: var(--shadow-lg); }
.cap-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-deep);
  margin-bottom: 8px;
}
.cap-card p { font-size: 15px; color: var(--color-gray-600); line-height: 1.6; }

/* ===== Contact Form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-800);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  color: var(--color-gray-800);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-brand-light);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }
/* v3（2026-10-11）：radio/checkbox 不参与上方 .form-group input{width:100%}。
   radio 走原生绘制，被撑宽不改变它画出来的样子，只会挤掉标签文字、
   让 label 折成 2–3 行（实测 64.19/87.28px、中英在 375 档还不一致）；
   限制回自然宽度后 label 单行约 41px，再配合标签自身 min-height 保证
   ≥44px 的触屏热区（见 content/{cn,en}/contact.html 的 quantity 标签）。 */
.form-group input[type="radio"],
.form-group input[type="checkbox"] { width: auto; flex: 0 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.table-wrap { overflow-x: auto; }

fieldset.form-group { border: none; padding: 0; margin: 0; }
fieldset.form-group legend {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 8px;
  padding: 0;
}

/* Honeypot — hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Success/Error messages */
.form-msg {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
}
.form-msg.success {
  display: block;
  background: #F0FDF4;
  color: var(--color-success);
  border: 1px solid #BBF7D0;
}
.form-msg.error {
  display: block;
  background: #FEF2F2;
  color: var(--color-error);
  border: 1px solid #FECACA;
}

/* ===== Contact Info Cards ===== */
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-100);
}
.contact-info-card svg {
  width: 24px;
  height: 24px;
  fill: var(--color-accent);
  flex-shrink: 0;
}
.contact-info-card h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-info-card p { font-size: 15px; color: var(--color-gray-600); }

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FAQ (面向搜索引擎精选摘要与 AI 摘要的问答区块) ===== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 0 24px;
  transition: box-shadow 0.3s;
}
.faq-item[open] { box-shadow: var(--shadow-md); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-brand-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 0 20px;
  font-size: 16px;
  color: var(--color-gray-600);
  line-height: 1.7;
}

/* ===== Image Reveal（恢复图片进入时的柔和淡入）=====
   渐进增强：不支持 animation-timeline 的浏览器直接显示图片，无副作用。
   两个关键取舍：
   1) 只动 opacity —— 不碰 transform，否则会覆盖 .gallery-item:hover img 的放大效果；
   2) 起始不透明度取 0.45 而非 0 —— 即使动画异常中断，也不会出现"看不见的图"。 */
@supports (animation-timeline: view()) {
  .gallery-item img,
  .product-cat-card img,
  .cap-intro-img img {
    animation: xymfImageIn linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}
@keyframes xymfImageIn {
  from { opacity: 0.45; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .product-cat-card img,
  .cap-intro-img img { animation: none; }
}

/* ===== Centered Section（2026-10-08：about 页正文章节居中，中英共用）===== */
.section-center { text-align: center; }
.section-center p { margin-left: auto; margin-right: auto; }

/* ===== Factory / Equipment gallery（2026-10-10 新增「车间设备」单页；v3 统一卡片比例）=====
   只新增变体类，不改动既有 .gallery-grid（首页三图不受影响）。
   用双类选择器提高特异性，避免被 responsive.css 里的 .gallery-grid 规则覆盖。
   v3（2026-10-10）：图片集重构后，页内各组图片按统一比例显示，网格才整齐：
     默认 3:2（车间与设备）、--portrait 3:4（检测与量具）、--single 单张跨满（公司前厅）。
   基础 .gallery-grid .gallery-item:first-child 会让每个图库首图跨行，故此处显式复位。 */
.gallery-grid.gallery-grid--factory { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid.gallery-grid--factory .gallery-item { aspect-ratio: 3 / 2; }
.gallery-grid.gallery-grid--factory .gallery-item:first-child { grid-column: auto; }
.gallery-grid.gallery-grid--factory .gallery-item img { object-fit: cover; }
.gallery-grid.gallery-grid--factory.gallery-grid--portrait .gallery-item { aspect-ratio: 3 / 4; }
.gallery-grid.gallery-grid--factory.gallery-grid--single { grid-template-columns: 1fr; }
@media (max-width: 1024px) {
  .gallery-grid.gallery-grid--factory { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gallery-grid.gallery-grid--factory { grid-template-columns: 1fr; }
}

/* ===== 车间设备页：通栏大图（2026-10-10 v4）=====
   磨床/线切割区那张实拍约 2.6:1（超宽），放进 3:2 卡片会被裁掉一大截；
   改为跨满整行显示。仅影响带 .gallery-item--wide 的那一张。 */
.gallery-grid.gallery-grid--factory .gallery-item.gallery-item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}
@media (max-width: 640px) {
  .gallery-grid.gallery-grid--factory .gallery-item.gallery-item--wide { aspect-ratio: 16 / 9; }
}

/* ===== 首页 Our Workshop：图块可点 + 正文下一步入口（2026-10-10 v9）=====
   1) 图块由 <div> 改为 <a>：沿用 .gallery-item 视觉，此处补 block（<a> 默认 inline，
      需要 block 才能吃 aspect-ratio）与键盘焦点态。
      .gallery-item:hover img 的放大效果（style.css:1036）已有，不重复定义。
   2) 首页这三张是「精选」图，改用 cover 填满 16:9 框 —— VMS 是竖图（0.87），
      contain 会在两侧留大片白边。只作用于 .gallery-grid--home，不影响其它页图库。
   3) .gallery-cta 是正文里的「下一步」文字链接：锚文本带关键词，兼顾客与搜索引擎。 */
a.gallery-item { display: block; }
a.gallery-item:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.gallery-grid--home .gallery-item img { object-fit: cover; }
.gallery-cta { text-align: center; margin: 28px 0 0; }
.gallery-cta a {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-accent);
  transition: color 0.2s;
}
.gallery-cta a:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* Contact page — QR reveal on the WeChat / WhatsApp cards.
   Desktop: hovering (or focusing) the card fades the QR in BELOW it and dims
   the rest of the page so the code stands out. Touch: tapping the card opens
   the same QR centred; tapping the backdrop or pressing Esc closes it.
   Absolutely positioned on desktop so the grid never reflows. */
.contact-info-card--qr { position: relative; }
.contact-info-qr {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 200px;
  height: 200px;
  padding: 10px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .22);
  opacity: 0;
  transform: translate(-50%, -8px) scale(.96);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity .2s ease, transform .26s cubic-bezier(.22, .8, .28, 1);
  z-index: 60;
}
.contact-info-qr img { display: block; width: 100%; height: 100%; border-radius: 6px; }
.contact-info-card--qr:focus-within .contact-info-qr,
.contact-info-card--qr.is-open .contact-info-qr {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

/* v2.1: hover 只在真正支持 hover 的精细指针上生效。触屏 tap 会留下粘滞 :hover，
   那样二维码会被 CSS 直接显示而**没有遮罩**；且居中定位的二维码正好压在落点上，
   随后合成的 click 会打在二维码上，JS 的 is-open / 遮罩 / Esc 就全部失效。
   触屏一律走 .is-open（由 contact-form.js 切换）。 */
@media (hover: hover) and (pointer: fine) {
  .contact-info-card--qr:hover .contact-info-qr {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
  }
}

/* Page dim: a full-screen veil injected by contact-form.js. The hovered card
   (and the QR inside it) is lifted above it so only everything else dims. */
.qr-dim {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 26, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 50;
}
body.is-qr-dim .qr-dim { opacity: 1; pointer-events: auto; }
body.is-qr-dim .contact-info-card--qr:hover,
body.is-qr-dim .contact-info-card--qr:focus-within,
body.is-qr-dim .contact-info-card--qr.is-open { z-index: 55; }

@media (max-width: 768px) {
  .contact-info-qr {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(74vw, 300px);
    height: min(74vw, 300px);
    padding: 12px;
    transform: translate(-50%, -46%) scale(.94);
    transform-origin: center;
  }
  .contact-info-card--qr.is-open .contact-info-qr {
    transform: translate(-50%, -50%) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .contact-info-qr, .qr-dim { transition: opacity .01ms linear; }
}
