/* =========================================================
   百乐门棋牌 · 共享样式表 /assets/site.css
   语汇：霓虹夜场 × 检修工单
   目录：1 重置 2 变量与底色 3 排版 4 头部 5 页脚
        6 通用组件 7 响应式 8 动效与降级
   ========================================================= */

/* 1 重置 ------------------------------------------------ */
*,
*::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;
  padding: 0;
}

ul, ol { list-style: none; }

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

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

/* 2 变量与底色 ------------------------------------------ */
:root {
  --ink: #0B0613;
  --panel: #170C22;
  --panel-2: #241335;
  --gold: #D9A441;
  --gold-hi: #F3D18A;
  --magenta: #FF3D7F;
  --cyan: #39D8E0;
  --paper: #F7F1E4;
  --mist: #9C8CB8;
  --line: #4A2E63;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 44px);
  --radius: 2px;

  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --t: 260ms cubic-bezier(.22, .61, .36, 1);
}

html.nav-open { overflow: hidden; }

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(180deg, rgba(247, 241, 228, .022) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
    radial-gradient(1200px 620px at 10% -12%, rgba(255, 61, 127, .10), transparent 62%),
    radial-gradient(940px 540px at 102% -4%, rgba(57, 216, 224, .09), transparent 58%),
    radial-gradient(900px 900px at 50% 118%, rgba(217, 164, 65, .07), transparent 62%);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
}

#main-content { display: block; }

/* 3 排版 ------------------------------------------------- */
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; }

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .24em;
  color: var(--gold);
  text-transform: uppercase;
}

.title-xl {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 6.5vw, 104px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--paper);
}

.title-lg {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: .01em;
  color: var(--paper);
}

.title-md {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.28;
  color: var(--paper);
}

.title--outline {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--gold);
  text-shadow: 0 0 26px rgba(217, 164, 65, .22);
}

.prose { max-width: 44em; }
.prose p + p { margin-top: .9em; }
.prose strong { color: var(--gold-hi); }
.prose ul, .prose ol { list-style: disc; padding-left: 1.3em; margin: .6em 0; }
.prose ol { list-style: decimal; }

