/* ==========================================================================
   吉祥访赛场 · 共享样式表 /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, 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, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0A1723;
  --ink-2: #16242F;
  --green: #00A870;
  --green-deep: #0C6B4A;
  --gold: #F2C230;
  --gold-soft: #FFE7A3;
  --aqua: #1FD9C4;
  --orange: #FF6A2B;
  --violet: #7B5CFF;
  --mist: #EEF3F1;
  --grey: #A9BAC6;

  --font-sans: "Source Han Sans SC", "HarmonyOS Sans SC", "Noto Sans SC",
               "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, "SFMono-Regular",
               Consolas, "Liberation Mono", monospace;

  --pill: 999px;
  --r-xl: 40px;
  --r-l: 26px;
  --r-m: 16px;

  --max: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --header-h: 76px;
}

/* ---------- 3. 中文排版基底 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 640px at 84% -10%, rgba(0, 168, 112, .20), transparent 62%),
    radial-gradient(820px 520px at -8% 14%, rgba(123, 92, 255, .13), transparent 60%),
    radial-gradient(700px 460px at 50% 108%, rgba(242, 194, 48, .10), transparent 64%);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.022em;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.5rem); }

p { text-wrap: pretty; }

strong { font-weight: 800; color: var(--gold); }

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

/* ---------- 4. 焦点可见 ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* ---------- 5. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -90px;
  left: 16px;
  z-index: 300;
  padding: 13px 24px;
  border-radius: 0 0 var(--r-m) var(--r-m);
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: top .2s var(--ease);
}

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

/* ---------- 6. 悬浮胶囊头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 16px var(--gutter) 18px;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  pointer-events: auto;
}

/* 品牌浮岛 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 15px;
  border: 1px solid rgba(0, 168, 112, .38);
  border-radius: var(--pill);
  background: rgba(22, 36, 47, .84);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  color: var(--mist);
  text-decoration: none;
  transition: border-color .24s var(--ease), background-color .24s var(--ease);
}

.brand:hover {
  border-color: var(--gold);
  background: rgba(22, 36, 47, .96);
}

.brand-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 194, 48, .18);
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-tag {
  padding-left: 12px;
  border-left: 1px solid rgba(169, 186, 198, .28);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  white-space: nowrap;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 19px;
  border: 1px solid rgba(0, 168, 112, .45);
  border-radius: var(--pill);
  background: rgba(22, 36, 47, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--mist);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}

.nav-toggle:hover {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.nav-toggle-text { white-space: nowrap; }

.nav-toggle-bars {
  display: grid;
  gap: 3px;
}

.nav-toggle-bars i {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}

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

/* 栏目胶囊组 */
.site-nav { pointer-events: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(169, 186, 198, .16);
  border-radius: var(--pill);
  background: rgba(22, 36, 47, .84);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.nav-list a {
  display: block;
  padding: 9px 16px;
  border-radius: var(--pill);
  color: var(--grey);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-list a:hover {
  background: rgba(0, 168, 112, .2);
  color: var(--mist);
}

.nav-list a[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(169, 186, 198, .12);
  overflow: hidden;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold) 72%, var(--orange));
}

/* ---------- 7. 桌面端：滚动收缩为单胶囊 ---------- */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .site-header[data-collapsed] .nav-toggle { display: inline-flex; }

  .site-header[data-collapsed] .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.96);
    transform-origin: top right;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }

  .site-header[data-collapsed][data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* ---------- 8. 移动端：底部横滑胶囊组 ---------- */
@media (max-width: 1023px) {
  body { padding-bottom: 86px; }

  .site-header {
    padding: 12px var(--gutter) 0;
  }

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

  .brand-tag { display: none; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 168, 112, .26);
    background: linear-gradient(to top, rgba(10, 23, 35, .99), rgba(10, 23, 35, .88));
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transition: padding .24s var(--ease);
  }

  .nav-list {
    gap: 8px;
    padding: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list::-webkit-scrollbar { display: none; }

  .nav-list li {
    flex: 0 0 auto;
    scroll-snap-align: center;
  }

  .nav-list a {
    padding: 11px 18px;
    border: 1px solid rgba(169, 186, 198, .2);
    background: rgba(22, 36, 47, .92);
    font-size: 14px;
  }

  .nav-list a[aria-current="page"] {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--ink);
  }

  /* 展开态 */
  .site-header[data-open] .site-nav {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top-color: var(--gold);
  }

  .site-header[data-open] .nav-list {
    flex-wrap: wrap;
    overflow: visible;
  }

  .site-header[data-open] .nav-list li { flex: 1 1 44%; }

  .site-header[data-open] .nav-list a {
    text-align: center;
    font-size: 15px;
    padding: 13px 16px;
  }
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 140px);
  background: linear-gradient(158deg, #0A1723 0%, #0D2030 52%, #0A1723 100%);
  color: var(--mist);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -110px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 112, .22), transparent 68%);
  pointer-events: none;
}

.footer-band {
  height: 6px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green) 26%, var(--gold) 48%, var(--orange) 72%, var(--violet) 100%);
}

