/* WeCredit marketing site (wecredithk.com)
   Design: premium fintech. Theme lock: dark navy across the whole site.
   Shape system: pill buttons, 16px glass panels, 8px chips. Applied everywhere.
   Single accent: indigo family (#4f46e5 / #818cf8). No second accent.
   Motion: CSS entrance cascade + IntersectionObserver reveals (assets/motion.js),
   fully gated behind html.js-motion and prefers-reduced-motion. */

:root {
  --navy: #020079;
  --indigo: #4f46e5;
  --indigo-deep: #4338ca;
  --indigo-light: #818cf8;
  --indigo-pale: #e0e7ff;

  --bg: #05041c;
  --bg-raise: #0a0830;
  --text: #eef0ff;
  --text-2: #a6a9cf;
  --text-3: #7d80a8;

  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);

  --font: system-ui, -apple-system, "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif;
  --radius-panel: 16px;
  --radius-chip: 8px;
  --radius-pill: 999px;
  --container: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(79, 70, 229, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(2, 0, 121, 0.55), transparent 65%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

/* ---- Bilingual display (default zh; html.lang-en flips) ---- */
html.lang-zh .i18n-en { display: none; }
html.lang-en .i18n-zh { display: none; }

/* ---- Layout primitives ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

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

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

::selection { background: rgba(79, 70, 229, 0.45); color: #ffffff; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 4, 28, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

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

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

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

.site-nav a { color: var(--text-2); font-size: 14px; transition: color 0.2s ease; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.lang-toggle {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--indigo-light); background: var(--glass-strong); }
.lang-toggle:active { transform: translateY(1px); }

/* ---- Hero (asymmetric split) ---- */
.hero { padding: 72px 0 88px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 62px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.14;
  background: linear-gradient(135deg, #ffffff 30%, var(--indigo-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text); /* fallback when background-clip unsupported */
}

.hero .hero-sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 30em;
}

.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Hero graphic: abstract masked-record motif (pure CSS, no fake UI) ---- */
.hero-art { position: relative; min-height: 320px; }

.hero-art::before {
  content: "";
  position: absolute;
  inset: 10% 5%;
  background: radial-gradient(closest-side, rgba(129, 140, 248, 0.28), transparent 70%);
  filter: blur(8px);
}

.masked-card {
  position: relative;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 70px rgba(2, 0, 60, 0.55);
  padding: 30px 28px;
  max-width: 420px;
  margin: 0 auto;
}

@media (prefers-reduced-transparency: reduce) {
  .masked-card { background: var(--bg-raise); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.masked-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--indigo-pale);
  background: rgba(79, 70, 229, 0.28);
  border: 1px solid rgba(129, 140, 248, 0.4);
  border-radius: var(--radius-chip);
  padding: 4px 10px;
}

.masked-row { margin-top: 22px; }

.masked-label {
  height: 9px;
  width: 34%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
}

.masked-value {
  margin-top: 9px;
  height: 16px;
  border-radius: var(--radius-chip);
  background: repeating-linear-gradient(
    90deg,
    rgba(129, 140, 248, 0.5) 0 26px,
    rgba(129, 140, 248, 0.14) 26px 34px
  );
}

.masked-row:nth-child(3) .masked-label { width: 26%; }
.masked-row:nth-child(3) .masked-value { width: 82%; }
.masked-row:nth-child(4) .masked-label { width: 42%; }
.masked-row:nth-child(4) .masked-value { width: 64%; }

.masked-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-3);
}

/* ---- Buttons (pill) ---- */
.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--indigo);
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.38);
}
.btn-primary:hover { background: var(--indigo-deep); }

.btn-ghost {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--indigo-light); background: var(--glass-strong); }

/* ---- Sections ---- */
.section { padding: 88px 0; }

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.section-intro { margin-top: 14px; color: var(--text-2); max-width: 36em; }

/* ---- Value props: 3-cell asymmetric bento ---- */
.bento {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.bento-cell {
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 30px 28px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.bento-cell:hover { border-color: rgba(129, 140, 248, 0.45); transform: translateY(-2px); }

.bento-feature {
  background:
    radial-gradient(480px 300px at 90% -10%, rgba(79, 70, 229, 0.4), transparent 65%),
    linear-gradient(160deg, rgba(79, 70, 229, 0.2), rgba(255, 255, 255, 0.02));
}

.bento-cell h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.bento-cell p { margin-top: 10px; color: var(--text-2); }

.bento-feature .bento-kicker {
  font-size: 15px;
  font-weight: 700;
  color: var(--indigo-light);
  margin-bottom: 14px;
}

/* ---- How it works: numbered rail ---- */
.steps { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 0; }

.step {
  position: relative;
  padding: 28px 0 28px 64px;
  border-top: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 1px solid var(--line-soft); }

.step-num {
  position: absolute;
  left: 0;
  top: 26px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--indigo-pale);
  background: rgba(79, 70, 229, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: var(--radius-pill);
}

.step h3 { font-size: 19px; font-weight: 700; }

.step p { margin-top: 8px; color: var(--text-2); max-width: 46em; }

/* ---- Compliance band ---- */
.compliance {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.02));
  padding: 72px 0;
}

