/* ==========================================================
   Site Kit — 开元棋牌记录查询平台
   文件：/assets/site.css
   角色：Reset、变量、中文排版、全局头部与页脚、通用组件
   ========================================================== */

/* ---------- 1. 变量与 Reset ---------- */

:root {
  --navy-deep: #0A1A2F;
  --graphite: #1F2D3D;
  --mist: #7FA6C9;
  --gold: #D4AF37;
  --line-gold: #B8934A;
  --coral: #FF6B5B;
  --coconut: #2FA36B;
  --dark-red: #8B1E2D;
  --ivory: #F5EFE0;
  --glow: #4FC3F7;
  --text-main: #F5EFE0;
  --text-dim: #B9C6D4;
  --text-faint: #7A8DA0;
  --font-head: "Playfair Display", "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --content-max: 1200px;
  --ease-standard: cubic-bezier(.25, .65, .3, 1);
  --shadow-panel: 0 20px 44px rgba(3, 10, 22, .45);
}

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

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

body {
  margin: 0;
  background-color: var(--navy-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.2;
}

p { margin: 0; }

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

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

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

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

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

::selection {
  background: rgba(212, 175, 55, .3);
  color: var(--ivory);
}

/* ---------- 2. 布局骨架 ---------- */

.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.page-main {
  position: relative;
  min-height: 60vh;
  padding-block: clamp(48px, 7vw, 84px) clamp(56px, 8vw, 96px);
}

.section {
  position: relative;
  padding-block: clamp(40px, 6vw, 72px);
}

.section-head {
  position: relative;
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-kicker::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--line-gold);
}

.section-title {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .03em;
}

.section-desc {
  margin-top: 12px;
  color: var(--text-dim);
  max-width: 58ch;
}

.gold-rule {
  height: 1px;
  margin: 32px 0;
  background: linear-gradient(90deg, transparent, var(--line-gold) 28%, var(--gold) 50%, var(--line-gold) 72%, transparent);
  border: 0;
}

/* ---------- 3. 正文排版 ---------- */

.prose {
  max-width: 72ch;
  color: var(--text-dim);
}

.prose h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 2em 0 .6em;
}

.prose h3 {
  font-size: 20px;
  margin: 1.6em 0 .5em;
}

.prose p {
  margin: 0 0 1.2em;
  color: var(--text-dim);
}

.prose strong {
  color: var(--ivory);
}

.prose a {
  color: var(--glow);
  border-bottom: 1px solid rgba(79, 195, 247, .4);
  transition: color .25s, border-color .25s;
}

.prose a:hover {
  color: var(--gold);
  border-color: rgba(212, 175, 55, .6);
}

/* ---------- 4. 面包屑 ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: clamp(20px, 3vw, 32px);
  font-size: 13px;
}

.crumb {
  color: var(--glow);
  transition: color .25s;
}

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

.crumb + .crumb::before {
  content: "◈";
  margin-right: 10px;
  font-size: 8px;
  color: var(--line-gold);
  opacity: .7;
}

.crumb-current {
  color: var(--ivory);
}

/* ---------- 5. 通用按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #E7C35E, var(--gold) 55%, #C49A34);
  color: #08121F;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 235, 180, .6);
  border-radius: 3px;
  box-shadow: 0 8px 22px rgba(212, 175, 55, .18);
  text-align: center;
  transition: transform .25s var(--ease-standard), box-shadow .25s, filter .25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, .28);
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--line-gold);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(212, 175, 55, .08);
  box-shadow: 0 8px 22px rgba(212, 175, 55, .12);
}

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

/* ---------- 6. 面板与图片容器 ---------- */

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(145deg, rgba(31, 45, 61, .82), rgba(10, 26, 47, .88));
  border: 1px solid rgba(184, 147, 74, .25);
  border-radius: 3px;
  box-shadow: var(--shadow-panel);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.panel--cut {
  border: 0;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 195, 247, .12), transparent 42%),
    linear-gradient(330deg, rgba(212, 175, 55, .1), rgba(10, 26, 47, .35) 60%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, .05) 0 2px, transparent 2px 10px);
  border: 1px solid rgba(184, 147, 74, .4);
  border-radius: 2px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(245, 239, 224, .14);
  pointer-events: none;
}