.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 2.2fr;
  gap: clamp(28px, 5vw, 68px);
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding-block: clamp(42px, 6vw, 78px) clamp(30px, 4vw, 48px);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .01em;
}

.footer-blurb {
  margin-top: 12px;
  max-width: 30ch;
  color: var(--grey);
  font-size: 15px;
  line-height: 1.7;
}

.footer-brand .btn { margin-top: 22px; }

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

.footer-title {
  margin-bottom: 14px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
}

.footer-col li + li { margin-top: 2px; }

.footer-col a {
  display: inline-block;
  padding: 5px 0;
  color: var(--grey);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-col a:hover {
  color: var(--gold);
  transform: translateX(3px);
}

.footer-meta {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 48px);
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding-block: clamp(20px, 3vw, 30px);
  border-top: 1px solid rgba(169, 186, 198, .16);
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(18px, 3vw, 38px);
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
}

.meta-list li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.meta-key {
  color: var(--green);
  font-weight: 700;
  letter-spacing: .1em;
}

.pavilion {
  flex: none;
  color: rgba(0, 168, 112, .55);
}

.pavilion svg {
  width: clamp(96px, 14vw, 140px);
  height: auto;
}

.footer-copy {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding-bottom: clamp(24px, 3vw, 38px);
  color: rgba(169, 186, 198, .7);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

/* ---------- 10. 布局容器与网格 ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 100px);
}

.section--ink2 { background: var(--ink-2); }

.section--mist {
  background: var(--mist);
  color: var(--ink);
}

.section--mist .eyebrow { color: var(--green-deep); }
.section--mist .text-muted { color: #4B5C69; }

.section--cut {
  position: relative;
  overflow: hidden;
}

.section--cut::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: clamp(26px, 4vw, 54px);
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}

.col-main { grid-column: 1 / span 8; }
.col-rail { grid-column: 9 / span 3; }
.col-full { grid-column: 1 / -1; }

/* ---------- 11. 文字元件 ---------- */
.eyebrow {
  display: inline-block;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.note-rail {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: var(--grey);
  font-size: 12.5px;
  letter-spacing: .26em;
  line-height: 1.6;
}

.text-muted { color: var(--grey); }

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

.data-num {
  font-weight: 700;
  color: var(--gold);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--pill);
  background: var(--gold-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}

.btn:active { transform: translateY(1px); }

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

.btn--gold:hover {
  background: var(--gold-soft);
  color: var(--ink);
}

.btn--green {
  background: var(--green);
  color: #ffffff;
}

.btn--green:hover { background: var(--green-deep); }

.btn--ghost {
  border-color: rgba(169, 186, 198, .38);
  background: transparent;
  color: var(--mist);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.section--mist .btn--ghost {
  border-color: rgba(10, 23, 35, .28);
  color: var(--ink);
}

.section--mist .btn--ghost:hover {
  border-color: var(--green-deep);
  color: var(--green-deep);
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumb {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(169, 186, 198, .5);
}

.breadcrumb a {
  color: var(--grey);
  text-decoration: none;
  transition: color .2s var(--ease);
}

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

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

/* ---------- 14. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-l);
  background: linear-gradient(140deg, var(--ink-2) 0%, var(--ink) 100%);
  isolation: isolate;
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 23, 35, 0) 42%, rgba(10, 23, 35, .62) 100%);
  pointer-events: none;
}

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

.media-figure {
  display: grid;
  gap: 10px;
}

.media-caption {
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
}

/* ---------- 15. 胶囊标签页 ---------- */
.tabs {
  display: grid;
  gap: clamp(18px, 2.6vw, 30px);
}

.tab-list {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  border: 1px solid rgba(169, 186, 198, .18);
  border-radius: var(--pill);
  background: rgba(22, 36, 47, .8);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar { display: none; }

.tab-list [role="tab"] {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  color: var(--grey);
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.tab-list [role="tab"]:hover { color: var(--mist); }

.tab-list [role="tab"][aria-selected="true"] {
  background: var(--gold);
  color: var(--ink);
}

.tab-panel:focus { outline: none; }

/* ---------- 16. 滚动显现 ---------- */
.reveal.is-armed {
  opacity: 0;
  transform: translateY(26px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

/* ---------- 17. 响应式收束 ---------- */
@media (max-width: 1023px) {
  .footer-inner {
    grid-template-columns: 1fr;
    padding-block: clamp(36px, 8vw, 58px) clamp(26px, 5vw, 40px);
  }

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

  .footer-blurb { max-width: 46ch; }

  .grid-12 { grid-template-columns: 1fr; }

  .col-main,
  .col-rail,
  .col-full { grid-column: 1 / -1; }

  .col-rail {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .note-rail {
    writing-mode: horizontal-tb;
    letter-spacing: .2em;
  }
}

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

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 20px; }

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

  .pavilion { align-self: flex-end; }

  .meta-list { flex-direction: column; gap: 6px; }

  .btn { padding: 12px 22px; font-size: 14.5px; }
}

/* ---------- 18. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal.is-armed {
    opacity: 1;
    transform: none;
  }
}
