/* =========================================================
   新宝5娱乐 · /assets/site.css
   共享外壳：刊头 / 导航 / 页脚 / 基础组件
   ========================================================= */

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

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

body { margin: 0; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

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

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

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

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

a { color: inherit; }

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink-950: #071522;
  --ink-900: #0B1F34;
  --ink-800: #123451;
  --copper-500: #C58B42;
  --copper-300: #E7BE7A;
  --ochre-600: #A4512F;
  --teal-500: #2F7D72;
  --paper-050: #F6EFE3;
  --paper-100: #EAE0CF;
  --graphite-700: #3D4753;
  --text-900: #111C26;
  --white: #FFFFFF;

  --line-dark: rgba(231, 190, 122, 0.20);
  --line-dark-soft: rgba(246, 239, 227, 0.14);
  --line-light: rgba(17, 28, 38, 0.14);

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --dur: 180ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-900);
  background: var(--paper-050);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--copper-500);
  color: var(--ink-950);
}

#main-content { display: block; }

/* ---------- 4. 通用工具 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.grid__rail { grid-column: span 2; }
.grid__body { grid-column: span 10; }

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.85;
}

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

.prose h2,
.prose h3 {
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-top: 2em;
}

.prose h2 { font-size: 24px; }
.prose h3 { font-size: 19px; }

.prose a {
  color: var(--ochre-600);
  text-decoration: none;
  border-bottom: 1px solid rgba(164, 81, 47, 0.45);
  transition: border-color var(--dur) ease-out;
}

.prose a:hover { border-bottom-color: var(--ochre-600); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  color: var(--ochre-600);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section-title {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.12em;
}

.tag--copper { color: var(--ochre-600); }
.tag--teal { color: var(--teal-500); }
.tag--ink { color: var(--ink-800); }

.panel {
  background: var(--white);
  border: 1px solid var(--line-light);
  padding: clamp(18px, 2.4vw, 28px);
}

.panel--dark {
  background: var(--ink-900);
  border-color: var(--line-dark);
  color: var(--paper-050);
}

/* ---------- 5. 图片容器 ---------- */
.figure { margin: 0; }

.figure__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-light);
  background-color: var(--paper-100);
  background-image:
    linear-gradient(140deg, rgba(197, 139, 66, 0.30) 0%, rgba(47, 125, 114, 0.16) 48%, rgba(164, 81, 47, 0.26) 100%),
    linear-gradient(0deg, var(--paper-100), var(--paper-050));
}

.figure__media--wide { aspect-ratio: 16 / 9; }
.figure__media--tall { aspect-ratio: 3 / 4; }

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

.figure--dark .figure__media {
  border-color: var(--line-dark);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(140deg, rgba(197, 139, 66, 0.34) 0%, rgba(47, 125, 114, 0.22) 55%, rgba(164, 81, 47, 0.30) 100%),
    linear-gradient(0deg, var(--ink-800), var(--ink-950));
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--graphite-700);
}

.figure--dark .figure__caption { color: rgba(246, 239, 227, 0.62); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition:
    background-color var(--dur) ease-out,
    color var(--dur) ease-out,
    border-color var(--dur) ease-out,
    transform var(--dur) ease-out;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--copper-500);
  border-color: var(--copper-500);
  color: var(--ink-950);
}

.btn--primary:hover {
  background: var(--copper-300);
  border-color: var(--copper-300);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(231, 190, 122, 0.45);
  color: var(--paper-050);
}

.btn--ghost:hover {
  background: rgba(231, 190, 122, 0.08);
  border-color: var(--copper-300);
  color: var(--copper-300);
}

.btn--line {
  background: transparent;
  border-color: rgba(17, 28, 38, 0.30);
  color: var(--ink-900);
}

.btn--line:hover {
  border-color: var(--copper-500);
  color: var(--ochre-600);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.10em;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--graphite-700);
}

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

.breadcrumb__list li + li::before {
  content: "/";
  color: rgba(61, 71, 83, 0.45);
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) ease-out, border-color var(--dur) ease-out;
}

.breadcrumb a:hover {
  color: var(--ochre-600);
  border-bottom-color: var(--copper-500);
}

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

/* ---------- 8. 跳转链接与进度条 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 120;
  padding: 10px 20px;
  background: var(--copper-500);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translate(-50%, -140%);
  transition: transform var(--dur) ease-out;
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 2px;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--ochre-600), var(--copper-500) 55%, var(--copper-300));
  transition: width 100ms linear;
  pointer-events: none;
}

/* ---------- 9. 刊头 ---------- */
.site-header {
  position: relative;
  z-index: 60;
  background: var(--ink-950);
  color: var(--paper-050);
  border-bottom: 1px solid var(--line-dark);
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(231, 190, 122, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 190, 122, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
}

.masthead {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line-dark-soft);
}

.masthead__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(18px, 2.6vw, 30px) var(--gutter);
}

.masthead__descriptor {
  position: relative;
  justify-self: start;
  max-width: 20ch;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.16em;
  color: rgba(246, 239, 227, 0.62);
}

.masthead__descriptor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 9px;
  height: 2px;
  background: var(--copper-500);
}

.brand {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  text-decoration: none;
}

.brand__name {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--copper-300);
  transition: color var(--dur) ease-out;
}

.brand:hover .brand__name { color: var(--white); }

.brand__rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 139, 66, 0.7), transparent);
}

.brand__en {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: rgba(246, 239, 227, 0.48);
}

