/* ============================================================
   澳博指南 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 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[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

/* ---------- 2. 变量 ---------- */
:root {
  --blue: #0E5AA7;
  --deep: #083B6F;
  --sky: #3E8FD0;
  --snow: #F7FAFD;
  --paper: #FFFFFF;
  --red: #D7402B;
  --yellow: #F2B233;
  --green: #1E8A5F;
  --ink: #14202E;
  --mist: #C9D6E2;

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

  --max: 1200px;
  --gutter: 24px;
  --cut: 18px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-1: 0 12px 28px -22px rgba(8, 59, 111, .9);
  --shadow-2: 0 24px 48px -30px rgba(8, 59, 111, .9);
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--snow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--deep);
}

h1 { font-size: 56px; }
h2 { font-size: 34px; }
h3 { font-size: 22px; line-height: 1.4; }

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

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

::selection {
  background: var(--yellow);
  color: var(--deep);
}

/* ---------- 4. 焦点与无障碍 ---------- */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

#main-content:focus,
#main-content:focus-visible {
  outline: none;
}

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

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 300;
  display: inline-block;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--deep);
  border-radius: 0 0 14px 14px;
  transform: translate(-50%, -140%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
  outline: 3px solid var(--yellow);
  outline-offset: -3px;
}

/* ---------- 5. 顶部滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 250;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--sky) 55%, var(--green) 100%);
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px var(--gutter) 12px;
  background-color: var(--snow);
}

.site-header__pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 10px 8px 16px;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}

.site-header__bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 14px;
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
}

.brand__mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}

.brand__mark::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 13px;
  height: 13px;
  background: var(--yellow);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.brand__text {
  display: block;
}

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--deep);
}

.brand__meta {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  color: var(--blue);
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--deep);
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

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

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background-color .2s var(--ease);
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s var(--ease), top .2s var(--ease);
}

.nav-toggle__icon::before { top: -5px; }
.nav-toggle__icon::after  { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after  { top: 0; transform: rotate(-45deg); }

/* 面板 */
.site-header__panel {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

/* 导航 */
.site-nav { min-width: 0; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__item { display: block; }

.site-nav__link {
  display: inline-block;
  padding: 7px 12px;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  border-radius: 999px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.site-nav__link:hover {
  background: #EAF2FA;
  color: var(--deep);
}

.site-nav__link[aria-current="page"] {
  font-weight: 700;
  color: #FFFFFF;
  background: var(--blue);
}

.site-nav__link[aria-current="page"]:hover {
  background: var(--deep);
  color: #FFFFFF;
}

/* 检索 */
.site-search {
  position: relative;
  flex: 0 0 auto;
  width: 210px;
}

.site-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site-search__input {
  width: 100%;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--snow);
  border: 1px solid var(--mist);
  border-radius: 999px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.site-search__input::placeholder { color: #7C8B9C; }

.site-search__input:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(62, 143, 208, .22);
}

.site-search__status {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
  color: var(--deep);
  background: var(--yellow);
  border-radius: 6px;
}

.site-search__status:empty { display: none; }

/* 检索命中态 */
[data-search-item].is-search-hit {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  background-color: rgba(242, 178, 51, .16);
  border-radius: 8px;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 72px;
  padding: 64px var(--gutter) 28px;
  overflow: hidden;
  color: #E6EEF6;
  background: var(--deep);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 14px);
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 1.5fr;
  gap: 40px 32px;
}

.site-footer__brand-block { min-width: 0; }

.site-footer__name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.site-footer__tagline {
  margin-top: 6px;
  font-size: 14px;
  color: #9FB8D0;
}

.site-footer__version {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
}

.site-footer__version-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #9FB8D0;
}

.site-footer__version-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--yellow);
}

.site-footer__note {
  max-width: 26em;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #8FA9C4;
}

.site-footer__col { min-width: 0; }

.site-footer__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #86B7E2;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.site-footer__item { display: block; }

.site-footer__link {
  display: inline-block;
  font-size: 14.5px;
  color: #D6E3EF;
  transition: color .2s var(--ease);
}

.site-footer__link::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 9px;
  vertical-align: 3px;
  background: var(--sky);
  border-radius: 1px;
}

.site-footer__link:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--yellow);
}

