/* INFINITY / interactive city constellation. Scoped to the city network. */
#network {
  --orbit-orange: #ff8c42; --orbit-ice: #a6cbdc;
  position: relative; isolation: isolate;
  padding: clamp(72px, 7vw, 116px) 0 68px;
  background: radial-gradient(ellipse at 18% 56%, #142638 0, transparent 49%), #080d14;
}
#network::after { content: "INFINITY"; bottom: -18px; right: 2vw; font-size: clamp(100px, 16vw, 260px); color: #ffffff02; pointer-events: none; }
#network .space-center-network-head { align-items: end; margin-bottom: 48px; gap: 48px; }
#network .space-center-network-head .eyebrow { color: var(--orbit-orange); letter-spacing: .22em; }
#network .space-center-network-head .eyebrow > span { background: var(--orbit-orange); }
#network .space-center-network-head h2 { margin-top: 22px; font-size: clamp(36px, 4vw, 62px); line-height: 1.15; letter-spacing: -.05em; }
#network .space-center-network-head > p { max-width: 380px; font-size: 1rem; color: #9baeba; }
#network .space-center-network-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: clamp(30px, 4vw, 64px); }

#network .space-city-directory { min-width: 0; }
#network .space-city-directory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-top: 1px solid #ffffff25; color: #c7d5df; font-size: .875rem; }
#network .space-city-directory-head > span { display: flex; align-items: center; gap: 10px; letter-spacing: .08em; }
#network .space-city-directory-head i { width: 6px; height: 6px; background: var(--orbit-orange); box-shadow: 0 0 14px #ff8c4280; }
#network .space-city-directory-head p { margin: 0; color: #8499aa; font-size: .875rem; }
#network .space-city-directory-head strong { margin-right: 5px; color: #f2f7fc; font: 400 1.3rem/1 Arial, sans-serif; }
#network .space-orbit-map { position: relative; isolation: isolate; aspect-ratio: 1.1; min-height: 480px; }
#network .space-orbit-earth {
  position: absolute; z-index: -1; inset: -3% -10%;
  background: url('./assets/space-center/hero-orbit-v2.png') 65% 50% / cover no-repeat;
  opacity: .32;
  mask-image: radial-gradient(ellipse, #000 0, #0009 36%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse, #000 0, #0009 36%, transparent 70%);
  transform: translate(var(--orbit-drift-x, 0px), var(--orbit-drift-y, 0px));
  transition: transform .8s ease-out; pointer-events: none;
}
#network .space-orbit-routes { position: absolute; width: 100%; height: 100%; inset: 0; overflow: visible; pointer-events: none; }
#network .orbit-track { fill: none; stroke: #9dc8e142; stroke-width: 1; vector-effect: non-scaling-stroke; }
#network .orbit-track-inner { stroke: #9dc8e155; }
#network .orbit-track-dashed { stroke: #9dc8e120; stroke-dasharray: 2 8; animation: orbit-stream 40s linear infinite; animation-play-state: paused; }
#network.is-orbit-visible:not(.orbit-motion-off) .orbit-track-dashed { animation-play-state: running; }
#network .orbit-crosshair { fill: none; stroke: #bddaea50; stroke-width: 1; vector-effect: non-scaling-stroke; }
#network .orbit-route { fill: none; stroke: var(--orbit-orange); stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px #ff8c4260); }
#network .orbit-route.is-traveling { stroke-dasharray: 1; animation: orbit-connect .9s cubic-bezier(.2,.65,.25,1) both; }
#network .orbit-traveler { fill: #fff2d5; filter: drop-shadow(0 0 7px #ff873b); }
#network .space-orbit-core { position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; flex-direction: column; color: #f1f8fd; pointer-events: none; }
#network .space-orbit-core > span { font-weight: 800; font-size: clamp(28px, 3.5vw, 48px); line-height: 1.3; letter-spacing: .1em; text-shadow: 0 0 35px #adcfe14d; }
#network .space-orbit-core > small { margin-top: 4px; color: var(--orbit-orange); font: 400 .75rem/1.4 Arial, sans-serif; letter-spacing: .28em; }
#network .space-center-city-tabs { position: absolute; inset: 0; display: block; max-height: none; margin: 0; border: 0; overflow: visible; }
#network .space-center-city-tabs button {
  --node-x: 27.1%; --node-y: 20.9%;
  position: absolute; left: var(--node-x); top: var(--node-y);
  transform: translate(-50%, -13px);
  display: flex; flex-direction: column; align-items: center; justify-content: start;
  gap: 0; width: 86px; min-height: 64px; height: auto;
  padding: 0; border: 0; background: none; box-shadow: none;
  color: #abc2d2; text-align: center; transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
