/* ============================================================
   苹果澳门服务 · 共享 Site Kit
   文件路径：/assets/site.css
   职责：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #0B0D10;
  --graphite: #151A20;
  --silver: #C9D0D8;
  --mist: #8B939E;
  --paper: #F3F5F7;
  --cyan: #1FE0CF;
  --orange: #FF8A3D;
  --line: #2A3038;
  --teal: #0B6E67;
  --deep: #07090C;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --shell: 1440px;
  --gutter: 24px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --header-h: 66px;
}

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

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--silver);
  font-family: var(--font-body);
  font-size: clamp(16px, .35vw + 15px, 18px);
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

main { display: block; }

/* ---------- 3. 中文排版基线 ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.02em;
  color: var(--paper);
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 4.4vw, 56px); }
h2 { font-size: clamp(25px, 2.6vw, 32px); }
h3 { font-size: clamp(19px, 1.4vw, 22px); line-height: 1.35; letter-spacing: -.01em; }
h4 { font-size: 17px; letter-spacing: 0; line-height: 1.5; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin: .25em 0; }
li::marker { color: var(--mist); }

strong, b { color: var(--paper); font-weight: 700; }
small { font-size: 13px; }

a {
  color: var(--silver);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
a:hover { color: var(--paper); text-decoration-color: var(--cyan); }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: clamp(28px, 4vw, 48px) 0;
}

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

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

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transform: translateY(-130%);
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 12px 20px;
  text-decoration: none;
  transition: transform .18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--ink);
  outline-offset: 0;
}

/* ---------- 5. 容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 960px; }
.container--text { max-width: 720px; }

.section { padding-block: clamp(44px, 6.5vw, 92px); }
.section__head { margin-bottom: clamp(24px, 3.5vw, 44px); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}
.grid--split { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---------- 6. 通用文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--cyan);
}

.lede {
  max-width: 38em;
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.8;
  color: var(--silver);
}

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.4;
  white-space: nowrap;
}
.tag--cyan { border-color: var(--cyan); color: var(--cyan); }
.tag--orange { border-color: var(--orange); color: var(--orange); }

.panel {
  background: var(--graphite);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.6vw, 32px);
  color: var(--silver);
}
.panel--paper {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--graphite);
}
.panel--paper h2,
.panel--paper h3,
.panel--paper h4 { color: var(--ink); }
.panel--paper .meta,
.panel--paper .lede { color: #46505A; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--silver);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}
.btn--ghost {
  border-color: var(--line);
  color: var(--silver);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--cyan);
  color: var(--paper);
}
.btn--block { width: 100%; }

/* ---------- 8. 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, var(--graphite) 0%, #10151A 52%, rgba(31, 224, 207, .12) 100%);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 34%, rgba(31, 224, 207, .10) 72%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }
.media--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 42px), calc(100% - 42px) 100%, 0 100%);
}
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

/* ---------- 9. 面包屑 ---------- */
.crumbs { margin-bottom: clamp(20px, 3vw, 34px); }
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
}
.crumbs__item { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.crumbs__item + .crumbs__item::before { content: "/"; color: var(--line); }
.crumbs__link {
  color: var(--mist);
  text-decoration: none;
}
.crumbs__link:hover { color: var(--cyan); }
.crumbs__item[aria-current="page"] { color: var(--silver); }

/* ---------- 10. 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(11, 13, 16, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(31, 224, 207, .7);
  transition: width .1s linear;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: var(--shell);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}
.brand:hover { color: var(--paper); }
.brand__mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
}
.brand__note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.5;
  color: var(--mist);
}

/* 索引式导航 */
.cmd-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.cmd-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cmd-nav__item { margin: 0; }
.cmd-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 11px;
  color: var(--mist);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.cmd-nav__link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}
