:root {
  --bg: #f6f8fb;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --panel-border: #e2e8f0;
  --text-primary: #1e2a3b;
  --text-secondary: #4f5b6b;
  --text-muted: #8a94a6;
  --brand-primary: #1d4ed8;
  --brand-primary-light: #3b6df0;
  --brand-accent: #ea580c;
  --tag-domestic-bg: rgba(234, 88, 12, 0.1);
  --tag-domestic-text: #c2410c;
  --tag-import-bg: rgba(29, 78, 216, 0.08);
  --tag-import-text: #1d4ed8;
  --radius: 14px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 { line-height: 1.3; margin: 0 0 16px; color: var(--text-primary); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 14px; color: var(--text-secondary); }

.eyebrow {
  color: var(--brand-primary);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.section-heading { text-align: center; margin-bottom: 40px; }
.section-desc { max-width: 640px; margin: 0 auto; }
.section-footnote {
  max-width: 780px;
  margin: 32px auto 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--panel-border);
  padding-top: 20px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand-accent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(234, 88, 12, 0.32); }
.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-block { width: 100%; margin-top: 10px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.brand-mark {
  display: block;
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.brand-text em { color: var(--text-muted); font-style: normal; font-weight: 400; margin-left: 4px; font-size: 0.85rem; }

.main-nav { display: flex; gap: 26px; flex: 1; justify-content: center; }
.main-nav a { color: var(--text-secondary); font-size: 0.95rem; }
.main-nav a:hover { color: var(--brand-primary); }

.nav-cta {
  background: var(--brand-accent);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
  font-weight: 600;
}
.nav-cta:hover { opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--panel-border);
  background: var(--bg-alt);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 24px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--text-secondary);
}

/* Hero */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; background: linear-gradient(180deg, #eef3fc 0%, var(--bg) 100%); }
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}
.hero-bg-pattern path { fill: none; stroke: var(--brand-primary); stroke-width: 1.2; opacity: 0.25; }
.hero-bg-pattern circle { fill: var(--brand-accent); opacity: 0.35; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero-copy { max-width: 620px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.hero-desc { font-size: 1.02rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 44px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 32px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--brand-primary); }
.stat-label { color: var(--text-muted); font-size: 0.85rem; }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.chip-illustration { width: 100%; max-width: 340px; }
.chip-body { fill: #ffffff; stroke: var(--brand-primary); stroke-width: 3; }
.chip-pins { fill: var(--brand-primary); }
.chip-traces path { fill: none; stroke: var(--brand-accent); stroke-width: 2.5; stroke-linecap: round; opacity: 0.75; }
.chip-traces circle { fill: var(--brand-accent); }
.chip-label { font-size: 22px; font-weight: 800; fill: var(--brand-primary); font-family: inherit; }

/* About */
.about { padding: 72px 0; background: var(--bg-alt); }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.pillar-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.pillar-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  color: var(--brand-primary);
}
.pillar-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pillar-index {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-accent);
  margin-bottom: 10px;
}
.pillar-card p { font-size: 0.92rem; margin: 0; }

.about-banner {
  width: 100%;
  height: 120px;
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(120deg, #eef3fc, var(--bg));
  border: 1px solid var(--panel-border);
}
.about-banner svg { width: 100%; height: 100%; display: block; }

.about-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
}
.service-icon { width: 28px; height: 28px; margin-bottom: 10px; color: var(--brand-accent); }
.service-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 8px; font-size: 1rem; }
.service-card p { font-size: 0.88rem; margin: 0; }

/* Brand filter */
.brand-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.filter-btn.is-active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* Brand marquee */
.brands { padding: 64px 0 72px; }
.marquee-block { margin-bottom: 32px; transition: opacity 0.2s ease, max-height 0.2s ease; }
.marquee-block.is-hidden { display: none; }
.marquee-label {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  max-width: var(--max-width); margin: 0 auto 16px; padding: 0 24px;
}
.tag {
  padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
}
.tag-domestic { background: var(--tag-domestic-bg); color: var(--tag-domestic-text); }
.tag-import { background: var(--tag-import-bg); color: var(--tag-import-text); }
.marquee-sub { color: var(--text-muted); font-size: 0.85rem; }

