/* ========== 企业官网 - 宇树风格 1:1 复刻 ========== */
/* 二次修改：可调整 --color-* 等变量统一换肤 */

:root {
  --color-bg: #0a0a0a;
  --color-bg-elevated: #111;
  --color-bg-card: #161616;
  --color-text: #e5e5e5;
  --color-text-muted: #888;
  --color-accent: #00c853;
  --color-border: #2a2a2a;
  --font-sans: "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-height: 56px;
  --container-max: 1280px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

a:hover {
  color: var(--color-accent);
}

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

/* ---------- 主导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
}

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

.logo {
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  padding: 8px 12px;
  color: var(--color-text-muted);
  font-size: 13px;
  border-radius: 4px;
  position: relative;
}

.nav-item:hover {
  color: var(--color-text);
}

.nav-item.has-dropdown {
  cursor: default;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-item.has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 8px 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.nav-dropdown a:hover {
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.04);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* ---------- 首屏轮播（与中屏一致按视口宽度自适应） ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2.54 / 1;
  min-height: 40vh;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  overflow: hidden;
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--color-bg-elevated);
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  /* 使用 cover：图片比例与区域一致时正好铺满不变形；见下方注释的推荐尺寸 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1a1a;
}
/* 轮播区域比例 ≈ 100vw : 70vh，16:9 屏下约 2.54:1。推荐图片尺寸：1920×756、2560×1008、1280×504 */

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
}

.hero-slide-content {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 90%;
  max-width: 600px;
}

.hero-slide-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-slide-link {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
}

.hero-slide-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

.hero-slogan {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  z-index: 2;
}

/* ---------- 特色横幅（全屏宽 2:1，可轮播） ---------- */
.feature-banner {
  width: 100%;
  padding: 48px 0;
}

.feature-banner-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.feature-banner-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  display: block;
  position: relative;
  background: var(--color-bg-card);
  aspect-ratio: 2 / 1;
}

.feature-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
}

.feature-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px;
}

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

.feature-banner-text h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
}

.feature-banner-text p {
  margin: 0 0 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.feature-banner-text .link-more {
  font-size: 14px;
  color: var(--color-accent);
}

.feature-banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.feature-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.feature-banner-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.feature-banner-dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* ---------- 产品网格 ---------- */
.products-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--color-text);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.product-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s, transform 0.2s;
}

.product-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.product-card-image {
  aspect-ratio: 1;
  background: var(--color-bg-elevated);
  background-size: cover;
  background-position: center;
}

.product-card-body {
  padding: 16px;
}

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.product-card-tag {
  font-size: 12px;
  color: var(--color-accent);
}

/* ---------- 新闻 ---------- */
.news-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 24px;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.news-header .section-title {
  margin: 0;
}

.link-more {
  color: var(--color-text-muted);
  font-size: 14px;
}

.link-more:hover {
  color: var(--color-accent);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  padding: 20px;
  background: var(--color-bg-card);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: border-color 0.2s;
}

.news-card:hover {
  border-color: var(--color-accent);
}

.news-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.news-card-date {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.news-card-summary {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ---------- 重大事件 ---------- */
.events-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 24px;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.event-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: var(--color-bg-card);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  align-items: flex-start;
}

.event-card-image {
  flex: 0 0 200px;
  aspect-ratio: 16/10;
  border-radius: 8px;
  background: var(--color-bg-elevated);
  background-size: cover;
  background-position: center;
}

.event-card-body h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.event-card-body p {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.event-card-body .link-more {
  font-size: 14px;
}

/* ---------- 合作伙伴/客户（每个单独 Logo，后台统一管理） ---------- */
.partners-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 24px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}

.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--color-bg-card);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, transform 0.2s;
}

.partner-item:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.partner-item-logo {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 2 / 1;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
}

.partners-placeholder-tip {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
  padding: 32px 24px;
  background: var(--color-bg-card);
  border-radius: 12px;
  border: 1px dashed var(--color-border);
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  margin-top: 64px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.footer-column h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-column a {
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-column a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-tagline {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.footer-copyright,
.footer-icp {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* ---------- 联系我们二维码弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.modal-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

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

.modal-qr img {
  max-width: 240px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .hero-slide-content {
    bottom: 20%;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .event-card {
    flex-direction: column;
  }
  .event-card-image {
    flex: none;
    width: 100%;
  }
}
