/* ==========================================================================
   北京中科实检科技有限公司 · 官方网站样式表
   Structured Corporate Minimal | Pure CSS, Zero External Dependencies
   ========================================================================== */

:root {
  --navy: #002d59;
  --navy-deep: #001e3d;
  --navy-mid: #0a3e73;
  --accent: #1b5fa7;
  --surface: #ffffff;
  --surface-soft: #f4f6fa;
  --line: #dfe5ec;
  --line-subtle: #ebf0f5;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #4f5d6e;
  --success-bg: #eef7f2;
  --success-border: #86c7a3;
  --success-ink: #14532d;
  --warn-bg: #fff8eb;
  --warn-border: #e5b769;
  --warn-ink: #7c4a03;
  --error-bg: #fef2f2;
  --error-border: #f1a5a5;
  --error-ink: #881c1c;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --container: 1140px;
  --gutter: 40px;
  --header-height: 100px;
  --radius: 3px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.78;
  color: var(--ink);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd {
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--navy);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
  color: #ffffff;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: var(--header-height);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 66px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  position: relative;
  padding: 8px 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--navy);
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
  font-weight: 700;
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--navy);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--navy);
  background: var(--surface-soft);
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero & Page Subhero */
.hero,
.page-header {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(125deg, var(--navy-deep) 0%, var(--navy) 58%, var(--navy-mid) 100%);
}

.hero::before,
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero {
  padding: clamp(56px, 7vw, 88px) 0 clamp(60px, 7.5vw, 92px);
}

.hero-inner,
.page-header-inner {
  position: relative;
  max-width: 820px;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 20px;
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 2px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
}

.hero h1 {
  margin-bottom: 22px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: #ffffff;
}

.hero-lead {
  max-width: 760px;
  font-size: clamp(15px, 1.3vw, 16px);
  line-height: 1.88;
  color: rgba(255, 255, 255, 0.88);
}

.page-header {
  padding: clamp(40px, 5vw, 56px) 0;
}

.page-header h1 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.page-header p {
  max-width: 720px;
  font-size: 15.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

/* Content Sections */
.section {
  padding: clamp(52px, 6vw, 72px) 0;
}

.section-soft {
  background: var(--surface-soft);
}

.section-white {
  background: var(--surface);
}

.section-bordered {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.section-title {
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.32;
  color: var(--navy);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 680px;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0, 45, 89, 0.3);
}

.section-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Home: 2x2 Core Services Grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: #c5d1df;
  border-top-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 30, 61, 0.05);
}

.card-index {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--navy);
}

.service-card p {
  flex: 1;
  margin-bottom: 18px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--muted);
}

.service-points {
  list-style: none;
  padding: 16px 0 0;
  border-top: 1px solid var(--line-subtle);
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.service-points li {
  position: relative;
  padding: 4px 0 4px 14px;
  line-height: 1.62;
}

.service-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--navy);
}

/* Home: 4-Step Delivery Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.process-step {
  padding-top: 16px;
  border-top: 2px solid var(--navy);
}

.process-num {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.process-step h3 {
  margin-bottom: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
}

.process-step p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* Solutions Page: 5 Two-Column Sections (No Pills) */
.solution-list {
  display: flex;
  flex-direction: column;
}

