:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #121520;
  --muted: #586071;
  --line: #e2e5ee;
  --accent: #3352f0;
  --accent-2: #0f9f8f;
  --accent-ink: #ffffff;
  --wave-a: rgba(51, 82, 240, 0.35);
  --wave-b: rgba(15, 159, 143, 0.30);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f16;
    --surface: #141925;
    --text: #e8ebf2;
    --muted: #9aa3b5;
    --line: #252c3b;
    --accent: #7d93ff;
    --accent-2: #2fd3bf;
    --accent-ink: #0c0f16;
    --wave-a: rgba(125, 147, 255, 0.40);
    --wave-b: rgba(47, 211, 191, 0.30);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow > * { max-width: 720px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .site-header { background: var(--bg); }
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; }
.mark rect { fill: var(--accent); }
.mark path {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 3;
  stroke-linecap: round;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-zh { font-weight: 650; font-size: 16px; }
.brand-en { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted);
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--line); text-decoration: none; }
.nav .lang {
  margin-left: 6px;
  border: 1px solid var(--line);
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 112px;
  padding-bottom: 200px;
}
.eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 750;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.lead {
  max-width: 640px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  margin-bottom: 32px;
}
.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 16px;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }

.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 240px;
  pointer-events: none;
}
.wave {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.wave-a { stroke: var(--wave-a); animation: drift-a 24s linear infinite; }
.wave-b { stroke: var(--wave-b); animation: drift-b 30s linear infinite; }
@keyframes drift-a { from { transform: translateX(0); } to { transform: translateX(720px); } }
@keyframes drift-b { from { transform: translateX(0); } to { transform: translateX(-480px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave-a, .wave-b { animation: none; }
}

/* Sections */
.section { padding: 88px 0; }
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 {
  font-size: clamp(26px, 3.4vw, 32px);
  font-weight: 700;
  margin-bottom: 28px;
}
.section h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.note {
  color: var(--muted);
  padding-left: 14px;
  border-left: 3px solid var(--accent-2);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
}
.card-no {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.card h3 { font-size: 20px; font-weight: 650; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }

.contact { margin: 0; display: grid; gap: 18px; }
.contact div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.contact dt { color: var(--muted); }
.contact dd { margin: 0; word-break: break-word; }
.contact .hint { display: block; color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner { text-align: center; }
.footer-inner p { margin: 0 0 4px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }

/* 404 */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.error-page h1 { margin-bottom: 8px; }
.error-code {
  font-size: clamp(64px, 14vw, 120px);
  font-weight: 750;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .bar { height: 58px; }
  .brand-en { display: none; }
  .nav a { padding: 6px 7px; font-size: 14px; }
  .hero-inner { padding-top: 72px; padding-bottom: 168px; }
  .br-wide { display: none; }
  .waves { height: 180px; }
  .section { padding: 64px 0; }
  .contact div { grid-template-columns: 1fr; gap: 2px; }
}
