/* 达因智能科技 - 静态网站样式 */
/* 完全复刻 React + Tailwind CSS 版本的设计系统 */

/* ===== CSS 变量定义 ===== */
:root {
  /* 颜色系统 - 完全保留原设计 */
  --radius: 0.75rem;
  --background: 0 0% 100%;
  --foreground: 270 15% 20%;
  --card: 0 0% 100%;
  --card-foreground: 270 15% 20%;
  --popover: 0 0% 100%;
  --popover-foreground: 270 15% 20%;
  --primary: 270 70% 50%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 270 70% 65%;
  --primary-lighter: 270 70% 90%;
  --secondary: 270 15% 25%;
  --secondary-foreground: 0 0% 100%;
  --muted: 270 20% 96%;
  --muted-foreground: 270 15% 45%;
  --accent: 270 70% 97%;
  --accent-foreground: 270 70% 50%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 270 20% 90%;
  --input: 270 20% 90%;
  --ring: 270 70% 50%;
  
  /* 渐变和阴影 */
  --gradient-primary: linear-gradient(135deg, hsl(270 70% 50%), hsl(270 70% 65%));
  --gradient-subtle: linear-gradient(180deg, hsl(0 0% 100%), hsl(270 70% 98%));
  --shadow-elegant: 0 10px 30px -10px hsl(270 70% 50% / 0.25);
  --shadow-card: 0 4px 12px -2px hsl(270 15% 20% / 0.08);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 基础样式重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
}

/* ===== 工具类 ===== */
.gradient-text {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-light)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.card-hover {
  transition: var(--transition-smooth);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elegant);
}

/* ===== 容器 ===== */
.container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== 头部导航 ===== */
header {
  background-color: hsl(var(--card) / 0.95);
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

header nav {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  header nav {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  header nav {
    padding: 0 2rem;
  }
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  height: 4rem;
}

header .logo {
  display: flex;
  align-items: center;
}

header .logo img {
  height: 10rem;
  width: auto;
  object-fit: contain;
  max-width: 200px;
}

header .nav-links {
  display: none;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

@media (min-width: 768px) {
  header .nav-links {
    display: flex;
  }
}

header .nav-links a {
  text-decoration: none;
  color: hsl(var(--foreground));
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
  font-size: 1rem;
}

header .nav-links a:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

header .nav-links a.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

header .mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  header .mobile-menu-btn {
    display: none;
  }
}

header .mobile-menu {
  display: block;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  header .mobile-menu {
    display: none;
  }
}

header .mobile-menu a {
  display: block;
  text-decoration: none;
  color: hsl(var(--foreground));
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

header .mobile-menu a:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

header .mobile-menu a.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ===== 页脚 ===== */
footer {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

footer .footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

@media (min-width: 768px) {
  footer .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

footer h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

footer p {
  color: hsl(var(--secondary-foreground) / 0.8);
  line-height: 1.75;
}

footer .contact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: hsl(var(--secondary-foreground) / 0.8);
}

footer .contact-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

footer .footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--secondary-foreground) / 0.2);
  text-align: center;
  color: hsl(var(--secondary-foreground) / 0.8);
}

footer .footer-bottom a {
  color: hsl(var(--secondary-foreground) / 0.8);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer .footer-bottom a:hover {
  color: hsl(var(--primary));
}

/* ===== 卡片 ===== */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--card-foreground));
  margin-bottom: 0.5rem;
}

.card-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.9);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-lg {
  padding: 0.875rem 2.5rem;
  font-size: 1.125rem;
  height: 3.5rem;
  border-radius: 9999px;
}

/* ===== 网格布局 ===== */
.grid {
  display: grid;
  gap: 2rem;
}

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

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== 页面标题 ===== */
.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

@media (min-width: 1024px) {
  .page-title {
    font-size: 3rem;
  }
}

.page-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-bottom: 3rem;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(to bottom right, hsl(var(--accent)), hsl(var(--background)), hsl(var(--accent)));
  padding: 5rem 0;
  text-align: center;
}

@media (min-width: 1024px) {
  .hero {
    padding: 8rem 0;
  }
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.75rem;
  }
}

.hero p {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .hero p {
    font-size: 1.5rem;
  }
}

.hero .btn-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero .btn-group {
    flex-direction: row;
  }
}

/* ===== 特性区域 ===== */
.features {
  padding: 4rem 0;
  background-color: hsl(var(--background));
}

@media (min-width: 1024px) {
  .features {
    padding: 6rem 0;
  }
}

.features .section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.features .section-title h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .features .section-title h2 {
    font-size: 2.25rem;
  }
}

.features .section-title p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
}

.feature-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elegant);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background-color: hsl(var(--primary) / 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--primary));
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
}

/* ===== 产品区域 ===== */
.products {
  padding: 4rem 0;
  background-color: hsl(var(--muted) / 0.3);
}

@media (min-width: 1024px) {
  .products {
    padding: 6rem 0;
  }
}

.product-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elegant);
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: hsl(var(--muted));
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-info .model {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  margin-bottom: 1rem;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.product-spec {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.product-spec .label {
  color: hsl(var(--muted-foreground));
}

.product-spec .value {
  font-weight: 500;
}

.product-price {
  color: hsl(var(--primary));
  font-weight: 500;
}

/* ===== CTA 区域 ===== */
.cta {
  padding: 4rem 0;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  text-align: center;
}

@media (min-width: 1024px) {
  .cta {
    padding: 6rem 0;
  }
}

.cta h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .cta h2 {
    font-size: 2.25rem;
  }
}

.cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 筛选按钮 ===== */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.875rem;
}

.filter-btn:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.filter-btn.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* ===== 骨架屏 ===== */
.skeleton {
  background-color: hsl(var(--muted));
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.skeleton-card {
  height: 400px;
}

/* ===== 工具类 ===== */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }

.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.hidden { display: none; }

/* ===== 响应式工具 ===== */
@media (max-width: 767px) {
  .mobile-menu.hidden {
    display: none;
  }
}
