﻿/* ===== 凯宁软件工作室 - 全局样式 ===== */
:root {
  --primary: #1E56A0;
  --primary-light: #2196F3;
  --primary-dark: #0D3B6B;
  --accent: #FF6B35;
  --accent-light: #FF8A5C;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --shadow: 0 4px 24px rgba(30, 86, 160, 0.08);
  --shadow-hover: 0 8px 40px rgba(30, 86, 160, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --header-height: 72px;
  --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-cn);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(30, 86, 160, 0.08);
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 640px;
  line-height: 1.7;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header .section-sub {
  margin: 0 auto;
}
section {
  padding: 80px 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}
.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
}
.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
}
.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}
.nav-cta {
  background: var(--primary) !important;
  color: white !important;
  padding: 8px 20px !important;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--primary-dark) !important;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  background: linear-gradient(135deg, #0D3B6B 0%, #1E56A0 50%, #2D7BCB 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,107,53,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(33,150,243,0.2) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,53,0.3);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}
.btn-secondary {
  background: var(--primary);
  color: white;
}
.btn-secondary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-code-block {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 2;
}
.hero-code-block .comment { color: rgba(255,255,255,0.4); }
.hero-code-block .keyword { color: var(--accent); }
.hero-code-block .string { color: #7ECFFF; }
.hero-code-block .func { color: #A8E6CF; }

/* ===== Trust Strip ===== */
.trust-strip {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}
.trust-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.trust-item { text-align: center; }
.trust-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.trust-item.highlight .trust-num { color: var(--accent); }
.trust-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: default;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary-dark);
}
.service-card p {
  font-size: 0.93rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service-tags span {
  font-size: 0.78rem;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(30, 86, 160, 0.06);
  color: var(--primary);
  border: 1px solid rgba(30, 86, 160, 0.1);
}

/* ===== Why Us ===== */
.why-section {
  background: var(--bg-white);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.why-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.why-card:hover {
  box-shadow: var(--shadow);
}
.why-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}
.why-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.why-card p {
  font-size: 0.93rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== Cases Preview ===== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.case-img {
  height: 200px;
  background: linear-gradient(135deg, #E8F0FE, #D6E4F0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.case-body {
  padding: 24px;
}
.case-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 12px;
  background: rgba(255,107,53,0.1);
  color: var(--accent);
  margin-bottom: 10px;
}
.case-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-dark);
}
.case-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}
.case-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  text-align: center;
}
.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.cta-section p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.cta-section .btn-primary {
  font-size: 1.05rem;
  padding: 14px 36px;
}

/* ===== Footer ===== */
.footer {
  background: #0F172A;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo {
  color: white;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}
.footer h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  font-size: 0.9rem;
  opacity: 0.7;
}
.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

/* ===== Page Header ===== */
.page-header {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 48px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  text-align: center;
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-header p {
  opacity: 0.85;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== About Page ===== */
.about-story {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text);
}
.about-story p { margin-bottom: 20px; }
.about-story .highlight {
  color: var(--primary);
  font-weight: 600;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.value-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.value-icon { font-size: 2.5rem; margin-bottom: 16px; }
.value-card h4 { font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.value-card p { font-size: 0.9rem; color: var(--text-light); }

/* ===== Services Full ===== */
.service-detail { margin-bottom: 60px; }
.service-detail:last-child { margin-bottom: 0; }
.service-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.service-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.service-detail-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.service-detail-header .tagline {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}
.service-detail-body {
  padding-left: 88px;
}
.service-detail-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}
.service-scenes {
  margin-bottom: 16px;
}
.service-scenes li {
  font-size: 0.93rem;
  color: var(--text);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.service-scenes li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
}
.service-detail-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.service-detail-tech span {
  font-size: 0.8rem;
  padding: 3px 14px;
  border-radius: 16px;
  background: rgba(30, 86, 160, 0.06);
  color: var(--primary);
  border: 1px solid rgba(30, 86, 160, 0.12);
}

/* ===== Tech Page ===== */
.tech-stack-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 60px;
}
.tech-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  text-align: center;
  transition: var(--transition);
  min-width: 110px;
}
.tech-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tech-card .icon { font-size: 1.8rem; margin-bottom: 6px; }
.tech-card .name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.tech-card .cat {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.tech-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 40px 0;
}
.flow-step {
  text-align: center;
  padding: 24px 12px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.flow-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-light);
  font-size: 1.3rem;
  font-weight: 700;
}
.flow-step .step-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 auto 12px;
}
.flow-step h4 { font-size: 0.9rem; font-weight: 600; color: var(--primary-dark); }
.flow-step p { font-size: 0.8rem; color: var(--text-light); margin-top: 6px; }

/* ===== Cases Page ===== */
.cases-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Insights Page ===== */
.insights-list { max-width: 800px; margin: 0 auto; }
.insight-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 20px;
  transition: var(--transition);
}
.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.insight-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.insight-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.insight-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}
.insight-tag {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 12px;
  border-radius: 12px;
  background: rgba(30, 86, 160, 0.06);
  color: var(--primary);
  border: 1px solid rgba(30, 86, 160, 0.1);
  margin-top: 12px;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
}
.contact-info-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(30, 86, 160, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-row-label { font-size: 0.85rem; color: var(--text-muted); }
.contact-row-value { font-size: 0.95rem; font-weight: 500; color: var(--text); }
.contact-form-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
}
.contact-form-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 86, 160, 0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: auto; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-visual { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-flow { grid-template-columns: repeat(3, 1fr); }
  .tech-flow .flow-step:nth-child(3)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .nav.open a { width: fit-content; }
  .hero { padding-top: calc(var(--header-height) + 32px); padding-bottom: 48px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .service-detail-body { padding-left: 0; margin-top: 16px; }
  .service-detail-header { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-grid { gap: 32px; }
  .tech-flow { grid-template-columns: 1fr 1fr; }
  .tech-flow .flow-step::after { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cases-filter { gap: 8px; }
  .filter-btn { font-size: 0.82rem; padding: 6px 14px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .trust-grid { gap: 20px; }
  .trust-num { font-size: 1.5rem; }
}
