/*
  Shanghai Bridge — Design System v2
  Premium B2B service aesthetic, mobile-first, lightweight.
  Lighthouse-oriented: system fonts, inline SVG icons, no external dependencies.
  Backward-compatible with older class names used in about/ and trust-safety/.
*/

:root{
  --ink:#0f1b2e;
  --ink-2:#1d2d44;
  --paper:#ffffff;
  --muted:#5a6b7d;
  --muted-2:#8a9aae;
  --brand:#2563eb;
  --brand-600:#1d4ed8;
  --brand-700:#1e40af;
  --brand-ink:#0b3d91;
  --accent:#0ea5a4;
  --surface:#f6f9fc;
  --surface-2:#eef4fa;
  --line:#e2ebf5;
  --radius:14px;
  --maxw:1160px;
  --shadow-sm:0 2px 8px rgba(15,27,46,.06);
  --shadow:0 10px 30px rgba(15,27,46,.08);
  --shadow-lg:0 20px 50px rgba(15,27,46,.12);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink); background:var(--paper); line-height:1.65; font-size:16px;
  -webkit-font-smoothing:antialiased;
}
img,svg{max-width:100%; display:block}
a{color:var(--brand-600); text-decoration:none}
a:hover{color:var(--brand-700)}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 24px}

/* Header */
.site-header, header.site{
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
header.site{border-bottom:1px solid var(--line)}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px; max-width:var(--maxw); margin:0 auto; gap:16px;
}
.nav__brand, .nav > strong:first-of-type{font-weight:800; font-size:18px; color:var(--ink); letter-spacing:-.02em}
.nav__brand span, .nav > strong:first-of-type span{color:var(--brand)}
.nav__links, .nav .links{display:flex; gap:22px; flex-wrap:wrap; font-size:14px; font-weight:500}
.nav__links a, .nav .links a{color:var(--ink-2)}
.nav__links a:hover, .nav .links a:hover{color:var(--brand)}
.nav__lang, .nav .lang{display:flex; gap:10px; font-size:13px; font-weight:500}
.nav__lang a, .nav .lang a{color:var(--muted)}
.nav__lang a[aria-current="page"], .nav__lang a:hover, .nav .lang a:hover{color:var(--ink); text-decoration:underline}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--brand); color:#fff; padding:13px 24px; border-radius:var(--radius);
  font-weight:700; font-size:15px; border:0; cursor:pointer;
  box-shadow:0 6px 18px rgba(37,99,235,.25);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{background:var(--brand-600); color:#fff; transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn--secondary{
  background:#fff; color:var(--brand-700); border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
}
.btn--secondary:hover{background:var(--surface); border-color:var(--line)}
.btn--small{padding:10px 18px; font-size:14px}

/* ---------- Tables (comparison / data) ---------- */
.table-wrap{overflow-x:auto; margin:1rem 0}
table{width:100%; border-collapse:collapse; font-size:.95rem; background:var(--paper)}
th,td{border:1px solid var(--line); padding:.55rem .8rem; text-align:left; vertical-align:top}
th{background:var(--surface); color:var(--ink); font-weight:600}
tbody tr:nth-child(even){background:var(--surface)}
.table-wrap{border-radius:var(--radius); box-shadow:var(--shadow-sm)}

/* Hero (generic) */
.hero{padding:56px 0 40px}
.hero__eyebrow{
  display:inline-block; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  color:var(--brand-700); background:var(--surface-2); padding:6px 12px; border-radius:999px; margin:0 0 16px;
}
.hero h1{font-size:36px; line-height:1.15; margin:0 0 18px; letter-spacing:-.02em; color:var(--ink)}
.hero p{font-size:17px; color:var(--muted); max-width:640px; margin:0 0 24px}
.hero__actions{display:flex; gap:14px; flex-wrap:wrap}

