/* =========================================================
   微赢牌局 · 共享样式表  /assets/site.css
   轨道式页头 · 深海页脚 · 海风撞色文档馆
   ========================================================= */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: .01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; }

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

a { color: inherit; }

button { font: inherit; color: inherit; }

main { display: block; }

hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 0;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink:        #0E2233;
  --ink-2:      #17384F;
  --teal:       #0FA3A0;
  --teal-soft:  #D6F2EF;
  --coral:      #FF6B4A;
  --coral-soft: #FFE3DA;
  --lime:       #C8F04A;
  --paper:      #FBF7F0;
  --sand:       #F0E7D8;
  --stone:      #5A6B78;
  --hair:       #DCD5C8;

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

  --page-max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(14, 34, 51, .08);
  --ease: 180ms cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 3. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(14, 34, 51, .42);
  border-radius: 3px;
}

.site-footer :focus-visible {
  box-shadow: 0 0 0 4px rgba(200, 240, 74, .28);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -160%);
  z-index: 400;
  display: inline-block;
  padding: 12px 22px;
  border-radius: 0 0 12px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: transform var(--ease);
}

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

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

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 6.5vw, 92px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 3vw, 40px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: .02em;
  color: var(--ink);
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.8;
  max-width: 38em;
  color: var(--ink-2);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .03em;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- 5. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease),
              color var(--ease), border-color var(--ease);
}

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

.btn-primary {
  background: var(--coral);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--ink);
  color: var(--coral-soft);
}

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

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.tag-coral {
  background: var(--coral-soft);
  color: var(--ink);
}

/* ---------- 6. 卡片与媒体框 ---------- */
.card {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform var(--ease), border-color var(--ease),
              background var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
}

.card-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: .01em;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}

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

.media-frame-wide   { aspect-ratio: 16 / 9; }
.media-frame-square { aspect-ratio: 1 / 1; }
.media-frame-tall   { aspect-ratio: 3 / 4; }
.media-frame-band   { aspect-ratio: 21 / 9; }

.media-placeholder {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    135deg,
    var(--teal-soft) 0 14px,
    var(--sand) 14px 28px
  );
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  padding-block: 22px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

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

.breadcrumb li + li::before {
  content: "/";
  color: var(--hair);
}

.breadcrumb a {
  color: var(--stone);
  text-decoration: none;
  transition: color var(--ease);
}

.breadcrumb a:hover { color: var(--teal); }

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

/* ---------- 8. 页头：品牌轨道 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 247, 240, .95);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 11px var(--gutter);
  min-height: 66px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-block: 2px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  letter-spacing: .16em;
  line-height: 1.2;
  color: var(--ink);
  transition: color var(--ease);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--stone);
  line-height: 1.4;
}

.brand:hover .brand-mark { color: var(--teal); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 24px);
  list-style: none;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 1px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease);
}

.nav-link:hover { color: var(--ink); }

.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(--ink);
  font-weight: 700;
}

.nav-version {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  background: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
  white-space: nowrap;
  transition: background var(--ease);
}

.nav-version-key { color: rgba(251, 247, 240, .58); }
.nav-version-val { color: var(--lime); }
.nav-version:hover { background: var(--teal); }
.nav-version:hover .nav-version-key { color: rgba(14, 34, 51, .7); }
.nav-version:hover .nav-version-val { color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  cursor: pointer;
}

.nav-toggle-label { line-height: 1; }

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

.nav-toggle-bars i {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--lime);
  transition: transform var(--ease), opacity var(--ease);
}

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

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

.header-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  overflow: hidden;
  background: rgba(15, 163, 160, .14);
}

.header-track-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 9. 页脚：深海区 ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.footer-inner {
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 74px) var(--gutter) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.6vw, 48px);
}

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

.footer-brand-mark {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  letter-spacing: .16em;
  line-height: 1.2;
  color: var(--paper);
}

.footer-brand-note {
  margin: 0 0 20px;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(251, 247, 240, .64);
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--coral);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform var(--ease), background var(--ease),
              color var(--ease);
}

.footer-cta:hover {
  transform: translateY(-2px);
  background: var(--lime);
  color: var(--ink);
}

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

.footer-col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.5;
  color: var(--lime);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.footer-link {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(251, 247, 240, .78);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.footer-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.copy-btn {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  color: rgba(251, 247, 240, .78);
  text-align: left;
  cursor: pointer;
  word-break: break-all;
  transition: color var(--ease);
}

.copy-btn:hover { color: var(--lime); }

.copy-note {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--lime);
}

.copy-note.is-on { display: inline; }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 22px;
  border-top: 1px solid rgba(251, 247, 240, .14);
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(251, 247, 240, .52);
}

.footer-address {
  margin: 0;
  max-width: 34em;
  color: rgba(251, 247, 240, .6);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .02em;
}

.footer-icp { color: rgba(251, 247, 240, .82); }

.footer-hours {
  margin: 0;
  flex-basis: 100%;
  color: rgba(251, 247, 240, .48);
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-list { gap: 8px 14px; }
  .nav-link { font-size: 13.5px; }
}

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    transition: max-height 260ms cubic-bezier(.4, 0, .2, 1);
  }

  .site-nav[data-open="true"] {
    max-height: min(72vh, 540px);
    overflow-y: auto;
    box-shadow: 0 18px 32px rgba(14, 34, 51, .24);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 0;
  }

  .nav-list li + li { border-top: 1px solid rgba(251, 247, 240, .1); }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    color: rgba(251, 247, 240, .86);
  }

  .nav-link::after {
    right: auto;
    bottom: 8px;
    width: 30px;
  }

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

  .nav-version {
    align-self: flex-start;
    margin: 14px var(--gutter) 22px;
  }

  .header-inner { min-height: 60px; padding-block: 9px; }

  .brand-sub { display: none; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta { flex-direction: column; }
}

@media (max-width: 540px) {
  body { font-size: 16px; }

  .footer-grid { grid-template-columns: 1fr; }

  .btn { width: 100%; justify-content: center; }

  .section-head { align-items: flex-start; }
}

/* ---------- 11. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .card:hover,
  .btn:hover,
  .footer-cta:hover { transform: none; }
}
