/* ==========================================================================
   bickey.net · 线路图
   bickey.net 居中换乘，每个领域一条线：在建的画虚线，运营中的画实线。
   首屏固定深色；下面的板块跟随深浅色。
   CSP 是 style-src 'self' / script-src 'self'：页面里不写 style="" 和内联脚本，SVG 的颜色也走这里。
   ========================================================================== */

@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-700.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-600.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  --font-display: "Sora", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --max: 1120px;
  --radius: 14px;

  /* 每个领域一种颜色，首屏和卡片共用 */
  --power: #f5a524;
  --embodied: #22c3d6;
  --medicine: #34c27a;
  --care: #ff6f91;
  --community: #6b8cff;

  /* 首屏固定深色 */
  --night: #08090c;
  --night-2: #101319;
  --night-text: #eef0f3;
  --night-muted: #8c93a0;
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #ecebe5;
  --text: #121419;
  --text-2: #3a3e47;
  --muted: #6b7079;
  --rule: #dcd9d0;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e12;
  --surface: #151820;
  --surface-2: #11141a;
  --text: #eceef1;
  --text-2: #c6cad1;
  --muted: #8c93a0;
  --rule: #262b35;
}

/* 没跑 theme-init.js（禁用了脚本）时跟系统走 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0c0e12; --surface: #151820; --surface-2: #11141a;
    --text: #eceef1; --text-2: #c6cad1; --muted: #8c93a0; --rule: #262b35;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
code { font-family: var(--font-mono); }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--community); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; left: 1rem; top: -5rem;
  padding: .6rem 1rem; background: var(--text); color: var(--bg); border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.eyebrow {
  margin: 0 0 .7rem; color: var(--muted);
  font-family: var(--font-display); font-weight: 700; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- 顶栏：压在首屏上，滚动后成为半透明深色条 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgb(8 9 12 / .78);
  border-bottom: 1px solid rgb(255 255 255 / .07);
  color: var(--night-text);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-inner { min-height: 60px; display: flex; align-items: center; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; margin-right: auto; text-decoration: none; }
.wordmark img { width: 30px; height: 30px; flex: none; }
.wordmark-name { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.wordmark-domain { color: var(--night-muted); font-family: var(--font-mono); font-size: .8rem; }
.topnav { display: flex; align-items: center; gap: .2rem; }
.topnav a {
  padding: .38rem .8rem; border-radius: 999px;
  text-decoration: none; font-weight: 650; font-size: .92rem; white-space: nowrap; color: var(--night-text);
}
.topnav a:hover { background: rgb(255 255 255 / .08); }
.theme-toggle {
  width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; padding: 0;
  background: transparent; border: 1px solid rgb(255 255 255 / .16); border-radius: 50%; cursor: pointer; color: var(--night-text);
}
.theme-toggle:hover { background: rgb(255 255 255 / .08); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (max-width: 560px) {
  .wordmark-domain { display: none; }
}

/* ---------- 首屏：左边标题，右边一套环绕轨道 ----------
   轨道动画改写自 Magic UI 的 OrbitingCircles / Ripple（MIT License, Copyright (c) Magic UI，
   https://github.com/magicuidesign/magicui）。原组件用内联 style 传角度，这里的 CSP 不允许，
   所以角度和半径都写成类。 */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(92vh, 860px); display: flex; align-items: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
  background:
    radial-gradient(70% 60% at 75% 50%, rgb(107 140 255 / .16), transparent 65%),
    radial-gradient(45% 45% at 10% 15%, rgb(245 165 36 / .07), transparent 70%),
    var(--night);
  color: var(--night-text);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / .08) 1px, transparent 1.1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(60% 70% at 72% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 70% at 72% 50%, #000 30%, transparent 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ripple {
  position: absolute; left: 72%; top: 50%; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / var(--o));
  background: rgb(255 255 255 / calc(var(--o) * .25));
  width: var(--s); height: var(--s);
  transform: translate(-50%, -50%);
  animation: ripple 3.4s ease-in-out infinite;
  animation-delay: var(--d);
}
.r1 { --s: 220px; --o: .14; --d: 0s; }
.r2 { --s: 330px; --o: .11; --d: .22s; }
.r3 { --s: 450px; --o: .09; --d: .44s; }
.r4 { --s: 580px; --o: .07; --d: .66s; }
.r5 { --s: 720px; --o: .05; --d: .88s; }
.r6 { --s: 870px; --o: .035; --d: 1.1s; border-style: dashed; }
@keyframes ripple {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(.94); }
}

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 2rem; }
.hero .eyebrow { color: var(--night-muted); }
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4rem, 11vw, 8.5rem); line-height: .92; letter-spacing: -.045em;
  background: linear-gradient(180deg, #ffffff 35%, #9aa3b5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 1.5rem 0 0; max-width: 24em; text-wrap: balance; font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 650; line-height: 1.55; }
.hero-note { margin: .6rem 0 0; color: var(--night-muted); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: .6rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; font-weight: 700; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: #0b0d12; }
.btn-light:hover { background: #e9ecf2; }
.btn-ghost { border-color: rgb(255 255 255 / .22); color: #fff; background: rgb(255 255 255 / .04); }
.btn-ghost:hover { border-color: rgb(255 255 255 / .45); background: rgb(255 255 255 / .08); }

.orbit {
  --r1: 140; --r2: 236;
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin-inline: auto;
}
.orbit-path {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%);
  border: 1px solid rgb(255 255 255 / .12);
}
.orbit-path-1 { width: calc(var(--r1) * 2px); height: calc(var(--r1) * 2px); }
.orbit-path-2 { width: calc(var(--r2) * 2px); height: calc(var(--r2) * 2px); border-style: dashed; border-color: rgb(255 255 255 / .1); }
.orbit-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #1b2030, #0b0d12 70%);
  border: 1px solid rgb(255 255 255 / .14);
  box-shadow: 0 0 0 10px rgb(255 255 255 / .025), 0 0 80px 10px rgb(107 140 255 / .28);
}
.orbit-core img { width: 72px; height: 72px; border-radius: 16px; }
.orbit-ring { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.orbit-item {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(calc(var(--angle) * 1deg)) translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg));
  animation: orbit calc(var(--duration) * 1s) linear infinite;
}
.orbit-ring-1 .orbit-item { --radius: var(--r1); --duration: 44; }
.orbit-ring-2 .orbit-item { --radius: var(--r2); --duration: 70; animation-direction: reverse; }
.a0 { --angle: 0; } .a45 { --angle: 45; } .a90 { --angle: 90; } .a165 { --angle: 165; }
.a180 { --angle: 180; } .a225 { --angle: 225; } .a270 { --angle: 270; } .a300 { --angle: 300; }
@keyframes orbit {
  0% { transform: rotate(calc(var(--angle) * 1deg)) translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg)); }
  100% { transform: rotate(calc(var(--angle) * 1deg + 360deg)) translateY(calc(var(--radius) * 1px)) rotate(calc(var(--angle) * -1deg - 360deg)); }
}
.d-power { --c: var(--power); }
.d-embodied { --c: var(--embodied); }
.d-medicine { --c: var(--medicine); }
.d-care { --c: var(--care); }
.d-community { --c: var(--community); }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .45rem .85rem .45rem .7rem; border-radius: 999px;
  background: rgb(16 19 25 / .82); border: 1px solid rgb(255 255 255 / .14);
  color: #f1f3f6; font-size: .95rem; font-weight: 700;
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / .7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.chip-plan { border-style: dashed; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.chip-live { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, #0b0d12); }
.spark { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px 2px var(--c); opacity: .75; }

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub, .hero-note { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .ripple { left: 50%; top: 72%; }
  .hero::before {
    mask-image: radial-gradient(70% 50% at 50% 72%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 50% at 50% 72%, #000 30%, transparent 100%);
  }
  .orbit { max-width: 480px; }
}
@media (max-width: 520px) {
  .orbit { --r1: 92; --r2: 138; max-width: 340px; }
  .orbit-core { width: 96px; height: 96px; }
  .orbit-core img { width: 52px; height: 52px; border-radius: 12px; }
  .chip { font-size: .8rem; padding: .32rem .6rem .32rem .5rem; gap: .35rem; }
  .chip::before { width: 7px; height: 7px; }
}

/* ---------- 线路卡片 ---------- */
.lines { padding: clamp(3rem, 7vw, 5rem) 0; }
.lines h2, .running h2 {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.2; letter-spacing: -.01em;
}
.line-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  margin: 1.8rem 0 1rem; padding: 0; list-style: none;
}
.line-card {
  position: relative; display: flex; flex-direction: column; gap: .2rem;
  padding: 1.4rem 1.3rem 1.2rem; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--rule); overflow: hidden;
}
.line-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--c) 0 6px, transparent 6px 14px);
}
.c-power { --c: var(--power); }
.c-embodied { --c: var(--embodied); }
.c-medicine { --c: var(--medicine); }
.c-care { --c: var(--care); }
.c-community { --c: var(--community); }
.line-no { color: var(--c); font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .08em; }
.line-card h3 { margin: .35rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.01em; }
.line-en { margin: 0; color: var(--muted); font-family: var(--font-display); font-weight: 600; font-size: .82rem; letter-spacing: .04em; }
.line-card p:not(.line-en) { margin: .7rem 0 0; color: var(--text-2); font-size: .95rem; flex: 1; }
.status {
  align-self: flex-start; margin-top: 1.1rem; padding: .12rem .6rem; border-radius: 999px;
  border: 1px dashed var(--c); color: var(--c); font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-decoration: none;
}
.status-live { border-style: solid; background: var(--c); color: #fff; }
@media (max-width: 980px) { .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .line-grid { grid-template-columns: 1fr; } }

/* 运营中的一条：横条，和在建的卡片区分开 */
.line-live {
  display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 1.3rem;
  background: var(--surface); border: 1px solid var(--rule); border-left: 6px solid var(--c); border-radius: var(--radius);
  text-decoration: none;
}
.line-live:hover { border-color: var(--c); }
.line-live-text { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.line-live-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.line-live-text span:last-child { color: var(--text-2); font-size: .95rem; }
.line-live .status { margin-top: 0; align-self: center; white-space: nowrap; }
@media (max-width: 560px) {
  .line-live { flex-wrap: wrap; }
  .line-live .status { margin-left: auto; }
}

/* ---------- 运营中的站点（次要位置，字号收小） ---------- */
.running { padding: clamp(2.4rem, 6vw, 3.6rem) 0 clamp(3rem, 7vw, 4.4rem); background: var(--surface-2); border-top: 1px solid var(--rule); }
.running h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.running-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem 2.4rem; margin-top: 1.4rem; }
.running h3 {
  margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--community);
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .14em; color: var(--muted);
}
.running ul { margin: 0; padding: 0; list-style: none; }
.running li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding: .42rem 0; border-bottom: 1px solid var(--rule); font-size: .93rem; }
.running li:last-child { border-bottom: 0; }
.running li a { font-weight: 650; text-decoration: none; }
.running li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.running .item-name { font-weight: 650; }
.running code { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
@media (max-width: 820px) { .running-grid { grid-template-columns: 1fr; } }

/* ---------- 页脚 ---------- */
.footer { background: var(--night); color: var(--night-muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; padding: 1.8rem 0 1rem; color: var(--night-text); }
.footer-inner .wordmark { margin-right: 0; }
.footer-inner p { margin: 0; color: var(--night-muted); font-size: .9rem; }
.disclaimer { margin-block: 0; padding: 0 0 1.6rem; font-size: .7rem; letter-spacing: .03em; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(3.5rem, 12vw, 7rem) 0; }
.notfound .hero-title { font-size: clamp(2.4rem, 8vw, 4.4rem); background: none; color: var(--text); letter-spacing: -.02em; }
.notfound .hero-sub { color: var(--text-2); font-weight: 500; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.notfound .btn { border-color: var(--text); color: var(--text); }
.notfound .btn-primary { background: var(--text); color: var(--bg); }