.site-footer__list--plain {
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #C3D5E5;
}

.site-footer__text { display: inline-block; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 44px;
  padding-top: 20px;
  font-size: 12.5px;
  color: #8FA9C4;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.site-footer__copy { margin: 0; }

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.site-footer__legal-link {
  color: #C3D5E5;
  transition: color .2s var(--ease);
}

.site-footer__legal-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--yellow);
}

.site-footer__sep { color: rgba(255, 255, 255, .3); }

.site-footer__icp {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---------- 8. 通用容器与节奏 ---------- */
.u-container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.stack > * + * { margin-top: 24px; }

/* ---------- 9. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.btn--primary {
  color: #FFFFFF;
  background: var(--blue);
}

.btn--primary:hover {
  background: var(--deep);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--deep);
  background: transparent;
  border-color: var(--mist);
}

.btn--ghost:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  background: #EAF2FA;
  border-radius: 6px;
}

.tag--red    { color: var(--red);   background: rgba(215, 64, 43, .10); }
.tag--yellow { color: #8A5A00;      background: rgba(242, 178, 51, .24); }
.tag--green  { color: var(--green); background: rgba(30, 138, 95, .12); }

/* ---------- 10. 堆叠画板 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 3vw, 36px);
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 18px;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.panel--cut::before {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 26px;
  height: 26px;
  background: var(--snow);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* ---------- 11. 区块标题 ---------- */
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head__index {
  flex: 0 0 auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--red);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--deep);
}

/* ---------- 12. 竖排注释 ---------- */
.annotation {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--sky);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ---------- 13. 图片容器（页面阶段放占位） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #E8F1FA 0%, #F7FAFD 55%, #EAF2FA 100%);
  border: 1px solid var(--mist);
  border-radius: 18px;
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, rgba(14, 90, 167, .06) 0 1px, transparent 1px 16px);
}

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

.media__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--blue);
}

/* ---------- 14. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--blue);
}

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

.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb__link {
  color: var(--blue);
  transition: color .2s var(--ease);
}

.breadcrumb__link:hover {
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--yellow);
}

.breadcrumb__sep { color: var(--mist); }

.breadcrumb__current {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 15. 入场动效协议 ---------- */
[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(12px);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity .24s ease-out, transform .24s ease-out;
}

/* ---------- 16. 响应式：平板 ---------- */
@media (max-width: 1120px) and (min-width: 961px) {
  .site-header__pill { gap: 12px; }
  .site-nav__link { padding: 7px 9px; font-size: 14px; }
  .site-search { width: 160px; }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px 24px; }
}

@media (max-width: 960px) {
  h1 { font-size: 40px; }

  .site-header { padding: 12px 16px 8px; }

  .site-header__pill {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 20px;
  }

  .site-header__bar {
    justify-content: space-between;
    width: 100%;
  }

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

  .site-header__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    max-height: calc(100vh - 140px);
    padding: 16px;
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid var(--mist);
    border-radius: 18px;
    box-shadow: var(--shadow-2);
  }

  .site-header__panel[data-open] { display: flex; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__link {
    display: block;
    padding: 11px 14px;
    font-size: 15.5px;
    border-radius: 12px;
  }

  .site-search { width: 100%; }

  .site-search__input {
    padding: 11px 16px;
    font-size: 15px;
  }

  .site-search__status {
    position: static;
    display: inline-block;
    margin-top: 8px;
  }

  .site-footer { padding: 48px 16px 24px; }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .site-footer__brand-block { grid-column: 1 / -1; }

  .site-footer__bottom {
    justify-content: flex-start;
    gap: 10px 20px;
  }
}

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

  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }

  .brand__name { font-size: 15px; }
  .brand__meta { font-size: 9px; letter-spacing: 0.12em; }

  .site-footer__grid { grid-template-columns: 1fr; }

  .site-footer__name { font-size: 22px; }

  .section-head { gap: 12px; margin-bottom: 20px; }

  .section-head__index { padding-top: 6px; font-size: 11px; }

  .btn { width: 100%; justify-content: center; }
}

/* ---------- 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;
  }

  [data-reveal],
  [data-reveal].is-pending {
    opacity: 1 !important;
    transform: none !important;
  }

  .panel:hover,
  .btn:hover {
    transform: none;
  }
}
