/* ==========================================================================
   卫星云图网 — 共享样式
   设计系统参考 WordPress.com Design System (DESIGN-wordpress-com.md)
   纯 HTML5 + 原生 JS，无外部 CSS/JS 依赖
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 颜色 */
  --colors-primary: #3858e9;
  --colors-primary-hover: #304bc6;
  --colors-primary-active: rgba(56, 88, 233, 0.65);
  --colors-background: #ffffff;
  --colors-background-dark: #101517;
  --colors-surface: #f6f7f7;
  --colors-text-primary: #101517;
  --colors-text-secondary: #3c434a;
  --colors-text-muted: #646970;
  --colors-text-inverse: #ffffff;
  --colors-border-light: #c3c4c7;
  --colors-border-input: #e3e3e3;
  --colors-focus-ring: #3858e9;
  --colors-disabled-bg: #e9e9e9;
  --colors-disabled-text: #757575;

  /* 间距 (4px 基准) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 9px;
  --radius-full: 999px;

  /* 阴影 */
  --elevation-card: rgba(29, 29, 29, 0.01) 0 4px 4px 0,
    rgba(29, 29, 29, 0.02) 0 3px 3px 0, rgba(29, 29, 29, 0.02) 0 1px 2px 0,
    rgba(29, 29, 29, 0.03) 0 1px 1px 0;
  --elevation-hover-lift: 0 8px 16px rgba(29, 29, 29, 0.08);
  --elevation-focus-outline: 0 0 0 1px rgba(195, 196, 199, 0.7);

  /* 动效 */
  --motion-duration: 0.15s;
  --motion-easing: ease-out;

  /* 布局 */
  --layout-max-width: 1152px;
  --layout-gutter: 24px;

  /* 字体 (使用系统字体作为 recoleta-web / inter-variable-web 的本地替代) */
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
    sans-serif;
  --font-mono: Menlo, Consolas, Monaco, monospace;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--colors-text-primary);
  background-color: var(--colors-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--colors-primary);
  text-decoration: underline;
  transition: opacity var(--motion-duration) var(--motion-easing);
}
a:hover {
  opacity: 0.85;
}
a:focus-visible {
  outline: 2px solid var(--colors-focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--colors-text-primary);
}

h1 {
  font-size: 40px;
}
h2 {
  font-size: 32px;
}
h3 {
  font-size: 24px;
}

p {
  margin-bottom: var(--space-4);
}

ul,
ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

/* ---------- 布局工具 ---------- */
.container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}

.section {
  padding: var(--space-12) 0;
}
.section--surface {
  background-color: var(--colors-surface);
}
.section--dark {
  background-color: var(--colors-background-dark);
  color: var(--colors-text-inverse);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--colors-text-inverse);
}

.section__head {
  text-align: center;
  margin-bottom: var(--space-8);
}
.section__head h2 {
  margin-bottom: var(--space-2);
}
.section__head p {
  color: var(--colors-text-muted);
  max-width: 640px;
  margin: 0 auto;
  margin-bottom: 0;
}
.section--dark .section__head p {
  color: rgba(255, 255, 255, 0.7);
}

.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 11.5px 36px 12.5px 36px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--motion-duration) var(--motion-easing),
    color var(--motion-duration) var(--motion-easing),
    border-color var(--motion-duration) var(--motion-easing),
    opacity var(--motion-duration) var(--motion-easing);
}
.btn:focus-visible {
  outline: 2px solid var(--colors-focus-ring);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--colors-primary);
  color: var(--colors-text-inverse);
}
.btn--primary:hover {
  background-color: var(--colors-primary-hover);
  opacity: 0.85;
}
.btn--primary:active {
  background-color: var(--colors-primary);
  opacity: 0.65;
  transition: none;
}

.btn--secondary {
  background-color: var(--colors-background);
  color: var(--colors-primary);
  border: 1px solid var(--colors-primary);
}
.btn--secondary:hover {
  background-color: var(--colors-surface);
  color: var(--colors-primary-hover);
  border-color: var(--colors-primary-hover);
  opacity: 0.85;
}

