/* ============================================
   云南科漫科技 — 公共样式
   Design System: Light Cool Gray + Deep Navy
   ============================================ */

:root {
  /* Surfaces */
  --bg-base: #f4f6fa;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-muted: #e8edf4;
  --bg-deep: #1a2433;
  --bg-tint: #eef2f8;

  /* Primary — corporate blue */
  --primary: #2563eb;
  --primary-bright: #3b82f6;
  --primary-dim: #1d4ed8;
  --primary-soft: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.08);

  /* Accent — sky blue */
  --accent: #38bdf8;
  --accent-dim: #0284c7;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-on-dark: #f1f5f9;
  --text-on-primary: #ffffff;

  /* Borders */
  --border: #e2e8f0;
  --border-bright: #cbd5e1;
  --border-deep: #1e293b;

  /* Decoration */
  --decor-warm: #fb923c;
  --decor-yellow: #facc15;
  --decor-green: #10b981;

  /* Fonts */
  --font-display: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', monospace;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--primary); color: white; }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

/* ========== Layout ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.section { padding: var(--space-2xl) 0; }
.section-sm { padding: var(--space-xl) 0; }
.section-lg { padding: 140px 0; }
.section-muted { background: var(--bg-muted); }
.section-tint { background: var(--bg-tint); }
.section-dark {
  background: var(--bg-deep);
  color: var(--text-on-dark);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-on-dark);
}

/* ========== Typography Helpers ========== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--primary);
}
.section-dark .eyebrow { color: var(--accent); }
.section-dark .eyebrow::before { background: var(--accent); }

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}
.section-dark .section-subtitle { color: #94a3b8; }

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dim);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-bright);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-on-dark {
  background: white;
  color: var(--text-primary);
}
.btn-on-dark:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.btn-large {
  padding: 18px 36px;
  font-size: 16px;
}
.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: gap 0.3s ease;
}
.btn-arrow:hover { gap: 12px; }
.btn-arrow svg { width: 16px; height: 16px; }

/* ========== Top Nav ========== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.nav-brand:hover { color: var(--text-primary); }
.nav-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-menu {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}
.nav-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  transition: all 0.2s ease;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--primary-glow);
}
.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px !important;
  border-radius: var(--r-md) !important;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--primary-dim) !important;
  color: white !important;
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 0;
  color: var(--text-primary);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ========== Footer ========== */
.footer {
  background: var(--bg-deep);
  color: var(--text-on-dark);
  padding: 80px 0 40px;
}
.footer .container {
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 64px;
  margin-bottom: 64px;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}
.footer-about {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 320px;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: white;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 12px; }
.footer-list a {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-list a:hover { color: white; }
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #94a3b8;
  font-size: 14px;
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: white; }
.footer-icp {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-bright);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.card-icon svg { width: 24px; height: 24px; }
.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-tint);
  color: var(--text-secondary);
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

/* ========== Section Headers ========== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head-text {
  max-width: 720px;
  flex: 1;
  min-width: 280px;
}
.section-head-actions {
  flex-shrink: 0;
}

/* ========== Service Card Grid ========== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ========== Stats ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat {
  text-align: left;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: white;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}
.stat-num .suffix {
  font-size: 24px;
  color: var(--accent);
  font-weight: 600;
}
.stat-label {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
}

/* ========== Forms ========== */
.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.form-row input,
.form-row textarea,
.form-row select {
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-row textarea { resize: vertical; min-height: 120px; }

/* ========== Utilities ========== */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 48px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 48px; }
.mb-xl { margin-bottom: 80px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.w-full { width: 100%; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (max-width: 768px) {
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 80px 0; }
  .service-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-menu a { padding: 12px 16px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-num { font-size: 40px; }
}

/* ========== Animations ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float { animation: float 6s ease-in-out infinite; }