.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 4px 0;
}
.marquee[data-direction="left"] .marquee-track { animation: scrollLeft 48s linear infinite; }
.marquee[data-direction="right"] .marquee-track { animation: scrollRight 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes scrollLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes scrollRight {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.brand-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(30, 42, 59, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.brand-chip:hover { border-color: var(--brand-primary); transform: translateY(-3px); }
.brand-chip .chip-logo-wrap {
  flex: 0 0 96px;
  width: 96px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}
.brand-chip .chip-logo {
  display: block;
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}
.brand-chip .chip-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-chip .chip-name { font-weight: 700; font-size: 0.98rem; }
.brand-chip .chip-desc { color: var(--text-muted); font-size: 0.78rem; }

/* Spotlight */
.spotlight { padding: 72px 0; background: var(--bg-alt); }
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.spotlight-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
}
.spot-tag { position: absolute; top: 20px; right: 20px; }
.spot-logo-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 18px;
}
.spot-logo { max-height: 100%; max-width: 150px; object-fit: contain; }
/* onsemi 官方素材是白色描边设计,原本用于深色底,这里反相处理让它在白底容器上可见 */
.spot-logo[src$="onsemi.svg"],
.chip-logo[src$="onsemi.svg"] { filter: invert(1); }
.spot-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--brand-primary);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.spot-name-block { text-align: center; margin-bottom: 12px; }
.spotlight-card h3 { margin: 0; font-size: 1.05rem; }
.spotlight-card .spot-en { color: var(--text-muted); font-size: 0.78rem; display: block; margin-top: 2px; }
.spotlight-card .spot-position { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.spotlight-card .spot-product { font-size: 0.88rem; margin: 0; }

/* Applications */
.applications { padding: 72px 0; }
.application-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.app-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.card-media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 20px 24px 24px; }
.app-card h3 { margin-bottom: 8px; }
.app-card p { font-size: 0.9rem; margin: 0; }

/* Dual chain */
.dual-chain { padding: 72px 0; background: var(--bg-alt); }
.dual-chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.chain-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius);
  padding: 24px;
}
.chain-card p { font-size: 0.9rem; margin: 0; }

/* Categories */
.categories { padding: 72px 0; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.cat-card h3 { margin-bottom: 8px; }
.cat-card p { font-size: 0.9rem; margin: 0; }

/* Process */
.process { padding: 72px 0; background: var(--bg-alt); }
.process-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
.process-step {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.process-step .card-media { aspect-ratio: 4 / 3; }
.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  flex: 0 0 auto;
  margin-bottom: 10px;
}
.process-step p { font-size: 0.85rem; margin: 0; }

/* Advantages */
.advantages { padding: 72px 0; }
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.adv-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.adv-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 10px;
  opacity: 0.8;
}
.adv-card p { font-size: 0.9rem; margin: 0; }

.outcome-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
}
.outcome-item h4 { margin: 0 0 8px; font-size: 1rem; color: var(--brand-accent); }
.outcome-item p { font-size: 0.85rem; margin: 0; }

/* Vision */
.vision { padding: 72px 0; background: var(--bg-alt); }
.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.vision-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}
.vision-card .card-media { aspect-ratio: 16 / 9; }
.vision-card p { font-size: 0.9rem; margin: 0; }

/* Contact */
.contact { padding: 72px 0 96px; }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--panel-border); padding-bottom: 12px; flex-wrap: wrap; }
.contact-label { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }
.contact-value { font-weight: 600; text-align: right; }
.contact-value a:hover { color: var(--brand-primary); }
.contact-wechat-row { align-items: center; padding: 8px 0 20px; }
.contact-wechat { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.wechat-qr { width: 120px; height: 120px; object-fit: contain; border: 1px solid var(--panel-border); border-radius: 8px; background: #ffffff; flex: 0 0 auto; }
.wechat-caption { font-weight: 400; font-size: 0.82rem; color: var(--text-muted); }

.contact-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-tagline { font-size: 0.85rem; color: var(--text-muted); }

/* Footer */
.site-footer { padding: 32px 0; border-top: 1px solid var(--panel-border); background: var(--bg-alt); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; flex: 0 0 auto; }
.footer-copy { flex: 1; text-align: center; color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .application-grid,
  .category-grid,
  .process-track {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .main-nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 260px; margin: 0 auto; }
  .pillar-grid { grid-template-columns: 1fr; }
  .about-services { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, auto); row-gap: 20px; }
  .contact-list li { flex-direction: column; }
  .contact-value { text-align: left; }
  .contact-wechat { align-items: flex-start; }
  .footer-copy { text-align: left; }
  .spotlight-grid,
  .dual-chain-grid,
  .vision-grid,
  .outcome-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-banner { height: 90px; }
}

@media (max-width: 560px) {
  .application-grid,
  .category-grid,
  .process-track {
    grid-template-columns: 1fr;
  }
  .spotlight-grid,
  .dual-chain-grid,
  .vision-grid,
  .outcome-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .about-services { grid-template-columns: 1fr; }
  .header-inner { height: 64px; }
  .hero { padding: 48px 0 40px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { grid-template-columns: repeat(2, auto); gap: 20px; }
  .about, .brands, .spotlight, .applications, .dual-chain, .categories, .process, .advantages, .vision, .contact {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .section-heading { margin-bottom: 28px; }
  .pillar-card, .service-card, .spotlight-card, .chain-card, .adv-card { padding: 20px 18px; }
  .app-card .card-body, .cat-card .card-body, .process-step .card-body, .vision-card .card-body { padding: 16px 18px 18px; }
  .contact-card { padding: 24px 20px; }
  .about-banner { height: 70px; }
  .brand-chip { min-width: 220px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .marquee { overflow-x: auto; }
}
