/* ============================================================
   site.css — 新濠官网 gateway-xinhao.com.cn
   共享外壳：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ============================================================ */

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

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

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

ul, ol { list-style: none; }

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

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

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink-950: #060D1A;
  --ink-900: #0B1526;
  --ink-800: #122036;
  --cyan: #35E6E0;
  --cyan-dim: #1E8F93;
  --amber: #F2A03D;
  --sage: #8FA79B;
  --paper: #EEF3F6;
  --text: #E6EEF5;
  --text-muted: #93A3B5;
  --alert: #D9553F;

  --rule: rgba(30, 143, 147, 0.30);
  --rule-soft: rgba(147, 163, 181, 0.16);
  --cyan-veil: rgba(53, 230, 224, 0.06);
  --cyan-veil-strong: rgba(53, 230, 224, 0.12);

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC Condensed",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  --shell: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
  --measure: 40em;

  --scroll-progress: 0;
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-950);
  background-image:
    linear-gradient(rgba(30, 143, 147, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 143, 147, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(30px, 4.6vw, 40px); }
h2 { font-size: clamp(24px, 3.2vw, 28px); }
h3 { font-size: 20px; line-height: 1.36; }
h4 { font-size: 17px; line-height: 1.4; }

p { max-width: var(--measure); }

strong, b { font-weight: 700; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: 0.02em;
}

::selection {
  background: var(--cyan);
  color: #04141a;
}

/* ---------- 4. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 300;
  transform: translateY(-140%);
  padding: 10px 18px;
  background: var(--cyan);
  color: #04141a;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  border: 1px solid var(--cyan);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -3px;
}

.rule {
  display: block;
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--rule);
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.u-accent {
  font-weight: 700;
  padding-bottom: 1px;
  border-bottom: 2px solid var(--amber);
}

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

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--rule);
}

.section-index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  flex: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "›";
  padding: 0 8px;
  color: var(--cyan-dim);
}

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

.breadcrumb a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan-dim);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  color: var(--sage);
  white-space: nowrap;
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(53, 230, 224, 0.42);
  background: var(--cyan-veil);
}

.tag--amber {
  color: var(--amber);
  border-color: rgba(242, 160, 61, 0.45);
  background: rgba(242, 160, 61, 0.07);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--cyan-dim);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover {
  background: var(--cyan-veil);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-accent {
  background: var(--amber);
  border-color: var(--amber);
  color: #1a1003;
}

.btn-accent:hover {
  background: #ffb75c;
  border-color: #ffb75c;
  color: #1a1003;
}

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

.btn-ghost:hover {
  background: var(--cyan-veil);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 6. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--rule);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(rgba(30, 143, 147, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 143, 147, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

.media-frame > img,
.media-frame > svg,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ---------- 7. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.site-header[data-scrolled="true"] {
  background: rgba(11, 21, 38, 0.96);
  border-bottom-color: var(--rule);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--scroll-progress, 0) * 100%);
  background: var(--cyan);
  opacity: 0.9;
  transition: width 80ms linear;
  pointer-events: none;
}

.header-frame {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 顶部联络条 */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.header-meta {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-utility {
  display: flex;
  align-items: center;
  flex: none;
}

.header-utility li {
  display: flex;
  align-items: center;
}

.header-utility li + li::before {
  content: "/";
  padding: 0 10px;
  color: var(--cyan-dim);
}

.header-utility a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.header-utility a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan-dim);
}

/* 品牌行 */
.header-main {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1.5px solid var(--cyan);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
}

.brand-tag {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--sage);
  white-space: nowrap;
}

/* 只读状态面板 */
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: none;
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 230, 224, 0.16);
}

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

.status-value {
  color: var(--cyan);
  font-weight: 600;
}

.header-cta {
  flex: none;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  transition: border-color 160ms ease, color 160ms ease;
}

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

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 14px;
  height: 12px;
}

.nav-toggle-bar {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--cyan);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle-label {
  display: block;
}

/* 导航 */
.site-nav {
  border-top: 1px solid var(--rule-soft);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border-right: 1px solid var(--rule-soft);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-list > li:first-child .nav-link {
  padding-left: 0;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(30, 143, 147, 0.08);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cyan-dim);
  transition: color 160ms ease;
}

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

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
}

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

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 112px);
  background: var(--ink-900);
  border-top: 1px solid var(--rule);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-frame {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 60px) var(--gutter) clamp(26px, 3.5vw, 40px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

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

.footer-brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}

.footer-brand:hover {
  color: var(--cyan);
  border-bottom-color: var(--amber);
}

.footer-tagline {
  margin-top: 8px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--sage);
}

.footer-contact {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.65;
}

.footer-contact-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: none;
  word-break: break-word;
}

.footer-label {
  flex: none;
  min-width: 34px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan-dim);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

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

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--sage);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

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

.footer-base {
  background: var(--ink-950);
  border-top: 1px solid var(--rule);
}

.footer-base-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer-copy,
.footer-icp,
.footer-note {
  max-width: none;
}

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

.footer-note {
  color: rgba(147, 163, 181, 0.78);
}

/* ---------- 9. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 0.7, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal-delay="1"] { transition-delay: 60ms; }
[data-reveal-delay="2"] { transition-delay: 120ms; }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- 10. 响应式：平板 ---------- */
@media (max-width: 1020px) {
  .header-status { display: none; }
}

@media (max-width: 960px) {
  html { scroll-padding-top: 120px; }

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

  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--rule);
  }

  .site-header[data-open="true"] .site-nav {
    display: block;
  }

  .site-header[data-open="true"] .nav-toggle-bar:first-child {
    transform: translateY(2.75px) rotate(45deg);
  }

  .site-header[data-open="true"] .nav-toggle-bar:last-child {
    transform: translateY(-2.75px) rotate(-45deg);
  }

  .nav-list {
    flex-direction: column;
    padding-bottom: 8px;
  }

  .nav-link,
  .nav-list > li:first-child .nav-link {
    padding: 14px 4px 14px 0;
    border-right: 0;
    border-top: 1px solid var(--rule-soft);
    font-size: 16px;
  }

  .nav-list > li:first-child .nav-link {
    border-top: 0;
  }

  .nav-link[aria-current="page"]::before {
    top: 8px;
    bottom: 8px;
    left: 0;
    right: auto;
    width: 2px;
    height: auto;
  }

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

/* ---------- 11. 响应式：手机 ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }

  .header-top {
    padding: 7px 0;
  }

  .header-meta {
    font-size: 11px;
  }

  .header-utility { display: none; }

  .brand-tag { display: none; }

  .brand-name { font-size: 18px; }

  .header-main {
    padding: 10px 0;
    gap: 10px;
  }

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

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

@media (max-width: 480px) {
  .brand-name { font-size: 17px; }

  .brand-mark { width: 18px; height: 18px; }

  .brand-mark::after { width: 6px; height: 6px; top: 3px; right: 3px; }

  .header-cta {
    padding: 8px 12px;
    font-size: 13px;
  }

  .nav-toggle {
    padding: 8px 10px;
    letter-spacing: 0.06em;
  }

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

/* ---------- 12. 减少动态 ---------- */
@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;
  }

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

  .site-header::after {
    transition: none;
  }
}