#network .space-center-city-tabs button::before { content: ""; display: block; flex: none; width: 10px; height: 10px; margin: 8px 0 11px; border: 2px solid #a6cbdc; border-radius: 50%; background: #101e2a; box-shadow: 0 0 0 5px #adcfe109; transition: border-color .2s, box-shadow .3s, background .2s; }
#network .space-center-city-tabs button::after { content: ""; position: absolute; width: 28px; height: 28px; top: -1px; left: calc(50% - 14px); border: 1px solid transparent; border-radius: 50%; pointer-events: none; }
#network .space-center-city-tabs button > img,
#network .space-center-city-tabs button > span,
#network .space-center-city-tabs button > small { display: none; }
#network .space-center-city-tabs button > b { display: block; font-size: 1rem; font-weight: 500; line-height: 1.4; letter-spacing: .06em; text-shadow: 0 2px 8px #080d14; }
#network .space-center-city-tabs button:hover,
#network .space-center-city-tabs button.active { padding: 0; color: #fff; background: none; box-shadow: none; }
#network .space-center-city-tabs button:hover::before { background: #e1f5ff; border-color: #e1f5ff; box-shadow: 0 0 0 6px #adcfe116, 0 0 18px #adcfe180; }
#network .space-center-city-tabs button.active::before { background: var(--orbit-orange); border-color: #ffbc80; box-shadow: 0 0 20px #ff8c42b0; }
#network .space-center-city-tabs button.active::after { border-color: #ff9d4e80; animation: orbit-beacon 2.5s ease-out infinite; animation-play-state: paused; }
#network.is-orbit-visible:not(.orbit-motion-off) .space-center-city-tabs button.active::after { animation-play-state: running; }
#network .space-center-city-tabs button.active > b { color: #ffc89f; }
#network .space-center-city-tabs button:focus-visible { outline: 2px solid #ffbd85; outline-offset: 4px; border-radius: 3px; }
#network .space-center-city-tabs [data-space-city="taixing"] { --node-x: 66.9%; --node-y: 17.6%; }
#network .space-center-city-tabs [data-space-city="shanghai"] { --node-x: 89.8%; --node-y: 48.7%; }
#network .space-center-city-tabs [data-space-city="changsha"] { --node-x: 72.9%; --node-y: 83.1%; }
#network .space-center-city-tabs [data-space-city="hefei"] { --node-x: 33.1%; --node-y: 86.4%; }
#network .space-center-city-tabs [data-space-city="beijing"] { --node-x: 10.2%; --node-y: 55.3%; }
#network .space-center-city-tabs [data-space-city="quanzhou"] { --node-x: 50%; --node-y: 31%; }
#network .space-center-city-tabs [data-space-city="zhengzhou"] { --node-x: 70.9%; --node-y: 45.5%; }
#network .space-center-city-tabs [data-space-city="xinjiang"] { --node-x: 62.9%; --node-y: 69%; }
#network .space-center-city-tabs [data-space-city="wuhan"] { --node-x: 37.1%; --node-y: 69%; }
#network .space-center-city-tabs [data-space-city="chongqing"] { --node-x: 29.1%; --node-y: 45.5%; }
#network .space-orbit-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 0; border-bottom: 1px solid #ffffff25; }
#network .space-orbit-toolbar > p { margin: 0; color: #b9ccda; font-size: .875rem; line-height: 1.6; }
#network .space-orbit-toolbar > p > span { margin-right: 6px; color: var(--orbit-orange); }
#network .space-orbit-toolbar small { display: block; margin-top: 6px; color: #8195a6; font-size: .75rem; }
#network .space-orbit-toolbar button { display: inline-flex; gap: 10px; align-items: center; justify-content: center; flex: none; min-height: 46px; padding: 0 17px; border: 1px solid #d2e1eb40; border-radius: 24px; background: #ffffff04; font-size: .875rem; color: #dfeaf1; cursor: pointer; transition: border-color .2s, background .2s; }
#network .space-orbit-toolbar button:hover,
#network .space-orbit-toolbar button[aria-pressed="true"] { border-color: #ff8c4270; background: #ff8c4210; }
#network .orbit-tour-icon { color: var(--orbit-orange); font-size: 1.1rem; }

