/* ==========================================================================
   优乐在线 — 共享站点套件 / assets/site.css
   冷底 + 高亮信号：雾蓝 / 墨绿 / 苗银冷灰 / 酸橙黄
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 76px) + 20px);
  background: #101C22;
}

body { margin: 0; }

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

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

button { background: none; border: 0; cursor: pointer; }

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

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

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

/* ---------- tokens ---------- */
:root {
  --fog-950: #101C22;
  --fog-800: #1C2E36;
  --mist-300: #A9C0CA;
  --silver-100: #E8EEF0;
  --silver-300: #C9D3D7;
  --lime: #D8FF3E;
  --lime-deep: #5E7410;
  --ink-900: #0B2B24;
  --paper: #F7FAF8;
  --amber: #FFB020;
  --coral: #FF6B57;

  --bg: #101C22;
  --fg: #F7FAF8;
  --muted: #A9C0CA;
  --line: rgba(201, 211, 215, 0.22);
  --line-soft: rgba(201, 211, 215, 0.12);

  --font-display: "阿里巴巴普惠体 3.0", "思源黑体", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", "苹方", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;

  --header-h: 76px;
  --wrap-max: 1240px;
  --gutter: 20px;

  --shadow-hard: 10px 10px 0 rgba(11, 43, 36, 0.9);
  --shadow-hard-sm: 6px 6px 0 rgba(11, 43, 36, 0.9);
  --shadow-hard-light: 8px 8px 0 rgba(201, 211, 215, 0.5);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
}

@media (max-width: 899px) {
  :root { --header-h: 64px; --gutter: 16px; }
}

/* ---------- base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background:
    radial-gradient(120% 70% at 80% -10%, rgba(28, 46, 54, 0.9) 0%, rgba(16, 28, 34, 0) 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--lime); color: var(--ink-900); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- utilities ---------- */
.wrap {
  width: min(var(--wrap-max), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.stack > * + * { margin-top: var(--stack-gap, 16px); }

.mono-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.display-index {
  display: block;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--mist-300);
}

.display-index--solid {
  color: var(--lime);
  -webkit-text-stroke: 0;
}

.body-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--silver-100);
}

.body-text p + p { margin-top: 14px; }
.body-text strong { color: var(--lime); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid var(--ink-900);
  background: var(--lime);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: var(--shadow-hard-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(11, 43, 36, 0.9);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(11, 43, 36, 0.9);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--silver-300);
  box-shadow: 6px 6px 0 rgba(201, 211, 215, 0.22);
}

.btn--ghost:hover {
  background: rgba(216, 255, 62, 0.08);
  color: var(--lime);
  border-color: var(--lime);
  box-shadow: 8px 8px 0 rgba(216, 255, 62, 0.22);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist-300);
}

.breadcrumb a {
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumb a:hover { color: var(--lime); border-bottom-color: var(--lime); }

.breadcrumb-sep { color: var(--lime-deep); }

/* ---------- layout primitives ---------- */
.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}

.content-col { min-width: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; top: auto; }
}

/* ---------- tags & panels ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--lime-deep);
  background: rgba(216, 255, 62, 0.08);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.panel {
  background: var(--fog-800);
  border: 2px solid var(--ink-900);
  border-left: 3px solid var(--lime);
  box-shadow: var(--shadow-hard-sm);
  padding: clamp(18px, 2.4vw, 28px);
}

.panel--light {
  background: var(--paper);
  color: var(--ink-900);
  border-color: var(--ink-900);
  border-left-color: var(--lime-deep);
  box-shadow: var(--shadow-hard-light);
}

.panel--light .h2,
.panel--light .body-text { color: var(--ink-900); }

/* ---------- media frames (页面阶段放图) ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--fog-800);
  border: 3px solid var(--ink-900);
  box-shadow: var(--shadow-hard-sm);
}

.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

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

.media-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist-300);
}

@media (max-width: 640px) {
  .media-frame { box-shadow: 5px 5px 0 rgba(11, 43, 36, 0.9); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 220;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transform: translateY(-220%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--paper);
  outline-offset: 2px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(16, 28, 34, 0.88) 0%, rgba(16, 28, 34, 0) 100%);
  transition: background-color 280ms var(--ease), box-shadow 280ms var(--ease),
    border-color 280ms var(--ease);
  border-bottom: 2px solid transparent;
}

.site-header.is-scrolled {
  background: var(--ink-900);
  border-bottom: 2px solid var(--lime-deep);
  box-shadow: 0 8px 0 rgba(11, 43, 36, 0.55);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 40px);
  width: min(1440px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
  height: var(--header-h);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding-block: 6px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid var(--lime);
  background: rgba(216, 255, 62, 0.07);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(216, 255, 62, 0.42);
  pointer-events: none;
}

.brand-mark-dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(216, 255, 62, 0.16);
  animation: lamp-breathe 2s ease-in-out infinite;
}

@keyframes lamp-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.78); }
}

.brand-text { display: block; min-width: 0; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand-tagline {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--mist-300);
  white-space: nowrap;
}

/* status lamp */
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(169, 192, 202, 0.34);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist-300);
  white-space: nowrap;
}

