:root {
  --green: #2f9a37;
  --green-dark: #145a32;
  --green-soft: #e8f5e8;
  --blue: #164b8f;
  --tech-cyan: #6ee48e;
  --tech-blue: #4dc4ff;
  --tech-deep: #06121a;
  --ink: #17212b;
  --muted: #5d6875;
  --line: #dce7df;
  --surface: #ffffff;
  --soft: #f7faf8;
  --shadow: 0 18px 48px rgba(20, 90, 50, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
}

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

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

/* ---------- Header & Language Switcher ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 0;
  min-width: 210px;
}

.brand-mark {
  color: var(--blue);
  font-size: 24px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2b3a48;
  font-size: 14px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 6px;
}

.nav a:hover {
  background: var(--green-soft);
  color: var(--green-dark);
}

.nav-cta {
  color: #fff !important;
  background: var(--green);
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 7px 12px;
  border: 1px solid var(--green);
  border-radius: 20px;
  background: #fff;
  color: var(--green-dark);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  user-select: none;
}

.lang-switch:hover {
  background: var(--green-soft);
  box-shadow: 0 4px 14px rgba(47, 154, 55, 0.22);
  transform: translateY(-1px);
}

.lang-switch .lang-divider {
  color: rgba(47, 154, 55, 0.5);
  font-weight: 400;
}

.lang-switch .lang-zh,
.lang-switch .lang-en {
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.45;
}

/* Active language highlight (toggled by JS via [data-lang]) */
html[lang="zh-CN"] .lang-switch .lang-zh {
  opacity: 1;
  color: var(--green);
}
html[lang="en"] .lang-switch .lang-en {
  opacity: 1;
  color: var(--green);
}

/* ---------- Hero / Tech Banner ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: var(--tech-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(100deg, rgba(6, 18, 26, 0.93), rgba(6, 18, 26, 0.62) 45%, rgba(6, 18, 26, 0.35)),
    url("assets/cover.jpg") center / cover no-repeat;
  transform: scale(1.02);
}

/* Animated tech grid */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(110, 228, 142, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 228, 142, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 20% 80%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 20% 80%, #000 30%, transparent 75%);
  animation: gridPan 24s linear infinite;
}

@keyframes gridPan {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

/* Glowing orbs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
}

.hero-glow-1 {
  width: 460px;
  height: 460px;
  left: -120px;
  top: 10%;
  background: radial-gradient(circle, rgba(47, 154, 55, 0.55), transparent 70%);
  animation: floatA 12s ease-in-out infinite;
}

.hero-glow-2 {
  width: 380px;
  height: 380px;
  right: -80px;
  top: 30%;
  background: radial-gradient(circle, rgba(77, 196, 255, 0.45), transparent 70%);
  animation: floatB 15s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.12); }
}

/* Scanning line */
.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(110, 228, 142, 0.9), transparent);
  box-shadow: 0 0 18px rgba(110, 228, 142, 0.7);
  animation: scanMove 7s ease-in-out infinite;
}

@keyframes scanMove {
  0% { top: 8%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

/* Circuit SVG decoration */
.hero-circuit {
  position: absolute;
  right: clamp(0px, 4vw, 60px);
  top: 14%;
  width: min(420px, 38vw);
  z-index: -1;
  opacity: 0.55;
}
.hero-circuit svg {
  width: 100%;
  height: auto;
}

/* Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-particles .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(110, 228, 142, 0.9);
  box-shadow: 0 0 8px rgba(110, 228, 142, 0.8);
  animation: particleDrift linear infinite;
}

@keyframes particleDrift {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-120px) translateX(20px); opacity: 0; }
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22vh;
  z-index: -1;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0));
}

.hero-content {
  width: min(780px, calc(100% - 40px));
  margin: 0 clamp(20px, 7vw, 96px) clamp(72px, 12vh, 132px);
  color: #fff;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--tech-cyan);
  text-shadow: 0 0 16px rgba(110, 228, 142, 0.6);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  text-shadow: 0 0 30px rgba(110, 228, 142, 0.35), 0 4px 24px rgba(0, 0, 0, 0.5);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-actions,
.service-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 28px rgba(47, 154, 55, 0.24);
}

.hero .button.primary {
  box-shadow: 0 10px 30px rgba(47, 154, 55, 0.45), 0 0 22px rgba(110, 228, 142, 0.4);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  right: clamp(20px, 6vw, 80px);
  bottom: 28px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-scroll-hint .scroll-arrow {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(110, 228, 142, 0.9), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Stats band ---------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-band div {
  display: grid;
  gap: 4px;
  padding: 28px clamp(18px, 4vw, 42px);
  background: #f0f7f1;
}

.stats-band strong {
  color: var(--green);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.stats-band span {
  color: var(--green-dark);
  font-weight: 700;
}

/* ---------- Sections ---------- */
.section,
.inquiry-section {
  padding: clamp(64px, 9vw, 116px) clamp(20px, 6vw, 86px);
}

.section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
}

.section-heading {
  grid-column: 1 / -1;
  max-width: 760px;
}

.section-copy {
  max-width: 620px;
}

.section-copy p {
  color: var(--muted);
}

.image-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--soft);
}

.products,
.applications {
  grid-template-columns: 1fr;
  background: var(--soft);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(47, 154, 55, 0.16);
}

.product-card h3 {
  color: var(--blue);
}

.product-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.wide-reference {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.tech {
  background: #fff;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: var(--soft);
  font-weight: 700;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.application-grid span,
.service-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 154, 55, 0.22);
  border-radius: 6px;
  color: var(--green-dark);
  background: #fff;
  font-weight: 700;
  text-align: center;
}

.service {
  background: #fff;
}

.case-stack {
  display: grid;
  gap: 16px;
}

.case-stack img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.inquiry-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background:
    linear-gradient(90deg, rgba(247, 250, 248, 0.96), rgba(247, 250, 248, 0.82)),
    url("assets/contact.jpg") center / cover no-repeat;
}

.inquiry-copy p,
.inquiry-copy address {
  max-width: 560px;
  color: var(--muted);
}

.inquiry-copy address {
  font-style: normal;
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.inquiry-form label {
  display: grid;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 800;
}

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 12px;
  border: 1px solid #cddbd1;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.inquiry-form textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 700;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
  padding: 28px 20px;
  color: rgba(255, 255, 255, 0.86);
  background: #10261a;
}

.footer span {
  color: #fff;
  font-weight: 800;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .section,
  .inquiry-section {
    grid-template-columns: 1fr;
  }

  .stats-band,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .application-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-circuit {
    display: none;
  }

  .hero-scroll-hint {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    padding: 14px 16px;
  }

  .brand-sub {
    white-space: normal;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 16px 68px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .stats-band,
  .product-grid,
  .application-grid,
  .inquiry-form {
    grid-template-columns: 1fr;
  }

  .section,
  .inquiry-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .inquiry-form {
    padding: 18px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-grid,
  .hero-glow-1,
  .hero-glow-2,
  .hero-scanline,
  .hero-particles .particle,
  .hero-scroll-hint .scroll-arrow {
    animation: none;
  }
}
