/* ==========================================================================
   奥迪棋牌包网 · 共享站点样式  /assets/site.css
   仪表盘 × 棋牌桌面：深墨底、刻度线、粗边框、偏移硬阴影、零圆角
   ========================================================================== */

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

html { -webkit-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 { font: inherit; color: inherit; background: none; border: 0; }

table { border-collapse: collapse; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B0D10;
  --panel: #151A20;
  --silver: #C9D0D6;
  --mist: #8A949D;
  --paper: #F4F6F7;
  --red: #D91F26;
  --red-soft: #F05257;
  --cyan: #18E0C8;
  --teal: #16A085;
  --amber: #E6A817;
  --violet: #8B7CF6;

  --line: rgba(201, 208, 214, 0.18);
  --line-strong: rgba(201, 208, 214, 0.42);

  --font-display: "Barlow Condensed", "Arial Narrow", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --w-max: 1240px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 74px;
  --dur: 0.2s;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, rgba(201, 208, 214, 0.045) 0 1px, transparent 1px 120px),
    radial-gradient(1100px 620px at 12% -12%, rgba(24, 224, 200, 0.075), transparent 62%),
    radial-gradient(900px 520px at 96% 2%, rgba(139, 124, 246, 0.07), transparent 58%);
  background-repeat: repeat, no-repeat, no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--paper);
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

#main-content { scroll-margin-top: calc(var(--header-h) + 16px); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 0.5rem;
  z-index: 200;
  padding: 0.72rem 1.15rem;
  background: var(--red);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--paper);
  transform: translateY(-220%);
  transition: transform var(--dur) var(--ease);
}

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

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 13, 16, 0.96);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 18px 34px -30px rgba(0, 0, 0, 0.95);
}

.header-scale {
  height: 8px;
  border-bottom: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(90deg, rgba(201, 208, 214, 0.55) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, var(--red) 0 2px, transparent 2px 120px);
  opacity: 0.55;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  color: var(--paper);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--red);
  background: linear-gradient(150deg, var(--red), #7d0f14);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 4px 4px 0 0 rgba(217, 31, 38, 0.28);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 0 rgba(24, 224, 200, 0.3);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.12;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.4rem);
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 0.1rem;
  color: var(--silver);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--dur) var(--ease);
}

.nav-link__idx {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--mist);
  transition: color var(--dur) var(--ease);
}

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

.nav-link:hover,
.nav-link:focus-visible { color: var(--paper); }

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

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

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

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

.nav-cta {
  flex: 0 0 auto;
  margin-left: 0.5rem;
  padding: 0.58rem 0.95rem;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
  flex: 0 0 auto;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--panel);
  border-top: 2px solid var(--red);
  color: var(--silver);
}

.footer-scale {
  height: 6px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, rgba(201, 208, 214, 0.5) 0 1px, transparent 1px 8px);
  opacity: 0.5;
}

.footer-inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

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

.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.footer-brand__desc {
  margin-top: 0.6rem;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--mist);
}

.footer-brand__stamp {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--silver);
}

.footer-brand__stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.footer-heading {
  margin-bottom: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-link {
  color: var(--silver);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible { color: var(--cyan); }

.footer-contact__list {
  display: grid;
  gap: 0.7rem;
}

.footer-contact__row {
  display: grid;
  gap: 0.1rem;
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.footer-contact__val {
  font-size: 0.92rem;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-legal {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--mist);
}

.footer-legal a {
  color: var(--silver);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
}

.footer-sep { color: var(--line-strong); }

.footer-rank {
  height: 4px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--cyan) 35%, var(--violet) 70%, var(--amber) 100%);
  opacity: 0.75;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
              color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 4px 4px 0 0 rgba(217, 31, 38, 0.32);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #ee2a32;
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 0 rgba(217, 31, 38, 0.38);
}

.btn--primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 rgba(217, 31, 38, 0.32);
}

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

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn--quiet {
  background: var(--panel);
  color: var(--silver);
  border-color: var(--line);
}

.btn--quiet:hover,
.btn--quiet:focus-visible {
  color: var(--paper);
  border-color: var(--silver);
}

/* ---------- 8. Section / typography blocks ---------- */
.section { padding-block: clamp(2.25rem, 5.5vw, 4.5rem); }

