/* LedgerBridge Accounting / 账桥: shared styles for the English (/) and Chinese (/zh/) pages. */

:root {
  --brand: #1f3a5f;
  --brand-deep: #152b47;
  --accent: #2f6ea5;
  --accent-dark: #245a8a;
  --accent-pale: #e8f0f8;
  --gold: #f2c14e;
  --gold-light: #f6d27d;
  --gold-pale: #fcf3da;
  --gold-ink: #6f5200;
  --ink: #1c2633;
  --muted: #566376;
  --line: #dae2eb;
  --soft: #f4f7fa;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 52, .06);
  --shadow: 0 2px 6px rgba(15, 30, 52, .05), 0 18px 44px rgba(15, 30, 52, .10);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html:lang(zh) body { font-size: 16.5px; line-height: 1.8; }

h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p, ul, ol, figure { margin: 0; }
p, li { text-wrap: pretty; }
svg { display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible,
.why :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold); }

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

.skip {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-gold { background: var(--gold); color: var(--brand-deep); }
.btn-gold:hover { background: var(--gold-light); color: var(--brand-deep); }

.btn-ghost { border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); color: #fff; }

.btn-outline { border-color: var(--line); color: var(--brand); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-small { min-height: 38px; padding: 7px 16px; font-size: .9375rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  backdrop-filter: saturate(1.5) blur(12px);
}

.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--brand); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-light { color: var(--accent); font-weight: 500; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: .9375rem;
  text-decoration: none;
}
.nav a:hover { background: var(--soft); color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.lang:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 880px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 480px) {
  .header-actions .btn { display: none; }
}

@media (max-width: 440px) {
  html:lang(zh) .site-header .brand-light { display: none; }
}

@media (max-width: 350px) {
  .site-header .brand-light { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--brand);
  background-image:
    radial-gradient(780px 420px at 92% -8%, rgba(47, 110, 165, .55), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(255, 255, 255, .045) 35px 36px);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 112px);
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--gold);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow:lang(zh) { font-size: .9375rem; letter-spacing: .24em; }

.hero h1 {
  font-size: clamp(2.3rem, 1.5rem + 3vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.hero h1:lang(zh) { letter-spacing: .02em; line-height: 1.3; }
.hero h1 > span { display: block; }
.hero h1 .hl { color: var(--gold); }

.lead {
  max-width: 33em;
  margin-top: 22px;
  color: rgba(255, 255, 255, .86);
  font-size: 1.1875rem;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.when { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); }
.when-label {
  color: rgba(255, 255, 255, .62);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.when-label:lang(zh) { font-size: .875rem; letter-spacing: .1em; }
.when ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 10px;
  padding: 0;
  color: rgba(255, 255, 255, .9);
  font-size: .9375rem;
  list-style: none;
}
.when li { display: flex; align-items: center; gap: 9px; }
.when li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* Deadline card in the hero */

.paper-stack { position: relative; isolation: isolate; }
.paper-stack::before,
.paper-stack::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
}
.paper-stack::before { inset: 12px -12px -12px 12px; }
.paper-stack::after { inset: 24px -24px -24px 24px; background: rgba(255, 255, 255, .06); }

.paper {
  position: relative;
  padding: 22px 24px 18px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.45;
  box-shadow: 0 32px 64px -16px rgba(2, 10, 24, .5);
}

.paper-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.paper-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.paper-tag:lang(zh) { letter-spacing: .1em; }
.paper-year { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .08em; }

.deadlines { width: 100%; margin-top: 12px; border-collapse: collapse; }
.deadlines th,
.deadlines td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.deadlines tr:last-child th,
.deadlines tr:last-child td { border-bottom: 0; }
.deadlines th { padding-right: 14px; color: var(--ink); font-weight: 500; text-align: left; }
.deadlines td { color: var(--brand); font-weight: 650; text-align: right; }
.deadlines .sub { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; }

.paper-note {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .paper-stack { max-width: 560px; margin-right: 24px; }
}

@media (max-width: 440px) {
  .paper { padding: 18px 16px 14px; font-size: .8125rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-soft { background: var(--soft); }

.section-head { max-width: 640px; margin-bottom: clamp(32px, 4.5vw, 52px); }
.section-head h2 {
  color: var(--brand);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.section-head h2:lang(zh) { letter-spacing: .02em; }
.section-head h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--gold);
}
.section-lead { margin-top: 14px; color: var(--muted); font-size: 1.0625rem; }

/* Services */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 6px; color: var(--brand); font-size: 1.1875rem; }
.card p { color: var(--muted); }

.card-ask { border-color: #efdfb4; background: var(--gold-pale); }
.card-ask .btn { align-self: flex-start; margin-top: auto; }

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--accent-pale);
  color: var(--accent);
}
.icon-box svg { width: 24px; height: 24px; }
.card-ask .icon-box { background: #f7e6b6; color: var(--gold-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 6px 0 0; list-style: none; }
.tags li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-size: .8125rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px; }
}

