/* ==========================================================================
   天宝博看台 — 共享站点样式 /assets/site.css
   语言：Bento 看板 · 纸张叠层 · 票根入口 · 7° 斜切 · 转播质感
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

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

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

img { height: auto; }

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

a { color: inherit; }

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

/* ---------- tokens ---------- */
:root {
  --clay: #C0441C;
  --clay-lit: #E4693A;
  --mist-deep: #0F3350;
  --mist-mid: #2C6B8A;
  --mist-pale: #D6E3EA;
  --flare: #B9F24B;
  --paper: #F8F4EC;
  --stub: #EDDFC9;
  --ink: #14181C;
  --relay: #5C6B75;

  --shell: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.4rem);
  --radius: 4px;
  --cut: 7deg;

  --font-display: "Arial Narrow", "Helvetica Neue Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-ticket: 3px 3px 0 rgba(20, 24, 28, .16);
  --shadow-ticket-hover: 0 12px 0 -4px rgba(20, 24, 28, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: condensed;
  letter-spacing: -.01em;
  line-height: 1.06;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); letter-spacing: 0; }

p + p { margin-top: .9em; }

strong { font-weight: 700; }

main { display: block; }

#main-content { scroll-margin-top: 76px; }

/* ---------- utilities ---------- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.section { padding-block: clamp(2.2rem, 5vw, 4rem); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--relay);
}

.data {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.lead { font-size: 1.08rem; line-height: 1.8; color: #2b333a; }

.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;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -120px;
  z-index: 200;
  padding: .6rem 1rem;
  background: var(--flare);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 2px;
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: top .2s var(--ease);
}

.skip-link:focus { top: .6rem; }

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 3px;
  background: var(--clay-lit);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .12s linear;
  pointer-events: none;
}

/* --- 上层：品牌说明带 --- */
.header-upper {
  background: var(--mist-deep);
  color: var(--paper);
  max-height: 240px;
  overflow: hidden;
  box-shadow: inset 6px 0 0 var(--clay);
  transition: max-height .42s var(--ease), opacity .3s var(--ease);
}

.site-header[data-compact] .header-upper {
  max-height: 0;
  opacity: 0;
}

.header-upper-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  padding-block: .78rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-plate {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--clay);
  color: var(--paper);
  border: 1.5px solid var(--paper);
  border-radius: 2px;
  transform: skewX(-8deg);
}

.brand-plate b {
  display: block;
  transform: skewX(8deg);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .06em;
}

.brand-copy { display: block; min-width: 0; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: .04em;
  line-height: 1.1;
  color: var(--paper);
}

.brand-line {
  display: block;
  margin-top: .2rem;
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--mist-pale);
  white-space: nowrap;
}

.header-rail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .7rem;
}

/* --- 状态标签 --- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .34em .62em;
  border: 1px solid rgba(185, 242, 75, .55);
  border-radius: 2px;
  background: rgba(185, 242, 75, .08);
  color: var(--flare);
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: .12em;
  white-space: nowrap;
}

.status-chip-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--flare);
  animation: flare-breath 2.4s ease-in-out infinite;
}

@keyframes flare-breath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 242, 75, .55); opacity: 1; }
  50% { box-shadow: 0 0 0 5px rgba(185, 242, 75, 0); opacity: .7; }
}

/* --- 下层：栏目条 --- */
.header-lower { background: var(--paper); }

.header-lower-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}

.nav-bar-head { display: none; }

.nav-bar-title {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--relay);
}

.primary-nav { flex: 1 1 auto; min-width: 0; }

.nav-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  counter-reset: nav-item;
  scrollbar-width: thin;
}

.nav-track::-webkit-scrollbar { height: 3px; }
.nav-track::-webkit-scrollbar-thumb { background: var(--mist-pale); border-radius: 2px; }

.nav-track li { flex: 0 0 auto; counter-increment: nav-item; }

.nav-track a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .95rem .9rem;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}

.nav-track a::before {
  content: counter(nav-item, decimal-leading-zero);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--relay);
}

.nav-track a:hover {
  background: var(--stub);
  color: var(--clay);
  border-bottom-color: var(--clay-lit);
}

.nav-track a:hover::before { color: var(--clay-lit); }

