/* ==========================================================================
   威廉希尔品牌 · 主场资料板 Site Kit
   路径：/assets/site.css
   内容：重置 / 变量 / 中文排版 / 头部 / 页脚 / 通用组件 / 响应式
   ========================================================================== */

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

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

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

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

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

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

button { background: none; border: 0; }

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

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

/* ---------- 2. 设计变量 ---------- */
:root {
  --navy-900: #061229;
  --navy-800: #0a1c3d;
  --navy-700: #102a56;
  --navy-600: #1a3a72;
  --gold-500: #e8b23c;
  --gold-400: #f2c65f;
  --gold-200: #fbe6b0;
  --red-600: #c8202b;
  --sand-500: #e07b34;
  --paper: #f6f4ef;
  --paper-2: #ece7dd;
  --ink: #0f1728;
  --ink-soft: #4a5568;
  --line: rgba(10, 28, 61, .14);
  --line-invert: rgba(255, 255, 255, .18);
  --shadow-md: 0 16px 34px -22px rgba(6, 18, 41, .5);
  --shadow-lg: 0 34px 64px -34px rgba(6, 18, 41, .6);
  --r-pill: 999px;
  --r-xl: 32px;
  --r-lg: 22px;
  --r-md: 14px;
  --wrap: 1220px;
  --gap: clamp(1rem, 2.4vw, 2rem);
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB",
          ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  letter-spacing: .012em;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% -6%, rgba(232, 178, 60, .18), transparent 55%),
    radial-gradient(circle at 96% 2%, rgba(200, 32, 43, .10), transparent 46%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.18;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); }

p { overflow-wrap: anywhere; }

::selection {
  background: var(--gold-500);
  color: var(--navy-900);
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.site-head :focus-visible,
.site-foot :focus-visible {
  outline-color: var(--gold-400);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

#main-content { display: block; }

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

.grid {
  display: grid;
  gap: var(--gap);
}

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

/* ---------- 5. 通用排版组件 ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sand-500);
  margin-bottom: .6rem;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  letter-spacing: -.026em;
}

.lede {
  max-width: 58ch;
  font-size: clamp(1.02rem, 1.7vw, 1.26rem);
  line-height: 1.78;
  color: var(--ink-soft);
}

.prose {
  max-width: 68ch;
  font-size: 1.04rem;
  line-height: 1.92;
  color: #24303f;
}

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

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
}

.prose h3 { margin-top: 1.7em; }

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

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

.prose a {
  color: var(--navy-600);
  box-shadow: inset 0 -2px 0 rgba(232, 178, 60, .8);
}

.prose a:hover { color: var(--red-600); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 16px 30px -18px rgba(232, 178, 60, .95);
}

.btn-red {
  background: linear-gradient(135deg, #e0353f, var(--red-600));
  color: #fff;
  box-shadow: 0 16px 30px -18px rgba(200, 32, 43, .9);
}

.btn-ink {
  background: var(--navy-800);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: rgba(232, 178, 60, .1);
  border-color: rgba(232, 178, 60, .55);
  color: var(--gold-200);
}

.btn-ghost:hover {
  background: rgba(232, 178, 60, .22);
  color: #fff;
}

/* ---------- 7. 标签与专题板 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .78rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(10, 28, 61, .05);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.tag--gold {
  background: rgba(232, 178, 60, .16);
  border-color: rgba(232, 178, 60, .5);
  color: #7a5410;
}

.tag--red {
  background: rgba(200, 32, 43, .1);
  border-color: rgba(200, 32, 43, .34);
  color: var(--red-600);
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

/* ---------- 8. 面包屑 ---------- */
.crumbs {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.crumbs li::after {
  content: "/";
  color: rgba(15, 23, 40, .3);
}

.crumbs li:last-child::after { content: none; }

.crumbs a { color: var(--navy-600); }
.crumbs a:hover { color: var(--red-600); }

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

/* ---------- 9. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-xl);
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900));
  isolation: isolate;
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 18, 41, 0) 44%, rgba(6, 18, 41, .48) 100%);
  pointer-events: none;
}

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

.media-caption {
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

/* ==========================================================================
   10. 头部
   ========================================================================== */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 22px 44px -34px rgba(6, 18, 41, 1);
}

.skip-link {
  position: absolute;
  top: -140px;
  left: clamp(1rem, 4vw, 2.5rem);
  z-index: 200;
  padding: .68rem 1.15rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: .9rem;
  font-weight: 700;
  transition: top .18s ease;
}

.skip-link:focus { top: 0; }

/* 顶部播报轨 */
.head-rail {
  background: #04101f;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.head-rail-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 1.2rem;
  padding-block: .48rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}

.rail-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--gold-400);
}

.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-600);
  animation: railPulse 2.6s ease-out infinite;
}