.masthead__utility {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.masthead__mail {
  color: var(--paper-050);
  word-break: break-all;
}

.masthead__hours { color: rgba(246, 239, 227, 0.52); }

/* ---------- 10. 导航 ---------- */
.nav-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px var(--gutter);
  position: relative;
  z-index: 2;
  background: var(--ink-900);
  color: var(--paper-050);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid rgba(231, 190, 122, 0.10);
}

.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  background: var(--copper-300);
  transition: transform var(--dur) ease-out, opacity var(--dur) ease-out;
}

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.site-nav {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  counter-reset: navitem;
}

.site-nav__item { display: flex; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 15px clamp(10px, 1.6vw, 20px) 13px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: rgba(246, 239, 227, 0.82);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition:
    color var(--dur) ease-out,
    border-color var(--dur) ease-out,
    background-color var(--dur) ease-out;
}

.site-nav__link::before {
  counter-increment: navitem;
  content: "0" counter(navitem);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(197, 139, 66, 0.66);
  transform: translateY(-1px);
  transition: color var(--dur) ease-out;
}

.site-nav__link:hover {
  color: var(--white);
  background: rgba(231, 190, 122, 0.06);
  border-bottom-color: rgba(197, 139, 66, 0.55);
}

.site-nav__link:hover::before { color: var(--copper-300); }

.site-nav__link[aria-current="page"] {
  color: var(--copper-300);
  border-bottom-color: var(--copper-500);
}

.site-nav__link[aria-current="page"]::before { color: var(--copper-300); }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink-950);
  color: var(--paper-050);
  border-top: 2px solid var(--copper-500);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(231, 190, 122, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 190, 122, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

.footer-note {
  position: relative;
  z-index: 1;
  background: var(--ink-800);
  border-bottom: 1px solid var(--line-dark);
}

.footer-note__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: rgba(246, 239, 227, 0.78);
}

.footer-note__inner::before {
  content: "说明";
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 8px;
  border: 1px solid rgba(231, 190, 122, 0.55);
  border-radius: 2px;
  color: var(--copper-300);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.16em;
}

.site-footer__main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(28px, 4vw, 44px);
}

.footer-brand__name {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--copper-300);
}

.footer-brand__tagline {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.16em;
  color: rgba(246, 239, 227, 0.55);
}

.footer-brand__text {
  max-width: 26ch;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(246, 239, 227, 0.68);
}

.footer-brand .btn { margin-top: 20px; }

.footer-col { min-width: 0; }

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  color: var(--copper-300);
}

.footer-col__title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(231, 190, 122, 0.22);
}

.footer-links__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.footer-links__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(246, 239, 227, 0.80);
  text-decoration: none;
  border-bottom: 1px solid rgba(231, 190, 122, 0.10);
  transition: color var(--dur) ease-out, border-color var(--dur) ease-out;
}

.footer-links__list a::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 1.5px;
  background: rgba(231, 190, 122, 0.28);
  transition: background-color var(--dur) ease-out;
}

.footer-links__list a:hover {
  color: var(--copper-300);
  border-bottom-color: rgba(231, 190, 122, 0.42);
}

.footer-links__list a:hover::before { background: var(--copper-500); }

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list__row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.14em;
  color: rgba(246, 239, 227, 0.45);
}

.contact-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(246, 239, 227, 0.86);
  word-break: break-word;
}

.site-footer__legal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--gutter) clamp(30px, 4vw, 42px);
  border-top: 1px solid var(--line-dark-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.08em;
  color: rgba(246, 239, 227, 0.50);
}

/* ---------- 12. 回到顶部 ---------- */
.totop {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink-900);
  color: var(--copper-300);
  border: 1px solid rgba(231, 190, 122, 0.42);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--dur) ease-out,
    transform var(--dur) ease-out,
    visibility var(--dur) linear,
    background-color var(--dur) ease-out,
    border-color var(--dur) ease-out;
}

.totop[data-visible="true"] {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.totop:hover {
  background: var(--ink-800);
  border-color: var(--copper-300);
}

/* ---------- 13. 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--copper-500);
  outline-offset: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.totop:focus-visible {
  outline-color: var(--copper-300);
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 980px) {
  .site-footer__main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

@media (max-width: 900px) {
  .grid__rail,
  .grid__body { grid-column: 1 / -1; }
}

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    max-width: none;
    max-height: min(66vh, 440px);
    overflow-y: auto;
    padding-inline: 0;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 22px 40px -30px rgba(0, 0, 0, 0.95);
  }

  .site-header[data-open="true"] .site-nav { display: block; }

  .site-nav__list {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .site-nav__item { width: 100%; }

  .site-nav__link {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    padding: 15px var(--gutter);
    font-size: 16px;
    border-bottom: 1px solid rgba(231, 190, 122, 0.10);
  }

  .site-nav__link::before {
    width: 22px;
    font-size: 11px;
  }

  .site-nav__link:hover { background: rgba(231, 190, 122, 0.07); }

  .site-nav__link[aria-current="page"] {
    background: rgba(197, 139, 66, 0.10);
    border-bottom-color: rgba(231, 190, 122, 0.10);
    box-shadow: inset 3px 0 0 var(--copper-500);
  }
}

@media (max-width: 820px) {
  .masthead__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding-block: 20px;
  }

  .masthead__descriptor { display: none; }

  .masthead__utility {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .site-footer__main { grid-template-columns: minmax(0, 1fr); }
  .footer-links__list { grid-template-columns: minmax(0, 1fr); }
  .contact-list__row { grid-template-columns: 54px minmax(0, 1fr); }
  .footer-note__inner { align-items: flex-start; }
}

/* ---------- 15. 减少动效 ---------- */
@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;
  }

  .btn:hover { transform: none; }
  .totop[data-visible="true"] { transform: none; }
}