.btn--ghost {
  background-color: transparent;
  color: var(--colors-text-inverse);
  padding: 0 8px;
  font-size: 13px;
}
.btn--ghost:hover {
  opacity: 0.85;
}

.btn--lg {
  font-size: 18px;
  padding: 14px 40px 15px 40px;
}

/* ---------- 卡片 ---------- */
.card {
  background-color: var(--colors-background);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-card);
  padding: var(--space-10);
  transition: box-shadow var(--motion-duration) var(--motion-easing),
    transform var(--motion-duration) var(--motion-easing);
}
.card--surface {
  background-color: var(--colors-surface);
  box-shadow: none;
  border: 1px solid var(--colors-border-input);
}
.card:hover {
  box-shadow: var(--elevation-hover-lift);
  transform: translateY(-2px);
}
.card__title {
  font-size: 20px;
  margin-bottom: var(--space-2);
}
.card__text {
  color: var(--colors-text-secondary);
  font-size: 15px;
}
.card__link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  background-color: var(--colors-background-dark);
  color: var(--colors-text-inverse);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}
.topbar__inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--colors-text-inverse);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--colors-primary), #6b8dff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav__link {
  color: var(--colors-text-inverse);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 0 8px;
  text-decoration: none;
  position: relative;
  transition: opacity var(--motion-duration) var(--motion-easing);
  line-height: 64px;
  display: inline-block;
}
.nav__link:hover {
  opacity: 0.85;
}
.nav__link[aria-current="page"] {
  opacity: 1;
  font-weight: 600;
}
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: var(--colors-primary);
}
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--colors-text-inverse);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--colors-primary);
  color: var(--colors-text-inverse);
  padding: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}
.hero__display {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.15;
  font-weight: 400;
  color: var(--colors-text-inverse);
  margin-bottom: var(--space-4);
  max-width: 760px;
}
.hero__lead {
  font-size: 19px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-6);
}
.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hero__stats {
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero__stat .num {
  font-family: var(--font-display);
  font-size: 32px;
  display: block;
}
.hero__stat .label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- 实时云图预览 ---------- */
.preview-map {
  background-color: #0b1a2a;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--elevation-hover-lift);
  position: relative;
}
.preview-map__img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: #0b1a2a;
}
.preview-map__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background-color: rgba(16, 21, 23, 0.85);
  color: var(--colors-text-inverse);
  font-size: 13px;
}
.preview-map__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- 标签 / 徽章 ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background-color: rgba(56, 88, 233, 0.1);
  color: var(--colors-primary);
}
.tag--live {
  background-color: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.tag--live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: #dc2626;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ---------- 产品导航卡 ---------- */
.product-card {
  background-color: var(--colors-background);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-card);
  overflow: hidden;
  transition: box-shadow var(--motion-duration) var(--motion-easing),
    transform var(--motion-duration) var(--motion-easing);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--elevation-hover-lift);
  transform: translateY(-2px);
}
.product-card__thumb {
  aspect-ratio: 16 / 10;
  background-color: #0b1a2a;
  overflow: hidden;
}
.product-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card__body {
  padding: var(--space-4) var(--space-4) var(--space-6);
}
.product-card__title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.product-card__meta {
  font-size: 13px;
  color: var(--colors-text-muted);
  margin-bottom: var(--space-2);
}
.product-card__desc {
  font-size: 14px;
  color: var(--colors-text-secondary);
}

/* ---------- 卫星介绍卡 ---------- */
.sat-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.sat-card__num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--colors-primary);
  color: var(--colors-text-inverse);
  font-family: var(--font-display);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sat-card__title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.sat-card__text {
  font-size: 14px;
  color: var(--colors-text-secondary);
}