@keyframes railPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 32, 43, .7); }
  70% { box-shadow: 0 0 0 9px rgba(200, 32, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 32, 43, 0); }
}

.rail-meta { white-space: nowrap; }

/* 主栏 */
.head-bar {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 42, 86, .92) 0%, var(--navy-900) 100%);
  border-bottom: 1px solid rgba(232, 178, 60, .3);
}

.head-bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: .85rem;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  flex: 0 0 auto;
}

.brand-mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px 5px 16px 5px;
  background: linear-gradient(145deg, var(--gold-400), var(--sand-500) 58%, var(--red-600));
  color: var(--navy-900);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 14px 26px -16px rgba(232, 178, 60, .95);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .012em;
}

.brand-sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: .6rem;
  font-style: normal;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-500);
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: .95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .76);
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nav-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  transition: background-color .2s ease;
}

.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.nav-list a:hover::before { background: var(--gold-500); }

.nav-list a[aria-current="page"] {
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border-color: rgba(232, 178, 60, .8);
  box-shadow: 0 12px 24px -14px rgba(232, 178, 60, .95);
}

.nav-list a[aria-current="page"]::before { background: var(--red-600); }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1rem;
  border: 1px solid rgba(232, 178, 60, .5);
  border-radius: var(--r-pill);
  background: rgba(232, 178, 60, .12);
  color: var(--gold-200);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.nav-toggle:hover {
  background: rgba(232, 178, 60, .22);
  color: #fff;
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) 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(-6px) rotate(-45deg); }

/* ==========================================================================
   11. 页脚
   ========================================================================== */
.site-foot {
  position: relative;
  overflow: hidden;
  margin-top: clamp(3rem, 7vw, 6rem);
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 55%, #030c19 100%);
  color: rgba(255, 255, 255, .76);
}

.site-foot::before {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -42%;
  width: min(620px, 72vw);
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle, rgba(232, 178, 60, .2), transparent 65%);
  pointer-events: none;
}

.foot-stand {
  height: 6px;
  background-image:
    repeating-linear-gradient(105deg, var(--gold-500) 0 3px, transparent 3px 16px),
    linear-gradient(90deg, var(--red-600), var(--navy-600));
  background-color: var(--navy-900);
}

.foot-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .85fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  padding-block: clamp(2.4rem, 6vw, 4.2rem);
}

.foot-brand { display: block; }

.brand--foot { margin-bottom: 1.1rem; }

.foot-lede {
  max-width: 36ch;
  margin-bottom: 1.1rem;
  color: rgba(255, 255, 255, .7);
  line-height: 1.8;
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .7rem;
  align-items: baseline;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .74);
  overflow-wrap: anywhere;
}

.foot-key {
  flex: 0 0 auto;
  letter-spacing: .08em;
  color: var(--gold-400);
}

.foot-title {
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.foot-list {
  display: grid;
  gap: .6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-list a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  transition: color .2s ease;
}

.foot-list a::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--red-600);
  transition: width .2s ease, background-color .2s ease;
}

.foot-list a:hover { color: var(--gold-400); }
.foot-list a:hover::before { width: 24px; background: var(--gold-500); }

.foot-note {
  max-width: 30ch;
  margin-bottom: 1.3rem;
  font-size: .92rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, .7);
}

.foot-base {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .28);
}

.foot-base-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.6rem;
  padding-block: 1.1rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .58);
}

.icp { color: var(--gold-500); }

/* ==========================================================================
   12. 注入型交互元素
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red-600), var(--sand-500) 45%, var(--gold-500));
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 150;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 178, 60, .55);
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-400);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background-color .2s ease;
  box-shadow: var(--shadow-lg);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { background: var(--navy-700); }

/* 滚动显现 */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}

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

/* ==========================================================================
   13. 响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    max-height: 75vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--navy-900), #04101f);
    border-bottom: 1px solid rgba(232, 178, 60, .35);
    box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .92);
  }

  .site-nav[data-open] { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
  }

  .nav-list a {
    padding: .9rem 1.05rem;
    border-radius: var(--r-md);
    font-size: 1.05rem;
  }

  .nav-list a::before { width: 8px; height: 8px; }

  .foot-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

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

  .head-bar-in { gap: .75rem; }
  .brand-mark { width: 40px; height: 40px; font-size: 1.05rem; }
  .brand-name { font-size: .98rem; }
  .brand-sub { letter-spacing: .22em; }

  .foot-main { grid-template-columns: minmax(0, 1fr); }
  .foot-base-in { justify-content: flex-start; }

  .btn { width: 100%; }
  .to-top { width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  .rail-meta { white-space: normal; }
  .nav-toggle-text { display: none; }
}

/* ---------- 14. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html { scroll-behavior: auto; }

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

  .rail-dot { animation: none; }
}
