:root {
  --ink: #0B1B2B;
  --ink-deep: #071320;
  --panel: #102A3E;
  --line: #16374F;
  --flame: #E84C1D;
  --flame-soft: #FF7A45;
  --teal: #2EC4B6;
  --teal-soft: #7CE0D6;
  --paper: #F4F6F8;
  --muted: #9FB2C2;
  --edge: #5B7085;
  --warn: #FFD166;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --shell: 1240px;
  --gutter: 24px;
  --header-h: 124px;
  --shadow-1: 0 2px 12px rgba(0, 0, 0, .35);
  --glow-line: inset 0 0 0 1px rgba(232, 76, 29, .18);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

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

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

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

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

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

a { color: inherit; }

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 520px at 82% -8%, rgba(232, 76, 29, .13), transparent 62%),
    radial-gradient(900px 480px at 4% 108%, rgba(46, 196, 182, .10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.02em;
}

h1 { font-size: 44px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 17px; letter-spacing: 0; }

strong { font-weight: 900; }
small { font-size: 14px; color: var(--muted); }

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

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

/* ---------- 工具类 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--teal);
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 12px;
}

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .16s var(--ease);
}

.btn--flame {
  background: var(--flame);
  color: var(--ink);
}

.btn--flame:hover { background: var(--flame-soft); }

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

.btn--ghost:hover {
  color: var(--flame-soft);
  border-color: var(--flame);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 14px;
}

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

/* ---------- 页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background-color: rgba(11, 27, 43, 0);
  background-image: linear-gradient(180deg, rgba(11, 27, 43, .96) 0%, rgba(11, 27, 43, .80) 58%, rgba(11, 27, 43, 0) 100%);
  border-bottom: 1px solid transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header[data-scrolled="true"] {
  background-color: var(--ink);
  background-image: none;
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-1);
}

.header-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0 12px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--flame);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-220%);
  transition: transform .16s var(--ease);
}

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

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--paper);
  text-decoration: none;
}

.brand__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background-image: linear-gradient(150deg, var(--flame), var(--flame-soft));
  color: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  transition: filter .2s var(--ease);
}

.brand:hover .brand__mark { filter: brightness(1.12); }

.brand__glyph {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-1px);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__name {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.brand__badge {
  align-self: flex-start;
  padding: 1px 6px;
  border: 1px solid rgba(46, 196, 182, .38);
  border-radius: 3px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.5;
}

/* 右侧动作 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.fav-btn:hover {
  color: var(--paper);
  border-color: var(--edge);
}

.fav-btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--edge);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.fav-btn[aria-pressed="true"] {
  color: var(--teal-soft);
  border-color: rgba(46, 196, 182, .5);
  background: rgba(46, 196, 182, .07);
}

.fav-btn[aria-pressed="true"] .fav-btn__dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(46, 196, 182, .18);
}

.fav-btn[data-flash="true"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, .22);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

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

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

.nav-toggle__bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

.nav-toggle__word {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
}

/* ---------- 主导航 ---------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(22, 55, 79, .8);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color .16s var(--ease);
}

.site-nav__link:hover { color: var(--paper); }

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

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--flame);
}

.site-nav__quick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav__quick-label {
  padding-right: 4px;
  color: var(--edge);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
}

.quick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: rgba(16, 42, 62, .62);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .16s var(--ease), color .16s var(--ease), background-color .16s var(--ease);
}

.quick::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--teal);
  transform: rotate(45deg);
}

.quick:hover {
  color: var(--teal-soft);
  border-color: var(--teal);
  background: rgba(46, 196, 182, .08);
}

/* 滚动进度 */
.header-progress {
  height: 2px;
  background: rgba(22, 55, 79, .7);
}

.header-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background-image: linear-gradient(90deg, var(--flame), var(--flame-soft) 55%, var(--teal));
  transition: width .1s linear;
}

/* ---------- 主内容占位 ---------- */
#main-content {
  padding-top: var(--header-h);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

