/* ============================================================
   CLEAR BRIDGE TRADE — clearbridgetrade.com
   Ink on paper. Cartographic restraint. Tokens from the
   Clear Bridge Trade design system (colors_and_type.css).
   ============================================================ */

@import url('/fonts/fonts.css');

:root {
  /* ink / paper */
  --paper:        #F4F1EA;
  --paper-raised: #FBFAF6;
  --paper-sunken: #ECE8DE;
  --paper-hover:  #E7E2D7;
  --ink:          #171B21;
  --ink-strong:   #0E1116;

  /* warm neutral ramp */
  --slate-900: #1F252C;
  --slate-800: #2E3640;
  --slate-700: #434C57;
  --slate-600: #5B636E;
  --slate-500: #7A818B;
  --slate-400: #9CA0A4;
  --slate-300: #C2BEB4;
  --slate-200: #D8D3C8;
  --slate-100: #E6E1D6;

  /* harbor — single primary signal */
  --harbor:        #145C56;
  --harbor-strong: #0E4540;
  --harbor-soft:   #5E9A92;
  --harbor-tint:   #E1ECEA;
  --harbor-line:   #B7D0CB;

  /* brass — sparse cartographic marker */
  --brass:      #9A6B2F;
  --brass-tint: #EFE6D5;

  /* type */
  --font-serif: 'Spectral', 'Songti SC', 'STSong', 'SimSun', Georgia, 'Times New Roman', serif;
  --font-sans:  'IBM Plex Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, 'PingFang SC', 'Microsoft YaHei', monospace;

  --track-label: 0.08em;
  --track-tight: -0.01em;

  /* space / radius / border / shadow */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --r-xs: 2px; --r-sm: 3px; --r-md: 5px; --r-lg: 8px; --r-pill: 999px;

  --border:        1px solid var(--slate-200);
  --border-strong: 1px solid var(--slate-300);
  --border-ink:    1px solid var(--ink);

  --shadow-xs: 0 1px 0 rgba(23,27,33,0.04);
  --shadow-sm: 0 1px 2px rgba(23,27,33,0.06), 0 1px 1px rgba(23,27,33,0.04);
  --ring-focus: 0 0 0 3px var(--harbor-tint), 0 0 0 1px var(--harbor);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

::selection { background: var(--harbor-tint); }

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

a { color: var(--harbor); text-decoration: none; border-bottom: 1px solid var(--harbor-line); }
a:hover { color: var(--harbor-strong); border-bottom-color: var(--harbor); }
a:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: var(--r-xs); }

/* ---- layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--s-5); }

/* ---- header ---- */
.site-header {
  border-bottom: var(--border);
  background: var(--paper);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); padding-top: var(--s-4); padding-bottom: var(--s-4);
}
.brand { border-bottom: none; display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--s-5); }
.site-nav a {
  border-bottom: none; color: var(--slate-700);
  font-size: 13.5px; font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }
.lang-switch {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em;
  color: var(--slate-500); border: var(--border-strong); border-radius: var(--r-sm);
  padding: 5px 10px; background: var(--paper-raised);
}
.lang-switch:hover { background: var(--paper-hover); color: var(--ink); border-color: var(--slate-400); }

/* ---- the rule motif: ——— LABEL ——— ---- */
.rule-label {
  display: flex; align-items: center; gap: var(--s-4);
  font-size: 12px; line-height: 1.4; font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--slate-500);
}
.rule-label::before, .rule-label::after {
  content: ""; flex: 1; height: 1px; background: var(--slate-200);
}
.rule-label--left::before { display: none; }
.rule-label--left { gap: var(--s-3); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; border-bottom: var(--border); }
.hero-ghost {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 560px; opacity: 0.05; pointer-events: none; user-select: none;
}
.hero .wrap { position: relative; padding-top: var(--s-8); padding-bottom: var(--s-8); }
.hero h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(36px, 5.4vw, 58px); line-height: 1.06;
  letter-spacing: var(--track-tight); color: var(--ink-strong);
  margin: var(--s-5) 0 var(--s-4); max-width: 17em;
}
.hero-sub {
  font-size: 18px; line-height: 1.6; color: var(--slate-700);
  max-width: 36em; margin: 0 0 var(--s-6);
}
.hero-meta {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--slate-500); margin-top: var(--s-6);
}

