/* ============================================================
   皇冠体彩开奖 · 共享站点样式 /assets/site.css
   外层画框 · Bento 面板 · 等宽数据层
   ============================================================ */

:root {
  --ink-deep: #0C231C;
  --ink-panel: #14382D;
  --gold: #D4A82C;
  --gold-hi: #F0D27A;
  --cinnabar: #C63B2C;
  --silver: #C3CCC6;
  --paper: #F4F1E6;
  --ink-text: #1B2420;
  --teal: #2E8F7A;

  --rule: rgba(195, 204, 198, 0.22);
  --rule-gold: rgba(212, 168, 44, 0.38);
  --rule-dark: rgba(27, 36, 32, 0.14);

  --cut: 14px;
  --shell: 1280px;
  --gutter: clamp(16px, 3vw, 40px);

  --font-display: "FZCuHei", "方正粗黑", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.22;
  color: var(--ink-text);
}

p { margin: 0 0 1em; }

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

a { color: inherit; }

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

button { font: inherit; color: inherit; }

address { font-style: normal; }

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

#main-content:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* ---------- 焦点环 ---------- */
:focus-visible {
  outline: 2px solid var(--ink-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--gold-hi);
  outline-offset: 3px;
}

/* ============================================================
   头部：导航即画框
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: rgba(12, 35, 28, 0.94);
  background-image: linear-gradient(180deg, rgba(20, 56, 45, 0.6), rgba(12, 35, 28, 0));
  border-bottom: 1px solid var(--rule-gold);
  color: var(--paper);
}

/* 贯穿视口的两条金色竖线，构成页面外框 */
.site-header::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: clamp(8px, 1.6vw, 28px);
  right: clamp(8px, 1.6vw, 28px);
  border-left: 1px solid var(--rule-gold);
  border-right: 1px solid var(--rule-gold);
  pointer-events: none;
  z-index: 90;
}

.header-bar {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

/* ---------- 品牌 ---------- */
.header-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  flex: 0 0 auto;
  width: 28px;
  height: 22px;
  background: linear-gradient(160deg, var(--gold-hi) 0%, var(--gold) 58%, #9a7a1c 100%);
  clip-path: polygon(0 100%, 0 22%, 20% 62%, 50% 0, 80% 62%, 100% 22%, 100% 100%);
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.brand-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

/* ---------- 主导航 ---------- */
.primary-nav { margin-left: auto; }

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

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--silver);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease);
}

.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }

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

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: clamp(8px, 1.5vw, 20px);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0 var(--cut) 0 var(--cut);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
              border-color 160ms var(--ease), transform 160ms var(--ease);
}

.btn-crown {
  background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 55%, #b98f20 100%);
  border-color: var(--gold-hi);
  color: #12261F;
}

.btn-crown:hover {
  background: linear-gradient(135deg, #fff0bd 0%, var(--gold-hi) 58%, var(--gold) 100%);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule-gold);
  color: var(--gold-hi);
}

.btn-ghost:hover {
  background: rgba(212, 168, 44, 0.12);
}

.btn-outline-dark {
  background: transparent;
  border-color: rgba(27, 36, 32, 0.32);
  color: var(--ink-deep);
}

.btn-outline-dark:hover {
  background: rgba(27, 36, 32, 0.06);
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--rule-gold);
  border-radius: 0 10px 0 10px;
  color: var(--paper);
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--gold);
  transition: background-color 160ms var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--gold);
  transition: transform 200ms var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.site-header[data-open] .nav-toggle-bars { background-color: transparent; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 10px 20px;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 10px 0;
  transition: top 160ms var(--ease);
}

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

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--rule-gold);
  background-color: var(--ink-deep);
  background-image:
    repeating-linear-gradient(135deg, rgba(212, 168, 44, 0.05) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #0C231C 0%, #0A1E18 100%);
  color: var(--silver);
  font-size: 14px;
}

.footer-crest {
  position: absolute;
  top: clamp(20px, 4vw, 52px);
  right: clamp(16px, 4vw, 80px);
  width: clamp(120px, 16vw, 200px);
  aspect-ratio: 20 / 14;
  background: linear-gradient(160deg, rgba(212, 168, 44, 0.18), rgba(212, 168, 44, 0.02));
  clip-path: polygon(0 100%, 0 22%, 20% 62%, 50% 0, 80% 62%, 100% 22%, 100% 100%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 48px);
}

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

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-brand-link .brand-mark {
  width: 22px;
  height: 17px;
}

.footer-brand-link .brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: var(--paper);
}

