/* WeCredit marketing site — brand tokens mirror lib/types/theme.ts */
:root {
  --navy: #020079;
  --indigo: #4f46e5;
  --indigo-light: #818cf8;
  --indigo-very-light: #e0e7ff;
  --emerald: #10B981;
  --error: #dc2626;
  --warning: #f59e0b;
  --bg: #f9fafb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #d1d5db;
  --hero-gradient: linear-gradient(160deg, #020079 0%, #04009a 55%, #0d0860 100%);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif;
  --radius: 14px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }


body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Language toggle: exactly one language visible at a time */
.lang-zh .i18n-en { display: none !important; }
.lang-en .i18n-zh { display: none !important; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 12px;
}

.wordmark {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }

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

.site-nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--indigo); text-decoration: none; }

.lang-toggle {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-very-light);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.lang-toggle:hover { background: #c7d2fe; }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-gradient);
  color: #fff;
  padding: 72px 0 80px;
  text-align: center;
}

.hero .wordmark-hero {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.3;
}

.hero .hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 12px;
}

.hero .hero-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 auto 36px;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 13px 30px;
  font-size: 1rem;
  font-weight: 700;
}
.btn:hover { text-decoration: none; opacity: 0.92; }

.btn-primary { background: #fff; color: var(--navy); }
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); }

.section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
}

.section .section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

.card .card-icon {
  font-size: 1.7rem;
  margin-bottom: 12px;
  display: block;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Steps (how it works) */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}

.step { position: relative; padding-left: 56px; }

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: center;
}

.price-card.featured { border: 2px solid var(--indigo); position: relative; }

.price-card .badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--indigo);
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  white-space: nowrap;
}

.price-card h3 { margin: 0 0 4px; font-size: 1.05rem; }

.price-card .price-original {
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: line-through;
  margin-top: 8px;
}

.price-card .price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  margin: 6px 0 2px;
}

.price-card .price-save {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #10b981;
}

.price-card .price-unit { color: var(--text-muted); font-size: 0.88rem; }

.price-card .price-note {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 6px;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: left;
}

.price-card ul li { padding: 5px 0 5px 24px; position: relative; }

.price-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 700;
}

.pricing-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 28px;
}

/* Trust strip */
.trust-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.trust-item .tick { color: var(--emerald); font-weight: 800; font-size: 1.1rem; }
.trust-item p { margin: 0; font-size: 0.95rem; color: var(--text); }

/* CTA band */
.cta-band {
  background: var(--hero-gradient);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}

.cta-band h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 10px; }
.cta-band p { color: rgba(255, 255, 255, 0.8); margin: 0 0 28px; }

.disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 28px auto 0;
  text-align: center;
}

/* ---------- Content pages (legal/support) ---------- */
.page-main { padding: 56px 0 72px; }

.page-main .page-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.page-main .page-updated {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 36px;
}

.legal-section { margin-bottom: 28px; }

.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.legal-section p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.legal-section ol, .legal-section ul {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin: 8px 0 0;
  padding-left: 22px;
}

.legal-section ol li, .legal-section ul li { margin-bottom: 6px; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin: 20px 0;
}

.contact-card h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
.contact-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.contact-card .email-link { font-size: 1.05rem; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 48px 0 36px;
  margin-top: 0;
}

.footer-inner { display: grid; gap: 24px; }

