/* 灵梭官网样式。配色取自 brand/README.md：深蓝 #1E4A97、蓝 #4565B6、淡紫 #A991C6、蜜桃 #F4C3AE */

@font-face {
  font-family: "Lingsuo Serif";
  src: url("/assets/fonts/lingsuo-serif.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --navy: #1E4A97;
  --blue: #4565B6;
  --lilac: #A991C6;
  --peach: #F4C3AE;
  --ink: #1D3B73;
  --deep: #16346E;

  --bg: #FBFAFD;
  --bg-tint: #F3F1F9;
  --surface: #FFFFFF;
  --text: #22304F;
  --muted: #5B6685;
  --line: #E3E0EE;
  --heading: var(--ink);
  --accent: var(--navy);
  --accent-text: #FFFFFF;
  --shadow: 0 1px 2px rgba(22, 52, 110, .06), 0 12px 32px -12px rgba(22, 52, 110, .18);

  --serif: "Lingsuo Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --radius: 14px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1A33;
    --bg-tint: #13213F;
    --surface: #182850;
    --text: #DCE3F5;
    --muted: #A3B0CF;
    --line: #2A3B66;
    --heading: #F2F4FB;
    --accent: #8EA6EA;
    --accent-text: #0F1A33;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--sans);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--heading); font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 0; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 99; top: 8px; left: 8px; padding: 8px 14px; background: var(--surface); border-radius: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { height: 54px; width: auto; margin-left: -6px; }
.brand__dark { display: none; }
@media (prefers-color-scheme: dark) { .brand__light { display: none; } .brand__dark { display: block; } }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--accent); }
.nav-toggle { display: none; }

/* 通用 */
.eyebrow { color: var(--blue); font-size: 13px; letter-spacing: .18em; font-weight: 600; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--lilac); } }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { color: var(--heading); border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--lilac); }

/* 首屏 */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 92% 10%, color-mix(in srgb, var(--lilac) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 70% 100%, color-mix(in srgb, var(--peach) 26%, transparent), transparent 70%);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 88px 0 96px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: .02em; }
.hero__lead { margin-top: 22px; font-size: clamp(18px, 2vw, 21px); color: var(--heading); }
.hero__story { margin-top: 18px; max-width: 34em; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* 首屏右侧：一根线串起一次上架 */
.loom { position: relative; margin: 0; padding: 26px 22px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.loom__steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
/* 一根丝线从第一步穿到最后一步：深蓝 → 淡紫 → 蜜桃 */
.loom__steps::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; background: linear-gradient(var(--navy), var(--blue) 40%, var(--lilac) 75%, var(--peach)); }
.loom__steps li {
  counter-increment: s;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  font-size: 15px; color: var(--heading);
  backdrop-filter: blur(2px);
}
.loom__steps li::after { content: "0" counter(s); margin-left: auto; font: 600 12px/1 var(--sans); color: var(--muted); letter-spacing: .1em; }
.loom__dot { position: relative; z-index: 1; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent); }
.loom__steps li:nth-child(3) .loom__dot { background: var(--lilac); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lilac) 22%, transparent); }
.loom__steps li:nth-child(4) .loom__dot { background: #C9A3C0; box-shadow: 0 0 0 4px color-mix(in srgb, #C9A3C0 22%, transparent); }
.loom__steps .is-you { border-color: color-mix(in srgb, var(--peach) 70%, var(--line)); background: color-mix(in srgb, var(--peach) 18%, var(--surface)); font-weight: 600; }
.loom__steps .is-you .loom__dot { background: var(--peach); box-shadow: 0 0 0 4px color-mix(in srgb, var(--peach) 35%, transparent); }
.loom figcaption { position: relative; margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* 分段 */
.section { padding: 96px 0; }
.section--tint { background: var(--bg-tint); }
.section__head { max-width: 46em; margin-bottom: 44px; }
.section__head h2, .contact h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section__lead { margin-top: 16px; color: var(--muted); font-size: 17px; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card { padding: 34px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card--feature { position: relative; overflow: hidden; }
.card--feature::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--navy), var(--blue), var(--lilac), var(--peach)); }
.card__mark { width: 56px; height: 56px; margin-bottom: 14px; }
.card__kicker { font-size: 13px; color: var(--muted); letter-spacing: .08em; margin-bottom: 8px; }
.card h3 { font-size: 23px; margin-bottom: 14px; }
.card > p { color: var(--muted); }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 14px; height: 8px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.ticks strong { color: var(--heading); }
.ticks em { font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--peach) 55%, transparent) 0); }
.grid-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-list li { padding: 16px; border-radius: 12px; background: var(--bg-tint); }
.grid-list b { display: block; color: var(--heading); font-family: var(--serif); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.grid-list span { font-size: 14px; line-height: 1.65; color: var(--muted); }
.fine { margin-top: 18px; font-size: 13px; line-height: 1.7; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { position: relative; padding: 30px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps__no { display: block; font: 600 34px/1 var(--serif); background: linear-gradient(120deg, var(--navy), var(--lilac) 70%, var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px; }
.steps h3 { font-size: 20px; margin-bottom: 10px; }
.steps p { color: var(--muted); }

.section--deep { background: var(--deep); color: #DCE3F5; position: relative; overflow: hidden; }
.section--deep::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(closest-side, rgba(169, 145, 198, .35), transparent); pointer-events: none; }
.section--deep h2, .section--deep h3 { color: #FFFFFF; }
.section--deep .eyebrow { color: var(--peach); }
.promises { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promise { padding: 28px; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.promise h3 { font-size: 20px; margin-bottom: 10px; }
.promise p { color: #C5D0EA; }
.promise__more { position: relative; z-index: 1; margin-top: 28px; color: #C5D0EA; }
.section--deep a { color: var(--peach); }

.contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; }
.contact__list { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.contact__list dt { color: var(--muted); }
.contact__list dd { margin: 0; color: var(--heading); font-weight: 600; word-break: break-all; }

.footer { background: #0E1E42; color: #A9B6D6; padding: 36px 0; font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.footer img { width: 36px; height: 36px; }
.footer a { color: #DCE3F5; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* 政策页 */
.doc { padding: 64px 0 96px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(30px, 4vw, 40px); }
.doc__meta { margin-top: 12px; color: var(--muted); font-size: 14px; }
.doc h2 { font-size: 22px; margin: 44px 0 14px; padding-top: 8px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.doc th { background: var(--bg-tint); color: var(--heading); font-weight: 600; }
.doc .table-wrap { overflow-x: auto; }
.doc__back { display: inline-block; margin-bottom: 26px; font-size: 14px; }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound img { width: 96px; margin: 0 auto 20px; }
.notfound p { margin: 14px 0 28px; color: var(--muted); }

/* 平板 */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; padding: 64px 0 72px; }
  .loom { max-width: 520px; }
  .duo, .contact { grid-template-columns: 1fr; }
  .steps, .promises { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .br-wide { display: none; }
}

/* 手机 */
@media (max-width: 680px) {
  .topbar__inner { height: 60px; }
  .brand img { height: 46px; }
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
    border: 0; background: none; color: var(--heading); cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
  .nav-toggle__bar::before { position: absolute; top: -6px; }
  .nav-toggle__bar::after { position: absolute; top: 6px; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 6px var(--gutter) 14px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 16px; }
  .card, .steps li, .promise { padding: 24px 20px; }
  .grid-list { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