/* ---------- 时间轴 / 播放器 ---------- */
.player {
  background-color: var(--colors-background-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.player__stage {
  position: relative;
  background-color: #050a10;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player__img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}
.player__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  gap: var(--space-2);
}
.player__loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--colors-text-inverse);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.player__controls {
  padding: var(--space-3) var(--space-4);
  background-color: rgba(0, 0, 0, 0.4);
  color: var(--colors-text-inverse);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.player__btn {
  background: none;
  border: none;
  color: var(--colors-text-inverse);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background-color var(--motion-duration) var(--motion-easing);
}
.player__btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}
.player__timeline {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.player__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.player__range {
  flex: 1;
  accent-color: var(--colors-primary);
}
.player__speed {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--colors-text-inverse);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ---------- 产品切换 Tab ---------- */
.tabs {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--colors-border-input);
  margin-bottom: var(--space-6);
}
.tab {
  background: none;
  border: none;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--colors-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--motion-duration) var(--motion-easing),
    border-color var(--motion-duration) var(--motion-easing);
}
.tab:hover {
  color: var(--colors-text-primary);
}
.tab[aria-selected="true"] {
  color: var(--colors-primary);
  border-bottom-color: var(--colors-primary);
}

/* ---------- 画廊 ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}
.gallery__item {
  background-color: var(--colors-background);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-card);
  overflow: hidden;
  transition: box-shadow var(--motion-duration) var(--motion-easing),
    transform var(--motion-duration) var(--motion-easing);
  cursor: pointer;
}
.gallery__item:hover {
  box-shadow: var(--elevation-hover-lift);
  transform: translateY(-2px);
}
.gallery__thumb {
  aspect-ratio: 4 / 3;
  background-color: #0b1a2a;
  overflow: hidden;
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__caption {
  padding: var(--space-3) var(--space-4);
}
.gallery__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.gallery__meta {
  font-size: 12px;
  color: var(--colors-text-muted);
  font-family: var(--font-mono);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--colors-border-input);
}
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-4) 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--colors-text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.faq-item__q::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--colors-primary);
  transition: transform var(--motion-duration) var(--motion-easing);
}
.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}
.faq-item__a {
  padding: 0 0 var(--space-4);
  color: var(--colors-text-secondary);
  font-size: 15px;
}

/* ---------- 页脚 ---------- */
.footer {
  background-color: var(--colors-background-dark);
  color: var(--colors-text-inverse);
  padding: var(--space-12) 0 var(--space-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: var(--space-3);
}
.footer__about {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  max-width: 320px;
}
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-3);
}
.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__col li {
  margin-bottom: var(--space-2);
}
.footer__col a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: none;
}
.footer__col a:hover {
  color: var(--colors-text-inverse);
  opacity: 1;
}
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: var(--space-4) 0;
  font-size: 13px;
  color: var(--colors-text-muted);
}
.breadcrumb a {
  color: var(--colors-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--colors-primary);
}
.breadcrumb span {
  margin: 0 var(--space-2);
  color: var(--colors-border-light);
}

/* ---------- 通知 ---------- */
.notice {
  background-color: rgba(56, 88, 233, 0.08);
  border-left: 3px solid var(--colors-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--colors-text-secondary);
  margin-bottom: var(--space-4);
}

/* ---------- 工具类 ---------- */
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.muted {
  color: var(--colors-text-muted);
}
.mono {
  font-family: var(--font-mono);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 26px;
  }
  .hero__display {
    font-size: 36px;
  }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--colors-background-dark);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3) var(--layout-gutter);
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav.is-open {
    display: flex;
  }
  .nav__link {
    line-height: 1.5;
    padding: var(--space-3) 0;
    font-size: 15px;
  }
  .nav__link[aria-current="page"]::after {
    display: none;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .hero__stats {
    gap: var(--space-4);
  }
  .section {
    padding: var(--space-10) 0;
  }
}

@media (max-width: 480px) {
  .hero__display {
    font-size: 30px;
  }
  .btn {
    padding: 10px 24px 11px;
  }
}

/* ==========================================================================
   首页（index.html）
   ========================================================================== */

