/* ============ 乐鱼主站 · /assets/site.css ============ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body { margin: 0; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

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

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

table { border-collapse: collapse; }

/* ---------- tokens ---------- */
:root {
  --orange: #FF5A1F;
  --blue: #0B1B33;
  --midnight: #06101F;
  --yellow: #FFC53D;
  --cyan: #64F4D2;
  --green: #16A36A;
  --coral: #FF6B5E;
  --paper: #F7F4EE;
  --line: #D8D3C8;
  --slate: #5E6B7D;
  --ink: #111111;

  --font-sans: "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --hair: 1px;
}

/* ---------- base ---------- */
body {
  background: var(--paper);
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content {
  display: block;
  scroll-margin-top: 140px;
}

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

::selection {
  background: var(--orange);
  color: var(--blue);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: 0;
  z-index: 300;
  transform: translate(-50%, -140%);
  padding: 11px 24px;
  background: var(--orange);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  transition: transform .22s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ================= header ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--hair) solid var(--line);
}

/* 顶部状态细轨 */
.header-rail {
  background: var(--blue);
  color: var(--paper);
}

.header-rail__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: 42px;
}

.batch {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(247, 244, 238, .82);
}

.batch__dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(100, 244, 210, .18);
}

.batch__label {
  font-size: 11px;
}

.batch__num {
  color: var(--cyan);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
}

.header-rail__links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.rail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 5px;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: .16em;
  border-bottom: var(--hair) solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.rail-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.rail-link--icon {
  padding-block: 5px;
}

.rail-link__glyph {
  width: 14px;
  height: 14px;
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 0;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: .18em;
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease);
}

.site-header[data-open] .nav-toggle__bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

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

/* 居中刊头 */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 34px) var(--gutter) clamp(14px, 2vw, 22px);
  transition: padding .3s var(--ease);
}

.masthead__brand {
  position: relative;
  display: inline-block;
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--blue);
  transition: color .2s var(--ease), font-size .3s var(--ease);
}

.masthead__brand::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 9px;
  background: linear-gradient(90deg, var(--orange) 0 62%, var(--yellow) 62% 82%, var(--cyan) 82% 100%);
  transform: scaleX(.28);
  transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}

.masthead__brand:hover {
  color: var(--orange);
}

.masthead__brand:hover::after {
  transform: scaleX(1);
}

.masthead__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--slate);
}

/* 栏目索引 */
.primary-nav {
  border-top: var(--hair) solid var(--line);
  background: var(--paper);
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 2.6vw, 36px);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.primary-nav__list a {
  position: relative;
  display: inline-block;
  padding: 15px 2px 13px;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--blue);
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.primary-nav__list a:hover {
  color: var(--orange);
}

.primary-nav__list a[aria-current="page"] {
  color: var(--orange);
  border-bottom-color: var(--orange);
  font-weight: 700;
}

/* 滚动压缩态 */
@media (min-width: 881px) {
  .site-header.is-compact .masthead {
    padding-block: 9px 11px;
  }

  .site-header.is-compact .masthead__brand {
    font-size: clamp(20px, 2.2vw, 26px);
  }

  .site-header.is-compact .masthead__brand::after {
    height: 2px;
    margin-top: 6px;
  }

  .site-header.is-compact .masthead__tagline {
    display: none;
  }

  .site-header.is-compact .primary-nav__list a {
    padding-block: 10px 8px;
  }
}

/* ================= footer ================= */
.site-footer {
  position: relative;
  background: var(--midnight);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--orange) 0 44%,
    var(--yellow) 44% 60%,
    var(--cyan) 60% 72%,
    var(--coral) 72% 83%,
    var(--green) 83% 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1.3fr);
  gap: clamp(30px, 5vw, 72px);
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(46px, 7vw, 86px) var(--gutter) clamp(34px, 5vw, 58px);
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 16px;
}

.footer-brand__mark {
  justify-self: start;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--paper);
  transition: color .2s var(--ease);
}