.media-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-standard);
}

.media-frame:hover > img {
  transform: scale(1.03);
}

.media-frame--wide {
  aspect-ratio: 16 / 7;
}

.media-frame--portrait {
  aspect-ratio: 3 / 4;
}

.media-frame--diamond {
  aspect-ratio: 1;
  border: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- 7. 全局头部 ---------- */

.site-header {
  position: relative;
  z-index: 100;
  background:
    radial-gradient(circle at 12% -30%, rgba(212, 175, 55, .12), transparent 34%),
    var(--navy-deep);
  border-bottom: 1px solid rgba(184, 147, 74, .4);
}

.skip-link {
  position: fixed;
  top: -52px;
  left: clamp(16px, 3vw, 40px);
  z-index: 2000;
  padding: 10px 18px;
  background: var(--gold);
  color: #08121F;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  transition: top .3s var(--ease-standard);
}

.skip-link:focus {
  top: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #F0D98A 45%, var(--coral) 100%);
  box-shadow: 0 0 14px rgba(212, 175, 55, .45);
  z-index: 1500;
  pointer-events: none;
}

.header-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px clamp(20px, 4vw, 48px);
  background: linear-gradient(180deg, #0D2036, #08141F);
  border-bottom: 1px solid rgba(212, 175, 55, .18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
}

.header-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--dark-red) 0 10%, var(--line-gold) 10% 30%, transparent 30% 55%, var(--line-gold) 55% 100%);
  opacity: .45;
}

.header-coords,
.header-status,
.header-mono {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coconut);
  box-shadow: 0 0 8px rgba(47, 163, 107, .8);
}

.header-mono {
  color: var(--glow);
  letter-spacing: .22em;
}

.header-masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px clamp(20px, 4vw, 48px) 24px;
  background:
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, .022) 0 2px, transparent 2px 10px),
    radial-gradient(ellipse at 50% -80%, rgba(212, 175, 55, .1), transparent 55%);
}

.header-masthead::before,
.header-masthead::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--gold), transparent);
  transform: translateY(-50%) rotate(45deg);
  opacity: .65;
}

.header-masthead::before {
  left: clamp(14px, 3vw, 40px);
}

.header-masthead::after {
  right: clamp(14px, 3vw, 40px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 24px);
  text-align: left;
}

.brand-mark {
  width: clamp(46px, 6vw, 66px);
  height: auto;
  overflow: visible;
}

.bm-diamond {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-dasharray: 3 2;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, .35));
}

.bm-grid {
  fill: none;
  stroke: var(--line-gold);
  stroke-width: .8;
  stroke-dasharray: 2 3;
  opacity: .7;
}

.bm-glyph {
  fill: var(--ivory);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}

.bm-glyph-sub {
  fill: var(--gold);
  font-size: 7px;
  letter-spacing: .1em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-name {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  color: var(--ivory);
  text-shadow: 0 2px 18px rgba(212, 175, 55, .18);
  white-space: nowrap;
}

.brand-suffix {
  display: inline-block;
  margin-left: 12px;
  padding: 2px 8px 2px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .26em;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, .5);
  border-radius: 2px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.brand-tagline {
  padding-left: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .46em;
  text-transform: uppercase;
  color: var(--line-gold);
}

.nav-toggle {
  position: absolute;
  top: 50%;
  right: clamp(16px, 4vw, 48px);
  transform: translateY(-50%);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ivory);
  background: rgba(10, 26, 47, .8);
  border: 1px solid rgba(184, 147, 74, .5);
  border-radius: 2px;
}

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

.nav-toggle-box {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.nav-toggle-box span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .3s, opacity .3s;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}

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

.nav-toggle-label {
  white-space: nowrap;
}

/* ---------- 8. 导航 ---------- */

.site-nav {
  background: linear-gradient(180deg, rgba(13, 32, 54, .96), rgba(10, 26, 47, .98));
  border-top: 1px solid rgba(184, 147, 74, .55);
  border-bottom: 1px solid rgba(184, 147, 74, .35);
  box-shadow: inset 0 0 22px rgba(3, 11, 22, .4);
}

.nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin-inline: auto;
}

.nav-item {
  position: relative;
}

