/* ==========================================================================
   ChinaBridge Sourcing — Website V2.0
   Design tokens, layout, components. No external fonts/images required.
   ========================================================================== */

:root {
  --ink: #12263a;
  --ink-2: #3d5164;
  --muted: #68798a;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --line: #e2e9f0;
  --brand: #0f4c81;
  --brand-2: #1264a3;
  --brand-soft: #e8f1f9;
  --accent: #e07a2f;
  --accent-2: #c9631a;
  --accent-soft: #fdf0e4;
  --ok: #1f7a4d;
  --danger: #b3402e;
  --shadow-sm: 0 1px 2px rgba(15, 40, 70, .06), 0 4px 12px rgba(15, 40, 70, .05);
  --shadow-md: 0 8px 24px rgba(15, 40, 70, .10);
  --radius: 14px;
  --maxw: 1140px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.22; font-weight: 700; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: .98rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  text-decoration: none; transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; text-decoration: none; box-shadow: 0 8px 20px rgba(224, 122, 47, .28); }
.btn-secondary { background: var(--brand); color: #fff; }
.btn-secondary:hover { background: var(--brand-2); color: #fff; text-decoration: none; box-shadow: 0 8px 20px rgba(15, 76, 129, .25); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.btn-lg { padding: 15px 28px; font-size: 1.04rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 auto; }
.brand small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: .96rem; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); }
.nav .btn { padding: 10px 18px; font-size: .92rem; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 40px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 96px;
  background:
    radial-gradient(1100px 480px at 88% -10%, rgba(18, 100, 163, .14), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(224, 122, 47, .10), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero h1 { font-size: clamp(2.15rem, 4.6vw, 3.35rem); letter-spacing: -.02em; margin-bottom: 20px; }
.hero .lead { font-size: 1.16rem; color: var(--ink-2); max-width: 34em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 18px; font-size: .88rem; color: var(--muted); }

.hero-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-md); padding: 28px;
}
.hero-panel h3 { font-size: 1.05rem; margin-bottom: 16px; }
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.value-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: .97rem; }
.value-list svg { width: 22px; height: 22px; flex: 0 0 auto; stroke: var(--ok); margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.015em; }
.section-head p { color: var(--muted); font-size: 1.04rem; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
a.card { color: inherit; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--brand); }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { font-size: .95rem; color: var(--muted); margin-bottom: 14px; flex: 1; }
.card .card-link { font-weight: 600; font-size: .92rem; color: var(--brand-2); display: inline-flex; align-items: center; gap: 6px; }
.card .card-link:hover { text-decoration: underline; }
.card { scroll-margin-top: 92px; }

/* ---------- Service detail sections ---------- */
.service-detail {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 32px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
  scroll-margin-top: 92px;
}
.service-detail h3 { font-size: 1.25rem; margin-bottom: 10px; }
.service-detail h4 { font-size: .95rem; margin: 0 0 8px; }
.service-detail p { font-size: .97rem; color: var(--ink-2); }
.detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-back { font-size: .86rem; color: var(--muted); }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 16px 0 18px; }
.detail-cols ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .95rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .detail-cols { grid-template-columns: 1fr; }
}

.value-card { text-align: center; padding: 30px 22px; }
.value-card .card-icon { margin: 0 auto 14px; }
.value-card h3 { font-size: 1rem; }
.value-card p { font-size: .9rem; }

.honesty-band {
  background: var(--brand); color: #eaf2f9; border-radius: var(--radius);
  padding: 34px 36px; display: flex; gap: 22px; align-items: flex-start;
}
.honesty-band svg { width: 30px; height: 30px; flex: 0 0 auto; stroke: #ffd9a8; margin-top: 4px; }
.honesty-band h3 { color: #fff; margin-bottom: 8px; font-size: 1.12rem; }
.honesty-band p { color: #d5e4f1; font-size: .97rem; margin: 0; }

/* ---------- Steps / timeline ---------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  position: relative; padding: 0 0 34px 58px; counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -2px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: .86rem;
  display: flex; align-items: center; justify-content: center;
}
.step::after {
  content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px;
  width: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.step h3 { font-size: 1.06rem; margin-bottom: 6px; }
.step p { font-size: .95rem; color: var(--muted); margin-bottom: 0; }
.step .step-deliverable { margin-top: 8px; font-size: .9rem; color: var(--ink-2); }

/* ---------- Accordion (FAQ) ---------- */
.accordion { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.accordion-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.accordion-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 600; color: var(--ink); font-size: 1rem;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--brand-2); flex: 0 0 auto;
  transition: transform .2s ease;
}
.accordion-item[open] summary::after { transform: rotate(45deg); }
.accordion-item .a-body { padding: 0 22px 20px; color: var(--ink-2); font-size: .97rem; }
.accordion-item .a-body p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #0d3a63 0%, #1264a3 100%);
  border-radius: 22px; padding: 56px 48px; color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 12px; }
.cta-band p { color: #d5e4f1; max-width: 640px; margin: 0 auto 28px; font-size: 1.05rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 48px; align-items: start; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.form-group label .req { color: var(--accent-2); }
.form-group input,
.form-group select,
.form-group textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18, 100, 163, .15);
}
.form-group .hint { font-size: .84rem; color: var(--muted); }
.field-error { font-size: .84rem; color: var(--danger); display: none; }
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--danger); }
.form-group.has-error .field-error { display: block; }
.form-error-banner {
  display: none; background: #fbeae6; border: 1px solid #efc9bf; color: var(--danger);
  border-radius: 10px; padding: 12px 16px; font-size: .94rem;
}
.form-success {
  display: none; background: #eaf6ef; border: 1px solid #c5e4d2; color: var(--ok);
  border-radius: 12px; padding: 20px 22px;
}
.form-success h3 { color: var(--ok); font-size: 1.05rem; margin-bottom: 6px; }
.form-success p { margin-bottom: 6px; font-size: .96rem; }
.form-success code { background: rgba(31, 122, 77, .08); padding: 1px 6px; border-radius: 6px; }
.send-block { display: none; }
.send-block.is-active { display: block; }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.success-actions .btn { margin: 0; }
.request-preview {
  background: #fff; border: 1px solid #c5e4d2; border-radius: 8px;
  padding: 12px 14px; font-size: .88rem; line-height: 1.55; white-space: pre-wrap;
  color: var(--ink-2); margin: 0 0 14px; font-family: inherit; overflow-wrap: anywhere;
}

.contact-info { display: grid; gap: 18px; }
.info-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info-card h3 { font-size: .98rem; margin-bottom: 8px; }
.info-card p, .info-card li { font-size: .94rem; color: var(--ink-2); }
.info-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #0c2b46; color: #b9cbdc; margin-top: 0; }
.footer-top { padding: 60px 0 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand { color: #fff; font-weight: 700; font-size: 1.12rem; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.site-footer h4 { color: #fff; font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .95rem; }
.site-footer a { color: #b9cbdc; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-note { font-size: .86rem; color: #8ba3b8; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0 26px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .84rem; color: #8ba3b8;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-md);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; stroke: #fff; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 76px 0 56px; background: linear-gradient(180deg, #f2f7fb 0%, #ffffff 100%); }
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -.015em; margin-bottom: 14px; }
.page-hero .lead { max-width: 720px; color: var(--ink-2); font-size: 1.08rem; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 72px 0 64px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; z-index: 55;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 22px 22px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav .btn { margin-top: 14px; justify-content: center; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 24px; }
  .honesty-band { flex-direction: column; padding: 26px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .step { padding-left: 50px; }
}
@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
  .header-inner { height: 64px; }
}