/* Hero --home (split + bg image) */
.hero--home{
  position:relative; min-height:560px; padding:0;
  display:flex; align-items:center;
  background:
    linear-gradient(135deg, rgba(15,27,46,.88) 0%, rgba(11,61,145,.82) 100%),
    url('../img/shanghai-skyline-hero.webp') center/cover no-repeat;
  color:#fff;
}
.hero--home .wrap{position:relative; z-index:2; padding-top:90px; padding-bottom:90px}
.hero--home .hero__eyebrow{background:rgba(255,255,255,.15); color:#fff; backdrop-filter:blur(4px)}
.hero--home h1{color:#fff; font-size:42px; max-width:620px}
.hero--home p{color:rgba(255,255,255,.82); font-size:18px; max-width:560px}
.hero--home .hero__grid{
  display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center;
}
.hero--home .hero__media{display:block}
.hero__visual{
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18);
  border-radius:var(--radius); padding:28px; backdrop-filter:blur(8px);
  box-shadow:var(--shadow-lg);
}
.hero__visual h3{font-size:18px; margin:0 0 14px; color:#fff}
.hero__visual ul{margin:0; padding:0; list-style:none; font-size:15px; color:rgba(255,255,255,.85)}
.hero__visual li{padding:7px 0; border-bottom:1px solid rgba(255,255,255,.1); display:flex; justify-content:space-between; gap:12px}
.hero__visual li:last-child{border-bottom:0}

/* Stats bar */
.stats{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:24px;
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px; box-shadow:var(--shadow); margin-top:-40px; position:relative; z-index:3;
}
.stat{text-align:center}
.stat__num{display:block; font-size:28px; font-weight:800; color:var(--brand-700)}
.stat__label{font-size:13px; color:var(--muted); font-weight:500}

/* Sections */
.section, main > section{padding:72px 0}
.section--alt, main > section:nth-child(even):not(.cta-band){background:var(--surface)}
.section__head{max-width:720px; margin:0 0 36px}
.section__head--center{text-align:center; margin-left:auto; margin-right:auto}
.section h2, main > section h2{font-size:30px; line-height:1.2; margin:0 0 12px; letter-spacing:-.01em}
.section__lead{font-size:17px; color:var(--muted); margin:0}

/* Cards */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:22px}
.card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px; box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{transform:translateY(-4px); box-shadow:var(--shadow); border-color:var(--line)}
.card__icon{
  width:48px; height:48px; border-radius:12px; background:var(--surface-2); color:var(--brand-700);
  display:flex; align-items:center; justify-content:center; margin:0 0 18px;
}
.card__thumb{
  width:calc(100% + 56px); height:170px; object-fit:cover;
  border-radius:var(--radius) var(--radius) 0 0;
  margin:-28px -28px 20px -28px; display:block;
}
.media-row{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px; margin:28px 0 0;
}
.media-item{
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); border:1px solid var(--line);
}
.media-item img{width:100%; height:220px; object-fit:cover; display:block}
.media-item figcaption{padding:14px 18px; font-size:13px; color:var(--muted); background:var(--paper)}
.card__icon svg{width:26px; height:26px; stroke-width:1.8}
.card h3{font-size:19px; margin:0 0 10px}
.card p{font-size:15px; color:var(--muted); margin:0 0 16px}
.card__link{font-weight:700; font-size:14px; display:inline-flex; align-items:center; gap:4px}
.card__link:hover{gap:8px}

/* Steps */
.steps{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; counter-reset:step}
.step{
  position:relative; padding:24px; border-radius:var(--radius); background:var(--paper); border:1px solid var(--line);
}
.step::before{
  counter-increment:step; content:counter(step);
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%; background:var(--brand); color:#fff;
  font-weight:800; font-size:15px; margin:0 0 16px;
}
.step h4{font-size:17px; margin:0 0 8px}
.step p{font-size:14px; color:var(--muted); margin:0}

