/* ============================================================
   皇冠现金站 · 共享 Site Kit
   /assets/site.css
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

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

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

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

button { background: none; border: 0; cursor: pointer; }

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

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

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink: #0E1B2C;
  --ink-2: #12253A;
  --paper: #F4EFE3;
  --paper-2: #E4DAC6;
  --gold: #C9A227;
  --gold-hi: #E3C15A;
  --gold-deep: #7A6212;
  --amber: #D9772B;
  --white: #F7FAFC;
  --graphite: #5C6773;
  --survey: #4FA9A0;

  --line-ink: rgba(14, 27, 44, 0.14);
  --line-ink-strong: rgba(14, 27, 44, 0.28);
  --line-light: rgba(247, 250, 252, 0.14);
  --line-light-strong: rgba(247, 250, 252, 0.30);
  --line-gold: rgba(201, 162, 39, 0.42);

  --font-display: "Oswald", "Barlow Condensed", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 280px;
  --topbar-h: 58px;
  --gutter: clamp(18px, 4vw, 52px);
  --max: 1440px;
  --read: 72ch;

  --t-fast: 0.16s cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-mid: 0.24s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 1500px) {
  :root { --rail-w: 312px; }
}

/* ---------- 3. 中文排版基础 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 5.6vw, 78px); }
h2 { font-size: clamp(26px, 3.2vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
h4 { font-size: 18px; }

p { text-wrap: pretty; }

strong { font-weight: 700; }

code, kbd, samp, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.02em;
}

/* ---------- 4. 焦点与可达性 ---------- */
:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.rail :focus-visible,
.topbar :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold-hi);
}

#main-content,
.main {
  display: block;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

.skip-link {
  position: fixed;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform var(--t-fast);
}

.skip-link:focus {
  transform: translateY(0);
  outline-color: var(--white);
}

/* ---------- 5. 左侧铁轨（框架式导航） ---------- */
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  background-color: var(--ink);
  color: var(--white);
  border-inline-end: 1px solid var(--line-gold);
  overflow-y: auto;
  overscroll-behavior: contain;
  --progress: 0;
}

.rail__brand {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-light);
}

.rail__mark {
  grid-row: 1 / span 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
}

.rail__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--white);
}

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

.rail__version {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  color: var(--gold-hi);
}

.rail__nav { margin-top: 18px; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail__item { display: block; }

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px 9px 16px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(247, 250, 252, 0.76);
  border-radius: 2px;
  transition: color var(--t-fast), background-color var(--t-fast);
}

.rail__link::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 9px;
  width: 3px;
  background-color: transparent;
  transition: background-color var(--t-fast);
}

.rail__link:hover {
  color: var(--white);
  background-color: rgba(247, 250, 252, 0.07);
}

.rail__link:hover::before { background-color: var(--gold); }

.rail__link[aria-current="page"] {
  color: var(--ink);
  background-color: var(--gold);
  font-weight: 700;
}

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

.rail__gauge {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
}

.gauge {
  position: relative;
  width: 3px;
  height: 116px;
  background-color: rgba(247, 250, 252, 0.16);
  flex: none;
}

.gauge__fill {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: calc(var(--progress, 0) * 100%);
  background-color: var(--gold);
  transition: height 0.18s linear;
}

.rail__ticks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(247, 250, 252, 0.42);
}

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

.tick::before {
  content: "";
  width: 10px;
  height: 1px;
  background-color: currentColor;
  flex: none;
}

.tick__label { display: block; white-space: nowrap; }

.rail__note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-light);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(247, 250, 252, 0.46);
}

/* ---------- 6. 顶部横条 ---------- */
.topbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: var(--rail-w);
  inset-inline-end: 0;
  z-index: 55;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline: var(--gutter);
  background-color: var(--ink-2);
  color: var(--white);
  border-block-end: 1px solid var(--line-gold);
  box-shadow: 0 1px 0 rgba(3, 8, 15, 0.5);
}

.topbar__brand {
  display: none;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  flex: none;
}

.topbar__brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--white);
}

.topbar__brand-ver {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold-hi);
}

.topbar__search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-light-strong);
  border-radius: 2px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: rgba(247, 250, 252, 0.86);
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}

.topbar__search:hover {
  border-color: var(--gold);
  color: var(--white);
  background-color: rgba(201, 162, 39, 0.1);
}

.topbar__search-label { white-space: nowrap; }

.topbar__key {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
  border: 1px solid var(--line-light-strong);
  border-radius: 2px;
  color: rgba(247, 250, 252, 0.6);
}