.solution-item {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.solution-item:first-child {
  padding-top: 0;
}

.solution-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.solution-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.solution-item h2 {
  margin-bottom: 14px;
  font-size: clamp(20px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}

.solution-item p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.spec-box {
  padding: 24px 26px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 2px solid var(--navy);
}

.spec-box h3 {
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.spec-box ul {
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.82;
  color: var(--ink-secondary);
}

.spec-box li + li {
  margin-top: 6px;
}

/* About & Contact Two-Column Layouts */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.prose h2 {
  margin-bottom: 18px;
  font-size: clamp(21px, 2vw, 24px);
  font-weight: 700;
  color: var(--navy);
}

.prose h3 {
  margin: 28px 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.prose p {
  max-width: 66ch;
  font-size: 15px;
  line-height: 1.88;
  color: var(--muted);
}

.prose p + p {
  margin-top: 16px;
}

/* Info / Credential Side Panel */
.info-panel {
  padding: 28px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
}

.info-panel h2,
.info-panel h3 {
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.info-list {
  display: flex;
  flex-direction: column;
}

.info-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:first-child {
  padding-top: 0;
}

.info-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-row dt {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.info-row dd {
  font-size: 14px;
  line-height: 1.72;
  color: var(--muted);
}

/* Careers Page */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}

.benefit-card {
  padding: 22px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-top: 2px solid var(--navy);
}

.benefit-card h2 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.benefit-card p {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--muted);
}

.job-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.job-card {
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-subtle);
}

.job-head h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.job-meta {
  font-size: 13.5px;
  color: var(--muted);
}

.job-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.job-card h3 {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.job-card ul {
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.job-card li + li {
  margin-top: 6px;
}

.apply-banner {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.apply-banner p {
  font-size: 14.5px;
  color: var(--ink-secondary);
  max-width: 680px;
}

.apply-banner .apply-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.apply-actions {
  flex-shrink: 0;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: #ffffff;
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--navy);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--navy);
  color: #ffffff;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.required-mark {
  color: #b42318;
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 95, 167, 0.12);
  outline: none;
}

.form-field input:user-invalid,
.form-field textarea:user-invalid {
  border-color: #c94a4a;
}

.form-field textarea {
  min-height: 128px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.form-hint {
  font-size: 13px;
  color: var(--muted);
}

.form-status {
  display: none;
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.65;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-ink);
}

.form-status.is-info {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
}

.form-status.is-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-ink);
}

.email-reveal-wrap {
  margin-top: 6px;
}

.email-revealed {
  display: inline-block;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.email-revealed:hover {
  border-color: var(--navy);
  color: var(--accent);
}

.spam-note {
  margin-top: 12px;
  font-size: 12.8px;
  line-height: 1.68;
  color: var(--muted);
}

/* 404 Page */
.not-found-box {
  max-width: 620px;
  padding: 40px 0;
}

.not-found-code {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.not-found-box h1 {
  margin-bottom: 14px;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--navy);
}

.not-found-box p {
  margin-bottom: 28px;
  font-size: 15px;
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 48px 0 28px;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1.15fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}

.footer-logo {
  height: 56px;
  width: auto;
  margin-bottom: 14px;
}

.footer-col h2 {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.footer-col p {
  margin-bottom: 8px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.84);
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact-link {
  display: inline-block;
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  font-weight: 600;
  color: #ffffff;
}

.footer-contact-link:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* Tablet Breakpoint (640px - 959px) */
@media (max-width: 959px) {
  :root {
    --gutter: 28px;
    --header-height: 86px;
  }

  .brand-logo {
    height: 56px;
  }

  .site-nav {
    gap: 22px;
  }

  .process-grid,
  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solution-item,
  .split-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Mobile Navigation Collapse (< 768px) */
@media (max-width: 767px) {
  :root {
    --header-height: 76px;
  }

  .brand-logo {
    height: 48px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(0, 30, 61, 0.08);
    padding: 8px 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 13px var(--gutter);
    font-size: 15.5px;
  }

  .site-nav a[aria-current="page"] {
    background: var(--surface-soft);
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  .service-grid,
  .job-cols {
    grid-template-columns: 1fr;
  }
}

/* Mobile Compact (< 640px) */
@media (max-width: 639px) {
  :root {
    --gutter: 20px;
  }

  .process-grid,
  .benefit-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .job-card,
  .info-panel,
  .spec-box {
    padding: 22px 20px;
  }

  .footer-logo {
    height: 48px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Print Friendly */
@media print {
  .site-header {
    position: static;
    border-bottom: 1px solid #cccccc;
  }

  .nav-toggle,
  .site-nav,
  .skip-link,
  .apply-banner .btn-primary,
  .contact-form button {
    display: none !important;
  }

  .hero,
  .page-header,
  .site-footer {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 1px solid #cccccc;
  }

  .hero::before,
  .page-header::before {
    display: none;
  }

  .hero h1,
  .hero-lead,
  .hero-kicker,
  .page-header h1,
  .page-header p,
  .site-footer,
  .site-footer a,
  .site-footer h2,
  .site-footer p {
    color: #000000 !important;
  }

  .footer-logo {
    filter: invert(1);
  }
}
