/* 签签电子合同官网 - 设计规范 #165DFF */
:root {
  --primary: #165DFF;
  --primary-dark: #0E42D2;
  --primary-light: #E8F3FF;
  --success: #00B42A;
  --warning: #FF7D00;
  --error: #F53F3F;
  --text: #1D2129;
  --text-secondary: #4E5969;
  --text-muted: #86909C;
  --border: #C9CDD4;
  --bg: #FFFFFF;
  --bg-page: #F5F7FA;
  --shadow: 0 4px 20px rgba(22, 93, 255, 0.08);
  --shadow-hover: 0 8px 30px rgba(22, 93, 255, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 72px;
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 600; line-height: 1.3; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; line-height: 1.35; }
h3 { font-size: 18px; font-weight: 600; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { color: var(--text); margin-bottom: 12px; }
.section-title p { color: var(--text-secondary); font-size: 15px; max-width: 560px; margin: 0 auto; }

.section { padding: 80px 0; }
.section--white { background: var(--bg); }
.section--gray { background: var(--bg-page); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn--ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn--ghost:hover { background: rgba(255,255,255,0.25); color: #fff; }

.btn--sm { padding: 8px 20px; font-size: 13px; }
.btn--lg { padding: 14px 36px; font-size: 15px; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  backdrop-filter: blur(12px);
}

.site-header:not(.is-scrolled) {
  background: transparent;
}

.site-header:not(.is-scrolled) .nav-link { color: rgba(255,255,255,0.92); }
.site-header:not(.is-scrolled) .nav-link:hover,
.site-header:not(.is-scrolled) .nav-link.is-active { color: #fff; }
.site-header:not(.is-scrolled) .logo-text { color: #fff; }
.site-header:not(.is-scrolled) .logo-icon { background: rgba(255,255,255,0.2); }

.site-header.is-scrolled .nav-link { color: var(--text-secondary); }
.site-header.is-scrolled .nav-link:hover,
.site-header.is-scrolled .nav-link.is-active { color: var(--primary); }
.site-header.is-scrolled .logo-text { color: var(--text); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  transition: all var(--transition);
}

.nav-link.is-active {
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary) !important;
}

.site-header:not(.is-scrolled) .nav-link.is-active {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--transition), opacity var(--transition);
}

.header-phone__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-phone:hover { opacity: 0.85; }

.site-header:not(.is-scrolled) .header-phone { color: rgba(255, 255, 255, 0.95); }
.site-header.is-scrolled .header-phone { color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

.site-header:not(.is-scrolled) .nav-toggle span { background: #fff; }

/* header-actions 按钮随顶栏滚动状态与 nav-main 同步 */
.site-header:not(.is-scrolled) .header-actions .btn--outline {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}
.site-header:not(.is-scrolled) .header-actions .btn--outline:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.site-header:not(.is-scrolled) .header-actions .btn--primary {
  background: #fff;
  color: var(--primary);
  box-shadow: none;
}
.site-header:not(.is-scrolled) .header-actions .btn--primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  box-shadow: var(--shadow-hover);
}

.site-header.is-scrolled .header-actions .btn--outline {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}
.site-header.is-scrolled .header-actions .btn--outline:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.site-header.is-scrolled .header-actions .btn--primary {
  background: var(--primary);
  color: #fff;
}
.site-header.is-scrolled .header-actions .btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0d1a2d;
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-text { color: #fff; }
.footer-brand p { margin-top: 16px; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }

.footer-qrcode-btn {
  display: block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-qrcode-btn:hover .footer-qrcode,
.footer-qrcode-btn:focus-visible .footer-qrcode {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.footer-qrcode-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.footer-qrcode {
  display: block;
  width: 100px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  pointer-events: none;
}

/* QR code lightbox */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.img-lightbox[hidden] {
  display: none !important;
}

.img-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: zoom-out;
}

.img-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(360px, 92vw);
  max-height: 90vh;
  margin: 0;
}

.img-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

.img-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.img-lightbox__close:hover {
  background: #f5f5f5;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: #fff; }

/* Floating tools */
.float-tools {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--primary);
  border: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all var(--transition);
}

.float-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.float-btn--primary { background: var(--primary); color: #fff; }
.float-btn--primary:hover { background: var(--primary-dark); }

/* Cards */
.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.card h3 { margin-bottom: 10px; color: var(--text); }
.card p { color: var(--text-secondary); font-size: 13px; line-height: 1.7; }

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Page hero (inner pages) */
.page-hero {
  padding: calc(var(--header-h) + 60px) 0 60px;
  background: linear-gradient(135deg, #0E42D2 0%, #165DFF 50%, #4080FF 100%);
  color: #fff;
  text-align: center;
}

.page-hero h1 { margin-bottom: 16px; }
.page-hero p { opacity: 0.9; font-size: 16px; max-width: 640px; margin: 0 auto; }

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { margin: 0 8px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.is-open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

/* Form */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control { min-height: 120px; resize: vertical; }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Logo carousel */
.logo-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logo-track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.logo-item {
  flex-shrink: 0;
  min-width: 140px;
  height: 56px;
  background: var(--bg-page);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.04);
  padding: 0 24px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Tags / filters */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; justify-content: center; }
.tag {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.tag:hover, .tag.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Article / list */
.article-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.article-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #d4e8ff);
}
.article-card .body { padding: 24px; }
.article-card .meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.article-card h3 { font-size: 16px; margin-bottom: 8px; }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: var(--bg);
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
}

.mobile-nav.is-open { display: block; }
.mobile-nav .nav-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-page);
  color: var(--text) !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav-main, .header-actions .btn--outline { display: none; }
  .site-header .logo { flex-shrink: 0; }
  .site-header .logo-text__full { display: none; }
  .header-phone__num { font-size: 14px; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-tools { right: 16px; bottom: 80px; }
  .float-btn { width: 44px; height: 44px; font-size: 11px; }
}
