/* ==========================================================================
   永利主站 · 共享样式 /assets/site.css
   头部 / 页脚 / 通用组件 / 正文容器 / 栅格 / 响应式
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink: #0B1224;
  --ink-2: #141F3A;
  --void: #05080F;
  --gold: #D7A84E;
  --gold-hi: #F3D483;
  --jade: #17B98A;
  --ruby: #E1445F;
  --cyan: #3AD0DE;
  --mist: #9AA6BC;
  --ivory: #F5F7FC;
  --body-text: #DCE3F0;

  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1320px;
  --cut: 20px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --line: rgba(215, 168, 78, .22);
  --line-soft: rgba(154, 166, 188, .16);
  --radius-a: 16px 4px 16px 4px;
  --header-h: 72px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--body-text);
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 80% at 88% -8%, rgba(58, 208, 222, .10), transparent 62%),
    radial-gradient(90% 70% at -8% 6%, rgba(215, 168, 78, .10), transparent 60%),
    radial-gradient(80% 60% at 50% 108%, rgba(23, 185, 138, .08), transparent 65%),
    linear-gradient(165deg, #0B1224 0%, #081227 45%, #05080F 100%);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 900;
  line-height: 1.2;
  color: var(--ivory);
  letter-spacing: .01em;
}

p { margin: 0; }

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

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

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

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

::selection { background: rgba(215, 168, 78, .32); color: #fff; }

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

/* ---------- 3. 工具类 ---------- */
.mono { font-family: var(--font-mono); letter-spacing: .12em; }
.muted { color: var(--mist); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: 72px; }
.section--tight { padding-block: 44px; }

.stack { display: flex; flex-direction: column; gap: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* ---------- 4. 排版组件 ---------- */
.display {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -.015em;
  color: var(--ivory);
}
.display strong {
  font-weight: 900;
  background: linear-gradient(118deg, var(--gold) 8%, var(--gold-hi) 55%, #FFF2CC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 900;
  line-height: 1.16;
  color: var(--ivory);
}

.index-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.index-tag::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.data-number {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 72px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

/* ---------- 5. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-a);
  white-space: nowrap;
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .09s var(--ease);
}
.btn:active { transform: scale(.98); }

.btn--gold {
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-hi) 100%);
  color: #20160A;
  box-shadow: 0 8px 22px -14px rgba(215, 168, 78, .9);
}
.btn--gold:hover {
  background: linear-gradient(120deg, var(--gold-hi) 0%, #FFF2CC 100%);
}

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

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- 6. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 300;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #20160A;
  background: linear-gradient(120deg, var(--gold), var(--gold-hi));
  border-radius: 0 0 12px 12px;
  transform: translateY(-130%);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
.skip-link:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 10px 16px 0;
  background: linear-gradient(180deg,
              rgba(5, 8, 15, .96) 0%,
              rgba(5, 8, 15, .86) 58%,
              rgba(5, 8, 15, 0) 100%);
  transition: padding .2s var(--ease);
}
.site-header[data-shrunk] { padding-top: 6px; }

.header-shell {
  max-width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: linear-gradient(140deg, #182444 0%, #0C1428 58%, #0A1020 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-a);
  box-shadow: 0 12px 34px -22px rgba(0, 0, 0, .95);
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 12px 4px 4px;
}
.brand__mark {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ivory);
  line-height: 1.2;
}
.brand__dot { color: var(--gold); margin: 0 4px; }
.brand__tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .26em;
  color: var(--mist);
  line-height: 1.4;
}

/* 导航 */
.nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__item { display: flex; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 10px;
  font-size: 15px;
  color: var(--mist);
  border-radius: 8px;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.nav__link:hover {
  color: var(--ivory);
  background: rgba(58, 208, 222, .09);
}
.nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--gold);
  opacity: .72;
  transition: opacity .16s var(--ease), color .16s var(--ease);
}
.nav__slash {
  width: 1px;
  height: 11px;
  background: linear-gradient(180deg, var(--gold), rgba(215, 168, 78, 0));
  transform: rotate(45deg);
}
.nav__text { white-space: nowrap; }

.nav__link[aria-current="page"] { color: var(--ivory); }
.nav__link[aria-current="page"] .nav__num { opacity: 1; color: var(--gold-hi); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(243, 212, 131, 0));
}

/* 头部工具区 */
.header-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--jade);
  background: rgba(23, 185, 138, .09);
  border: 1px solid rgba(23, 185, 138, .34);
  border-radius: 999px;
  white-space: nowrap;
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(23, 185, 138, .18);
  animation: chip-pulse 2.6s var(--ease) infinite;
}
@keyframes chip-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.82); }
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-a);
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); background: rgba(215, 168, 78, .08); }
.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
}
.nav-toggle__icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle__label { line-height: 1; }

