/* =========================================================
   共享样式表 style.css
   首页(index) / 项目案例(case) / 关于我们(about) 共用
   - 三页一致的部分：reset / 变量 / 导航 / logo / footer / 移动菜单 / 动画
   - 页面专属通过 body.home / body.case / body.about
     以及独立选择器区分（.hero 仅首页 / .timeline 仅项目 / .about-qr 仅关于）
   ========================================================= */

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

:root {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1a1d29;
  --text-dim: #6b7180;
  --text-faint: #9ca0ac;
  --accent: #4f6ef7;
  --grad: linear-gradient(135deg, #4f6ef7 0%, #7c5cff 50%, #ff4d8d 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
/* body 布局按页面区分：首页整屏锁定，项目/关于可滚动 */
body.home {
  height: 100vh;
  overflow: hidden;
}
body.case,
body.about {
  min-height: 100vh;
}

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

/* ===== Nav (三页一致) ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 1);
  border-bottom: none;
  box-shadow: none;
}
nav.scrolled {
  height: 100px;
}
nav {
  transition: transform 0.35s cubic-bezier(0.28, 0.11, 0.32, 1);
}
nav.hide {
  transform: translateY(-100%);
}
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.logo:active,
.logo:focus,
.logo:focus-visible {
  outline: none;
}
.logo-mark {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #07080d;
  font-weight: 900;
}
.logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
}
.nav-links a {
  color: #000000;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  border-radius: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease;
}
.nav-links a:hover {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-right {
  display: contents;
}
.mobile-toggle {
  display: none;
}

/* ===== Footer (三页一致) ===== */
footer {
  text-align: center;
  padding: 14px 48px;
  border: none;
  background: none;
  color: var(--text-faint);
  font-size: 13px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
footer .grad {
  font-weight: 700;
}

/* ===== 渐变文字工具类 (首页 hero 用) ===== */
.grad,
.hero-title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-flow,
.hero-title .grad-flow {
  background: var(--grad);
  background-size: 150% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title .grad-flow {
  animation: gradientFlow 3s ease-in-out infinite;
}

/* ===== 项目案例 / 关于我们 共用页面容器 ===== */
.page {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 104px 24px 140px;
  flex: 1 0 auto;
}
.page-header {
  text-align: center;
  padding: 120px 0 210px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s 0.05s forwards;
}
.page-title {
  font-size: 64px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 40px;
  line-height: 1.15;
}
.page-subtitle {
  font-size: 25px;
  font-weight: 600;
  color: #3a3a3a;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===== 首页专属 (hero / stats / 光晕) ===== */
.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 48px 20px;
  text-align: center;
}
.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}
.stats {
  display: flex;
  gap: 80px;
  margin-bottom: 0;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
.stat {
  text-align: center;
}
.stat-num {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 10px;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}
.bg-glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  pointer-events: none;
}
.bg-glow.g1 {
  top: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: #4f6ef7;
}
.bg-glow.g2 {
  bottom: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: #7c5cff;
  opacity: 0.06;
}

/* ===== 项目案例专属 (时间轴) ===== */
.timeline {
  padding: 8px 0 24px;
}
.timeline-list {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  border-top: 1px solid var(--border);
  padding: 80px 0;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s forwards;
}
.timeline-content {
  padding: 0 0 8px;
}
.timeline-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.35;
}
.timeline-desc {
  font-size: 14.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.7;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.timeline-tags span {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ===== 关于我们专属 (二维码) ===== */
.about-qr {
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s 0.18s forwards;
}
.about-qr .qr-box {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  border-radius: 18px;
  overflow: hidden;
}
.about-qr .qr-box img {
  width: 100%;
  height: 100%;
  display: block;
}
.about-qr .qr-tip {
  font-size: 14px;
  color: var(--text-dim);
}

/* ===== Keyframes ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes gradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ===== Responsive (max-width: 768px) ===== */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 20px;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: #ffffff;
    padding: 60px 50px 50px;
    gap: 16px;
    z-index: 98;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.5s cubic-bezier(0.28, 0.11, 0.32, 1),
      opacity 0.4s cubic-bezier(0.28, 0.11, 0.32, 1),
      visibility 0s 0.5s;
  }
  .nav-links a {
    font-size: 30px;
    padding: 6px 0;
    opacity: 0;
    transform: translateY(-12px);
    transition:
      opacity 0.5s cubic-bezier(0.28, 0.11, 0.32, 1),
      transform 0.5s cubic-bezier(0.28, 0.11, 0.32, 1);
  }
  /* 移动端抽屉菜单无 hover：隐藏下划线，菜单项统一黑色（覆盖桌面渐变 hover） */
  .nav-links a::after {
    display: none;
  }
  .nav-links a:hover {
    color: #000000;
    background: none;
    -webkit-text-fill-color: currentColor;
    background-clip: border-box;
  }
  .nav-links.mobile-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition:
      transform 0.5s cubic-bezier(0.28, 0.11, 0.32, 1),
      opacity 0.4s 0.1s cubic-bezier(0.28, 0.11, 0.32, 1),
      visibility 0s 0s;
  }
  .nav-links.mobile-open a {
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links.mobile-open a:nth-child(1) {
    transition-delay: 0.15s;
  }
  .nav-links.mobile-open a:nth-child(2) {
    transition-delay: 0.22s;
  }
  .nav-links.mobile-open a:nth-child(3) {
    transition-delay: 0.29s;
  }
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    z-index: 101;
    position: relative;
  }
  .mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition:
      transform 0.35s cubic-bezier(0.28, 0.11, 0.32, 1),
      opacity 0.2s ease;
  }
  .mobile-toggle.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }
  .mobile-toggle.active span:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* 首页 */
  .hero {
    padding: 52px 24px 20px;
  }
  .stats {
    gap: 40px;
  }

  /* 项目案例 */
  .page {
    padding: 88px 24px 100px;
  }
  .page-header {
    padding: 80px 0 120px;
  }
  .page-title {
    font-size: 32px;
    margin-bottom: 20px;
  }
  .page-subtitle {
    font-size: 18px;
  }
  .timeline-item {
    padding: 60px 0;
  }
  .timeline-title {
    font-size: 17px;
  }
  .timeline-desc {
    font-size: 14px;
  }

  /* 关于我们 */
  .about-qr .qr-box {
    width: 120px;
    height: 120px;
  }

  footer {
    padding: 14px 24px;
  }
}
