/* ============================================================
   飞驰炸金花 / 共享样式表 site.css
   夜间竞技场 × 精密仪表盘 · 非对称编辑部版式
   ============================================================ */

:root {
  --ink-deep: #061611;
  --ink-black: #0A0E0D;
  --panel: #0E2A21;
  --teal-deep: #123E33;
  --gold: #F6C85F;
  --cyan: #47E0D2;
  --rose: #FF5C8A;
  --fog: #EAF4EF;
  --sage: #91A89F;
  --gold-dark: #8A6A2A;
  --slate: #1D3A33;

  --line: rgba(145, 168, 159, 0.22);
  --line-gold: rgba(246, 200, 95, 0.34);
  --line-soft: rgba(145, 168, 159, 0.12);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular",
    ui-monospace, Consolas, "Courier New", monospace;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 44px);
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

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

:where(html) {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:where(body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre) {
  margin: 0;
}

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

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

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

img {
  height: auto;
}

a {
  color: inherit;
}

/* ---------- 中文基础排版 ---------- */
html {
  background: var(--ink-deep);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(1200px 620px at 10% -12%, rgba(71, 224, 210, 0.075), transparent 62%),
    radial-gradient(920px 520px at 94% 0%, rgba(246, 200, 95, 0.06), transparent 58%);
  background-repeat: no-repeat;
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--fog);
}

h1 {
  font-size: clamp(38px, 7.6vw, 92px);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(26px, 3.4vw, 44px);
}

h3 {
  font-size: clamp(20px, 2.2vw, 26px);
}

strong {
  font-weight: 800;
  color: var(--fog);
}

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

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

html.nav-locked {
  overflow: hidden;
}

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink-black);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  background: var(--ink-black);
  border-bottom: 1px solid var(--line);
}

.site-header[data-nav-open]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 12, 10, 0.74);
}

.header-top {
  border-bottom: 1px solid var(--line-soft);
}

.header-top__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  padding-block: 12px;
  transition: padding-block 0.22s var(--ease);
}

.site-header[data-shrink] .header-top__inner {
  padding-block: 7px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  text-decoration: none;
  color: var(--fog);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px 3px 11px 3px;
  background: linear-gradient(145deg, #F6C85F 0%, #C1952F 100%);
  color: var(--ink-black);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(10, 14, 13, 0.18);
  transition: transform 0.22s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-5deg);
}

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

.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fog);
}

.brand__tag {
  max-height: 15px;
  overflow: hidden;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--sage);
  transition: max-height 0.22s var(--ease), opacity 0.22s var(--ease);
}

.site-header[data-shrink] .brand__tag {
  max-height: 0;
  opacity: 0;
}

/* 上层承诺条 */
.header-top__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--sage);
  transition: opacity 0.22s var(--ease);
}

.header-top__note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(71, 224, 210, 0.16);
}

.site-header[data-shrink] .header-top__note {
  opacity: 0;
}

.header-top__cta {
  flex: none;
}

/* 移动导航按钮 */
.nav-toggle {
  position: relative;
  z-index: 95;
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 15px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: var(--panel);
  color: var(--fog);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

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

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 18px;
}

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

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

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

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

/* 下层栏目条 */
.header-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.5vw, 22px);
}

.nav__item {
  flex: 0 0 auto;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 14px 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--sage);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

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

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

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

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.header-bar__meta {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.2em;
  white-space: nowrap;
  color: var(--sage);
  text-transform: uppercase;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #12150E;
}

.btn--primary:hover {
  background: #FFD87A;
  border-color: #FFD87A;
  box-shadow: 0 0 0 4px rgba(246, 200, 95, 0.16);
  transform: translateY(-1px);
}

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

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

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

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  padding-block: 18px 6px;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--sage);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__item:not(:first-child)::before {
  content: "›";
  color: var(--gold-dark);
}

.breadcrumbs__link {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.breadcrumbs__link:hover {
  color: var(--cyan);
}

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

/* ---------- 正文与区段 ---------- */
.section {
  padding-block: clamp(46px, 7.5vw, 96px);
}

.section__head {
  display: grid;
  gap: 12px;
  max-width: 62ch;
  margin-bottom: clamp(24px, 4vw, 46px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan);
}

.note {
  padding-left: 14px;
  border-left: 1px solid var(--line-gold);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--sage);
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--fog);
}

