/* ============================================================
   拿大正规平台 · 共享站点样式
   文件路径：/assets/site.css
   范围：reset / CSS 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   页面特色布局请写在页面专属 CSS，不并入此文件
   ============================================================ */

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

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

body {
  margin: 0;
}

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

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

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

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

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

hr {
  margin: 0;
  border: 0;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 夜间网路区 */
  --c-abyss: #08131F;
  --c-panel: #0E2233;
  --c-void: #040B12;

  /* 结构层 */
  --c-steel: #26445A;
  --line: rgba(38, 68, 90, 0.80);
  --line-soft: rgba(38, 68, 90, 0.42);

  /* 文字 */
  --c-mist: #A9BCCB;
  --c-paper: #F2EEE5;
  --c-ink: #14212E;
  --line-paper: rgba(20, 33, 46, 0.18);

  /* 强调与状态 */
  --c-orange: #FF6A2A;
  --c-orange-lift: #FF8A55;
  --c-celadon: #63A88C;
  --c-sand: #D8B46A;

  /* 字体 */
  --font-head: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 尺度 */
  --maxw: 1280px;
  --narrow: 760px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

@media (min-width: 1200px) {
  :root { --gutter: 64px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  background: var(--c-abyss);
  color: var(--c-mist);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--c-paper);
}

h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.02; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.35; }

::selection {
  background: var(--c-orange);
  color: #08131F;
}

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

/* ---------- 4. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--narrow);
}

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

.section--tight {
  padding-block: clamp(28px, 4vw, 52px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-bottom: 14px;
  margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}

/* ---------- 5. 网格 ---------- */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-4, .span-5, .span-6, .span-7, .span-8, .span-12 {
  grid-column: span 12;
  min-width: 0;
}

@media (min-width: 900px) {
  .grid-12 { gap: 28px; }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
}

/* ---------- 6. 色彩分区 ---------- */
.band-panel {
  background: var(--c-panel);
}

.band-paper {
  background: var(--c-paper);
  color: var(--c-ink);
}

.band-paper h1,
.band-paper h2,
.band-paper h3,
.band-paper h4 {
  color: var(--c-ink);
}

.band-grid {
  background-image:
    repeating-linear-gradient(90deg, transparent 0 79px, var(--line-soft) 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, var(--line-soft) 79px 80px);
}

/* ---------- 7. 文字层 ---------- */
.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--c-sand);
}

.meta-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--c-sand);
}

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * {
  margin-top: 1.05em;
}

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(22px, 2.4vw, 30px);
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul {
  list-style: disc;
  padding-left: 1.25em;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose strong {
  color: var(--c-paper);
  font-weight: 700;
}

.band-paper .prose strong {
  color: var(--c-ink);
}

.rule {
  height: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(28px, 4vw, 48px);
}

.band-paper .rule {
  border-top-color: var(--line-paper);
}

/* ---------- 8. 按钮与链接 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--c-orange);
  color: #08131F;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--c-orange-lift);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--c-paper);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--c-orange);
  color: var(--c-orange);
}

.btn--ink {
  border-color: var(--line-paper);
  color: var(--c-ink);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-paper);
}

.link-underline {
  padding-bottom: 2px;
  color: var(--c-paper);
  background-image: linear-gradient(var(--c-orange), var(--c-orange));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.22s var(--ease), color 0.18s var(--ease);
}

.link-underline:hover,
.link-underline:focus-visible {
  background-size: 100% 1px;
  color: var(--c-orange);
}

/* ---------- 9. 面板 ---------- */
.panel {
  background: var(--c-panel);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 32px);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.panel--paper {
  background: var(--c-paper);
  border-color: var(--line-paper);
  color: var(--c-ink);
}

.panel--paper h2,
.panel--paper h3,
.panel--paper h4 {
  color: var(--c-ink);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs {
  padding-block: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-mist);
}

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

.breadcrumbs-item + .breadcrumbs-item::before {
  content: "›";
  color: var(--c-steel);
}

.breadcrumbs-link {
  color: var(--c-mist);
  transition: color 0.18s var(--ease);
}

.breadcrumbs-link:hover,
.breadcrumbs-link:focus-visible {
  color: var(--c-orange);
}

.breadcrumbs-current {
  color: var(--c-paper);
}

.breadcrumbs--paper {
  border-bottom-color: var(--line-paper);
}

.breadcrumbs--paper .breadcrumbs-list,
.breadcrumbs--paper .breadcrumbs-link {
  color: rgba(20, 33, 46, 0.72);
}

.breadcrumbs--paper .breadcrumbs-current {
  color: var(--c-ink);
}

.breadcrumbs--paper .breadcrumbs-item + .breadcrumbs-item::before {
  color: rgba(20, 33, 46, 0.4);
}

/* ---------- 11. 图片容器基础规则（供页面阶段放置图片） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background-color: var(--c-panel);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--line-soft) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--line-soft) 39px 40px);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  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-frame--paper {
  border-color: var(--line-paper);
  background-color: #E7E1D5;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(20, 33, 46, 0.12) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(20, 33, 46, 0.12) 39px 40px);
}

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-sand);
}

/* ---------- 12. 阅读进度细线 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: var(--c-orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 13. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 12px 22px;
  background: var(--c-orange);
  color: #08131F;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: top 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
}

/* ---------- 14. 页头 ---------- */
.site-header {
  position: relative;
  z-index: 30;
  background: var(--c-abyss);
  color: var(--c-mist);
  border-bottom: 1px solid var(--line);
}

/* 14.1 状态条 */
.utility-bar {
  background: var(--c-void);
  border-bottom: 1px solid var(--line-soft);
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 9px var(--gutter);
}

.utility-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: rgba(169, 188, 203, 0.62);
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.utility-link {
  display: inline-block;
  padding-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--c-mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.utility-link:hover,
.utility-link:focus-visible {
  color: var(--c-paper);
  border-bottom-color: var(--c-orange);
}

/* 14.2 刊头 */
.masthead {
  position: relative;
  background: var(--c-abyss);
}

.masthead-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 24px var(--gutter) 20px;
}

.brand-lockup {
  display: inline-block;
  text-align: center;
  transition: opacity 0.18s var(--ease);
}

.brand-lockup:hover,
.brand-lockup:focus-visible {
  opacity: 0.86;
}

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-paper);
}