.section__head {
  display: grid;
  gap: 0.6rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.section-index::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--red);
  flex: 0 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.eyebrow {
  max-width: 52ch;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--silver);
}

.divider {
  height: 1px;
  margin-block: clamp(1.5rem, 4vw, 3rem);
  border: 0;
  background: var(--line);
}

/* ---------- 9. Grid ---------- */
.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--rules { grid-template-columns: 5fr 7fr; }
.grid--topics { grid-template-columns: 4fr 8fr; }
.grid--contact { grid-template-columns: 3fr 9fr; }

/* ---------- 10. Panel / tag / meter ---------- */
.panel {
  padding: clamp(1rem, 2.5vw, 1.6rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
}

.panel--flush { padding: 0; }

.panel--quiet { border-left-color: var(--line-strong); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(24, 224, 200, 0.08);
}

.tag--violet {
  color: var(--violet);
  background: rgba(139, 124, 246, 0.1);
}

.tag--amber {
  color: var(--amber);
  background: rgba(230, 168, 23, 0.1);
}

.tag--red {
  color: var(--red-soft);
  background: rgba(217, 31, 38, 0.12);
}

.meter {
  display: grid;
  gap: 0.5rem;
}

.meter__bar {
  height: 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, var(--teal) 0%, var(--cyan) 38%, var(--violet) 68%, var(--amber) 100%);
}

.meter__labels {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--mist);
}

/* ---------- 11. Breadcrumb ---------- */
.breadcrumb { padding-block: clamp(1rem, 2vw, 1.5rem); }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  color: var(--line-strong);
}

.breadcrumb__link {
  color: var(--silver);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.breadcrumb__link:hover,
.breadcrumb__link:focus-visible { color: var(--cyan); }

/* ---------- 12. Figure (页面阶段放图的响应式容器) ---------- */
.figure {
  display: block;
  margin: 0;
}

.figure__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  background-color: var(--panel);
  background-image:
    repeating-linear-gradient(135deg, rgba(201, 208, 214, 0.06) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, rgba(24, 224, 200, 0.06), transparent 70%);
  box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.45);
}

.figure__media img,
.figure__media picture,
.figure__media svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.figure--wide .figure__media { aspect-ratio: 21 / 9; }
.figure--tall .figure__media { aspect-ratio: 4 / 5; }

/* ---------- 13. 滚动进度条（JS 注入） ---------- */
.scroll-meter {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  background: rgba(11, 13, 16, 0.6);
}

.scroll-meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal) 0%, var(--cyan) 40%, var(--violet) 72%, var(--amber) 100%);
  box-shadow: 0 0 12px rgba(24, 224, 200, 0.45);
}

/* ---------- 14. 显现动效协议 ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1180px) {
  .brand__sub { display: none; }
}

@media (max-width: 1024px) {
  .nav-link { font-size: 0.88rem; }
  .nav-link__idx { display: none; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--panel);
    border-top: 2px solid var(--red);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 26px 44px -24px rgba(0, 0, 0, 0.95);
  }

  .primary-nav[data-open="true"] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item { border-bottom: 1px solid var(--line); }

  .nav-link {
    width: 100%;
    flex-direction: row-reverse;
    justify-content: space-between;
    padding: 0.9rem 0;
    font-size: 1.05rem;
    color: var(--silver);
  }

  .nav-link::after { display: none; }
  .nav-link__idx { display: inline; }
  .nav-link[aria-current="page"] { color: var(--cyan); }
  .nav-link[aria-current="page"] .nav-link__idx { color: var(--cyan); }

  .nav-cta {
    width: 100%;
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

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

@media (max-width: 820px) {
  .grid--2,
  .grid--3,
  .grid--rules,
  .grid--topics,
  .grid--contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-legal { font-size: 0.76rem; line-height: 1.9; }
  .brand__name { font-size: 1.2rem; }
  .brand__mark { width: 34px; height: 34px; font-size: 1.25rem; }
  .section-title { font-size: clamp(1.45rem, 6vw, 2rem); }
}

/* ---------- 16. 降低动效偏好 ---------- */
@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;
  }

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

  .btn--primary:hover,
  .btn--primary:focus-visible,
  .brand:hover .brand__mark,
  .brand:focus-visible .brand__mark {
    transform: none;
  }
}