#network .space-orbit-viewer { position: relative; min-width: 0; padding-top: 16px; }
#network .space-orbit-viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 122px; padding-bottom: 25px; }
#network .space-orbit-viewer-head p { margin: 0 0 12px; color: #93a9b9; font-size: .75rem; letter-spacing: .12em; }
#network .space-orbit-viewer-head p > span:first-child { margin: 0 10px; color: #ff8c42; }
#network .space-orbit-viewer-head h3 { margin: 0; color: #eef5fa; font-size: clamp(32px, 3.5vw, 52px); line-height: 1.2; letter-spacing: -.03em; font-weight: 500; }
#network .space-orbit-index { color: #ffffff06; -webkit-text-stroke: 1px #7994a548; font: 400 clamp(64px, 7vw, 104px)/1 Arial, sans-serif; letter-spacing: -.07em; }
#network .space-center-city-stage { position: relative; display: grid; min-height: 0; min-width: 0; overflow: hidden; border: 0; background: transparent; }
#network .space-center-city-panel { position: relative; inset: auto; grid-area: 1 / 1; align-self: start; min-width: 0; width: 100%; margin: 0; transform: translateY(12px); pointer-events: none; transition: opacity .55s ease, visibility .55s, transform .65s var(--ease); }
#network .space-center-city-panel.active { transform: none; pointer-events: auto; }
#network .space-center-city-panel::after { display: none; }
#network .space-center-city-panel > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%); background: #111d28; }
#network [data-space-city-panel="quanzhou"] > img { object-position: 50% 25%; }
#network [data-space-city-panel="xinjiang"] > img { object-position: 50% 62%; }
#network [data-space-city-panel="chongqing"] > img { object-position: 50% 42%; }
#network [data-space-city-panel="wuhan"] > img { object-position: 50% 50%; }
#network .space-center-city-caption { position: static; display: flex; flex-direction: column; align-items: start; gap: 13px; padding: 25px 0 0; border: 0; background: transparent; }
#network .space-center-city-caption::before { content: ""; width: 34px; height: 2px; background: var(--orbit-orange); }
#network .space-center-city-caption > span { display: none; }
#network .space-center-city-caption > b { flex: none; color: #dce7ee; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.5; letter-spacing: -.02em; white-space: normal; overflow-wrap: anywhere; }
#network .space-center-city-caption > small { max-width: none; color: #90a6b7; font-size: .875rem; line-height: 1.8; text-align: left; white-space: normal; }
#network .space-orbit-viewer-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 24px; margin-top: 26px; border-top: 1px solid #ffffff20; }
#network .space-orbit-viewer-footer > p { display: flex; align-items: center; gap: 13px; margin: 0; color: #8297a7; font: 400 .75rem/1 Arial, sans-serif; }
#network #spaceOrbitProgress { color: #ffb77d; }
#network .orbit-progress-track { display: block; width: 100px; height: 2px; background: #d6e2ec20; }
#network .orbit-progress-track > i { display: block; width: 9.091%; height: 100%; background: var(--orbit-orange); transition: width .6s ease; }
#network .space-orbit-viewer-footer > div { display: flex; gap: 8px; }
#network .space-orbit-viewer-footer button { width: 46px; height: 46px; border: 1px solid #d2e1eb35; border-radius: 50%; background: none; color: #d6e5f0; font: 400 1.4rem/1 Arial, sans-serif; cursor: pointer; transition: background .2s, border-color .2s; }
#network .space-orbit-viewer-footer button:hover { background: #ff8c4220; border-color: var(--orbit-orange); }
#network .space-orbit-toolbar button:focus-visible,
#network .space-orbit-viewer-footer button:focus-visible { outline: 2px solid #ffc490; outline-offset: 4px; }
#network .space-orbit-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#network .space-orbit-viewer.is-switching .space-orbit-viewer-head h3 { animation: orbit-title .6s var(--ease) both; }
#network.orbit-motion-off .orbit-track-dashed,
#network.orbit-motion-off .space-center-city-tabs button.active::after { animation: none; }

@keyframes orbit-stream { to { stroke-dashoffset: -400; } }
@keyframes orbit-beacon { 0%, 100% { transform: scale(.8); opacity: .25; } 40% { transform: scale(1.45); opacity: .7; } 85% { transform: scale(1.8); opacity: 0; } }
@keyframes orbit-connect { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes orbit-title { from { opacity: .25; transform: translateY(9px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  #network .space-center-network-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; }
  #network .space-center-network-head { align-items: start; gap: 28px; }
  #network .space-center-city-tabs button { width: 60px; }
  #network .space-center-city-tabs button > b { font-size: .875rem; }
  #network .space-orbit-viewer-head { min-height: 96px; padding-bottom: 20px; }
  #network .space-orbit-index { font-size: 70px; }
  #network .space-orbit-toolbar { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  #network { padding: 64px 0 48px; }
  #network .space-center-network-head { flex-direction: column; margin-bottom: 30px; gap: 22px; }
  #network .space-center-network-head h2 { font-size: clamp(28px, 7.7vw, 46px); }
  #network .space-center-network-head > p { max-width: none; font-size: .9375rem; line-height: 1.8; }
  #network .space-center-network-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  #network .space-orbit-map { aspect-ratio: 1; min-height: 410px; }
  #network .space-orbit-core > span { font-size: 30px; }
  #network .space-orbit-core > small { font-size: .75rem; letter-spacing: .16em; }
  #network .space-center-city-tabs button { width: 48px; min-height: 54px; }
  #network .space-center-city-tabs button > b { font-size: .875rem; letter-spacing: 0; }
  #network .space-center-city-tabs button::before { margin-bottom: 8px; }
  #network .space-orbit-toolbar { flex-wrap: nowrap; gap: 8px; padding: 18px 0; }
  #network .space-orbit-toolbar > p { font-size: .8125rem; }
  #network .space-orbit-toolbar button { min-height: 44px; padding: 0 12px; gap: 7px; }
  #network .space-orbit-viewer { padding-top: 0; }
  #network .space-orbit-viewer-head { min-height: 90px; }
  #network .space-orbit-viewer-head h3 { font-size: 38px; }
  #network .space-center-city-caption { padding-top: 22px; }
  #network .space-center-city-caption > b { font-size: 22px; }
  #network .space-orbit-viewer-footer { margin-top: 20px; padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #network *, #network *::before, #network *::after { animation: none !important; transition: none !important; }
  #network .space-orbit-earth { transform: none; }
}