.nav-item + .nav-item::before {
  content: "◆";
  position: absolute;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 7px;
  color: var(--line-gold);
  opacity: .55;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 13px 22px 12px;
  color: var(--mist);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  transition: color .28s, background .28s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 175, 55, 0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s var(--ease-standard);
}

.nav-link:hover {
  color: var(--ivory);
  background: rgba(212, 175, 55, .05);
}

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

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

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

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--coral);
  opacity: .85;
}

/* ---------- 9. 全局页脚 ---------- */

.site-footer {
  position: relative;
  background:
    radial-gradient(circle at 82% 18%, rgba(212, 175, 55, .08), transparent 32%),
    radial-gradient(circle at 8% 72%, rgba(47, 163, 107, .06), transparent 30%),
    linear-gradient(180deg, var(--navy-deep) 0%, #061220 100%);
  color: var(--text-dim);
  font-size: 14px;
}

.footer-casino-line {
  height: 4px;
  background: linear-gradient(90deg,
    var(--dark-red) 0 12%,
    var(--line-gold) 12% 18%,
    transparent 18% 46%,
    var(--line-gold) 46% 52%,
    var(--dark-red) 52% 60%,
    transparent 60% 84%,
    var(--line-gold) 84% 92%,
    var(--coral) 92% 100%);
  opacity: .7;
}

.footer-main {
  display: grid;
  grid-template-columns: 4fr 2fr 2.6fr;
  gap: clamp(24px, 5vw, 56px);
  max-width: var(--content-max);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px) clamp(26px, 4vw, 40px);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-mark {
  width: 40px;
  height: auto;
}

.footer-brand-name {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: .12em;
  color: var(--ivory);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .footer-brand-name {
    background: linear-gradient(120deg, var(--gold) 0%, var(--ivory) 40%, var(--gold) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.footer-about {
  max-width: 42ch;
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
}

.footer-trust {
  max-width: 48ch;
  padding-left: 12px;
  border-left: 2px solid rgba(212, 175, 55, .5);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-faint);
}

.footer-heading {
  position: relative;
  margin-bottom: 14px;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 1px;
  background: var(--line-gold);
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  color: var(--mist);
  font-size: 14px;
  transition: color .25s, padding-left .25s;
}

.footer-list a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-contact {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.footer-contact li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}

.contact-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--line-gold);
}

.contact-value {
  word-break: break-all;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(20px, 4vw, 48px);
  background: rgba(3, 11, 22, .6);
  border-top: 1px solid rgba(184, 147, 74, .25);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.footer-icp {
  color: var(--mist);
}

/* ---------- 10. 滚动显现 ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s var(--ease-standard), transform .55s var(--ease-standard);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* ---------- 11. 响应式 ---------- */

@media (max-width: 920px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .header-masthead {
    justify-content: flex-start;
    padding: 14px 16px 14px;
  }

  .header-masthead::before,
  .header-masthead::after {
    display: none;
  }

  .brand-mark {
    width: 42px;
  }

  .brand-name {
    font-size: clamp(22px, 6.2vw, 32px);
  }

  .brand-suffix {
    margin-left: 6px;
    padding: 1px 6px 1px 9px;
    font-size: 9px;
  }

  .brand-tagline {
    font-size: 9px;
    letter-spacing: .3em;
  }

  .nav-toggle {
    display: inline-flex;
    right: 14px;
  }

  .site-nav {
    max-height: 0;
    overflow: hidden;
    border-bottom-width: 0;
    transition: max-height .4s var(--ease-standard);
  }

  .site-nav[data-open] {
    max-height: 560px;
    border-bottom-width: 1px;
  }

  .nav-list {
    flex-direction: column;
    padding: 6px 0 12px;
  }

  .nav-item + .nav-item::before {
    display: none;
  }

  .nav-link {
    justify-content: center;
    padding: 12px 22px;
  }

  .header-top {
    justify-content: center;
    font-size: 9px;
  }

  .header-status,
  .header-mono {
    display: none;
  }
}

@media (max-width: 560px) {
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-col--brand {
    grid-column: auto;
  }

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

@media (max-width: 420px) {
  .header-masthead {
    padding-inline: 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-suffix {
    display: none;
  }

  .nav-toggle-label {
    display: none;
  }
}

/* ---------- 12. 降低动态偏好 ---------- */

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

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

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