/* 首屏徽章 */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.16);
  color: var(--colors-text-inverse);
  margin-bottom: var(--space-4);
}
.hero__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: #4ade80;
  animation: pulse 1.5s ease-in-out infinite;
}

/* 深色首屏上的浅色描边按钮 */
.btn--inverse {
  background-color: transparent;
  color: var(--colors-text-inverse);
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.btn--inverse:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  opacity: 1;
}

/* 预览区 */
.home-preview {
  max-width: 880px;
  margin: 0 auto;
}

.preview-map__loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  background-color: rgba(11, 26, 42, 0.72);
}
.preview-map.is-loading .preview-map__loading {
  display: flex;
}
.preview-map.is-loading .preview-map__loading::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--colors-text-inverse);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}
.preview-map.is-loading .preview-map__img {
  opacity: 0.35;
}
/* 无 JS 时的 noscript 提示常显 */
.preview-map noscript .preview-map__loading {
  display: flex;
}
.preview-map__name {
  font-weight: 500;
}
.preview-map__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* 预览参数表 */
.home-preview__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4) var(--space-6);
  margin: var(--space-6) 0 0;
  padding: var(--space-6) 0 0;
  border-top: 1px solid var(--colors-border-input);
}
.home-preview__meta > div {
  min-width: 0;
}
.home-preview__meta dt {
  font-size: 13px;
  color: var(--colors-text-muted);
  margin-bottom: 2px;
}
.home-preview__meta dd {
  font-size: 15px;
  font-weight: 500;
  color: var(--colors-text-primary);
  word-break: break-word;
}

.home-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.home-preview__hint {
  margin: var(--space-6) 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--colors-text-muted);
}
.home-preview__hint strong {
  color: var(--colors-text-secondary);
  font-weight: 600;
}

/* ---------- 首页：风云看地球入口卡 ---------- */
.earth-entry {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-8);
  border: 1px solid var(--colors-border-input);
  border-radius: var(--radius-md);
  background-color: var(--colors-background);
  text-decoration: none;
  transition: border-color var(--motion-duration) var(--motion-easing),
    box-shadow var(--motion-duration) var(--motion-easing),
    transform var(--motion-duration) var(--motion-easing);
}
.earth-entry:hover {
  border-color: var(--colors-primary);
  box-shadow: var(--elevation-hover-lift);
  transform: translateY(-2px);
  opacity: 1;
}
.earth-entry:focus-visible {
  outline: 2px solid var(--colors-focus-ring);
  outline-offset: 2px;
}

/* 纯 CSS 装饰球（无图片、无脚本，aria-hidden） */
.earth-entry__globe {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(
    circle at 34% 30%,
    #8fdcff 0%,
    #3aa6e6 24%,
    #1e6bb4 52%,
    #0c2c58 100%
  );
  box-shadow: inset -16px -12px 32px rgba(0, 0, 0, 0.5),
    0 10px 28px rgba(13, 47, 92, 0.32);
}
.earth-entry__globe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 42% 24% at 30% 36%, rgba(255, 255, 255, 0.9), transparent 68%),
    radial-gradient(ellipse 28% 18% at 70% 64%, rgba(255, 255, 255, 0.72), transparent 68%),
    radial-gradient(ellipse 20% 30% at 56% 22%, rgba(255, 255, 255, 0.6), transparent 68%),
    radial-gradient(ellipse 32% 14% at 78% 26%, rgba(255, 255, 255, 0.5), transparent 70%);
}
.earth-entry__globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(108deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 44%);
}