.nav-track a[aria-current="page"] {
  color: var(--clay);
  font-weight: 700;
  border-bottom-color: var(--clay);
}

.nav-track a[aria-current="page"]::before { color: var(--clay); }

.nav-hint {
  flex: none;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--relay);
  white-space: nowrap;
}

/* --- 移动导航按钮 --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .42rem .7rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--stub);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .14em;
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

.site-header[data-nav-open] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-nav-open] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.site-header[data-nav-open] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ==========================================================================
   票根入口
   ========================================================================== */
.ticket {
  --ticket-stub: 28px;
  --ticket-hole: var(--paper);
  position: relative;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--stub);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-ticket);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ticket-hole);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  left: calc(var(--ticket-stub) - 7px);
}

.ticket::before { top: -7px; }
.ticket::after { bottom: -7px; }

.ticket-stub {
  flex: none;
  width: var(--ticket-stub);
  background: var(--clay);
  border-right: 1px dashed rgba(248, 244, 236, .75);
}

.ticket-body {
  display: flex;
  align-items: center;
  gap: .45em;
  padding: .72rem 1.1rem .72rem 1rem;
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.ticket:hover,
.ticket:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-ticket-hover);
}

.ticket--mini { --ticket-stub: 18px; --ticket-hole: var(--mist-deep); }

.ticket--mini .ticket-body {
  padding: .5rem .82rem .5rem .72rem;
  font-size: 12px;
  letter-spacing: .08em;
}

.ticket--mini::before,
.ticket--mini::after { width: 10px; height: 10px; left: calc(var(--ticket-stub) - 5px); }
.ticket--mini::before { top: -5px; }
.ticket--mini::after { bottom: -5px; }

.ticket--block {
  display: flex;
  width: 100%;
  max-width: 320px;
}

.ticket--block .ticket-body { flex: 1 1 auto; justify-content: space-between; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .7rem 1.15rem;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 rgba(20, 24, 28, .9);
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: .1em;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

.btn:hover {
  transform: translate(-1px, -2px);
  box-shadow: 4px 5px 0 rgba(20, 24, 28, .85);
}

.btn--primary {
  background: var(--clay);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--primary:hover { background: var(--clay-lit); }

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

.btn--line { background: transparent; box-shadow: none; }

/* ==========================================================================
   卡片与标签
   ========================================================================== */
.card {
  position: relative;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 rgba(20, 24, 28, .1);
}

.card--deep {
  background: var(--mist-deep);
  color: var(--paper);
  border-color: var(--mist-deep);
  box-shadow: 5px 5px 0 rgba(15, 51, 80, .28);
}

.card--mist {
  background: var(--mist-pale);
  border-color: rgba(20, 24, 28, .35);
  box-shadow: 3px 3px 0 rgba(20, 24, 28, .08);
}

.card--stub { background: var(--stub); }

.card--accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--clay);
  border-radius: 3px 3px 0 0;
}

.plate-label {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .24em .55em;
  background: var(--stub);
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.plate-label--flare { background: var(--flare); }
.plate-label--clay { background: var(--clay); color: var(--paper); border-color: var(--clay); }

.stand-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--mist-pale);
  border: 1.5px solid var(--ink);
  border-left: 8px solid var(--clay);
  border-radius: var(--radius);
  font-family: var(--font-data);
  font-size: 12.5px;
  letter-spacing: .1em;
}

/* ==========================================================================
   面包屑
   ========================================================================== */
.crumbs { padding-block: 1rem; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45em;
  font-family: var(--font-data);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--relay);
}

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

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

.crumbs a { text-decoration: none; border-bottom: 1px solid transparent; }

.crumbs a:hover { color: var(--clay); border-bottom-color: var(--clay); }

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

