:root {
  --bg-primary: #020202;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --accent-primary: #e60012;
  --accent-secondary: #ff6b6b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(230, 0, 18, 0.3);
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Section spacing */
.section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(2, 2, 2, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(230, 0, 18, 0.1);
  padding: 14px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: var(--accent-primary);
  font-size: 1.5rem;
  line-height: 1;
}

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.hero-logo {
  width: 100px;
  height: auto;
  opacity: 0;
  margin-bottom: 32px;
  filter: drop-shadow(0 0 30px rgba(230, 0, 18, 0.4));
  display: block;
  margin-left: auto;
  margin-right: auto;
  animation: logo-fade-in 1.2s ease-out 0.3s forwards;
}

@keyframes logo-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

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

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 2, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 600;
  transition: color 0.3s;
}

.mobile-nav-link:hover {
  color: var(--accent-primary);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 0 40px rgba(230, 0, 18, 0.2);
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 0 20px rgba(230, 0, 18, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(230, 0, 18, 0.4), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(230, 0, 18, 0.15);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s infinite;
}

.arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.arrow span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
  transform: rotate(45deg);
  opacity: 0;
  animation: arrow-down 2s infinite;
}

.arrow span:nth-child(2) { animation-delay: 0.2s; }
.arrow span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes arrow-down {
  0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Services */
.services {
  background: #060608;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* 6 卡页（fakao/qipei）用 3 列两行均分，避免 4 列下 4+2 断行 */
.services-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 6 卡页专属：卡片滚入时背景顺序点亮
   初始背景透明（仅边框可见，"没亮"），reveal-active 后背景浮现 +
   ::after 红色光层渐现 + ::before 顶部红线点亮，按 data-delay 依次触发 */
.services-grid.cols-3 .service-card {
  background: transparent;
}

.services-grid.cols-3 .service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 0%, rgba(230, 0, 18, 0.15), transparent 75%);
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.services-grid.cols-3 .service-card.reveal-active {
  background: var(--bg-surface);
}

.services-grid.cols-3 .service-card.reveal-active::after {
  opacity: 1;
}

.services-grid.cols-3 .service-card.reveal-active::before {
  opacity: 1;
}

.service-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: rgba(230, 0, 18, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(230, 0, 18, 0.08);
}

.service-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-primary);
  margin-bottom: 24px;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

/* 图标描边绘制：滚入视口时四张卡片依次"画"出图标 */
.card-icon svg > * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.service-card.drawn .card-icon svg > * {
  animation: icon-draw 0.8s ease-out forwards;
}

.service-card.drawn .card-icon svg > *:nth-child(2) { animation-delay: 0.08s; }
.service-card.drawn .card-icon svg > *:nth-child(3) { animation-delay: 0.16s; }
.service-card.drawn .card-icon svg > *:nth-child(4) { animation-delay: 0.24s; }

@keyframes icon-draw {
  to { stroke-dashoffset: 0; }
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Process */
.process-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 24px;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.process-item {
  flex: 1;
  text-align: center;
  position: relative;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.process-item.lit {
  opacity: 1;
}

.process-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-weight: 700;
  color: var(--accent-primary);
  position: relative;
  z-index: 1;
  transition: var(--transition);
  font-size: 0.875rem;
}

.process-item:hover .process-node {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(230, 0, 18, 0.3);
}

/* 节点描边点亮（滚入视口时 01→04 依次触发） */
@property --ring {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.process-node::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) var(--ring), transparent var(--ring));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  pointer-events: none;
}

.process-item.lit .process-node {
  box-shadow: 0 0 18px rgba(230, 0, 18, 0.35);
}

.process-item.lit .process-node::before {
  animation: ring-draw 0.6s ease-out forwards;
}

@keyframes ring-draw {
  to { --ring: 360deg; }
}

/* 连接线流光：点亮后光点沿时间线循环流动 */
.process-timeline::after {
  content: '';
  position: absolute;
  top: 26px;
  left: 0;
  width: 15%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.9), rgba(230, 0, 18, 1));
  filter: drop-shadow(0 0 6px rgba(230, 0, 18, 0.8));
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.process-timeline.lit::after {
  opacity: 1;
  animation: flow-move 2.6s linear infinite;
}

@keyframes flow-move {
  from { transform: translateX(-100%); }
  to { transform: translateX(667%); }
}

.process-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.process-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Stats */
.stats {
  background: radial-gradient(ellipse at center, rgba(230, 0, 18, 0.03) 0%, transparent 70%);
  padding: 24px 0 56px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-number {
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: inline-block;
}

.stat-suffix {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--accent-primary);
  display: inline-block;
  margin-left: 4px;
}

