/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --bg-alt: #f4f4f4;
  --text: #111;
  --text-muted: #666;
  --accent: #111;
  --border: #e5e5e5;
  --radius: 12px;
  --max-w: 1100px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(250,250,250,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 22px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.logo-link:hover .logo-img {
  opacity: 0.75;
  transform: scale(0.96);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav ul a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width 0.25s ease;
}
nav ul a:hover::after,
nav ul a.active::after { width: 100%; }
nav ul a:hover { color: var(--text); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: visible;
}

/* 背景网格 — 挂在 body 上，不影响 hero overflow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 80%);
  animation: gridDrift 20s linear infinite;
}

/* 背景网格 */
.hero::before {
  display: none;
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.hero-inner {
  max-width: 860px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.7s ease 0.2s forwards;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 28px;
  min-height: 1.1em;
  opacity: 0;
  transform: translateY(16px);
  background: linear-gradient(135deg, #111 0%, #444 50%, #111 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroFadeUp 0.8s ease 0.4s forwards, shimmer 4s linear 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.tagline {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.7s ease 0.6s forwards;
}

.hero .btn {
  opacity: 0;
  transform: translateY(12px);
  animation: heroFadeUp 0.7s ease 0.8s forwards;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* 滚动提示箭头 */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: heroFadeUp 0.6s ease 1.2s forwards;
}

.scroll-hint span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--text));
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* 按钮涟漪 */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  border-radius: inherit;
}
.btn:hover::before { transform: scaleX(1); }
.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-full { width: 100%; text-align: center; }

/* ===== SECTIONS ===== */
.section {
  padding: 100px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-alt {
  max-width: 100%;
  background: var(--bg-alt);
  padding: 100px 24px;
}

.section-alt > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 48px;
  display: block;
  text-align: center;
  position: relative;
  padding-left: 0;
}

/* 有 section-desc 时标题底部间距收窄 */
.section-title + .section-desc {
  margin-top: -32px;
}

/* section-title 左侧装饰点 */
.section-title::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-muted);
  opacity: 0;
  transition: opacity 0.4s;
}
.section-title.visible::before { opacity: 1; }

/* ===== GRID ===== */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ===== CARDS ===== */
.card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

/* 卡片顶部高亮线 */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  border-color: #ccc;
  box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}

.card-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
}

.card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ===== CASE CARDS ===== */
.case-card {
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

/* 悬停时左侧彩色边框 */
.case-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s ease;
  border-radius: 0 0 0 var(--radius);
}
.case-card:hover::after { transform: scaleY(1); }
.case-card:hover {
  border-color: #ccc;
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.case-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 16px;
  transition: border-color 0.2s, color 0.2s;
}
.case-card:hover .case-tag { border-color: #999; color: var(--text); }

.case-card h3 { font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.case-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.case-card strong { color: var(--text); }

/* ===== STATS ===== */
.stats-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
  max-width: 100%;
}

.stats-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat { position: relative; }

.stat-num {
  display: block;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===== CONTACT ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

.form-status {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  min-height: 20px;
  transition: opacity 0.3s;
}

.contact-info {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info p {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}
.contact-info p:hover { color: var(--text); transform: translateX(4px); }
.contact-info a:hover { color: var(--text); }

.social-links { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.social-btn {
  font-size: 13px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.social-btn:hover {
  border-color: #999;
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== SCROLL ANIMATIONS ===== */

/* 基础淡入上移 */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
              transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

/* 交错延迟（由 JS 设置 --delay） */
.fade-in { transition-delay: var(--delay, 0ms); }

/* 从左滑入 */
.slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

/* 数字计数动效（由 JS 驱动） */
.count-up { display: inline-block; }

/* ===== CURSOR GLOW (subtle) ===== */
.cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: left 0.15s ease, top 0.15s ease;
}

/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }

.loader-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  overflow: hidden;
}

.loader-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: loaderChar 0.05s ease forwards;
}

@keyframes loaderChar {
  to { opacity: 1; transform: translateY(0); }
}

.loader-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--text);
  animation: loaderBar 0.8s ease forwards;
}

@keyframes loaderBar {
  from { width: 0; }
  to   { width: 100%; }
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.hamburger:hover { background: rgba(0,0,0,0.05); }
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
/* 打开状态：X 形 */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 0 20px; }

  /* 隐藏桌面导航，显示汉堡按钮 */
  nav ul {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: rgba(250,250,250,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    z-index: 99;
  }
  nav ul.open { display: flex; }
  nav ul li { width: 100%; }
  nav ul a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: var(--text-muted);
  }
  nav ul a::after { display: none; }
  nav ul a:hover,
  nav ul a.active { color: var(--text); background: rgba(0,0,0,0.03); }

  .hamburger { display: flex; }

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

  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }

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

  .cursor-glow { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* 减少动效（无障碍） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== B. 卡片高光层 ===== */
.card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* 卡片开启 3D 变换 — 只对 case-card 和 cs-pricing */
.case-card, .cs-pricing {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ===== C. Hero canvas 层级 ===== */
#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-inner { z-index: 1; position: relative; }
.scroll-hint { z-index: 1; }

/* ===== D. Section 扫光 ===== */
.section-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  opacity: 0;
}
.section-sweep.sweep-run {
  animation: sectionSweep 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes sectionSweep {
  0%   { transform: translateX(-100%); opacity: 1; }
  100% { transform: translateX(100%);  opacity: 0; }
}

/* ===== SECTION DESC ===== */
.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 0;
  margin-bottom: 48px;
  text-align: center;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== CUSTOMER SERVICE LAYOUT ===== */
.cs-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: stretch; /* 左右等高 */
}

.cs-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 0 40px;
  height: 100%;
}

.cs-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

/* 最后一行两个 item 去掉底线 */
.cs-item:nth-child(5),
.cs-item:nth-child(6) {
  border-bottom: none;
}

.cs-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cs-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 10px;
  transition: transform 0.3s ease, background 0.2s;
}
.cs-item:hover .cs-icon {
  transform: scale(1.1) rotate(-5deg);
  background: #ebebeb;
}

.cs-item h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.cs-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== PRICING SIDEBAR ===== */
.cs-pricing {
  position: sticky;
  top: 88px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.cs-pricing h3 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
}

.pricing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pricing-item {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.pricing-item:hover {
  border-color: #999;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pricing-item--highlight {
  border-color: var(--text);
  background: #f8f8f8;
}
.pricing-item--highlight:hover {
  border-color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.pricing-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.pricing-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== RESPONSIVE — 新模块 ===== */
@media (max-width: 900px) {
  .cs-layout { grid-template-columns: 1fr; gap: 48px; }
  .cs-pricing { position: static; }
}

@media (max-width: 600px) {
  .cs-features { grid-template-columns: 1fr; gap: 24px; }
}
