/* ============================================================
   168彩票数 · 雪域数据观测站
   共享样式表 /assets/site.css
   ============================================================ */

/* ---------- 1. 重置 ---------- */
*,
*::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; }

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

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 色板 */
  --sky: #0A1626;
  --nebula: #14263D;
  --paper: #F5EEE2;
  --paper-2: #E4D9C6;
  --red: #C0392F;
  --gold: #D9A441;
  --green: #5E9A6A;
  --ice: #6FA9C9;
  --purple: #6B4E7D;
  --charcoal: #1B222C;
  --fog: #8A97A6;

  /* 派生 */
  --text: #EDE6DA;
  --text-soft: rgba(245, 238, 226, 0.74);
  --text-dim: rgba(245, 238, 226, 0.52);
  --line: rgba(217, 164, 65, 0.24);
  --line-soft: rgba(138, 151, 166, 0.26);
  --glass: rgba(20, 38, 61, 0.70);
  --glass-deep: rgba(10, 22, 38, 0.94);

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* 尺寸 */
  --shell: 1360px;
  --measure: 720px;
  --mast-h: 68px;
  --radius-card: 4px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.32, 0.74, 0.32, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--sky);
  background-image:
    radial-gradient(140% 90% at 12% -10%, rgba(20, 38, 61, 0.95), transparent 62%),
    radial-gradient(90% 60% at 96% 4%, rgba(107, 78, 125, 0.20), transparent 60%),
    linear-gradient(rgba(111, 169, 201, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 169, 201, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed, fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

p { line-height: 1.85; }

strong { font-weight: 600; }

::selection { background: rgba(192, 57, 47, 0.6); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 数字与索引 */
.num,
[data-num],
time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

.index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fog);
}

.index-label--gold { color: var(--gold); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 44px);
}

.wrap--text { max-width: var(--measure); }

.stack > * + * { margin-top: var(--stack-gap, 1.2em); }

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

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

/* ---------- 5. 标题与正文 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 6.4vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.display em {
  font-style: normal;
  color: var(--gold);
}

.lede {
  max-width: 46ch;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.9;
  color: var(--text-soft);
}

.prose {
  max-width: var(--measure);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-soft);
}

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

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.01em;
  color: var(--paper);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--paper);
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 1.1em;
}

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

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}

.prose a {
  color: var(--gold);
  border-bottom: 1px solid rgba(217, 164, 65, 0.45);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.prose strong { color: var(--paper); }

.prose blockquote {
  padding: 4px 0 4px 20px;
  border-left: 1px solid var(--gold);
  color: var(--text-dim);
  font-size: 15px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(20, 38, 61, 0.85);
  color: var(--ice);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--sm { padding: 8px 15px; font-size: 12.5px; letter-spacing: 0.05em; }

.btn--ghost {
  color: var(--paper);
  background: rgba(192, 57, 47, 0.12);
  border-color: rgba(192, 57, 47, 0.85);
}

.btn--ghost:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-2px);
}

.btn--solid {
  color: var(--paper);
  background: var(--red);
  border-color: var(--red);
}

.btn--solid:hover { background: #A63028; border-color: #A63028; transform: translateY(-2px); }

.btn--gold {
  color: var(--gold);
  background: rgba(217, 164, 65, 0.08);
  border-color: rgba(217, 164, 65, 0.7);
}

.btn--gold:hover { background: rgba(217, 164, 65, 0.18); transform: translateY(-2px); }

.btn--paper {
  color: var(--charcoal);
  background: var(--paper);
  border-color: var(--paper);
}

.btn--paper:hover { background: #FFFFFF; transform: translateY(-2px); }

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fog);
}

.breadcrumb__link {
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

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

.breadcrumb__sep { color: rgba(138, 151, 166, 0.5); }

.breadcrumb__current { color: var(--paper); }

/* ---------- 8. 卡片 ---------- */
.card {
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
              box-shadow 0.22s var(--ease);
}

.card--lift:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 164, 65, 0.5);
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, 0.95);
}

.card--paper {
  background: var(--paper);
  border-color: rgba(27, 34, 44, 0.14);
  color: var(--charcoal);
}

.card--paper h2,
.card--paper h3 { color: var(--charcoal); }