.stat-label {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Contact */
.contact {
  background: #060608;
}

/* 分步点亮：左栏标题→联系方式，右栏表单字段→提交按钮 */
.contact-info-title,
.contact-info-desc,
.contact-detail,
.contact-form .form-group,
.contact-form .btn {
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* 入场隐藏仅在 JS 可用时生效；否则直接可见（无障碍兜底） */
@media (scripting: enabled) {
  .contact-info-title,
  .contact-info-desc,
  .contact-detail,
  .contact-form .form-group,
  .contact-form .btn {
    opacity: 0;
    transform: translateY(16px);
  }

  .contact-detail {
    transform: translateX(-16px);
  }

  .contact-container .lit {
    opacity: 1;
    transform: none;
  }
}

/* 提交按钮呼吸光：点亮后缓慢脉动，引导点击 */
.contact-form .btn.breath {
  animation: cta-breath 2.4s ease-in-out infinite;
}

.contact-form .btn.breath:hover {
  animation: none;
  box-shadow: 0 0 30px rgba(230, 0, 18, 0.4), 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes cta-breath {
  0%, 100% { box-shadow: 0 0 16px rgba(230, 0, 18, 0.25); }
  50% { box-shadow: 0 0 34px rgba(230, 0, 18, 0.55); }
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info-desc {
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
}

.contact-detail a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-detail a:hover {
  color: var(--accent-primary);
}

.detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(230, 0, 18, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-feedback {
  margin-top: 8px;
  font-size: 0.875rem;
  min-height: 20px;
}

.form-feedback.success {
  color: #4ade80;
}

.form-feedback.error {
  color: #f87171;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.footer-brand-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
}

.footer-address {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 16px;
  line-height: 1.7;
  max-width: 420px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.footer-address a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.footer-address a:hover {
  color: var(--text-primary);
}

.footer-links-group {
  display: flex;
  gap: 48px;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col h4 {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.footer-links-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8125rem;
}

.beian-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.beian-links a {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* Reveal Animation */
.reveal {
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 入场隐藏仅在 JS 可用时生效；无 JS / 爬虫 / 不支持 scripting 媒体查询的旧浏览器
   一律直接可见，避免内容永久卡在 opacity:0 */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
  }
  .reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1023px) {
  .services-grid,
  .services-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 767px) {
  .section {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .services-grid,
  .services-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .process-timeline {
    flex-direction: column;
    gap: 40px;
  }

  .process-timeline::before {
    display: none;
  }

  .process-timeline::after {
    display: none;
  }

  .process-item {
    text-align: left;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }

  .process-node {
    margin: 0;
    flex-shrink: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-links-group {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-logo {
    width: 72px;
    margin-bottom: 24px;
  }

  .hero-title br {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .contact-container {
    gap: 48px;
  }

  .process-timeline {
    gap: 16px;
  }

  .services-grid {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   首页产品中心板块（双区布局：软件双星 + 明星产品跨行区 + 4 HOT 小卡）
   ============================================================ */
.home-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto repeat(2, minmax(230px, 1fr));
  gap: 20px;
}

.hp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}

.hp-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-glow);
}

/* 软件双星：占 2 列、单行 */
.hp-star {
  grid-column: span 2;
}

/* 明星产品（外贸拓客系统）：占 2 列、跨 2 行 */
.hp-star-hw {
  grid-row: span 2;
}

.hp-star::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hp-img {
  flex: none;
  height: 200px;
  background: radial-gradient(ellipse at 50% 60%, #161616 0%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 软件双星图区加高；跨行明星卡图区拉伸填满两行 */
.hp-star .hp-img {
  height: 320px;
}

.hp-star-hw .hp-img {
  flex: 1;
  height: auto;
  min-height: 320px;
}

.hp-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hp-star .hp-img img {
  padding: 32px;
}

.hp-card:hover .hp-img img {
  transform: scale(1.05);
}

.hp-body {
  padding: 18px 20px 20px;
}

.hp-star .hp-body {
  padding: 24px 28px 28px;
}

.hp-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 4px;
  letter-spacing: -0.01em;
}

.hp-star .hp-body h3 {
  font-size: 1.4rem;
}

.hp-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hp-star .hp-body p {
  font-size: 0.95rem;
}

.hp-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e8c96a;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  padding: 3px 10px;
}

.hp-badge.hp-hot {
  color: #fff;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.hp-more {
  text-align: center;
  margin-top: 40px;
}

@media (max-width: 1024px) {
  .home-products-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
  }

  .hp-star {
    grid-column: span 2;
  }

  .hp-star-hw {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .home-products-grid {
    grid-template-columns: 1fr;
  }

  .hp-star {
    grid-column: span 1;
  }

  .hp-img {
    min-height: 180px;
  }
}