.earth-entry__body {
  min-width: 0;
}
.earth-entry__title {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--colors-text-primary);
  margin-bottom: var(--space-2);
}
.earth-entry__text {
  display: block;
  font-size: 15px;
  line-height: 1.7;
  color: var(--colors-text-secondary);
}
.earth-entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.earth-entry__tags span {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(56, 88, 233, 0.08);
  color: var(--colors-primary);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- 风云看地球（earth.html） ---------- */
/* 组件宽度恒为 100%（3D 与 2D 一致，切换视图不再跳变）。
   3D：画布铺满整宽，地球居中、直径 = min(可用宽度, 690px)，两侧露出星空底；
   2D：画布按 2:1 铺满整宽。
   画布由自身高度撑开外层，所以 .earth-stage 不再写 aspect-ratio。 */
.earth-stage {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 50%,
    #0d1f33 0%,
    #070d16 55%,
    #04070c 100%
  );
  box-shadow: var(--elevation-hover-lift);
}

/* 2D 视图：等经纬平面世界地图，容器底色改为纯深色 */
.earth-stage.is-2d {
  background: #050a10;
}

/* 使用说明段落：比画布略窄，便于阅读 */
.earth-note {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.earth-canvas {
  display: block;
  width: 100%;
  /* 3D 球体直径上限：宽屏时两侧留出星空底，窄屏时直接铺满整宽（无断点跳变） */
  height: min(calc(100vw - 2 * var(--layout-gutter)), 690px);
  cursor: grab;
  touch-action: none;
}
.earth-stage.is-2d .earth-canvas {
  height: auto;
  aspect-ratio: 2 / 1;
}
.earth-canvas.is-dragging {
  cursor: grabbing;
}

.earth-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  background-color: rgba(4, 7, 12, 0.72);
}
.earth-stage.is-loading .earth-loading,
.earth-stage.is-error .earth-loading,
.earth-stage noscript .earth-loading {
  display: flex;
}
.earth-stage.is-loading .earth-loading::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--colors-text-inverse);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}
.earth-stage.is-error .earth-loading {
  color: #fca5a5;
}

.earth-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.earth-bar__group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.earth-switch {
  display: inline-flex;
  border: 1px solid var(--colors-border-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--colors-background);
}
.earth-switch .earth-btn + .earth-btn {
  border-left: 1px solid var(--colors-border-input);
}

.earth-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border: none;
  background: none;
  color: var(--colors-text-secondary);
  cursor: pointer;
  transition: background-color var(--motion-duration) var(--motion-easing),
    color var(--motion-duration) var(--motion-easing);
}
.earth-btn:hover {
  background-color: var(--colors-surface);
  color: var(--colors-text-primary);
}
.earth-btn:focus-visible {
  outline: 2px solid var(--colors-focus-ring);
  outline-offset: -2px;
}
.earth-btn[aria-pressed="true"] {
  background-color: var(--colors-primary);
  color: var(--colors-text-inverse);
}
.earth-btn[aria-pressed="true"]:hover {
  background-color: var(--colors-primary-hover);
  color: var(--colors-text-inverse);
}
.earth-btn--ghost {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--colors-primary);
}
.earth-btn--ghost:hover {
  background-color: rgba(56, 88, 233, 0.08);
}

.earth-readout {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--colors-text-muted);
}
.earth-readout__sep {
  color: var(--colors-border-light);
}

@media (max-width: 768px) {
  .earth-entry {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
    padding: var(--space-6);
  }
  .earth-entry__globe {
    width: 104px;
    height: 104px;
  }
  .earth-entry__tags {
    justify-content: center;
  }
  .earth-bar {
    justify-content: center;
  }
  .earth-bar__group {
    justify-content: center;
    width: 100%;
  }
  .earth-readout {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .home-preview__meta {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3) var(--space-4);
  }
  .home-preview__actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .home-preview__meta {
    grid-template-columns: 1fr 1fr;
  }
  .home-preview__meta dd {
    font-size: 14px;
  }
}

/* ==========================================================================
   卫星详情页（satellite-*.html）
   ========================================================================== */