/* ---------- 9. 图片容器基础规则（供页面阶段放置图片） ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background-color: var(--nebula);
  background-image:
    linear-gradient(rgba(111, 169, 201, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 169, 201, 0.09) 1px, transparent 1px),
    radial-gradient(120% 90% at 16% 8%, rgba(217, 164, 65, 0.20), transparent 58%),
    radial-gradient(90% 80% at 92% 96%, rgba(107, 78, 125, 0.30), transparent 60%),
    linear-gradient(165deg, #14263D 0%, #0A1626 78%);
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%, 100% 100%;
}

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

.media__note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 18px 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(245, 238, 226, 0.82);
  background: linear-gradient(to top, rgba(10, 22, 38, 0.88), rgba(10, 22, 38, 0));
}

.media--7x4 { aspect-ratio: 7 / 4; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--5x7 { aspect-ratio: 5 / 7; }

/* ---------- 10. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 38, 0.97) 0%,
    rgba(10, 22, 38, 0.86) 56%,
    rgba(10, 22, 38, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.24s var(--ease);
  pointer-events: none;
}

.site-header[data-condensed="true"]::before { opacity: 1; }

.site-header__shell {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 92px;
  padding: 24px clamp(16px, 4vw, 44px) 0;
  transition: padding-top 0.24s var(--ease), min-height 0.24s var(--ease);
}

.site-header[data-condensed="true"] .site-header__shell { padding-top: 10px; }

.masthead {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: 100%;
  max-width: var(--shell);
  height: var(--mast-h);
  padding: 0 clamp(12px, 1.6vw, 20px);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow:
    0 22px 60px -34px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(245, 238, 226, 0.06);
  transition: height 0.24s var(--ease), background-color 0.24s var(--ease),
              border-color 0.24s var(--ease);
}

.site-header[data-condensed="true"] .masthead {
  height: 52px;
  background: var(--glass-deep);
  border-color: rgba(217, 164, 65, 0.38);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
}

.brand__mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(217, 164, 65, 0.55);
  background-image:
    radial-gradient(circle, var(--gold) 0 2.4px, rgba(217, 164, 65, 0) 2.6px),
    radial-gradient(circle, rgba(192, 57, 47, 0) 0 5.6px, rgba(192, 57, 47, 0.92) 5.6px 7.2px, rgba(192, 57, 47, 0) 7.4px),
    radial-gradient(circle, rgba(217, 164, 65, 0) 0 9.2px, rgba(217, 164, 65, 0.55) 9.2px 10.2px, rgba(217, 164, 65, 0) 10.4px);
  box-shadow: 0 0 0 4px rgba(217, 164, 65, 0.07);
  transition: transform 0.24s var(--ease);
}

.brand:hover .brand__mark { transform: scale(1.07); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--fog);
}

/* 导航 */
.nav { margin-inline: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav__link:hover {
  color: var(--paper);
  background: rgba(245, 238, 226, 0.07);
}

.nav__link[aria-current="page"] {
  color: var(--paper);
  background: var(--red);
  box-shadow: 0 6px 22px -10px rgba(192, 57, 47, 0.95);
}

.nav__link[aria-current="page"]:hover { background: var(--red); }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.16em;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: rgba(217, 164, 65, 0.6); }

.nav-toggle[aria-expanded="true"] {
  background: rgba(192, 57, 47, 0.16);
  border-color: rgba(192, 57, 47, 0.85);
}

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

.nav-toggle__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform 0.22s var(--ease);
}

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

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

/* 头部工具区 */
.masthead__tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex: 0 0 auto;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--fog);
  white-space: nowrap;
}

.sync__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(94, 154, 106, 0.18);
  animation: sync-pulse 3s var(--ease) infinite;
}

@keyframes sync-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 跳转链接 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.95);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
  background-color: var(--sky);
  background-image:
    radial-gradient(120% 100% at 10% 0%, rgba(20, 38, 61, 0.92), transparent 62%),
    radial-gradient(80% 90% at 96% 100%, rgba(107, 78, 125, 0.22), transparent 60%);
}

.footer-ruler {
  height: 26px;
  border-bottom: 1px solid rgba(217, 164, 65, 0.14);
  background-image:
    repeating-linear-gradient(90deg, rgba(217, 164, 65, 0.5) 0 1px, transparent 1px 100px),
    repeating-linear-gradient(90deg, rgba(138, 151, 166, 0.3) 0 1px, transparent 1px 20px);
  background-size: 100% 18px, 100% 9px;
  background-position: left top, left top;
  background-repeat: no-repeat, no-repeat;
}

.site-footer__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 84px) clamp(20px, 4vw, 44px) clamp(28px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(0, 2.2fr);
  gap: clamp(36px, 5vw, 88px);
}

.footer-brand__note {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.9;
  color: var(--fog);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
}

.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.footer-col__list { display: grid; gap: 10px; }

.footer-col__list a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-col__list a:hover {
  color: var(--paper);
  border-bottom-color: var(--gold);
}

.footer-contact {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 24px clamp(20px, 4vw, 44px) 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 2;
  color: var(--fog);
}

.footer-contact strong {
  font-weight: 500;
  color: rgba(245, 238, 226, 0.88);
}

.footer-legal {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 clamp(20px, 4vw, 44px) clamp(36px, 4vw, 52px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fog);
}

.footer-legal__icp { color: rgba(245, 238, 226, 0.62); }

.footer-legal__sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-legal__sync .sync__dot {
  width: 6px;
  height: 6px;
  animation: none;
  box-shadow: 0 0 0 3px rgba(94, 154, 106, 0.16);
}

/* ---------- 12. 入场动效协议 ---------- */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

html[data-reveal-ready] [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.28s var(--ease) var(--reveal-delay, 0ms),
    transform 0.28s var(--ease) var(--reveal-delay, 0ms);
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1320px) {
  .nav__link { padding: 8px 11px; font-size: 13.5px; }
}

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

  .masthead__tools .sync { display: none; }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--glass-deep);
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
                visibility 0.22s linear;
  }

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

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

  .nav__link {
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 15px;
  }

  .nav__link[aria-current="page"] { border-radius: 14px; }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header__shell { min-height: 84px; padding-top: 20px; }
  .site-header[data-condensed="true"] .site-header__shell { padding-top: 10px; }
  .masthead { height: 60px; }
  .site-header[data-condensed="true"] .masthead { height: 52px; }
}

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

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .masthead__tools .btn { display: none; }
  .brand__sub { display: none; }
  .brand__name { font-size: 16px; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 15px; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 9px 12px; }
}

/* ---------- 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;
    transition-delay: 0ms !important;
  }

  html[data-reveal-ready] [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