/* ==========================================================================
   网格与图片容器
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(.9rem, 1.6vw, 1.4rem);
}

.bento > * { min-width: 0; }

.media {
  position: relative;
  overflow: hidden;
  background: var(--mist-pale);
  border: 1.5px solid rgba(20, 24, 28, .5);
  border-radius: var(--radius);
}

.media > img,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.06);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(20, 24, 28, .06) 0 1px, transparent 1px 4px);
  opacity: .55;
  mix-blend-mode: multiply;
}

.media--4x3 { aspect-ratio: 4 / 3; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--1x1 { aspect-ratio: 1 / 1; }

.media--cut { clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }

.media-caption {
  display: block;
  margin-top: .5rem;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--relay);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(2.4rem, 6vw, 5rem);
  background: var(--mist-deep);
  color: var(--paper);
}

.footer-tape {
  height: 12px;
  background-image: repeating-linear-gradient(135deg, var(--clay) 0 14px, var(--mist-deep) 14px 28px);
  border-bottom: 2px solid var(--ink);
}

.footer-shell { padding-block: clamp(2.2rem, 4vw, 3.2rem) 1.6rem; }

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.6fr;
  gap: 2rem 2.4rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: .02em;
}

.footer-line {
  margin-top: .7rem;
  max-width: 30ch;
  font-size: .94rem;
  line-height: 1.7;
  color: var(--mist-pale);
}

.footer-icp {
  display: inline-block;
  margin-top: 1rem;
  padding: .24em .55em;
  border: 1px solid rgba(185, 242, 75, .5);
  border-radius: 2px;
  color: var(--flare);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .14em;
}

.footer-col-title {
  margin-bottom: .9rem;
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--flare);
}

.footer-links li + li { margin-top: .45rem; }

.footer-links a {
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-links a:hover { color: var(--flare); border-bottom-color: var(--flare); }

.footer-contact-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: .6rem;
  align-items: baseline;
  font-size: .92rem;
}

.footer-contact-list li + li { margin-top: .55rem; }

.footer-key {
  font-family: var(--font-data);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--mist-pale);
  padding-top: .16em;
}

.footer-val {
  font-family: var(--font-data);
  font-size: .86rem;
  letter-spacing: .02em;
  word-break: break-word;
}

.footer-val--addr {
  font-family: var(--font-body);
  font-size: .9rem;
  line-height: 1.6;
}

.footer-note {
  margin-top: 1rem;
  font-size: .8rem;
  line-height: 1.65;
  color: var(--mist-pale);
}

.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(214, 227, 234, .24);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mist-pale);
}

.footer-base-note { color: var(--mist-pale); }

/* ==========================================================================
   滚动显现协议
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--reveal-order, 0) * 90ms);
}

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

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1023px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

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

  .header-upper-inner {
    flex-wrap: wrap;
    gap: .7rem;
    padding-block: .7rem;
  }

  .header-rail {
    width: 100%;
    justify-content: space-between;
  }

  .header-lower-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding-block: 0;
  }

  .nav-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .5rem;
  }

  .nav-hint { display: none; }

  .primary-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease);
  }

  .primary-nav[data-open] {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    border-top: 2px solid var(--ink);
  }

  .nav-track {
    flex-direction: column;
    overflow: visible;
  }

  .nav-track a {
    border-bottom: 1px solid rgba(20, 24, 28, .14);
    border-left: 3px solid transparent;
    padding: .85rem 1rem;
    font-size: 1rem;
  }

  .nav-track a[aria-current="page"] {
    border-bottom-color: rgba(20, 24, 28, .14);
    border-left-color: var(--clay);
    background: var(--stub);
  }

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

  .footer-top { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-brand { grid-column: auto; }
  .footer-base { flex-direction: column; gap: .4rem; }
}

@media (max-width: 559px) {
  .brand-line { font-size: 9.5px; letter-spacing: .1em; }
  .brand-plate { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .status-chip { font-size: 10.5px; letter-spacing: .08em; }
  .ticket--mini .ticket-body { font-size: 11.5px; }
  .card { padding: 1.1rem 1.15rem 1.25rem; }
  .footer-contact-list li { grid-template-columns: 2.8rem 1fr; }
}

/* ==========================================================================
   焦点可见性（置于末尾确保覆盖组件自身的 box-shadow）
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--flare);
  border-radius: 2px;
}

.site-footer :focus-visible,
.header-upper :focus-visible,
.card--deep :focus-visible {
  outline-color: var(--flare);
  box-shadow: 0 0 0 4px rgba(185, 242, 75, .28);
}

.skip-link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(20, 24, 28, .25);
}

/* ==========================================================================
   减少动态
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity .2s linear;
  }

  .ticket:hover,
  .ticket:focus-visible,
  .btn:hover {
    transform: none;
  }

  .header-progress { transition: none; }
}

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