.brand-tagline {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--c-sand);
}

/* 14.3 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 22px;
  right: var(--gutter);
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--c-paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--c-orange);
  color: var(--c-orange);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

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

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

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

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

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

.nav-toggle-label {
  display: block;
  line-height: 1;
}

/* 14.4 主导航 */
.primary-nav {
  background: rgba(14, 34, 51, 0.55);
  border-top: 1px solid var(--line);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav-link {
  display: block;
  padding: 16px clamp(12px, 1.8vw, 24px);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.2;
  color: var(--c-mist);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--c-paper);
  background: rgba(38, 68, 90, 0.32);
}

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

/* 14.5 页头移动端 */
@media (max-width: 900px) {
  .utility-note {
    display: none;
  }

  .utility-inner {
    justify-content: center;
    padding-block: 10px;
  }

  .masthead-inner {
    display: block;
    padding: 20px var(--gutter) 18px;
    text-align: center;
  }

  .brand-name {
    font-size: clamp(22px, 6.4vw, 30px);
  }

  .brand-tagline {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

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

  .primary-nav {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    border-top: 1px solid var(--line);
    transition: max-height 0.34s var(--ease), visibility 0.34s var(--ease);
  }

  .primary-nav[data-open="true"] {
    max-height: 560px;
    visibility: visible;
  }

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

  .nav-link {
    padding: 15px var(--gutter);
    font-size: 16px;
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: var(--line-soft);
    border-left-color: var(--c-orange);
    background: rgba(255, 106, 42, 0.08);
  }
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  background: var(--c-void);
  color: var(--c-mist);
  border-top: 1px solid var(--c-steel);
  font-size: 15px;
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 72px) var(--gutter) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1.2fr 1fr 1.1fr;
    gap: 32px;
  }

  .footer-col:nth-child(2) { margin-top: 28px; }
  .footer-col:nth-child(3) { margin-top: 12px; }
  .footer-col:nth-child(4) { margin-top: 44px; }
}

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

.footer-brand {
  padding-top: 0;
  font-family: var(--font-head);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-paper);
}

.footer-brand::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--c-orange);
}

.footer-tagline {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--c-sand);
}

.footer-meta {
  max-width: 22em;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(169, 188, 203, 0.78);
}

.footer-heading {
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--c-sand);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 14.5px;
  color: var(--c-mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--c-orange);
  border-bottom-color: var(--c-orange);
}

.footer-contact-item {
  margin: 0;
}

.footer-contact-item + .footer-contact-item {
  margin-top: 12px;
}

.footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: rgba(169, 188, 203, 0.6);
}

.footer-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--c-sand);
  word-break: break-word;
}

.footer-note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(169, 188, 203, 0.62);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(169, 188, 203, 0.7);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(169, 188, 203, 0.7);
}

/* ---------- 16. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-progress {
    transform: scaleX(0) !important;
  }
}