.footer-tagline {
  margin: 16px 0 10px;
  max-width: 24ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(195, 204, 198, 0.86);
}

.footer-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(195, 204, 198, 0.55);
}

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

.footer-col-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
  line-height: 1.4;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  font-size: 14px;
  color: var(--silver);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.footer-link:hover { color: var(--gold-hi); }

.footer-meta {
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.18);
}

.footer-meta-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 20px var(--gutter) 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 12.5px;
}

.footer-contact-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(212, 168, 44, 0.85);
}

.footer-value { color: rgba(195, 204, 198, 0.9); }

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(195, 204, 198, 0.6);
}

/* ============================================================
   通用组件
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 8vw, 112px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--teal);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(27, 36, 32, 0.58);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(27, 36, 32, 0.28);
}

.breadcrumbs a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.breadcrumbs a:hover {
  color: var(--ink-text);
  border-bottom-color: var(--gold);
}

/* ---------- 正文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--ink-text);
}

.prose h2 {
  margin: 1.6em 0 0.6em;
  font-size: clamp(22px, 2.2vw, 28px);
}

.prose h3 {
  margin: 1.4em 0 0.5em;
  font-size: clamp(18px, 1.8vw, 21px);
}

.prose p { margin: 0 0 1.1em; }

.prose ul { margin: 0 0 1.1em; }

.prose li {
  position: relative;
  margin-bottom: 0.5em;
  padding-left: 20px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

.prose a {
  color: #1c6f5e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Bento 栅格 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.bento-span-3 { grid-column: span 3; }
.bento-span-4 { grid-column: span 4; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }
.bento-span-7 { grid-column: span 7; }
.bento-span-8 { grid-column: span 8; }
.bento-span-12 { grid-column: span 12; }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

/* ---------- 切角面板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background-color: var(--ink-panel);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.panel--paper {
  background-color: var(--paper);
  color: var(--ink-text);
  box-shadow: inset 0 0 0 1px var(--rule-dark);
}

/* ---------- 数据带 ---------- */
.data-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 32px;
  min-height: 72px;
  padding: 12px clamp(16px, 2vw, 24px);
  background: linear-gradient(90deg, rgba(20, 56, 45, 0.96), rgba(12, 35, 28, 0.96));
  border-block: 1px solid var(--rule-gold);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.data-key {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(212, 168, 44, 0.9);
}

.data-value {
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-panel);
  background-image:
    radial-gradient(120% 100% at 12% 0%, rgba(212, 168, 44, 0.16), transparent 58%),
    linear-gradient(150deg, #14382D, #0C231C);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

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

.media-frame--wide { aspect-ratio: 3 / 2; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(12, 35, 28, 0.94), rgba(12, 35, 28, 0));
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--silver);
}

/* ---------- 滚动进度与返回顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 95;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--gold-hi));
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  z-index: 70;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-deep);
  color: var(--gold-hi);
  border: 1px solid var(--rule-gold);
  border-radius: 0 12px 0 12px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms var(--ease);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
}

.to-top:hover { border-color: var(--gold); }

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- 进入视口显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }

  .header-tools { margin-left: auto; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    padding: 8px var(--gutter) 20px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background-color: rgba(9, 28, 22, 0.98);
    border-top: 1px solid var(--rule-gold);
    border-bottom: 1px solid var(--rule-gold);
  }

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

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

  .nav-link {
    display: flex;
    justify-content: flex-start;
    padding: 14px 6px 14px 18px;
    font-size: 15px;
    border-bottom: 1px solid var(--rule);
  }

  .nav-link::after {
    left: 4px;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateY(-50%) scale(0);
    transform-origin: center;
  }

  .nav-link:hover::after,
  .nav-link:focus-visible::after,
  .nav-link[aria-current="page"]::after {
    transform: translateY(-50%) scale(1);
  }

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

@media (max-width: 900px) {
  .site-header::before { display: none; }

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

  .bento-span-3,
  .bento-span-4,
  .bento-span-5,
  .bento-span-7,
  .bento-span-8 { grid-column: span 6; }
}

@media (max-width: 620px) {
  .header-tools .btn-crown { display: none; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-meta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contact { flex-direction: column; gap: 8px; }

  .bento-span-3,
  .bento-span-4,
  .bento-span-5,
  .bento-span-6,
  .bento-span-7,
  .bento-span-8 { grid-column: span 12; }

  .data-band {
    font-size: 12px;
    gap: 8px 20px;
  }

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

/* ============================================================
   动效降级
   ============================================================ */
@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;
  }

  .to-top { transform: none; }

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