.cmd-nav__link:hover { color: var(--paper); }
.cmd-nav__link:hover::after { transform: scaleX(1); }
.cmd-nav__link[aria-current="page"] { color: var(--paper); }
.cmd-nav__link[aria-current="page"]::after { transform: scaleX(1); height: 2px; }
.cmd-nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--mist);
  opacity: .55;
  font-variant-numeric: tabular-nums;
  transition: color .18s var(--ease), opacity .18s var(--ease);
}
.cmd-nav__link[aria-current="page"] .cmd-nav__index { color: var(--cyan); opacity: 1; }

/* 头部工具区 */
.tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.tools__stamp {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--mist);
  white-space: nowrap;
}
.tools__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--cyan);
  transition: transform .2s var(--ease), top .2s var(--ease), bottom .2s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle__label { white-space: nowrap; }
.site-header[data-open="true"] .nav-toggle { border-color: var(--cyan); color: var(--paper); }
.site-header[data-open="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { bottom: 4px; transform: rotate(-45deg); }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: clamp(44px, 6.5vw, 84px);
  background: var(--deep);
  border-top: 1px solid var(--line);
  color: var(--mist);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 96px;
  opacity: .22;
  pointer-events: none;
}
.footer__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  padding-bottom: clamp(30px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
}
.footer__kicker {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer__wordmark {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 70px);
  line-height: .96;
  letter-spacing: -.035em;
  color: var(--paper);
}
.footer__lede {
  max-width: 34em;
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: var(--mist);
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  align-content: start;
}
.footer__col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
}
.footer__list { margin: 0; padding: 0; list-style: none; }
.footer__list li { margin: 0; }
.footer__list li + li { margin-top: 9px; }
.footer__link {
  display: inline-block;
  padding: 2px 0;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer__link:hover,
.footer__link:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--cyan);
}

.footer__contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(26px, 3.4vw, 42px) 0;
  border-bottom: 1px solid var(--line);
}
.contact-cell { min-width: 0; }
.contact-cell--wide .contact-value {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.7;
}
.contact-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mist);
}
.contact-value {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1.6;
  color: var(--silver);
  word-break: break-all;
}
.copy-btn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.copy-btn:hover { border-color: var(--cyan); color: var(--paper); }
.copy-btn[data-copied="true"] { border-color: var(--cyan); color: var(--cyan); }
.contact-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  max-width: 62em;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding: 22px 0 28px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mist);
}
.footer__copy { margin: 0; }
.footer__icp { margin: 0; }
.to-top {
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  line-height: 1.4;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.to-top:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- 12. 显现动效协议 ---------- */
[data-reveal] { transition: opacity .5s var(--ease), transform .5s var(--ease); }
[data-js="on"] [data-reveal] { opacity: 0; transform: translateY(12px); }
[data-js="on"] [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1280px) {
  .tools__stamp { display: none; }
}

@media (max-width: 1023px) {
  :root { --header-h: 60px; }

  .header-inner { gap: 12px; }

  .cmd-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    z-index: 90;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 6px var(--gutter) 24px;
    background: var(--graphite);
    border-bottom: 1px solid var(--line);
  }
  .site-header[data-open="true"] .cmd-nav { display: block; }

  .cmd-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .cmd-nav__item + .cmd-nav__item { border-top: 1px solid var(--line); }
  .cmd-nav__link {
    display: flex;
    justify-content: flex-start;
    padding: 15px 2px;
    font-size: 16px;
    color: var(--silver);
  }
  .cmd-nav__link::after { display: none; }
  .cmd-nav__link[aria-current="page"] { color: var(--cyan); }
  .cmd-nav__index { font-size: 11px; opacity: .7; }

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

  .footer__head { grid-template-columns: minmax(0, 1fr); }
  .footer__contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-cell--wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .brand__note { display: none; }
  .tools { gap: 8px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .footer__nav { gap: 22px; }
  .footer__contact { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { font-size: 11px; }
  .to-top { margin-left: 0; }
  .media--cut {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0 100%);
  }
}

@media (max-width: 420px) {
  .brand__name { font-size: 14px; }
  .nav-toggle__label { display: none; }
}

/* ---------- 14. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-js="on"] [data-reveal] { opacity: 1; transform: none; }
  .scroll-progress { transition: none; }
}