.prose > * + * {
  margin-top: 1.05em;
}

.prose h2 {
  margin-top: 1.8em;
  color: var(--fog);
}

.prose h3 {
  margin-top: 1.5em;
  color: var(--fog);
}

.prose p,
.prose li {
  color: rgba(234, 244, 239, 0.88);
}

.prose ul {
  padding-left: 1.1em;
  list-style: disc;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.prose :is(ul)::marker {
  color: var(--gold);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- 基础组件 ---------- */
.surface {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: border-color 0.2s var(--ease);
}

.surface:hover {
  border-color: var(--line-gold);
}

.grid-auto {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--teal-deep);
  color: var(--fog);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

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

.tag--active,
.tag[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #12150E;
}

/* 可复用图片容器 */
.media-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 120% at 16% 0%, rgba(71, 224, 210, 0.2), transparent 56%),
    radial-gradient(90% 90% at 92% 102%, rgba(246, 200, 95, 0.16), transparent 58%);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

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

.media-frame__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--fog);
  background: linear-gradient(0deg, rgba(6, 22, 17, 0.94), rgba(6, 22, 17, 0));
}

/* ---------- 滚动进度与回到顶部（由 JS 注入） ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: 2px;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: rgba(14, 42, 33, 0.94);
  color: var(--fog);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease),
    visibility 0.2s var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  padding-block: clamp(44px, 6vw, 78px) 26px;
  border-top: 1px solid var(--line-gold);
  background-color: var(--ink-deep);
  background-image: linear-gradient(
    180deg,
    rgba(14, 42, 33, 0.6) 0%,
    rgba(6, 22, 17, 0) 62%
  );
  background-repeat: no-repeat;
  color: var(--fog);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(145, 168, 159, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(145, 168, 159, 0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 74%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 74%);
}

.site-footer > .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  gap: clamp(26px, 4vw, 54px);
  grid-template-columns: minmax(200px, 1.35fr) repeat(3, minmax(120px, 0.85fr));
}

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

.footer-brand__link {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--fog);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

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

.footer-brand__note {
  max-width: 30ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--sage);
}

.footer-brand__stat {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.footer-col {
  display: block;
}

.footer-col__title {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
}

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

.footer-link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: rgba(234, 244, 239, 0.82);
  text-decoration: none;
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.18s var(--ease);
}

.footer-link:hover {
  padding-left: 13px;
  color: var(--gold);
}

.footer-link:hover::before {
  width: 8px;
}

.footer-meta {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-meta__row {
  display: block;
}

.footer-meta__label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--sage);
  text-transform: uppercase;
}

.footer-meta__value {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fog);
}

.footer-meta__value--mono {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--sage);
}

.footer-copy,
.footer-icp {
  font-size: 12px;
  color: var(--sage);
}

.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ---------- 平板 ---------- */
@media (max-width: 1024px) {
  .header-bar__meta {
    letter-spacing: 0.14em;
  }
}

/* ---------- 移动导航 ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-top__note,
  .header-top__cta {
    display: none;
  }

  .header-bar__inner {
    padding-block: 0;
  }

  .header-bar__meta {
    display: none;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(340px, 86vw);
    padding: 88px 24px 96px;
    overflow-y: auto;
    background-image: linear-gradient(180deg, #0A0E0D 0%, #0E2A21 100%);
    border-left: 1px solid var(--line-gold);
    box-shadow: -28px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(102%);
    transition: transform 0.26s var(--ease);
  }

  .nav[data-open] {
    transform: translateX(0);
  }

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

  .nav__link {
    display: block;
    padding: 15px 4px;
    font-size: 17px;
    color: var(--fog);
    border-bottom: 1px solid var(--line);
  }

  .nav__link::after {
    display: none;
  }

  .nav__link[aria-current="page"] {
    padding-left: 14px;
    color: var(--gold);
  }

  .nav__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--gold);
  }

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

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

/* ---------- 手机 ---------- */
@media (max-width: 560px) {
  .brand__name {
    font-size: 15px;
  }

  .brand__tag {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

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

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

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

  .to-top {
    padding: 9px 14px;
    font-size: 12px;
  }
}

/* ---------- 无障碍动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