.status-lamp {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--mist-300);
  animation: lamp-breathe 2s ease-in-out infinite;
}

.status-lamp--ok { background: var(--lime); }
.status-lamp--warn { background: var(--amber); }
.status-lamp--alert { background: var(--coral); animation: none; }

/* nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--silver-100);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease);
}

.nav-link:hover { color: var(--lime); }

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--lime);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--lime);
  color: var(--ink-900);
  border: 2px solid var(--lime);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 4px 4px 0 rgba(11, 43, 36, 0.7);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav-cta::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
}

.nav-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(11, 43, 36, 0.7);
}

.nav-cta:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(11, 43, 36, 0.7);
}

/* toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 13px;
  border: 2px solid rgba(201, 211, 215, 0.6);
  background: rgba(11, 43, 36, 0.45);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: var(--lime); color: var(--lime); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 200ms var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease), top 200ms var(--ease);
}

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

.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* scroll progress */
.nav-scrollbar {
  height: 2px;
  width: 100%;
  background: rgba(169, 192, 202, 0.16);
  overflow: hidden;
}

.nav-scrollbar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  transition: width 80ms linear;
}

/* ---------- header responsive ---------- */
@media (max-width: 1080px) {
  .header-status { display: none; }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    width: min(88vw, 400px);
    height: 100dvh;
    margin-left: 0;
    padding: calc(var(--header-h) + 22px) var(--gutter) 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-900);
    border-left: 3px solid var(--lime);
    box-shadow: -12px 0 0 rgba(11, 43, 36, 0.45);
    overflow-y: auto;
    visibility: hidden;
    transform: translateX(102%);
    transition: transform 280ms var(--ease), visibility 280ms var(--ease);
  }

  .site-header[data-open] .site-nav {
    visibility: visible;
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item { border-bottom: 1px solid rgba(201, 211, 215, 0.16); }

  .nav-link {
    display: block;
    width: 100%;
    padding: 16px 4px;
    font-size: 16px;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    padding-left: 12px;
    border-left: 3px solid var(--lime);
  }

  .nav-cta {
    justify-content: center;
    width: 100%;
    margin-top: 24px;
    padding: 14px 16px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .brand-tagline { display: none; }
  .brand-name { font-size: 17px; }
  .brand-mark { width: 30px; height: 30px; }
}

html.nav-locked { overflow: hidden; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--ink-900);
  color: var(--paper);
  border-top: 3px solid var(--lime);
}

.footer-inner {
  width: min(var(--wrap-max), 100% - (var(--gutter) * 2));
  margin-inline: auto;
  padding-top: clamp(40px, 5.5vw, 76px);
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

.footer-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 2px solid rgba(201, 211, 215, 0.16);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.footer-motto {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--lime);
}

.footer-summary {
  font-size: 14px;
  line-height: 1.75;
  color: var(--mist-300);
  max-width: 46ch;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 28px clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 211, 215, 0.2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer-links li + li { margin-top: 2px; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  font-size: 14px;
  color: var(--silver-100);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.footer-links a::before {
  content: "—";
  color: rgba(216, 255, 62, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
}

.footer-links a:hover {
  color: var(--lime);
  transform: translateX(3px);
}

.footer-contact-list {
  display: grid;
  gap: 14px;
}

.footer-contact-item {
  display: grid;
  gap: 3px;
}

.footer-contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist-300);
}

.footer-contact-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--lime-deep);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(169, 192, 202, 0.9);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 20px 28px;
  border-top: 1px solid rgba(201, 211, 215, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist-300);
}

.footer-icp { white-space: nowrap; }
.footer-copy { white-space: nowrap; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-legal a {
  color: var(--silver-100);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-legal a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

@media (max-width: 900px) {
  .footer-lead { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   动效降级
   ========================================================================== */
@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;
    scroll-behavior: auto !important;
  }

  .brand-mark-dot,
  .status-lamp { animation: none; }

  .nav-scrollbar-fill { transition: none; }
}