/* ---- buttons ---- */
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px; line-height: 1;
  white-space: nowrap; border-radius: var(--r-md); padding: 12px 18px;
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--harbor); color: var(--paper); border-bottom: none; }
.btn--primary:hover { background: var(--harbor-strong); color: var(--paper); }
.btn--secondary { background: var(--paper-raised); color: var(--ink); border-color: var(--slate-300); border-bottom-color: var(--slate-300); }
.btn--secondary:hover { background: var(--paper-hover); color: var(--ink); }
.btn:active { transform: translateY(0.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- sections ---- */
.section { padding: var(--s-8) 0; }
.section + .section { border-top: var(--border); }
.section-head { margin-bottom: var(--s-6); }
.section-head h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(26px, 3.2vw, 34px); line-height: 1.14;
  color: var(--ink-strong); margin: var(--s-4) 0 var(--s-2);
}
.section-head p { color: var(--slate-600); max-width: 40em; margin: 0; }

/* ---- service cards (claim / evidence two-column) ---- */
.svc {
  background: var(--paper-raised); border: var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  overflow: hidden;
}
.svc + .svc { margin-top: var(--s-5); }
.svc-claim { padding: var(--s-6); }
.svc-claim h3 {
  font-family: var(--font-serif); font-weight: 600; font-size: 24px; line-height: 1.2;
  color: var(--ink-strong); margin: var(--s-3) 0 var(--s-3);
}
.svc-claim p { color: var(--slate-700); margin: 0 0 var(--s-5); max-width: 34em; }
.svc-kicker {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--harbor);
}
.svc-evidence {
  background: var(--paper-sunken); border-left: var(--border);
  padding: var(--s-6);
}
.svc-evidence .rule-label { margin-bottom: var(--s-4); }

.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li {
  display: flex; gap: var(--s-3); align-items: baseline;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--slate-200);
  font-size: 14px; color: var(--slate-700);
}
.fact-list li:last-child { border-bottom: none; }
.fact-list .tick { color: var(--harbor); font-family: var(--font-mono); font-size: 12px; flex: none; }

.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li {
  counter-increment: step;
  display: flex; gap: var(--s-4); align-items: baseline;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--slate-200);
  font-size: 14px; color: var(--slate-700);
}
.step-list li:last-child { border-bottom: none; }
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 12px; color: var(--slate-500); flex: none;
}

.svc-cta { margin-top: var(--s-5); }
.svc-note {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--slate-500); margin-top: var(--s-4);
}

/* ---- about ---- */
.about-grid {
  display: grid; grid-template-columns: 1fr 280px; gap: var(--s-7);
  align-items: center;
}
.about-copy p { color: var(--slate-700); max-width: 38em; }
.about-title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(26px, 3.2vw, 34px); line-height: 1.14;
  color: var(--ink-strong); margin: var(--s-4) 0 var(--s-2);
}
.about-badge { display: flex; justify-content: center; }
.about-badge img { width: 220px; opacity: 0.9; }
.about-facts {
  margin-top: var(--s-5); padding-top: var(--s-4); border-top: var(--border);
  display: grid; grid-template-columns: repeat(3, auto); gap: var(--s-6); width: fit-content;
}
.about-facts div { min-width: 0; }
.about-facts dt {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--slate-500); margin: 0 0 4px;
}
.about-facts dd { font-family: var(--font-mono); font-size: 13px; color: var(--ink); margin: 0; }

/* ---- contact ---- */
.contact { text-align: center; }
.contact h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(26px, 3.2vw, 34px); color: var(--ink-strong);
  margin: var(--s-4) 0 var(--s-3);
}
.contact p { color: var(--slate-600); max-width: 34em; margin: 0 auto var(--s-5); }
.contact-mail {
  font-family: var(--font-mono); font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 0.01em;
}

/* ---- footer ---- */
.site-footer { background: var(--ink); color: var(--slate-300); }
.site-footer .wrap { padding-top: var(--s-7); padding-bottom: var(--s-6); }
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-6); flex-wrap: wrap;
}
.footer-top img { height: 56px; width: auto; }
.footer-nav { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-nav a { border-bottom: none; color: var(--slate-300); font-size: 13.5px; }
.footer-nav a:hover { color: var(--paper); }
.footer-rule {
  display: flex; align-items: center; gap: var(--s-4);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--track-label); color: var(--slate-500);
  margin: var(--s-6) 0 var(--s-4);
}
.footer-rule::before, .footer-rule::after {
  content: ""; flex: 1; height: 1px; background: rgba(244,241,234,0.14);
}
.footer-meta {
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--slate-500);
}
.footer-meta a { border-bottom: none; color: var(--slate-400); }
.footer-meta a:hover { color: var(--paper); }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .svc { grid-template-columns: 1fr; }
  .svc-evidence { border-left: none; border-top: var(--border); }
  .about-grid { grid-template-columns: 1fr; }
  .about-badge { order: -1; }
  .about-badge img { width: 160px; }
  .hero-ghost { width: 420px; right: -180px; opacity: 0.04; }
}
@media (max-width: 640px) {
  .site-nav a:not(.lang-switch) { display: none; }
  .hero .wrap { padding-top: var(--s-7); padding-bottom: var(--s-7); }
  .section { padding: var(--s-7) 0; }
  .about-facts { grid-template-columns: 1fr; gap: var(--s-4); }
}

/* ---- zh adjustments: looser tracking, no italics, system CJK fallbacks ---- */
html[lang="zh-CN"] body { font-size: 15.5px; }
html[lang="zh-CN"] .hero h1 { letter-spacing: 0.01em; font-size: clamp(32px, 4.8vw, 50px); line-height: 1.22; }
html[lang="zh-CN"] .rule-label,
html[lang="zh-CN"] .svc-kicker,
html[lang="zh-CN"] .about-facts dt,
html[lang="zh-CN"] .footer-rule { letter-spacing: 0.18em; }