.compliance-list {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  list-style: none;
}

.compliance-list li { border-left: 2px solid var(--indigo-light); padding-left: 18px; }

.compliance-list strong { display: block; font-size: 17px; font-weight: 700; }

.compliance-list span.desc { display: block; margin-top: 6px; color: var(--text-2); font-size: 15px; }

/* ---- Download CTA: centered manifesto (one centered moment per page) ---- */
.cta-final { text-align: center; padding: 104px 0; }

.cta-final h2 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.cta-final .cta-disclaimer {
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--text-3);
  max-width: 44em;
}

.cta-final .hero-cta { margin-top: 32px; justify-content: center; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(2, 1, 14, 0.6);
  padding: 56px 0 44px;
  font-size: 14px;
}

.footer-tagline { color: var(--text-3); margin-top: 10px; max-width: 34em; }

.footer-cols { display: grid; grid-template-columns: 1fr; gap: 30px; }

.footer-heading { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

.footer-cols ul { list-style: none; }

.footer-cols li { margin-bottom: 9px; }

.footer-cols a { color: var(--text-2); transition: color 0.2s ease; }
.footer-cols a:hover { color: var(--indigo-light); text-decoration: none; }

.footer-legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
}

/* ---- Legal / content pages ---- */
.page-main { padding: 64px 0 88px; }

.page-main .page-body { max-width: 760px; }

.page-title {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.page-lede { margin-top: 16px; color: var(--text-2); }

.legal-section { margin-top: 40px; }

.legal-section h2 { font-size: 18px; font-weight: 700; color: var(--text); }

.legal-section p { margin-top: 9px; color: var(--text-2); }

.legal-updated {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-3);
}

.contact-panel {
  margin-top: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 26px 28px;
  transition: border-color 0.25s ease;
}
.contact-panel:hover { border-color: rgba(129, 140, 248, 0.4); }

.contact-panel h2 { font-size: 16px; font-weight: 700; }

.contact-panel p { margin-top: 8px; color: var(--text-2); }

.steps-list { margin-top: 14px; padding-left: 22px; color: var(--text-2); }

.steps-list li { margin-bottom: 9px; }

/* ---- 404 ---- */
.notfound { padding: 120px 0; }
.notfound h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
.notfound p { margin-top: 14px; color: var(--text-2); }
.notfound .btn { margin-top: 28px; }

/* ---- Entrance + scroll-reveal motion ----
   Hidden states exist ONLY under html.js-motion (set by assets/motion.js).
   JS-off or reduced-motion: everything renders static and visible. */
html.js-motion .hero h1,
html.js-motion .hero .hero-sub,
html.js-motion .hero .hero-cta,
html.js-motion .hero-art {
  opacity: 0;
  transform: translateY(18px);
  animation: wc-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
html.js-motion .hero .hero-sub { animation-delay: 0.08s; }
html.js-motion .hero .hero-cta { animation-delay: 0.16s; }
html.js-motion .hero-art { animation-delay: 0.22s; }

@keyframes wc-rise {
  to { opacity: 1; transform: translateY(0); }
}

html.js-motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js-motion .reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html.js-motion .hero h1,
  html.js-motion .hero .hero-sub,
  html.js-motion .hero .hero-cta,
  html.js-motion .hero-art,
  html.js-motion .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---- Desktop ---- */
@media (min-width: 768px) {
  .hero { padding: 96px 0 112px; }

  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }

  .section { padding: 104px 0; }

  .bento {
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: auto auto;
  }
  .bento-feature { grid-row: 1 / 3; }

  .steps { margin-top: 56px; }
  .step { padding: 34px 0 34px 84px; }
  .step-num { top: 32px; width: 46px; height: 46px; font-size: 16px; }

  .compliance { padding: 88px 0; }
  .compliance-list { grid-template-columns: repeat(3, 1fr); gap: 34px; }

  .footer-cols { grid-template-columns: 2fr 1fr 1fr; }
}