/* Trust strip */
.trust-strip{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:16px}
.trust-item{
  display:flex; align-items:flex-start; gap:12px; padding:18px; border-radius:var(--radius);
  background:rgba(255,255,255,.7); border:1px solid var(--line);
}
.trust-item__icon{color:var(--brand-700); flex-shrink:0; margin-top:2px}
.trust-item__icon svg{width:22px; height:22px; stroke-width:2}
.trust-item strong{display:block; font-size:14px; color:var(--ink); margin:0 0 2px}
.trust-item span{font-size:13px; color:var(--muted)}

/* CTA band */
.cta-band{
  background:linear-gradient(135deg, var(--brand-ink) 0%, var(--brand-700) 100%);
  border-radius:var(--radius); padding:52px; color:#fff; text-align:center;
}
.cta-band h2{font-size:28px; margin:0 0 12px; color:#fff}
.cta-band p{color:rgba(255,255,255,.82); max-width:560px; margin:0 auto 24px; font-size:16px}

/* Tables */
.tbl{width:100%; border-collapse:collapse; margin:8px 0 4px; font-size:15px; background:var(--paper)}
.tbl th,.tbl td{border:1px solid var(--line); padding:12px 14px; text-align:left; vertical-align:top}
.tbl th{background:var(--surface-2); font-weight:700}
.tbl tr:nth-child(even) td{background:var(--surface)}

/* Footer */
.site-footer, footer.site{
  background:var(--ink); color:#b8c5d3; padding:60px 0 32px;
}
footer.site{padding:60px 0 32px; background:var(--ink); color:#b8c5d3}
.site-footer a, footer.site a{color:#dbe6f3}
.site-footer a:hover, footer.site a:hover{color:#fff}
.site-footer__grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px; margin:0 0 40px;
}
.site-footer__brand{color:#fff; font-weight:800; font-size:18px; margin:0 0 12px}
.site-footer__tagline{font-size:14px; line-height:1.6; margin:0}
.site-footer h4{color:#fff; font-size:14px; text-transform:uppercase; letter-spacing:.05em; margin:0 0 16px}
.site-footer ul{list-style:none; margin:0; padding:0; font-size:14px}
.site-footer li{margin:0 0 10px}
.contact-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px; margin:0 0 28px;
}
.contact-card, .contact-grid .item{
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius); padding:20px;
}
.contact-card strong, .contact-grid .item strong{display:block; color:#fff; margin:0 0 8px; font-size:15px}
.contact-card img, .contact-grid .item img{display:block; width:132px; max-width:100%; aspect-ratio:1/1; object-fit:contain; border-radius:8px; margin:0 0 10px}
.contact-card small, .contact-grid .item small{color:#93a4b8; font-size:13px}
.site-footer__bottom{
  border-top:1px solid rgba(255,255,255,.1); padding-top:24px;
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:13px; color:#8a9aae;
}

/* Reveal animation */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .5s ease, transform .5s ease}
.reveal.in{opacity:1; transform:translateY(0)}
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1; transform:none; transition:none}
  html{scroll-behavior:auto}
}

/* Responsive */
@media (max-width:860px){
  .nav{flex-wrap:wrap}
  .nav__links, .nav .links{order:3; width:100%; justify-content:flex-start; padding-top:6px}
  .hero--home .hero__grid{grid-template-columns:1fr}
  .hero--home h1{font-size:32px}
  .hero--home .hero__media{display:none}
  .stats{margin-top:-24px; padding:20px; grid-template-columns:repeat(2,1fr)}
  .site-footer__grid{grid-template-columns:1fr}
  .section, main > section{padding:52px 0}
}
@media (max-width:600px){
  .wrap{padding:0 18px}
  .nav{padding:12px 18px}
  .hero h1{font-size:28px}
  .hero--home h1{font-size:30px}
  .section h2, main > section h2{font-size:24px}
  .cards{grid-template-columns:1fr}
  .steps{grid-template-columns:1fr}
  .trust-strip{grid-template-columns:1fr}
  .cta-band{padding:34px 24px}
  .site-footer__bottom{flex-direction:column; gap:8px}
}