.sat-hero {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.sat-hero__body { flex: 1; min-width: 0; }
.sat-hero__tag {
  display: inline-block;
  padding: 3px 12px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(56, 88, 233, 0.1);
  color: var(--colors-primary);
  font-size: 13px;
  line-height: 1.6;
}
.sat-hero__lead {
  margin-top: var(--space-4);
  color: var(--colors-text-secondary);
  max-width: 720px;
}
.sat-hero__mark {
  flex-shrink: 0;
  width: 112px;
  height: 112px;
  border-radius: var(--radius-md);
  background: var(--colors-surface);
  border: 1px solid var(--colors-border-input);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sat-hero__mark img {
  width: 64px;
  height: auto;
}

.sat-params {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--colors-border-input);
  border: 1px solid var(--colors-border-input);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sat-param {
  background: var(--colors-background);
  padding: var(--space-4);
}
.sat-param dt {
  font-size: 13px;
  color: var(--colors-text-muted);
  margin-bottom: var(--space-1);
}
.sat-param dd {
  font-size: 15px;
  color: var(--colors-text-primary);
  line-height: 1.45;
}

/* ---------- 运行轨迹组件 ---------- */
.sat-orbit {
  max-width: 900px;
  margin: 0 auto;
}
.sat-orbit__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  background: #050a10 url("../img/orbit/world.jpg") no-repeat center center;
  background-size: 100% 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sat-orbit__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.sat-orbit__area,
.sat-orbit__icon {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.sat-orbit__area { opacity: 0.45; z-index: 1; }
.sat-orbit__icon { z-index: 2; }
.sat-orbit [hidden] { display: none; }

.sat-orbit__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--colors-text-muted);
}
.sat-orbit__legend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.sat-orbit__lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sat-orbit__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
}
.sat-orbit__dot--track { background: #ff3b30; }
.sat-orbit__dot--ahead { background: #ff3b30; opacity: 0.45; }
.sat-orbit__dot--now { background: #4ade80; }
.sat-orbit__dot--cover {
  background: rgba(64, 224, 208, 0.45);
  border: 1px solid rgba(64, 224, 208, 0.9);
}
.sat-orbit__dot--night {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(100, 105, 112, 0.6);
}

/* ---------- 正文段落 ---------- */
.sat-prose p {
  margin-bottom: var(--space-4);
  color: var(--colors-text-secondary);
}
.sat-prose p:last-child { margin-bottom: 0; }
.sat-prose strong { color: var(--colors-text-primary); }

/* ---------- 相关卫星 ---------- */
.sat-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.sat-related__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--colors-border-input);
  border-radius: var(--radius-md);
  background: var(--colors-background);
  text-decoration: none;
  transition: border-color var(--motion-duration) var(--motion-easing),
    box-shadow var(--motion-duration) var(--motion-easing);
}
.sat-related__item:hover {
  border-color: var(--colors-primary);
  box-shadow: var(--elevation-hover-lift);
  opacity: 1;
}
.sat-related__icon {
  width: 44px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--colors-surface);
  border-radius: var(--radius-sm);
}
.sat-related__icon img { width: 30px; height: auto; }
.sat-related__name {
  display: block;
  font-size: 15px;
  color: var(--colors-text-primary);
  font-weight: 500;
}
.sat-related__meta {
  display: block;
  font-size: 12px;
  color: var(--colors-text-muted);
  margin-top: 2px;
}

