/* ==========================================================================
   鸣雀剪辑 · LARKMUSE Cut — 组件层 components.css
   导航 / 抽屉 / 按钮 / 徽标 / 纸卡 / 器框 / 表格 / 提示条 / FAQ / 页脚
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 内联 SVG 图标精灵
   -------------------------------------------------------------------------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   1. 顶部导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(250, 246, 236, 0.94);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    backdrop-filter: blur(8px);
  }
}

@supports not (backdrop-filter: blur(8px)) {
  .site-header {
    background: var(--paper);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  flex: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__en {
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.site-nav {
  display: none;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--gold-ink);
}

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

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

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* 移动端首屏优先展示菜单按钮，CTA 收进抽屉 */
.site-header__cta {
  display: none;
}

@media (min-width: 600px) {
  .site-header__cta {
    display: inline-flex;
  }
}

/* 汉堡按钮 */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: transparent;
}

.menu-btn__lines {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.menu-btn__lines::before,
.menu-btn__lines::after,
.menu-btn__lines span {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) linear;
}

.menu-btn__lines::before {
  top: 0;
}

.menu-btn__lines span {
  top: 50%;
  transform: translateY(-50%);
}

.menu-btn__lines::after {
  bottom: 0;
}

.menu-btn[aria-expanded="true"] .menu-btn__lines::before {
  transform: translateY(5.25px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-btn__lines::after {
  transform: translateY(-5.25px) rotate(-45deg);
}

.menu-btn[aria-expanded="true"] .menu-btn__lines span {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   2. 移动端抽屉
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}

.drawer[hidden] {
  display: none;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(23, 19, 31, 0.4);
  opacity: 0;
  transition: opacity var(--dur-2) linear;
  cursor: pointer;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 28px;
  background: var(--paper-card);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform var(--dur-2) var(--ease-out);
}

.drawer.is-open .drawer__backdrop {
  opacity: 1;
}

.drawer.is-open .drawer__panel {
  transform: none;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
}

.drawer__label {
  margin: 22px 0 8px;
  font-size: var(--t-label);
  letter-spacing: var(--tracking-label);
  color: var(--ink-muted);
}

.drawer__list {
  display: grid;
}

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}

.drawer__link:hover {
  color: var(--gold-ink);
}

.drawer__link[aria-current="page"] {
  color: var(--gold-ink);
}

.drawer__link small {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.drawer__foot {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  gap: 10px;
}

.drawer__note {
  font-size: var(--t-caption);
  line-height: 1.6;
  color: var(--ink-muted);
}

body.is-locked {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. 按钮
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transition:
    background-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out);
}

.btn .ico {
  transition: transform var(--dur-1) var(--ease-out);
}

.btn:hover .ico--arrow {
  transform: translateX(3px);
}

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

.btn--primary:hover {
  background: var(--ink-soft);
  box-shadow: var(--shadow-inset-gold);
}

.btn--ghost {
  border-color: var(--line-gold);
  color: var(--ink);
}

.btn--ghost:hover {
  background: rgba(235, 211, 160, 0.34);
  border-color: var(--gold);
}

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

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

.btn--quiet {
  border-color: rgba(246, 241, 231, 0.34);
  color: var(--on-dark);
}

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

.btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.btn--lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

.btn--text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--gold-ink);
  text-underline-offset: 6px;
}

.btn--text:hover {
  text-decoration-color: var(--terracotta);
}

