/* =========================================================
   加拿大指南 · 极光导航 — 共享样式 /assets/site.css
   ========================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- tokens ---------- */
:root {
  --ink: #0E1B24;
  --ink-2: #123243;
  --ink-3: #17394C;
  --glacier: #1F5A78;
  --aurora: #2FA79B;
  --aurora-bright: #46C9BC;
  --aurora-deep: #1D7C73;
  --moss: #7C9A6E;
  --moss-deep: #4E6B43;
  --clay: #C4714F;
  --clay-deep: #9E5636;
  --maple: #D6453D;
  --maple-ink: #B0332C;
  --gold: #E8B24A;
  --gold-ink: #9A6F1A;
  --stone: #6B7A80;
  --paper: #F4F1EA;
  --fog: #E3EDF2;

  --line: rgba(107, 122, 128, 0.26);
  --line-soft: rgba(107, 122, 128, 0.16);
  --line-aurora: rgba(70, 201, 188, 0.22);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "Inter Tight", "DIN Alternate", "Noto Sans SC", system-ui, sans-serif;

  --r-pill: 999px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --wrap: 1200px;
  --gap: clamp(18px, 3vw, 34px);
  --pad-x: clamp(18px, 4vw, 44px);

  --shadow-float: 0 18px 48px rgba(6, 14, 20, 0.34);
}

/* ---------- base / 中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
strong, b { font-weight: 700; }
small { font-size: 13px; }
::selection { background: rgba(47, 167, 155, 0.28); }

:focus-visible {
  outline: 2px solid var(--aurora-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translate(-50%, -220%);
  z-index: 200;
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  background: var(--aurora-bright);
  color: #06201D;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(160deg, #0E1B24 0%, #123243 52%, #0E1B24 100%);
  border-bottom: 1px solid var(--line-aurora);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 150% at 10% 0%, rgba(47, 167, 155, 0.32), transparent 62%),
    radial-gradient(46% 130% at 88% 6%, rgba(31, 90, 120, 0.55), transparent 68%);
  pointer-events: none;
}

.header-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: padding 0.22s ease;
}
.site-header.is-scrolled .header-bar { padding-top: 8px; padding-bottom: 8px; }

/* 品牌浮岛 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  background: rgba(14, 27, 36, 0.55);
  border: 1px solid var(--line-aurora);
  color: var(--paper);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.brand:hover,
.brand:focus-visible {
  border-color: var(--aurora-bright);
  background: rgba(31, 90, 120, 0.42);
  transform: translateY(-1px);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
}
.brand-tag {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--aurora-bright);
  padding-left: 10px;
  border-left: 1px solid rgba(70, 201, 188, 0.35);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: rgba(14, 27, 36, 0.6);
  border: 1px solid var(--line-aurora);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: var(--aurora-bright); color: var(--aurora-bright); }
.nav-toggle-bars { display: block; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars span + span { margin-top: 4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle-text { font-weight: 600; }

/* 栏目浮岛 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgba(14, 27, 36, 0.58);
  border: 1px solid var(--line-aurora);
}
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-block;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 15px;
  color: rgba(244, 241, 234, 0.8);
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.nav-link:hover { background: rgba(70, 201, 188, 0.16); color: var(--aurora-bright); }
.nav-link[aria-current="page"] {
  background: rgba(70, 201, 188, 0.2);
  color: var(--aurora-bright);
  box-shadow: inset 0 0 0 1px rgba(70, 201, 188, 0.45);
}
.nav-cta {
  margin-left: 6px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--aurora);
  color: #06201D;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.nav-cta:hover,
.nav-cta:focus-visible { background: var(--gold); color: var(--ink); transform: translateY(-1px); }
.site-header.is-scrolled .nav-link { padding: 7px 13px; }
.site-header.is-scrolled .nav-cta { padding: 8px 18px; }

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--aurora), var(--aurora-bright) 55%, var(--gold));
  z-index: 2;
}

/* ---------- layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.narrow { max-width: 760px; }

.section { padding: clamp(46px, 7vw, 96px) 0; }
.section--fog { background: var(--fog); }
.section--dark {
  position: relative;
  background: linear-gradient(155deg, #0E1B24 0%, #123243 58%, #0E1B24 100%);
  color: var(--paper);
}
.section--dark .lede { color: rgba(244, 241, 234, 0.72); }
.section--dark .eyebrow { color: var(--aurora-bright); }
.section--dark .section-index { color: var(--gold); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: clamp(24px, 3.2vw, 42px);
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--glacier);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.6vw, 2.9rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.lede {
  max-width: 36em;
  font-size: 17px;
  color: var(--stone);
  line-height: 1.8;
}

.num {
  font-family: var(--font-num);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.03em;
  line-height: 1;
}
.section-index {
  font-family: var(--font-num);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold-ink);
}

.grid { display: grid; gap: clamp(18px, 2.6vw, 30px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.split--reverse { grid-template-columns: 1fr 1.15fr; }

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.85;
  color: #2A3A42;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-top: 1.9em;
}
.prose h3 { font-size: 1.12rem; margin-top: 1.7em; }
.prose a {
  color: var(--glacier);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: color 0.16s ease;
}
.prose a:hover { color: var(--aurora-deep); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.45em; }
.prose blockquote {
  border-left: 2px solid var(--aurora);
  padding-left: 18px;
  color: var(--stone);
}

/* ---------- cards & labels ---------- */
.card {
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 30px);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--aurora);
  background: #EAF3F7;
  transform: translateY(-2px);
}
.card--dark {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-aurora);
  color: var(--paper);
}
.card--dark:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--aurora-bright);
}
.card--flat:hover { transform: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(47, 167, 155, 0.14);
  color: var(--aurora-deep);
}
.tag--moss { background: rgba(124, 154, 110, 0.2); color: var(--moss-deep); }
.tag--clay { background: rgba(196, 113, 79, 0.16); color: var(--clay-deep); }
.tag--maple { background: rgba(214, 69, 61, 0.14); color: var(--maple-ink); }
.tag--gold { background: rgba(232, 178, 74, 0.22); color: var(--gold-ink); }
.tag--stone { background: rgba(107, 122, 128, 0.14); color: #55646A; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary { background: var(--aurora); color: #06201D; }
.btn-primary:hover,
.btn-primary:focus-visible { background: var(--aurora-bright); transform: translateY(-1px); }
.btn-ghost { border-color: var(--glacier); color: var(--glacier); }
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--aurora);
  background: rgba(47, 167, 155, 0.1);
  color: var(--aurora-deep);
}
.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-radius: 0;
  color: var(--glacier);
  font-weight: 700;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.16s ease, color 0.16s ease;
}
.btn-quiet:hover,
.btn-quiet:focus-visible { background-size: 100% 1px; color: var(--aurora-deep); }
.btn-arrow { transition: transform 0.18s ease; }
.btn:hover .btn-arrow,
.btn:focus-visible .btn-arrow { transform: translateX(4px); }
.section--dark .btn-ghost { border-color: var(--aurora-bright); color: var(--aurora-bright); }
.section--dark .btn-ghost:hover { background: rgba(70, 201, 188, 0.14); }

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--stone); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: rgba(107, 122, 128, 0.5); }
.breadcrumb a { color: var(--glacier); transition: color 0.16s ease; }
.breadcrumb a:hover { color: var(--aurora-deep); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- media containers ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(140deg, #0E1B24 0%, #1F5A78 58%, #2FA79B 100%);
  isolation: isolate;
}
.media > img,
.media > svg,
.media > picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 27, 36, 0) 40%, rgba(14, 27, 36, 0.46) 100%),
    repeating-linear-gradient(90deg, rgba(70, 201, 188, 0.12) 0 1px, transparent 1px 56px);
  pointer-events: none;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--band { aspect-ratio: 4 / 1; border-radius: var(--r-md); }