/* How it works */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 0;
  list-style: none;
}
.steps::before {
  content: "";
  position: absolute;
  top: 23px;
  right: calc((100% - 3 * 28px) / 4 - 24px); /* stop at the last circle's centre */
  left: 24px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #bccadb 0 7px, transparent 7px 13px);
}

.step { position: relative; }
.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: 0 0 0 8px var(--soft);
}
.step.you .step-num { background: var(--gold); color: var(--brand-deep); }

.who {
  display: inline-block;
  margin-top: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e6edf5;
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.step.you .who { background: var(--gold-pale); color: var(--gold-ink); }

.step h3 { margin-top: 10px; color: var(--brand); font-size: 1.1875rem; }
.step p { margin-top: 6px; color: var(--muted); }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps::before { display: none; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 58px;
    bottom: 8px;
    left: 23px;
    width: 2px;
    background: repeating-linear-gradient(180deg, #bccadb 0 7px, transparent 7px 13px);
  }
  .step {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 18px;
    padding-bottom: 30px;
  }
  .step:last-child { padding-bottom: 0; }
  .step-num { grid-row: 1 / span 3; }
  .step > :not(.step-num) { grid-column: 2; }
  .who { justify-self: start; margin-top: 2px; }
}

/* Why us */

.why { background: var(--brand-deep); color: #fff; }
.why .section-head h2 { color: #fff; }
.why .section-lead { color: rgba(255, 255, 255, .76); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .14);
}
.why-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 18px;
  padding: 30px 28px;
  background: var(--brand);
}
.why-item .icon-box {
  grid-row: 1 / span 2;
  background: rgba(242, 193, 78, .14);
  color: var(--gold);
}
.why-item h3 { margin-top: 10px; color: #fff; font-size: 1.125rem; }
.why-item p { margin-top: 8px; color: rgba(255, 255, 255, .8); }

@media (max-width: 760px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-item { padding: 24px 20px; column-gap: 16px; }
}

/* Contact */

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.contact-card h2 {
  color: var(--brand);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.125rem);
  letter-spacing: -.02em;
}
.contact-card h2:lang(zh) { letter-spacing: .02em; }

.contact-list { display: grid; margin: 0; padding: 0; list-style: none; }
.contact-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
}
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-label { color: var(--muted); font-size: .875rem; font-weight: 600; }
.contact-list a { font-weight: 600; overflow-wrap: anywhere; }
.contact-note { margin-top: 14px; color: var(--muted); font-size: .875rem; line-height: 1.6; }

@media (max-width: 860px) {
  .contact-card { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px 34px;
  background: var(--brand-deep);
  color: rgba(255, 255, 255, .7);
  font-size: .875rem;
  line-height: 1.7;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-footer .brand { color: #fff; }
.site-footer .brand-light { color: var(--gold); }
.site-footer .brand-mark rect { fill: #24466f; }
.footer-tagline { color: rgba(255, 255, 255, .75); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; color: rgba(255, 255, 255, .55); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 220px);
  padding-block: 80px;
  text-align: center;
}
.notfound h1 { color: var(--brand); font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.notfound p { margin-top: 12px; color: var(--muted); }
.notfound .cta-row { justify-content: center; }