/* 阅读进度 */
.header-progress {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: rgba(154, 166, 188, .14);
  overflow: hidden;
}
.header-progress__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--jade) 0%, var(--cyan) 42%, var(--gold) 78%, var(--ruby) 100%);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 88px;
  overflow: hidden;
  color: var(--mist);
  background: linear-gradient(180deg, #05080F 0%, #081020 42%, #05080F 100%);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 62% at 10% -6%, rgba(58, 208, 222, .12), transparent 68%),
    radial-gradient(48% 52% at 92% 4%, rgba(215, 168, 78, .12), transparent 70%);
}
.footer-shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 60px 20px 26px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.95fr);
  gap: 44px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand__mark {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ivory);
}
.footer-brand__tagline {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 34ch;
}
.footer-brand__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(154, 166, 188, .78);
}

.spectrum-bar {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--jade) 0%, var(--cyan) 38%, var(--gold) 72%, var(--ruby) 100%);
  opacity: .88;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer-col { min-width: 0; }
.footer-col__title {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  color: var(--gold);
}
.footer-col__list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist);
}
.footer-col__list li::before {
  content: "/";
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--gold);
  opacity: .55;
}
.footer-col__list a {
  color: var(--mist);
  transition: color .16s var(--ease), transform .16s var(--ease);
}
.footer-col__list a:hover { color: var(--gold-hi); }
.footer-col__list--plain li::before { content: none; }
.footer-col__list--plain li { color: rgba(154, 166, 188, .9); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.footer-base__item { color: var(--mist); }
.footer-base__item--dim { color: rgba(154, 166, 188, .62); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }

/* ---------- 9. 通用面板与视觉组件 ---------- */
.panel {
  position: relative;
  padding: 24px;
  background: linear-gradient(155deg, rgba(20, 31, 58, .92) 0%, rgba(11, 18, 36, .92) 100%);
  border: 1px solid var(--line-soft);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.float-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 5px 12px 5px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #20160A;
  background: linear-gradient(120deg, var(--gold), var(--gold-hi));
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
}

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(20, 31, 58, .95) 0%, rgba(5, 8, 15, .95) 100%);
  border: 1px solid var(--line-soft);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}
.media-frame > img,
.media-frame > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(5, 8, 15, .74) 100%);
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3  { aspect-ratio: 4 / 3; }
.media-frame--1x1  { aspect-ratio: 1 / 1; }
.media-frame--3x4  { aspect-ratio: 3 / 4; }
.media-frame__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mist);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "";
  width: 1px;
  height: 11px;
  background: var(--gold);
  opacity: .6;
  transform: rotate(45deg);
}
.breadcrumb a { color: var(--mist); transition: color .16s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--gold-hi); }

/* 正文排版 */
.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body-text);
}
.prose > * + * { margin-top: 1.2em; }
.prose h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin-top: 1.9em;
  color: var(--ivory);
}
.prose h3 { font-size: 19px; margin-top: 1.6em; color: var(--ivory); }
.prose ul, .prose ol { padding-left: 1.4em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(58, 208, 222, .38);
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.prose a:hover { color: var(--gold-hi); border-bottom-color: var(--gold); }
.prose strong { color: var(--ivory); font-weight: 700; }
.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  padding: .12em .4em;
  border-radius: 4px;
  background: rgba(58, 208, 222, .1);
  color: var(--cyan);
}

/* ---------- 10. 入场显隐 ---------- */
[data-reveal] { opacity: 1; }
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
html.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1280px) {
  .nav__link { padding: 10px 8px; font-size: 14px; }
  .brand__tagline { display: none; }
}

@media (max-width: 1160px) {
  .status-chip { display: none; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .header-shell { justify-content: space-between; }

  .nav {
    position: fixed;
    top: calc(var(--header-h, 72px) + 6px);
    left: 14px;
    right: 14px;
    z-index: 140;
    display: block;
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 8px;
    background: linear-gradient(160deg, rgba(21, 33, 62, .99) 0%, rgba(5, 8, 15, .99) 100%);
    border: 1px solid var(--line);
    border-radius: 14px 4px 14px 4px;
    box-shadow: 0 26px 60px -28px rgba(0, 0, 0, .96);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s linear;
  }
  .nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__item { display: block; }
  .nav__link {
    justify-content: flex-start;
    padding: 15px 14px;
    font-size: 16px;
    border-radius: 8px;
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] {
    background: rgba(215, 168, 78, .1);
    box-shadow: inset 2px 0 0 var(--gold);
  }
}

@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr; gap: 34px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-block: 56px; }
  .grid--7-5 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; background-attachment: scroll; }
  .header-shell { padding: 7px 10px; gap: 10px; }
  .brand__mark { font-size: 16px; }
  .grid { gap: 18px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .panel { padding: 20px; --cut: 16px; }
  .footer-shell { padding: 44px 20px 22px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .section { padding-block: 44px; }
  .grid--2 { grid-template-columns: 1fr; }
}

/* ---------- 12. 动效与无障碍偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.reveal-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .header-progress__fill { transition: none !important; }
}