/* 4 头部 ------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--gold);
  color: #180D03;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top var(--t);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 6, 19, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .site-header { background: var(--ink); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(14px, 1.8vw, 22px) var(--gutter);
  transition: padding var(--t);
}

.site-header.is-scrolled .header-inner { padding-top: 9px; padding-bottom: 9px; }
.site-header.is-scrolled .brand__tag { opacity: 0; height: 0; overflow: hidden; }

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(19px, 2.1vw, 24px);
  letter-spacing: .07em;
  color: var(--paper);
  text-shadow: 0 0 18px rgba(217, 164, 65, .35);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--gold);
}

.brand__tag {
  font-size: 12px;
  line-height: 1.5;
  color: var(--mist);
  transition: opacity var(--t);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 15px;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--paper);
  transition: color var(--t);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}

.nav-link:hover { color: var(--gold-hi); }
.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-link[aria-current="page"] { color: var(--gold-hi); }

.nav-link--anchor {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 1.8vw, 21px);
  padding: 8px 16px;
  color: var(--gold-hi);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(217, 164, 65, .14), 0 0 22px rgba(255, 61, 127, .18);
  animation: neon-breathe 6s ease-in-out infinite;
}
.nav-link--anchor::after { display: none; }
.nav-link--anchor:hover { background: rgba(217, 164, 65, .12); }

@keyframes neon-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(217, 164, 65, .14), 0 0 22px rgba(255, 61, 127, .16); }
  50%      { box-shadow: 0 0 0 1px rgba(217, 164, 65, .34), 0 0 30px rgba(57, 216, 224, .26); }
}

.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold-hi); }

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-toggle__text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold), var(--magenta) 55%, var(--cyan));
  will-change: transform;
}

/* 5 页脚 ------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 104px);
  border-top: 1px solid var(--line);
  background-image:
    linear-gradient(180deg, rgba(23, 12, 34, .95), rgba(11, 6, 19, 1) 72%),
    repeating-linear-gradient(180deg, rgba(247, 241, 228, .02) 0 1px, transparent 1px 4px);
  color: var(--mist);
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 72px) var(--gutter) clamp(20px, 3vw, 32px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(130px, 1fr));
  gap: clamp(22px, 3vw, 40px);
  padding-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .08em;
  color: var(--paper);
}

.footer-brand__note {
  margin-top: 10px;
  max-width: 30em;
  font-size: 14px;
  line-height: 1.8;
}

.footer-brand__meta {
  margin-top: 14px;
  color: var(--gold);
}
.footer-brand__meta .ver {
  font-family: var(--font-mono);
  color: var(--gold-hi);
  border-bottom: 1px dashed rgba(217, 164, 65, .5);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--gold);
}

.footer-links { margin-top: 12px; display: grid; gap: 8px; }

.footer-link {
  font-size: 15px;
  text-decoration: none;
  color: var(--paper);
  opacity: .82;
  transition: color var(--t), opacity var(--t);
}
.footer-link:hover { color: var(--gold-hi); opacity: 1; }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px clamp(18px, 3vw, 34px);
  padding: clamp(20px, 3vw, 30px) 0;
  border-bottom: 1px solid var(--line);
}

.contact-item {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--panel-2);
}

.contact-item--wide { grid-column: 1 / -1; }

.contact-item__label {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: .2em;
}

.contact-item__value {
  font-size: 16px;
  color: var(--paper);
  word-break: break-all;
}

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

.copy-status { color: var(--gold-hi); min-height: 1.2em; }

.contact-note {
  padding: 18px 0 0;
  max-width: 52em;
  font-size: 13px;
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(18px, 2.6vw, 28px);
  padding-top: 16px;
  border-top: 1px dashed rgba(74, 46, 99, .8);
}

.legal-line { font-size: 12px; line-height: 1.7; }

.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(23, 12, 34, .9);
  color: var(--gold-hi);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t), transform var(--t), visibility var(--t), background var(--t);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(217, 164, 65, .16); }
.to-top__text { font-size: 11px; }

/* 6 通用组件 --------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: var(--gold-hi);
  color: #1B0F04;
}
.btn--gold:hover { color: #1B0F04; background: linear-gradient(180deg, #FFE3AC, var(--gold-hi)); }

.btn--ghost { border-color: var(--gold); color: var(--gold-hi); }
.btn--sm { padding: 8px 14px; font-size: 12px; letter-spacing: .12em; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mist);
}
.crumbs__item { color: var(--mist); text-decoration: none; }
.crumbs__item:hover { color: var(--gold-hi); }
.crumbs__item + .crumbs__item::before { content: "/"; margin-right: 8px; color: var(--line); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(36, 19, 53, .6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mist);
}
.tag--magenta { border-color: var(--magenta); color: var(--magenta); }
.tag--cyan { border-color: var(--cyan); color: var(--cyan); }
.tag--gold { border-color: var(--gold); color: var(--gold-hi); }

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  background: linear-gradient(180deg, var(--panel), #120A1B);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217, 164, 65, .16);
  border-radius: var(--radius);
  pointer-events: none;
}

.paper-card {
  position: relative;
  padding: clamp(20px, 2.6vw, 34px);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}

.ledger {
  font-size: 14px;
  border: 1px solid var(--line);
}
.ledger th, .ledger td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ledger thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--gold);
  background: rgba(36, 19, 53, .7);
}
.ledger tbody tr { transition: background var(--t); }
.ledger tbody tr:hover { background: rgba(217, 164, 65, .08); }
.ledger td .mono { color: var(--cyan); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--mist);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.tab:hover { color: var(--gold-hi); border-color: var(--gold); }
.tab[aria-selected="true"] {
  color: #1B0F04;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  border-color: var(--gold-hi);
}
.tabpanel { padding-top: 20px; }
.tabpanel[hidden] { display: none; }

.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--gold);
  text-align: left;
  cursor: pointer;
}
.step__body { font-size: 15px; line-height: 1.8; }
.step__body strong { color: var(--gold-hi); }

.figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--panel);
  background-image:
    linear-gradient(135deg, rgba(255, 61, 127, .10), rgba(57, 216, 224, .08)),
    repeating-linear-gradient(180deg, rgba(247, 241, 228, .03) 0 1px, transparent 1px 5px);
  aspect-ratio: 4 / 3;
}
.figure img, .figure svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 4 / 5; }
.figure--square { aspect-ratio: 1 / 1; }

.figure__cap {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

/* 7 响应式 ----------------------------------------------- */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(110px, 1fr)); }
}

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

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 350px);
    z-index: 65;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 92px 24px 48px;
    overflow-y: auto;
    background: linear-gradient(160deg, var(--panel-2), var(--ink) 78%);
    border-left: 1px solid var(--line);
    box-shadow: -26px 0 60px rgba(0, 0, 0, .62);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform var(--t), visibility var(--t);
  }
  .site-nav[data-open] { transform: translateX(0); visibility: visible; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-link {
    display: block;
    padding: 14px 2px;
    font-size: 17px;
    border-bottom: 1px solid rgba(74, 46, 99, .55);
  }
  .nav-link--anchor {
    margin: 14px 0 4px;
    padding: 12px 16px;
    text-align: center;
    font-size: 19px;
  }
  .nav-cta { width: 100%; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 12; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__tag { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-contact { grid-template-columns: 1fr; }
  .contact-item--wide { grid-column: auto; }
  .step { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .footer-bottom { flex-direction: column; }
  .to-top__text { display: none; }
}

/* 8 显现与降级 ------------------------------------------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 300ms ease, transform 300ms ease;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .nav-link--anchor { animation: none; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