.topbar__coord {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--survey);
  white-space: nowrap;
}

.topbar__cta { flex: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-light-strong);
  border-radius: 2px;
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.nav-toggle:hover { border-color: var(--gold); background-color: rgba(201, 162, 39, 0.12); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background-color: currentColor;
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

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

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

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

.btn--gold:hover {
  background-color: var(--gold-hi);
  border-color: var(--gold-hi);
}

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

.btn--ghost:hover {
  border-color: var(--gold);
  background-color: rgba(201, 162, 39, 0.14);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 13.5px;
}

/* ---------- 8. 布局工具 ---------- */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.read {
  max-width: 760px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 32fr) minmax(0, 68fr);
  gap: var(--gutter);
  align-items: start;
}

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

.rule {
  height: 1px;
  border: 0;
  background-color: var(--line-ink);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background-color: currentColor;
  flex: none;
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--graphite);
}

.breadcrumbs a {
  color: var(--graphite);
  transition: color var(--t-fast);
}

.breadcrumbs a:hover { color: var(--ink); }

.breadcrumbs__sep {
  color: var(--gold);
  font-size: 11px;
}

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--gold { color: var(--gold-deep); }

.tag--amber {
  color: #A6511A;
  background-color: rgba(217, 119, 43, 0.12);
}

/* ---------- 11. 图片容器基础规则 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background-color: var(--ink-2);
  border: 1px solid var(--line-ink);
  border-radius: 2px;
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(201, 162, 39, 0.16) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(201, 162, 39, 0.16) 0 1px, transparent 1px 34px);
  pointer-events: none;
}

.media img,
.media picture {
  position: relative;
  z-index: 1;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--graphite);
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background-color: var(--ink);
  color: rgba(247, 250, 252, 0.78);
}

.footer__scale {
  height: 6px;
  background-image: repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 14px);
  opacity: 0.72;
}

.footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 60px) var(--gutter) 30px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.25fr;
  gap: 40px 32px;
}

.footer__brand { min-width: 0; }

.footer__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--white);
}

.footer__tagline {
  margin-top: 10px;
  max-width: 30ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(247, 250, 252, 0.62);
}

.footer__region {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 4px 10px;
  border: 1px solid rgba(79, 169, 160, 0.45);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--survey);
}

.footer__nav { min-width: 0; }

.footer__head {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__link {
  display: inline-block;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(247, 250, 252, 0.78);
  transition: color var(--t-fast);
}

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

.footer__contact { min-width: 0; }

.footer__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.footer__text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(247, 250, 252, 0.78);
  overflow-wrap: anywhere;
}

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

.copy-btn {
  padding: 3px 9px;
  border: 1px solid var(--line-light-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: rgba(247, 250, 252, 0.68);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}

.copy-btn:hover {
  color: var(--gold-hi);
  border-color: var(--gold);
  background-color: rgba(201, 162, 39, 0.12);
}

.copy-btn.is-done {
  color: var(--ink);
  background-color: var(--gold);
  border-color: var(--gold);
}

.footer__hours {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(247, 250, 252, 0.45);
}

.footer__base {
  max-width: var(--max);
  margin-inline: auto;
  padding: 18px var(--gutter) 34px;
  border-top: 1px solid var(--line-light);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}

.footer__legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: rgba(247, 250, 252, 0.48);
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 34px 28px;
  }
}

@media (max-width: 960px) {
  body { padding-left: 0; }

  .rail {
    width: min(86vw, 336px);
    transform: translateX(-102%);
    visibility: hidden;
    box-shadow: 10px 0 34px rgba(6, 14, 24, 0.42);
    transition: transform var(--t-mid), visibility var(--t-mid);
  }

  .rail[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .topbar {
    inset-inline-start: 0;
    gap: 10px;
  }

  .topbar__brand { display: flex; }
  .topbar__coord { display: none; }
  .topbar__search { margin-inline-start: auto; }
  .nav-toggle { display: inline-flex; }

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

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .topbar { padding-inline: 16px; }
  .media--21x9 { aspect-ratio: 16 / 9; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 520px) {
  .topbar { gap: 8px; padding-inline: 12px; }
  .topbar__search { font-size: 12.5px; padding: 6px 10px; gap: 7px; }
  .topbar__cta { padding: 7px 11px; font-size: 12.5px; }
  .topbar__brand-ver { display: none; }
  .nav-toggle { padding: 7px 9px; }
  .nav-toggle__label { display: none; }
  .footer__base { gap: 6px 18px; }
}

/* ---------- 14. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .gauge__fill { transition: none; }
  .skip-link { transition: none; }
}
