:root {
  --primary: #0a1628;
  --primary-light: #132244;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --text: #e4e8f1;
  --text-muted: #8a95a8;
  --bg-card: rgba(19, 34, 68, 0.6);
  --border: rgba(0, 212, 255, 0.12);
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #1a2d5a 50%, #0d1f3c 100%);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

[data-lang="en"] { display: none; }
body.en [data-lang="zh"] { display: none; }
body.en [data-lang="en"] { display: block; }
body.en span[data-lang="en"],
body.en a[data-lang="en"],
body.en label[data-lang="en"] {
  display: inline;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
}
.logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.lang-toggle {
  background: var(--accent-glow);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.lang-toggle:hover {
  background: rgba(0, 212, 255, 0.25);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  background: url('../images/hero-circuit.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.6) 0%, rgba(10,22,40,0.95) 100%);
  z-index: 1;
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 32px;
}
.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent), #0099cc);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35);
}

/* --- Sections --- */
section {
  padding: 100px 24px;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* --- About --- */
#about {
  background: var(--primary-light);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.about-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.about-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(10,22,40,0.9));
}
.about-image-stat {
  text-align: center;
}
.about-image-stat .number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}
.about-image-stat .label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Products --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.12);
}
.product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-content {
  padding: 24px;
  flex: 1;
}
.product-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.product-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.specs {
  list-style: none;
}
.specs li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}
.specs li:last-child { border: none; }
.specs li span:first-child { color: var(--text); font-weight: 500; }

/* --- Gallery --- */
.gallery {
  padding: 100px 24px;
  background: var(--primary);
}
.gallery-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(10,22,40,0.85));
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* --- Advantages --- */
#advantages {
  background: var(--primary-light);
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}
.adv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s;
}
.adv-card:hover {
  transform: translateY(-4px);
}
.adv-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}
.adv-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.adv-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.contact-info-item h4 {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.contact-info-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* --- Footer --- */
footer {
  background: var(--primary-light);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 260px;
    height: calc(100vh - 64px);
    background: rgba(10, 22, 40, 0.98);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    transition: right 0.3s;
  }
  .nav-links.open { right: 0; }
  .hamburger { display: flex; }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .about-image { order: -1; }
  .about-image img { height: 280px; }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