.footer-brand__mark:hover {
  color: var(--yellow);
}

.footer-brand__desc {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(247, 244, 238, .68);
}

.footer-brand__meta {
  justify-self: start;
  padding-top: 12px;
  border-top: var(--hair) solid rgba(247, 244, 238, .16);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--cyan);
}

.footer-nav__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--yellow);
}

.footer-nav__list {
  display: grid;
  gap: 10px;
}

.footer-nav__list a {
  font-size: 14px;
  color: rgba(247, 244, 238, .8);
  border-bottom: var(--hair) solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-nav__list a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

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

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

.footer-contact__row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(247, 244, 238, .45);
}

.footer-contact__row dd {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(247, 244, 238, .86);
  word-break: break-word;
}

.footer-base {
  border-top: var(--hair) solid rgba(247, 244, 238, .15);
}

.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 22px var(--gutter) 36px;
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(247, 244, 238, .55);
}

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

.footer-legal a {
  color: rgba(247, 244, 238, .78);
  border-bottom: var(--hair) solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

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

.footer-icp {
  font-size: 11px;
  letter-spacing: .1em;
  color: rgba(247, 244, 238, .5);
}

/* ================= shared components ================= */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 8vw, 110px);
}

.section--paper { background: var(--paper); color: var(--blue); }
.section--deep { background: var(--blue); color: var(--paper); }
.section--midnight { background: var(--midnight); color: var(--paper); }
.section--orange { background: var(--orange); color: var(--blue); }

.section--deep .display,
.section--midnight .display { color: var(--paper); }

.section--deep .eyebrow,
.section--midnight .eyebrow { color: var(--cyan); }

.section--deep .lede,
.section--midnight .lede { color: rgba(247, 244, 238, .74); }

.section-head {
  display: grid;
  gap: 14px;
  max-width: 72ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head__title {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 800;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: var(--hair);
  background: var(--orange);
}

.display {
  font-size: clamp(56px, 9vw, 152px);
  font-weight: 200;
  line-height: .94;
  letter-spacing: -.04em;
  color: var(--blue);
}

.lede {
  max-width: 62ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.8;
  color: var(--slate);
}

.rule {
  height: var(--hair);
  border: 0;
  margin: 0;
  background: var(--line);
}

.rule--light {
  background: rgba(247, 244, 238, .18);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--orange);
  color: var(--blue);
  border: var(--hair) solid var(--orange);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn--ghost:hover {
  background: var(--blue);
  color: var(--paper);
}

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--blue);
}

.btn--light:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--blue);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue);
  border-bottom: var(--hair) solid currentColor;
  transition: color .2s var(--ease), gap .2s var(--ease);
}

.link-arrow::after {
  content: "→";
  transition: transform .2s var(--ease);
}

.link-arrow:hover {
  color: var(--orange);
  gap: 12px;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.section--deep .link-arrow,
.section--midnight .link-arrow { color: var(--paper); }

.section--deep .link-arrow:hover,
.section--midnight .link-arrow:hover { color: var(--cyan); }

/* cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 30px);
  background: #fff;
  border: var(--hair) solid var(--line);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 26px;
  height: 3px;
  background: var(--orange);
}

.card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.card--deep {
  background: var(--blue);
  border-color: rgba(247, 244, 238, .18);
  color: var(--paper);
}

.card--deep:hover {
  border-color: var(--cyan);
}

.card--accent {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--blue);
}

/* tags & status */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--yellow);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1.4;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: .1em;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--slate);
}

.status--live::before { background: var(--cyan); }
.status--ok::before { background: var(--green); }
.status--warn::before { background: var(--coral); }

/* stats */
.stat {
  display: grid;
  gap: 6px;
  padding-block: 18px;
  border-top: var(--hair) solid var(--line);
}

.stat__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

.stat__label {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--slate);
}

.stat--accent .stat__value { color: var(--orange); }

.section--deep .stat,
.section--midnight .stat { border-top-color: rgba(247, 244, 238, .18); }