.btn--text:hover .ico--arrow {
  transform: translateX(3px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* 图标 */
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--sm {
  width: 16px;
  height: 16px;
}

.ico--lg {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   4. 徽标 / 标签
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge--dev {
  border-color: rgba(23, 19, 31, 0.35);
  color: var(--ink-muted);
}

.badge--soon {
  border: 1px dashed rgba(23, 19, 31, 0.38);
  color: var(--ink-muted);
}

.badge--live {
  background: var(--gold);
  color: var(--ink);
}

.badge--beta {
  border-color: var(--gold-ink);
  color: var(--gold-ink);
}

.badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t-caption);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.fr-code {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   5. 纸卡 / 栅格
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.card--lift {
  transition:
    transform var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

.card--lift:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 164, 65, 0.6);
  box-shadow: var(--shadow-lift);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.card__no {
  font-family: var(--font-latin);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
}

.card__title {
  font-size: var(--t-h3);
}

.card__desc {
  font-size: 15px;
  color: var(--ink-muted);
}

.card__list {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.card__list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--gold-ink);
}

.card__caption {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.card__diagram {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line-soft);
}

.card__diagram svg {
  width: 100%;
  height: auto;
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2,
.grid--3,
.grid--4,
.grid--8 {
  grid-template-columns: 1fr;
}

/* --------------------------------------------------------------------------
   6. 器框（概念示意 / 图片框）
   -------------------------------------------------------------------------- */
.figure {
  position: relative;
  padding: 10px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
}

.figure__inner {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--r-2xl) - 8px);
  background: var(--paper-white);
}

.figure__inner img,
.figure__inner svg,
.figure__inner picture {
  width: 100%;
  height: auto;
}

.figure__badge {
  position: absolute;
  top: -11px;
  left: 18px;
  padding: 3px 10px;
  background: var(--paper-card);
  border: 1px solid var(--line-gold);
  border-radius: var(--r-pill);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
}

.figure__caption {
  display: block;
  padding: 10px 4px 2px;
  font-size: var(--t-caption);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   7. 提示条 / 状态条
   -------------------------------------------------------------------------- */
.notice {
  padding: 14px 18px;
  background: var(--paper-deep);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.notice--dev {
  border-left-color: var(--gold-ink);
}

.notice--warn {
  border-left-color: var(--terracotta);
}

.notice strong {
  color: var(--ink);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

.status-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-strip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-ink);
}

/* --------------------------------------------------------------------------
   8. 表格 / 代码
   -------------------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.spec-table caption {
  padding-bottom: 10px;
  text-align: left;
  font-size: var(--t-caption);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.spec-table th,
.spec-table td {
  padding: 12px 10px 12px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.spec-table th {
  width: 34%;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.spec-table td {
  color: var(--ink-soft);
}

.code-block {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--ink);
  color: #ede6d8;
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

/* --------------------------------------------------------------------------
   9. FAQ（details/summary，无 JS 亦可展开）
   -------------------------------------------------------------------------- */
.faq {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 14px 0;
  font-family: var(--font-serif);
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 1.6px solid var(--gold-ink);
  border-bottom: 1.6px solid var(--gold-ink);
  transform: rotate(45deg);
  transition: transform var(--dur-2) var(--ease-out);
}

.faq__item[open] .faq__q::after {
  transform: rotate(-135deg);
}

.faq__a {
  max-width: 66ch;
  padding: 0 0 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.faq__a p + p {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   10. 深色 CTA 带
   -------------------------------------------------------------------------- */
.cta-band__inner {
  display: grid;
  gap: 26px;
}

.cta-band__title {
  font-size: var(--t-h2);
  color: var(--on-dark);
}

.cta-band__sub {
  margin-top: 12px;
  max-width: 54ch;
  color: var(--on-dark-muted);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   11. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(231, 192, 122, 0.45);
  padding-block: clamp(48px, 6vw, 72px) 28px;
  color: var(--on-dark);
}

.site-footer__top {
  display: grid;
  gap: 36px;
}

.site-footer__brand-block {
  max-width: 320px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.site-footer__brand img {
  width: 32px;
  height: 32px;
}

.site-footer__brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.site-footer__brand-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--on-dark);
}

.site-footer__brand-en {
  font-family: var(--font-latin);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--on-dark-muted);
}

.site-footer__slogan {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--on-dark);
}

.site-footer__slogan .latin {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--on-dark-muted);
}

.site-footer__intro {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--on-dark-muted);
}

.site-footer__col-title {
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--on-dark-muted);
}

.site-footer__links {
  display: grid;
}

.site-footer__link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 14px;
  color: rgba(246, 241, 231, 0.82);
}

.site-footer__link:hover {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-footer__link small {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(246, 241, 231, 0.5);
}

.site-footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(246, 241, 231, 0.16);
  display: grid;
  gap: 10px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(246, 241, 231, 0.6);
}

.site-footer__bottom a {
  color: rgba(246, 241, 231, 0.8);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer__bottom a:hover {
  color: var(--gold-soft);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  padding-top: 6px;
}
