/* ============================================================
   北京市避雷装置安全检测中心 - 基础样式
   设计原型: Tailwind v4 + 蓝色品牌色 #4e92e5
   ============================================================ */

/* ---------- Reset & Tokens ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand */
  --brand: #2563eb;
  --brand-hover: #3b82e0;
  --brand-deep: #2a6ac8;
  --brand-darker: #1a4a8a;
  --brand-light: #7ab8f5;
  --brand-50: #eff6fe;
  --brand-100: #dbeafe;

  /* Slate scale */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Accents */
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --violet-50: #f5f3ff;
  --violet-100: #ede9fe;
  --violet-200: #ddd6fe;
  --violet-600: #7c3aed;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 14px 30px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12);
  --shadow-blue: 0 8px 20px rgba(78, 146, 229, 0.25);

  /* Layout */
  --container-max: 1300px;
  --container-px: 1.5rem;
  --header-h: 88px;

  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}
@media (max-width: 1023px) {
  :root { --header-h: 60px; }
}

html, body { height: 100%; }
html { font-size: 16px; }
body {
  font-family: 'Microsoft YaHei', '微软雅黑', '思源黑体', 'Source Han Sans SC', 'Source Han Sans CN', 'Noto Sans SC',
    -apple-system, BlinkMacSystemFont, 'PingFang SC', '苹方', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--slate-700);
}

::selection { background: var(--brand); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Utility: visually hidden */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ---------- Lucide icon helper ---------- */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }
.icon-2xl { width: 28px; height: 28px; }
.icon-3xl { width: 32px; height: 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(78,146,229,0.25);
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline {
  background: #fff;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}
.btn-outline:hover { background: var(--slate-50); }
.btn-ghost-light {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.2); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Form controls ---------- */
.field { margin-bottom: 1.25rem; }
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}
.field-label .req { color: var(--red-500); }
.form-control {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--slate-50);
  color: var(--slate-800);
  transition: all var(--transition);
  font-size: 0.875rem;
}
.form-control::placeholder { color: var(--slate-400); }
.form-control:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(78,146,229,0.18);
}
textarea.form-control { resize: vertical; min-height: 96px; }
.form-help { font-size: 0.75rem; color: var(--slate-400); margin-top: 0.375rem; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-sm);
}
.card-padded { padding: 2rem; }
.card-padded-lg { padding: 2.5rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  font-weight: 500;
}
.badge-pill { border-radius: 999px; padding: 0.25rem 0.75rem; }
.badge-blue { background: var(--blue-50); color: var(--brand); border-color: var(--blue-200); }
.badge-emerald { background: var(--emerald-50); color: var(--emerald-600); border-color: var(--emerald-100); }
.badge-orange { background: var(--orange-50); color: var(--orange-600); border-color: var(--orange-200); }
.badge-violet { background: var(--violet-50); color: var(--violet-600); border-color: var(--violet-200); }
.badge-red { background: var(--red-50); color: var(--red-600); border-color: #fecaca; }
.badge-amber { background: var(--amber-50); color: var(--amber-600); border-color: var(--amber-200); }

/* ---------- Section ---------- */
.section { padding: 4.5rem 0;background: rgba(248, 250, 252, 0.6);}
.section-tight { padding: 3rem 0; }
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h3 {
  position: relative;
  font-size: 2.125rem;
  font-weight: 700;
  color: var(--slate-800);
  padding-bottom: 16px;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.section-heading h3::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5da8ff, #2f80ed);
}
.section-heading p {
  color: var(--slate-500);
  font-size: 1rem;
  max-width: 42rem;
  margin: 0 auto;
}

/* ---------- Spinner ---------- */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive helpers ---------- */
@media (max-width: 1023px) {
  .lg-only { display: none !important; }
}
@media (min-width: 1024px) {
  .lg-hidden { display: none !important; }
}
@media (max-width: 639px) {
  .sm-only { display: none !important; }
}