.section--deep .stat__label,
.section--midnight .stat__label { color: rgba(247, 244, 238, .6); }

.section--deep .stat__value,
.section--midnight .stat__value { color: var(--cyan); }

/* breadcrumb */
.breadcrumb {
  padding-block: clamp(18px, 3vw, 28px);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--slate);
}

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

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "／";
  margin-left: 8px;
  color: var(--line);
}

.breadcrumb a {
  border-bottom: var(--hair) solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

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

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

/* figure containers */
.figure {
  position: relative;
  overflow: hidden;
  background: var(--blue);
}

.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.figure__ph {
  display: grid;
  place-content: center;
  width: 100%;
  height: 100%;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  background: repeating-linear-gradient(135deg, #0B1B33 0 14px, #06101F 14px 28px);
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x5 { aspect-ratio: 4 / 5; }
.figure--1x1 { aspect-ratio: 1 / 1; }
.figure--21x9 { aspect-ratio: 21 / 9; }

.figure--slant {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.figure--framed {
  box-shadow: 12px 12px 0 0 var(--orange);
}

/* fold groups */
.fold {
  border-top: var(--hair) solid var(--line);
}

.fold:last-child {
  border-bottom: var(--hair) solid var(--line);
}

.fold__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 0;
  text-align: left;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--blue);
  transition: color .2s var(--ease);
}

.fold__trigger:hover {
  color: var(--orange);
}

.fold__icon {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.fold__icon::before,
.fold__icon::after {
  content: "";
  position: absolute;
  background: var(--orange);
  transition: transform .24s var(--ease), opacity .24s var(--ease);
}

.fold__icon::before {
  inset: 6px 0 auto 0;
  height: 2px;
}

.fold__icon::after {
  inset: 0 auto 0 6px;
  width: 2px;
}

.fold[data-open] .fold__icon::after {
  transform: scaleY(0);
  opacity: 0;
}

.fold__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s var(--ease);
}

.fold[data-open] .fold__panel {
  grid-template-rows: 1fr;
}

.fold__content {
  overflow: hidden;
  min-height: 0;
  padding-bottom: 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--slate);
  transition: padding-bottom .32s var(--ease);
}

.fold[data-open] .fold__content {
  padding-bottom: 22px;
}

/* scroll progress */
.scroll-progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  z-index: 150;
  pointer-events: none;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

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

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

/* ================= responsive ================= */
@media (max-width: 1000px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

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

  .header-rail__links .rail-link:not(.rail-link--icon) {
    display: none;
  }

  .header-rail__links {
    gap: 16px;
  }

  .primary-nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    border-top: 0;
    background: var(--blue);
    transition: max-height .34s var(--ease), visibility .34s var(--ease);
  }

  .site-header[data-open] .primary-nav {
    max-height: min(72vh, 540px);
    overflow-y: auto;
    visibility: visible;
    border-top: var(--hair) solid rgba(247, 244, 238, .14);
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
  }

  .primary-nav__list a {
    display: block;
    padding: 15px 2px;
    color: var(--paper);
    font-size: 15px;
    letter-spacing: .1em;
    border-bottom: var(--hair) solid rgba(247, 244, 238, .14);
  }

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

  .primary-nav__list a[aria-current="page"] {
    padding-left: 12px;
    color: var(--yellow);
    border-bottom-color: var(--yellow);
    background: linear-gradient(90deg, rgba(255, 90, 31, .2), transparent 72%);
  }

  .site-header.is-compact .masthead {
    padding-block: 12px 14px;
  }

  .site-header.is-compact .masthead__brand {
    font-size: clamp(22px, 6vw, 30px);
  }

  .grid-12 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-base__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .display {
    font-size: clamp(48px, 15vw, 72px);
  }

  .figure--framed {
    box-shadow: 8px 8px 0 0 var(--orange);
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  .batch__label {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

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

  .scroll-progress {
    display: none;
  }

  .card:hover {
    transform: none;
  }
}
