/* ==========================================================================
   彩娱乐会馆 · CITYPULSE — 共享站点样式 /assets/site.css
   结构母题：纵向脉冲轨道 + 切角面板 + 坐标索引
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body { margin: 0; }

h1, h2, h3, h4, h5, p, figure, blockquote {
  margin: 0;
}

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

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

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

a {
  color: inherit;
}

address {
  font-style: normal;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 色彩 */
  --ink-900: #12161F;   /* 夜航底色 */
  --ink-800: #1B2230;   /* 深巷面板 */
  --ink-700: #241B44;   /* 深紫幕 */
  --pulse: #0FA3A3;     /* 脉冲青 */
  --pulse-soft: #7FE3E0;/* 浅脉冲 */
  --violet: #3B2A6B;    /* 暮光紫 */
  --sand: #E0B36A;      /* 暖沙金 */
  --white: #F2F5F9;     /* 亮字白 */
  --mist: #A8B2C4;      /* 雾灰蓝 */
  --deep: #0B7C7C;      /* 深青压 */

  /* 线与边 */
  --line: rgba(127, 227, 224, 0.16);
  --line-strong: rgba(15, 163, 163, 0.55);
  --line-soft: rgba(168, 178, 196, 0.14);

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono",
    "Cascadia Mono", Menlo, Consolas, monospace;

  /* 尺度 */
  --container: 1180px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 76px;
  --cut: 16px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 中文排版基础 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1200px 620px at 10% -12%, rgba(59, 42, 107, 0.55), transparent 70%),
    radial-gradient(900px 520px at 92% -6%, rgba(15, 163, 163, 0.12), transparent 66%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.18;
  color: var(--white);
}

h1 { font-size: clamp(34px, 6vw, 72px); }
h2 { font-size: clamp(24px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 24px); letter-spacing: 0.04em; }

p { color: var(--mist); }

strong { color: var(--white); font-weight: 700; }

::selection {
  background: var(--pulse);
  color: #04181A;
}

/* ---------- 4. 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--pulse-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 140;
  padding: 12px 22px;
  background: var(--pulse);
  color: #04181A;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 0.24s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.skip-link:focus {
  transform: translate(-50%, 10px);
}

/* ---------- 5. 布局骨架 ---------- */
.container {
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

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

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  margin-bottom: clamp(24px, 4vw, 40px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.6vw, 32px);
}

.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); }
.grid--4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }

/* ---------- 6. 字标 ---------- */
.brand,
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--white);
}

.brand { padding-block: 8px; }

.brand-mark {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.15;
  color: var(--white);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  line-height: 1;
  color: var(--sand);
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  color: var(--pulse-soft);
}

.brand-mark,
.brand-sub {
  transition: color 0.24s var(--ease);
}

/* ---------- 7. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(18, 22, 31, 0.95);
  border-bottom: 1px solid rgba(15, 163, 163, 0.26);
  color: var(--white);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--deep), var(--pulse) 45%, var(--pulse-soft));
}

.header-inner {
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
}

.header-rail {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(15, 163, 163, 0.78) 0 10px,
    transparent 10px 19px
  );
  opacity: 0.85;
}

/* 移动端开关 */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 90;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--pulse-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  cursor: pointer;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease);
}

.nav-toggle:hover {
  background: rgba(15, 163, 163, 0.16);
  color: var(--white);
  border-color: var(--pulse);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.24s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* 导航 */
.site-nav {
  flex: 0 0 auto;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 2px;
  color: var(--mist);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pulse);
  transform: translateX(-50%) scale(0);
  transition: transform 0.24s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--white);
  border-bottom-color: rgba(15, 163, 163, 0.42);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: translateX(-50%) scale(1);
}

.nav-link[aria-current="page"] {
  color: var(--pulse-soft);
  border-bottom-color: var(--pulse);
}

.nav-link[aria-current="page"]::after {
  transform: translateX(-50%) scale(1);
  background: var(--pulse-soft);
}

/* 遮罩 */
.nav-scrim {
  display: none;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: clamp(64px, 10vw, 128px);
  background-image: linear-gradient(
    180deg,
    rgba(36, 27, 68, 0.9) 0%,
    rgba(27, 34, 48, 0.55) 45%,
    var(--ink-900) 100%
  );
  border-top: 1px solid rgba(15, 163, 163, 0.32);
  color: var(--mist);
  font-size: 15px;
}

.footer-rail {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--pulse) 22%,
    var(--sand) 58%,
    rgba(15, 163, 163, 0.2) 100%
  );
  opacity: 0.75;
}