.wordmark-footer { color: #fff; font-size: 1.2rem; font-weight: 800; }

.footer-tagline { margin: 8px 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a { color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; }

.footer-contact { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-contact a { color: var(--indigo-light); font-size: 0.92rem; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- 404 ---------- */
.notfound {
  text-align: center;
  padding: 110px 20px;
}
.notfound h1 { font-size: 2.4rem; margin: 0 0 12px; color: var(--navy); }
.notfound p { color: var(--text-muted); margin: 0 0 28px; }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding-left: 0; padding-top: 54px; }
  .step::before { left: 0; top: 0; }
  .pricing-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
  }
  .footer-legal { grid-column: 1 / -1; }
}


/* Shared public home and editorial pages. System Chinese fonts avoid remote font loads. */
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 4px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: white; padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.header-inner { min-height: 72px; height: auto !important; padding-top: 12px; padding-bottom: 12px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav .nav-action { color: white; background: var(--navy); border-radius: 8px; padding: 8px 16px; }
.eyebrow { font-size: .9rem; font-weight: 700; letter-spacing: .05em; }
.home-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; text-align: left; align-items: center; }
.hero .home-hero h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.25; letter-spacing: -.04em; }
.hero .home-hero .hero-sub { font-size: 1.15rem; max-width: 34em; margin-left: 0; }
.home-hero .cta-row { justify-content: flex-start; }
.hero-panel { padding: 32px; background: #fff; color: var(--text); border-radius: var(--radius); }
.hero-panel h2 { color: var(--navy); font-size: 2rem; line-height: 1.35; }
.hero-panel li { margin: 10px 0; }
.hero-panel a { display: inline-block; padding: 10px 0; }
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.audience-card, .info-panel { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.audience-card h3 { font-size: 1.65rem; margin: 8px 0 16px; }
.audience-card .btn { margin-top: 12px; }
.audience-card .btn-primary, .article-cta .btn-primary { background: var(--navy); color: white; }
body .section-alt { background: #eef1fa; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-card { display: block; padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: white; color: var(--text); }
.guide-card:hover { border-color: var(--indigo); text-decoration: none; }
.guide-card span { color: var(--navy); font-size: .9rem; }
.guide-card h3 { font-size: 1.25rem; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
.site-footer .wordmark, .site-footer nav a { color: white; }
.content-main { max-width: 820px; padding-top: 32px; padding-bottom: 64px; }
.content-main h1 { color: var(--navy); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.35; }
.content-main h2 { font-size: 1.45rem; margin-top: 0; }
.content-main article > section { margin: 36px 0; }
.content-main li { margin: 12px 0; }
.article-lead { font-size: 1.15rem; }
.article-meta, .breadcrumbs { color: #515b6b; font-size: .9rem; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-scroll:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.table-scroll table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.table-scroll caption { padding: 16px; text-align: left; font-weight: 700; color: var(--navy); }
.table-scroll th, .table-scroll td { padding: 14px; vertical-align: top; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.table-scroll thead { background: var(--indigo-very-light); }
.table-scroll thead th:first-child { width: 22%; }
.breadcrumbs { overflow-wrap: anywhere; margin-bottom: 28px; }
.source-note { padding: 24px; border-left: 4px solid var(--navy); background: #eef1fa; }
.article-cta { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.related-links { padding-left: 22px; }
.related-links a { display: inline-block; padding: 6px 0; }
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 4px; }
  .site-nav { gap: 6px 14px !important; }
  .home-hero, .audience-grid, .guide-grid { grid-template-columns: 1fr; }
  .home-hero { gap: 32px; }
  .hero-panel, .audience-card, .info-panel { padding: 24px; }
  .content-main { padding-top: 24px; }
  .table-scroll th, .table-scroll td { padding: 10px; font-size: .94rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

.section.container { padding-left: 20px; padding-right: 20px; }
.answer-summary { padding: 20px 24px; border-left: 4px solid var(--navy); background: #eef1fa; }
.answer-summary h2 { margin-top: 0; }
.document-template { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.article-questions h3 { margin-top: 24px; }
@media print {
  .site-header, .site-footer, .article-cta { display: none; }
  .document-template { break-inside: avoid; }
}

.header-languages { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .85rem; }
.header-languages a, .article-languages a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 1000px) { .header-inner { flex-wrap: wrap; } .header-languages { flex-basis: 100%; justify-content: flex-end; } }

.article-contents { margin-block: 2rem; }
.article-contents li { margin-block: .5rem; }
.content-main section[id], .content-main h3[id] { scroll-margin-top: 7rem; }
@media (max-width: 1000px) {
  .content-main section[id], .content-main h3[id] { scroll-margin-top: 16rem; }
}