@media (max-width: 1024px) {
  .sat-params { grid-template-columns: repeat(2, 1fr); }
  .sat-related { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sat-hero { flex-direction: column-reverse; align-items: flex-start; gap: var(--space-6); }
  .sat-hero__mark { width: 88px; height: 88px; }
  .sat-hero__mark img { width: 50px; }
  .sat-params { grid-template-columns: 1fr 1fr; }
  .sat-related { grid-template-columns: 1fr; }
  .sat-orbit__bar { font-size: 12px; }
}

/* ==========================================================================
   云图产品详情页（product-*.html）与产品聚合页（products.html）
   ========================================================================== */

/* hidden 属性显隐兜底：本区块内多个元素自带 display，必须显式覆盖 */
.product-viewer [hidden] { display: none !important; }

/* 停更产品的 Hero 标签改为琥珀色，与实时产品区分 */
.sat-hero__tag--stale {
  background-color: #fff7e6;
  border: 1px solid #f2d28a;
  color: #7a5300;
}

/* ---------- 产品查看器 ---------- */
.product-viewer {
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0b1a2a;
  box-shadow: var(--elevation-hover-lift);
}
.product-viewer__stage {
  position: relative;
  width: 100%;
  min-height: 300px;
  background-color: #0b1a2a;
}
.product-viewer__img {
  display: block;
  width: 100%;
  height: auto;
}
.product-viewer__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  background: radial-gradient(circle at 50% 45%, #12283f 0%, #070d16 100%);
}
.product-viewer__loading small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* 超大原图的「点击加载」闸门 */
.product-viewer__gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: radial-gradient(circle at 50% 40%, #12283f 0%, #070d16 100%);
}
.product-viewer__gate-title {
  font-size: 15px;
  color: #ffffff;
  margin: 0;
}
.product-viewer__gate-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 460px;
  margin: 0;
}
.product-viewer__gate-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}
.product-viewer__gate .btn {
  margin-top: var(--space-1);
}

/* 数据已停更提示条 */
.product-stale {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  background-color: #fff7e6;
  border-bottom: 1px solid #f2d28a;
  font-size: 14px;
  line-height: 1.6;
  color: #7a5300;
}
.product-stale strong { color: #5c3d00; }

/* 信息条 */
.product-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  background-color: rgba(16, 21, 23, 0.88);
  color: var(--colors-text-inverse);
  font-size: 13px;
}
.product-viewer__label {
  color: rgba(255, 255, 255, 0.6);
  margin-right: var(--space-1);
}
.product-viewer__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.product-viewer__link {
  color: var(--colors-text-inverse);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 1px;
}
.product-viewer__link:hover { opacity: 0.85; }
.product-viewer__note {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--colors-text-muted);
}

/* ---------- 产品聚合页卡片 ---------- */
.product-card__badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.product-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  line-height: 1.7;
}
.product-badge--live {
  background-color: rgba(56, 88, 233, 0.1);
  color: var(--colors-primary);
}
.product-badge--stale {
  background-color: #fff7e6;
  border: 1px solid #f2d28a;
  color: #7a5300;
}
.product-badge--plain {
  background-color: var(--colors-surface);
  border: 1px solid var(--colors-border-input);
  color: var(--colors-text-muted);
}
.product-card__params {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
  font-size: 13px;
  color: var(--colors-text-muted);
}
.product-card__params span { white-space: nowrap; }

/* 卡片整体可点击（a 标签） */
a.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.product-card:hover { opacity: 1; }
a.product-card:focus-visible { outline: 2px solid var(--colors-focus-ring); outline-offset: 2px; }
a.product-card .card__title { color: var(--colors-text-primary); }
a.product-card .card__link { color: var(--colors-primary); }

@media (max-width: 768px) {
  .product-viewer__stage { min-height: 220px; }
  .product-viewer__bar { font-size: 12px; }
  .product-viewer__gate { padding: var(--space-6) var(--space-4); }
  .product-stale { font-size: 13px; }
}

/* ==========================================================================
   404 页面（404.html）
   注意：404.html 会被服务器在任意路径下返回，因此页内链接必须用绝对路径。
   ========================================================================== */

.error-page {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-8) 0 var(--space-4);
  text-align: center;
}
.error-page__code {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  letter-spacing: 4px;
  color: var(--colors-primary);
  opacity: 0.18;
}
.error-page__title {
  margin-top: var(--space-4);
  font-size: 32px;
}
.error-page__text {
  margin-top: var(--space-4);
  color: var(--colors-text-secondary);
}
.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

@media (max-width: 768px) {
  .error-page__code { font-size: 72px; }
  .error-page__title { font-size: 26px; }
  .error-page__actions .btn { padding: 11px 24px 12px 24px; }
}
