/* =========================================================
   天辰登陆 · 共享外壳样式 /assets/site.css
   星舰控制台视觉：深空蓝基底 · 霓虹青光轨 · 暖金节点
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, picture, svg, video, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; }

/* ---------- tokens ---------- */
:root {
  --ink-900: #081229;
  --ink-800: #102147;
  --ink-glass: #1B356B;
  --cyan: #2BE3D2;
  --cyan-deep: #12A99C;
  --gold: #F3B54A;
  --gold-light: #FFD98F;
  --paper: #E8EFFA;
  --muted: #9DB2D2;
  --solid: #F4F8FF;

  --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --top-h: 68px;
  --rail-w: 0px;
  --gutter: clamp(18px, 4vw, 44px);
  --shell-max: 1180px;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 24px;

  --line-soft: rgba(157, 178, 210, 0.18);
  --line-cyan: rgba(43, 227, 210, 0.22);
  --shadow-deep: 0 26px 60px -34px rgba(2, 6, 18, 0.95);
}

@media (min-width: 1024px) {
  :root {
    --top-h: 76px;
    --rail-w: 268px;
  }
}

/* ---------- base ---------- */
html { background-color: var(--ink-900); }

body {
  min-height: 100vh;
  padding-top: var(--top-h);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 620px at 10% -8%, rgba(43, 227, 210, 0.13), transparent 62%),
    radial-gradient(900px 560px at 94% 2%, rgba(243, 181, 74, 0.09), transparent 60%),
    radial-gradient(1200px 820px at 50% 118%, rgba(27, 53, 107, 0.55), transparent 72%);
  background-repeat: no-repeat;
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

@media (min-width: 768px) { body { font-size: 17px; } }
@media (min-width: 1280px) { body { font-size: 18px; } }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: #ffffff;
}

h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }

p { text-wrap: pretty; }

::selection {
  background: rgba(43, 227, 210, 0.35);
  color: #04141a;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--cyan);
  color: #04141a;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

/* ---------- header shell ---------- */
.frame-header { position: relative; z-index: 70; }

.frame-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 74;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  padding: 0 var(--gutter);
  background: linear-gradient(180deg, rgba(8, 18, 41, 0.97) 0%, rgba(8, 18, 41, 0.74) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-cyan);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 6px 4px;
  border-radius: var(--radius-s);
  flex: none;
}

.brand__mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: conic-gradient(from 205deg, var(--cyan) 0deg, var(--ink-800) 150deg, var(--gold) 280deg, var(--cyan) 360deg);
  box-shadow: 0 0 0 1px rgba(43, 227, 210, 0.45), 0 0 22px rgba(43, 227, 210, 0.32);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 1px solid rgba(255, 217, 143, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .brand__mark { animation: mark-orbit 26s linear infinite; }
}

@keyframes mark-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.brand__tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.frame-top__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn--solid {
  background: var(--cyan);
  color: #04141a;
  box-shadow: 0 10px 26px -12px rgba(43, 227, 210, 0.9);
}

.btn--solid:hover { background: var(--cyan-deep); color: #04141a; }

.btn--ghost {
  border-color: rgba(43, 227, 210, 0.5);
  color: var(--cyan);
}

.btn--ghost:hover { background: rgba(43, 227, 210, 0.12); color: var(--cyan); }

.btn--gold {
  background: var(--gold);
  color: #241703;
  box-shadow: 0 10px 26px -14px rgba(243, 181, 74, 0.95);
}

.btn--gold:hover { background: var(--gold-light); }

.btn--quiet {
  border-color: rgba(157, 178, 210, 0.42);
  color: var(--paper);
}

.btn--quiet:hover { border-color: var(--gold); color: var(--gold-light); }

.btn:active { transform: translateY(1px); }

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(43, 227, 210, 0.45);
  background: rgba(27, 53, 107, 0.55);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle__label { line-height: 1; }

/* ---------- rail navigation ---------- */
.rail {
  position: fixed;
  top: var(--top-h);
  left: 0;
  bottom: 0;
  z-index: 72;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 20px 24px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(27, 53, 107, 0.66) 0%, rgba(8, 18, 41, 0.9) 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line-cyan);
}

.rail__caption {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--cyan);
  text-transform: uppercase;
}

.rail__list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, rgba(43, 227, 210, 0.6), rgba(157, 178, 210, 0.1));
}

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 14px 11px 28px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--ink-800);
  border: 1px solid rgba(157, 178, 210, 0.5);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rail__link:hover {
  color: var(--paper);
  background: rgba(43, 227, 210, 0.08);
  transform: translateX(2px);
}

.rail__link:hover::before {
  background: var(--cyan);
  border-color: var(--cyan);
}

.rail__link[aria-current="page"] {
  color: #ffffff;
  background: rgba(43, 227, 210, 0.13);
  border-color: rgba(43, 227, 210, 0.55);
  box-shadow: 0 14px 34px -20px rgba(43, 227, 210, 0.95);
}