.footer-inner {
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 76px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1fr 1.2fr;
  gap: clamp(26px, 4vw, 56px);
}

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

.footer-tagline {
  margin-top: 16px;
  margin-bottom: 22px;
  max-width: 30ch;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.75;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--sand);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.footer-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-list a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--pulse-soft);
  border-bottom-color: rgba(15, 163, 163, 0.55);
}

.footer-list--mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.footer-contact-item {
  display: grid;
  gap: 3px;
  color: var(--white);
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--mist);
  opacity: 0.8;
}

.footer-value {
  color: var(--white);
  word-break: break-all;
}

.footer-address {
  margin-top: 18px;
  max-width: 26ch;
  color: var(--mist);
  line-height: 1.7;
  font-size: 14px;
}

.footer-bottom {
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mist);
}

.footer-copy,
.footer-icp {
  color: inherit;
  font-size: inherit;
}

.footer-icp { color: var(--sand); }

.to-top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--pulse-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  cursor: pointer;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease);
}

.to-top:hover {
  background: rgba(15, 163, 163, 0.18);
  border-color: var(--pulse);
  color: var(--white);
}

.to-top:active {
  background: var(--deep);
  color: var(--white);
}

/* ---------- 9. 通用组件 ---------- */
.coord {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--sand);
  text-transform: uppercase;
}

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

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--ink-800);
  border: 1px solid var(--line);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--pulse), transparent 78%);
  opacity: 0.7;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(
    0 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% 100%,
    14px 100%,
    0 calc(100% - 14px)
  );
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease);
}

.btn--pulse {
  background: var(--pulse);
  border-color: var(--pulse);
  color: #04181A;
}

.btn--pulse:hover {
  background: var(--pulse-soft);
  border-color: var(--pulse-soft);
  color: #04181A;
}

.btn--pulse:active {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--pulse-soft);
}

.btn--ghost:hover {
  background: rgba(15, 163, 163, 0.16);
  border-color: var(--pulse);
  color: var(--white);
}

.btn--ghost:active {
  background: var(--deep);
  color: var(--white);
}

/* 图片容器（页面阶段填入 <img>） */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-700);
  border: 1px solid var(--line);
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 227, 224, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 227, 224, 0.14) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

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

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

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

.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--pulse-soft);
  border-bottom-color: rgba(15, 163, 163, 0.55);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(168, 178, 196, 0.45);
}

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

/* 正文阅读区 */
.prose {
  max-width: 68ch;
}

.prose p {
  color: var(--mist);
}

.prose p + p {
  margin-top: 1.2em;
}

.prose h2,
.prose h3 {
  margin-top: 2em;
  margin-bottom: 0.7em;
}

.prose ul,
.prose ol {
  margin-block: 1.2em;
  padding-left: 1.4em;
  list-style: none;
}

.prose ul li,
.prose ol li {
  position: relative;
  margin-block: 0.55em;
  padding-left: 1.1em;
  color: var(--mist);
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--pulse);
}

.prose ol {
  counter-reset: prose-ol;
}

.prose ol li {
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--sand);
}

.prose a {
  color: var(--pulse-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 163, 163, 0.5);
}

.prose a:hover {
  color: var(--white);
  border-bottom-color: var(--pulse-soft);
}

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
  .footer-col--contact {
    grid-column: 1 / -1;
  }
  .grid--7-5,
  .grid--4-8 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
    --cut: 14px;
  }

  .header-rail { display: none; }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(88vw, 360px);
    margin-left: 0;
    padding: calc(var(--header-h) + 24px) clamp(20px, 5vw, 32px) 40px;
    overflow-y: auto;
    background: var(--ink-700);
    border-left: 1px solid var(--line-strong);
    z-index: 80;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s var(--ease), visibility 0.3s var(--ease);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      28px 100%,
      0 calc(100% - 28px)
    );
  }

  .site-header[data-open="true"] .site-nav {
    transform: translateX(0);
    visibility: visible;
  }

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

  .nav-list li + li {
    border-top: 1px solid rgba(168, 178, 196, 0.14);
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 0;
  }

  .nav-link::after {
    left: auto;
    right: 2px;
    bottom: 50%;
    transform: translateY(50%) scale(0);
  }

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

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(8, 10, 16, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  }

  .site-header[data-open="true"] + .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  body.is-nav-open {
    overflow: hidden;
  }

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

  .footer-col--contact {
    grid-column: auto;
  }

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

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

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .to-top {
    margin-left: 0;
  }

  .section {
    padding-block: 40px;
  }
}

/* ---------- 11. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
