/* 南通元物道 - 科技感企业官网 */

:root {
  --bg-primary: #050a18;
  --bg-secondary: #0a1128;
  --bg-card: rgba(12, 22, 50, 0.7);
  --bg-card-hover: rgba(18, 32, 68, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(100, 160, 255, 0.15);
  --text-primary: #e8edf5;
  --text-secondary: rgba(200, 215, 245, 0.65);
  --text-muted: rgba(160, 180, 220, 0.4);
  --accent-blue: #4a9eff;
  --accent-cyan: #22d3ee;
  --accent-purple: #8b5cf6;
  --accent-red: #c41e3a;
  --accent-gold: #d4a017;
  --glow-blue: rgba(74, 158, 255, 0.4);
  --glow-cyan: rgba(34, 211, 238, 0.3);
  --gradient-main: linear-gradient(135deg, #4a9eff 0%, #22d3ee 50%, #8b5cf6 100%);
  --gradient-warm: linear-gradient(135deg, #c41e3a, #d4a017);
  --font-sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --max-width: 1100px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== 粒子背景 ===== */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== 头部 ===== */
.site-header {
  background: rgba(5, 10, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 10, 24, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 60px rgba(74, 158, 255, 0.03);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  height: 64px;
}

.site-logo {
  display: block;
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
  border-radius: 50%;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.site-logo:hover {
  filter: brightness(1.3);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
  position: relative;
}

.site-nav a:hover {
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.06);
}

.site-nav a.active {
  color: #fff;
  background: rgba(74, 158, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.25);
}

/* ===== 主内容 ===== */
.main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 20px;
  padding: 0.35rem 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 50%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0 0 3rem;
  letter-spacing: 0.1em;
}

/* 数据统计 */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding: 1.5rem 3rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  position: relative;
}

.hero-stats::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  background: var(--gradient-main);
  opacity: 0.1;
  z-index: -1;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-suffix {
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, var(--border-glow), transparent);
}

/* ===== Section 通用 ===== */
.section {
  margin: 5rem 0;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--accent-blue);
  background: rgba(74, 158, 255, 0.08);
  border: 1px solid rgba(74, 158, 255, 0.15);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== 业务卡片 ===== */
.business-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.business-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem 1.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(74, 158, 255, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.business-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 40px rgba(74, 158, 255, 0.06);
}

.business-card:hover .card-glow {
  opacity: 1;
}

.business-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 14px;
  margin-bottom: 1.25rem;
  transition: all 0.35s ease;
}

.business-card .icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.business-card:hover .icon {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
  transform: scale(1.05);
}

.business-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.business-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.card-arrow {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.3s ease;
}

.business-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-cyan);
}

/* ===== 关于我们 ===== */
.about-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  overflow: hidden;
}

.about-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.about-text {
  position: relative;
  max-width: 800px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.about-text p {
  margin: 0 0 1rem;
  text-indent: 2em;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-features {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 0 8px var(--glow-blue);
  flex-shrink: 0;
}

/* ===== 联系表单 ===== */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

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

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(74, 158, 255, 0.4);
  background: rgba(74, 158, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.08), 0 0 20px rgba(74, 158, 255, 0.05);
}

.field-error {
  min-height: 1.1em;
  font-size: 0.8rem;
  color: #f87171;
  line-height: 1.3;
}

.form-input.is-invalid {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.08);
}

.form-input.is-valid {
  border-color: rgba(34, 211, 238, 0.4);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: none;
  background: var(--gradient-main);
  color: #fff;
  padding: 0.8rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 140px;
  box-shadow: 0 4px 20px rgba(74, 158, 255, 0.25);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover {
  box-shadow: 0 6px 30px rgba(74, 158, 255, 0.35);
  transform: translateY(-2px);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.is-loading .btn-text {
  visibility: hidden;
}

.btn.is-loading .btn-loader {
  display: block;
  position: absolute;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Toast ===== */
.toast-wrap {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  padding: 0 12px;
}

.toast {
  pointer-events: auto;
  background: rgba(15, 25, 55, 0.95);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 0.9rem 0.75rem;
  min-width: 260px;
  max-width: min(480px, calc(100vw - 24px));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 40px rgba(74, 158, 255, 0.06);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-20px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-success {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 197, 94, 0.08);
}

.toast.is-success .toast-title {
  color: #4ade80;
}

.toast.is-error {
  border-color: rgba(248, 113, 113, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 30px rgba(248, 113, 113, 0.08);
}

.toast.is-error .toast-title {
  color: #f87171;
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.toast-desc {
  font-size: 0.8rem;
  margin: 0;
  color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.site-footer {
  background: rgba(3, 6, 16, 0.9);
  border-top: 1px solid var(--border-glass);
  padding: 2rem 1.5rem;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
}

.footer-left p,
.footer-right p {
  margin: 0;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  margin: 0.5rem 0 0;
}

/* ===== 滚动动画 ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.business-card:nth-child(1) { transition-delay: 0s; }
.business-card:nth-child(2) { transition-delay: 0.1s; }
.business-card:nth-child(3) { transition-delay: 0.2s; }
.business-card:nth-child(4) { transition-delay: 0.3s; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .site-header { padding: 0 1rem; }

  .header-inner { height: 56px; }

  .site-logo { height: 36px; }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 0;
  }

  .site-nav a {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
  }

  .main {
    padding: 0 1rem 3rem;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .business-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

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

  .section {
    margin: 3.5rem 0;
  }

  .about-content {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .about-features {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .business-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
    letter-spacing: 0.03em;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }

  .about-features {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}