[data-anchor] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--ink-deep);
  border-top: 1px solid var(--line);
}

.footer-rule {
  height: 16px;
  border-bottom: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(90deg, var(--flame) 0 2px, transparent 2px 126px),
    repeating-linear-gradient(90deg, var(--edge) 0 1px, transparent 1px 26px);
  background-size: 100% 14px, 100% 7px;
  background-position: 0 0, 0 9px;
  background-repeat: no-repeat, repeat-x;
  opacity: .62;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.brand--footer { margin-right: 0; }

.footer-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.footer-meta {
  color: var(--edge);
  font-size: 12px;
}

.footer-head {
  margin-bottom: 4px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
}

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

.footer-list a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.footer-list a:hover {
  color: var(--paper);
  border-bottom-color: var(--flame);
}

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

.footer-contact li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact__label {
  color: var(--edge);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
}

.footer-contact__value {
  color: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

.footer-icp {
  margin-top: 6px;
  color: var(--edge);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  color: var(--edge);
  font-size: 13px;
}

.footer-base__note { margin: 0; color: var(--edge); }

/* ---------- 框景模块 ---------- */
.frame {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-1);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--glow-line);
  pointer-events: none;
}

.frame__tag {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 3;
  padding: 3px 8px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1.6;
}

.frame__body { padding: 24px; }

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background-image: linear-gradient(150deg, var(--panel), var(--ink-deep));
  border: 1px solid var(--line);
}

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(165deg, rgba(232, 76, 29, .30), rgba(11, 27, 43, .10) 46%, rgba(46, 196, 182, .24));
}

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px;
  background-image: linear-gradient(0deg, rgba(7, 19, 32, .88), rgba(7, 19, 32, 0));
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.media--cinema { aspect-ratio: 16 / 9; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

/* ---------- 分段切换 ---------- */
.tabs { position: relative; }

.tabs__list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.tabs__btn {
  appearance: none;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}

.tabs__btn:hover { color: var(--paper); }

.tabs__btn[aria-selected="true"] {
  color: var(--paper);
  border-bottom-color: var(--flame);
  background: rgba(232, 76, 29, .08);
}

.tabs__panel { padding-top: 18px; }

.tabs__panel[hidden] { display: none; }

@keyframes tabIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.tabs__panel:not([hidden]) {
  animation: tabIn .16s ease-out;
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--edge);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color .16s var(--ease);
}

.crumbs a:hover { color: var(--teal); }

.crumbs__sep { color: var(--line); }

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

/* ---------- 入场显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}

html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  .site-nav__quick-label { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }

  .header-top { padding: 12px 0; }

  .header-actions .btn { display: none; }

  .fav-btn {
    padding: 9px;
    border-radius: 50%;
  }

  .fav-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 118;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 22px;
    background: var(--ink);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s var(--ease);
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 14px 6px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__link[aria-current="page"]::after {
    left: 6px;
    right: auto;
    bottom: -1px;
    width: 24px;
  }

  .site-nav__quick {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
  }

  .site-nav__quick-label {
    display: block;
    width: 100%;
    padding: 0 0 2px;
  }

  .quick { flex: 1 1 auto; justify-content: center; }
}

/* ---------- 手机 ---------- */
@media (max-width: 720px) {
  :root { --gutter: 18px; }

  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  h3 { font-size: 21px; }

  body { font-size: 16px; }

  .brand__name { font-size: 17px; }

  .brand__badge { font-size: 9px; }

  .brand__mark { width: 36px; height: 36px; }

  .fav-btn { padding: 8px; }

  .frame__body { padding: 18px; }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 26px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 24px;
  }

  .site-footer { margin-top: 56px; }
}

@media (max-width: 480px) {
  .site-nav__quick { flex-direction: column; align-items: stretch; }
  .quick { justify-content: flex-start; }
}

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

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

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

  .site-nav { transform: none !important; }
}