.media--plain::after { background: none; }

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 1px solid var(--line);
}
.timeline > li {
  position: relative;
  padding-bottom: 26px;
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 0 3px rgba(47, 167, 155, 0.18);
}
.timeline > li.is-flag::before { background: var(--maple); box-shadow: 0 0 0 3px rgba(214, 69, 61, 0.16); }
.timeline > li.is-done::before { background: var(--moss); box-shadow: 0 0 0 3px rgba(124, 154, 110, 0.2); }
.section--dark .timeline { border-left-color: var(--line-aurora); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.07s; }
.reveal[data-delay="2"] { transition-delay: 0.14s; }
.reveal[data-delay="3"] { transition-delay: 0.21s; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0E1B24 0%, #0A151C 100%);
  color: rgba(244, 241, 234, 0.78);
  padding: clamp(48px, 7vw, 84px) var(--pad-x) 28px;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(70, 201, 188, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 201, 188, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 92% at 78% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 92% at 78% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--aurora) 30%, var(--gold) 72%, transparent);
  opacity: 0.7;
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.55fr 1fr 1.15fr 1.35fr;
  gap: clamp(22px, 3.4vw, 46px);
  padding-bottom: clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--line-aurora);
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.footer-sub { max-width: 26em; font-size: 15px; line-height: 1.8; color: rgba(244, 241, 234, 0.7); }
.footer-note {
  max-width: 26em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gold);
  padding-top: 12px;
  border-top: 1px solid rgba(232, 178, 74, 0.28);
}

.footer-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--aurora-bright);
  margin-bottom: 16px;
}
.footer-list { display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.footer-list li { color: rgba(244, 241, 234, 0.7); }
.footer-list a {
  display: inline-block;
  color: rgba(244, 241, 234, 0.78);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 0.16s ease, color 0.16s ease;
}
.footer-list a:hover,
.footer-list a:focus-visible { background-size: 100% 1px; color: var(--aurora-bright); }

.footer-contact .footer-list li { word-break: break-all; }

.footer-bottom {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 26px;
  font-size: 13px;
  color: rgba(244, 241, 234, 0.55);
}
.footer-meta { letter-spacing: 0.03em; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
  .footer-contact { grid-column: 1 / -1; }
  .footer-list { flex-direction: row; flex-wrap: wrap; gap: 10px 22px; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 84px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: calc(100% - 2px);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border-radius: 26px;
    background: rgba(12, 24, 32, 0.98);
    border: 1px solid rgba(70, 201, 188, 0.26);
    box-shadow: var(--shadow-float);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }
  .site-nav[data-open] { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 13px 16px; font-size: 16px; border-radius: 16px; }
  .nav-cta {
    display: flex;
    justify-content: center;
    margin: 8px 0 2px;
    padding: 14px 20px;
    font-size: 15px;
  }
  .site-header.is-scrolled .nav-link { padding: 13px 16px; }
  .site-header.is-scrolled .nav-cta { padding: 14px 20px; }

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

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-col, .footer-contact { grid-column: auto; }
  .footer-list { flex-direction: column; gap: 11px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-bar { padding: 10px var(--pad-x); gap: 10px; }
  .brand { padding: 8px 15px; gap: 8px; }
  .brand-name { font-size: 16px; letter-spacing: 0.06em; }
  .brand-tag { font-size: 10px; letter-spacing: 0.16em; padding-left: 8px; }
  .nav-toggle { padding: 9px 14px; }
  .nav-toggle-text { display: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .card { border-radius: 22px; }
  .btn { padding: 12px 22px; font-size: 14px; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover .btn-arrow { transform: none; }
}