.rail__link[aria-current="page"]::before {
  background: var(--cyan);
  border-color: var(--gold-light);
  box-shadow: 0 0 14px rgba(43, 227, 210, 0.9);
}

.rail__note {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- progress ---------- */
.frame-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--top-h);
  height: 2px;
  z-index: 78;
  background: rgba(157, 178, 210, 0.1);
  pointer-events: none;
}

.frame-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transition: width 0.12s linear;
}

@media (min-width: 1024px) {
  .frame-progress { left: var(--rail-w); }
}

/* ---------- compact / mobile navigation ---------- */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }

  .rail {
    top: var(--top-h);
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - var(--top-h));
    padding: 18px var(--gutter) 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line-cyan);
    box-shadow: var(--shadow-deep);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s linear;
  }

  .rail[data-open] {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .rail__note { margin-top: 14px; }
}

@media (max-width: 639px) {
  .frame-top__actions .btn { display: none; }
}

/* ---------- footer ---------- */
.frame-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: linear-gradient(180deg, rgba(16, 33, 71, 0.42) 0%, rgba(8, 18, 41, 0.97) 100%);
  border-top: 1px solid var(--line-cyan);
}

.frame-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(340px, 46%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(43, 227, 210, 0));
}

.frame-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 3vw, 42px);
  width: 100%;
  max-width: calc(var(--shell-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 66px) var(--gutter) clamp(22px, 3vw, 34px);
}

@media (min-width: 760px) {
  .frame-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .frame-footer__inner { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; }
}

.frame-footer__brand { display: flex; flex-direction: column; align-items: flex-start; }

.frame-footer__signoff {
  margin-top: 14px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.frame-footer__brand .btn { margin-top: 18px; }

.frame-footer__title {
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--cyan);
}

.frame-footer__list { display: flex; flex-direction: column; gap: 9px; }

.frame-footer__list a {
  color: var(--paper);
  font-size: 0.94rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.frame-footer__list a:hover { color: var(--gold-light); transform: translateX(2px); }

.frame-footer__list--plain li {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
  word-break: break-word;
}

@media (min-width: 1080px) {
  .frame-footer__contact {
    padding-left: clamp(16px, 2vw, 28px);
    border-left: 1px solid var(--line-soft);
  }
}

.frame-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: calc(var(--shell-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 16px var(--gutter) 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.frame-footer__icp { position: relative; padding-left: 14px; }

.frame-footer__icp::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--gold);
}

.frame-footer__year { font-family: var(--font-mono); }

/* ---------- layout utilities ---------- */
.container {
  width: 100%;
  max-width: calc(var(--shell-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: calc(1440px + var(--gutter) * 2); }

.band { padding-block: clamp(34px, 6vw, 84px); }

.band--tint {
  background: linear-gradient(180deg, rgba(16, 33, 71, 0.5), rgba(8, 18, 41, 0.2));
  border-block: 1px solid var(--line-soft);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 34px);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.grid--sidebar { grid-template-columns: 1fr; }

@media (min-width: 900px) {
  .grid--sidebar { grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.9fr); }
}

/* ---------- typography utilities ---------- */
.display {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.8;
  color: #cddaf0;
}

.prose { max-width: 68ch; }

.prose p { margin-bottom: 1.1em; }

.prose p:last-child { margin-bottom: 0; }

.prose h2 { margin-top: 1.7em; margin-bottom: 0.6em; }

.prose h3 { margin-top: 1.5em; margin-bottom: 0.5em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--cyan);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--cyan);
}

/* ---------- panels ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 38px);
  border-radius: var(--radius-l);
  border: 1px solid var(--line-soft);
}

.panel--glass {
  background: rgba(27, 53, 107, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-deep);
}

.panel--solid {
  background: var(--solid);
  color: #16233c;
  border-color: rgba(16, 33, 71, 0.14);
}

.panel--solid h2,
.panel--solid h3 { color: #0b1730; }

.panel--solid .num { color: #0f8d84; }

.panel--gold {
  border-color: rgba(243, 181, 74, 0.5);
  background: linear-gradient(140deg, rgba(243, 181, 74, 0.16), rgba(27, 53, 107, 0.55));
}

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(43, 227, 210, 0.12);
  border: 1px solid rgba(43, 227, 210, 0.4);
  color: var(--cyan);
}

.chip--gold {
  background: rgba(243, 181, 74, 0.14);
  border-color: rgba(243, 181, 74, 0.5);
  color: var(--gold-light);
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  padding-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(157, 178, 210, 0.45);
}

.breadcrumbs a:hover { color: var(--cyan); }

.breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- media frames ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  border: 1px solid rgba(43, 227, 210, 0.2);
  background: linear-gradient(135deg, rgba(27, 53, 107, 0.85), rgba(8, 18, 41, 0.96));
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 3 / 4; }

.media__glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(8, 18, 41, 0.86), rgba(8, 18, 41, 0));
}

.media__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 18, 41, 0.82);
  border: 1px solid rgba(43, 227, 210, 0.42);
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ---------- reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
