/* ==========================================================================
   加拿大服务 · 共享外壳样式 /assets/site.css
   北境极光长卷：极夜蓝—深杉绿光带 + 雪原白正文 + 枫叶红章节强调
   ========================================================================== */

:root {
  --ink: #0B1F2A;
  --ink-soft: #0A2F34;
  --snow: #F7F9F7;
  --mist: #DCE7E8;
  --maple: #C8102E;
  --maple-deep: #8F0B20;
  --fir: #0F5B4E;
  --fir-deep: #083D34;
  --fir-night: #04241F;
  --aurora: #4FE3C1;
  --glacier: #A9D6E5;
  --amber: #F2A900;
  --slate: #2E3A3A;
  --muted: #5A6A6A;

  --bg: var(--snow);
  --text: var(--slate);

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "Source Han 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, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

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

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--fir);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button {
  font: inherit;
  color: inherit;
}

hr {
  border: 0;
  height: 1px;
  background: rgba(46, 58, 58, .14);
  margin: 0;
}

[id] { scroll-margin-top: 28px; }

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

::selection {
  background: rgba(200, 16, 46, .18);
  color: var(--ink);
}

/* ---------- 中文排版节奏 ---------- */
.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.85;
  color: var(--muted);
  max-width: 62ch;
}

.num,
.contact-value--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ==========================================================================
   通用布局
   ========================================================================== */
.container,
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.grid {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
}

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

/* ==========================================================================
   通用文字与标签
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--maple);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--maple), var(--amber));
  flex: 0 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  background: var(--mist);
  color: var(--fir);
}

.pill--amber { background: rgba(242, 169, 0, .18); color: #7A5500; }
.pill--maple { background: rgba(200, 16, 46, .12); color: var(--maple-deep); }
.pill--aurora { background: rgba(79, 227, 193, .2); color: var(--fir-deep); }

/* ==========================================================================
   通用按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--maple);
  color: var(--snow);
  box-shadow: 0 12px 28px -12px rgba(200, 16, 46, .7);
}
.btn--primary:hover { background: var(--maple-deep); }

.btn--aurora {
  background: linear-gradient(120deg, var(--aurora), var(--glacier));
  color: var(--ink);
  box-shadow: 0 12px 28px -14px rgba(79, 227, 193, .9);
}

.btn--ghost {
  background: transparent;
  color: var(--slate);
  border-color: rgba(46, 58, 58, .26);
}
.btn--ghost:hover { border-color: var(--fir); color: var(--fir); }

.btn--amber {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 12px 26px -14px rgba(242, 169, 0, .85);
}

/* ==========================================================================
   面包屑
   ========================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: .82rem;
  color: var(--muted);
}

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

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(46, 58, 58, .34);
}

.breadcrumb a {
  color: var(--fir);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ==========================================================================
   卡片与图片容器
   ========================================================================== */
.card {
  background: #fff;
  border: 1px solid rgba(46, 58, 58, .08);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 22px 48px -34px rgba(11, 31, 42, .55);
}

.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(79, 227, 193, .22), transparent 60%),
    linear-gradient(150deg, var(--ink), var(--fir-deep));
  isolation: isolate;
}

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

.media--4x3 { aspect-ratio: 4 / 3; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }

.media__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(79, 227, 193, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 227, 193, .16) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .65;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent 82%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent 82%);
}

.media__caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(11, 31, 42, .74);
  color: var(--snow);
  font-size: .78rem;
  letter-spacing: .04em;
}

/* ==========================================================================
   跳转链接
   ========================================================================== */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 16px 16px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: top .2s var(--ease);
}

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

/* ==========================================================================
   页头
   ========================================================================== */
.site-header {
  position: relative;
  isolation: isolate;
  color: var(--snow);
  background: linear-gradient(112deg, var(--ink) 0%, var(--ink-soft) 46%, var(--fir-deep) 100%);
  border-bottom: 1px solid rgba(79, 227, 193, .2);
}

.header-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 8% -10%, rgba(79, 227, 193, .34), transparent 58%),
    radial-gradient(80% 120% at 92% 0%, rgba(169, 214, 229, .22), transparent 62%),
    radial-gradient(90% 130% at 62% 130%, rgba(200, 16, 46, .42), transparent 68%);
}

.header-aurora::before {
  content: "";
  position: absolute;
  inset: -30% -10% -10% -10%;
  background-image:
    linear-gradient(rgba(169, 214, 229, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 214, 229, .16) 1px, transparent 1px);
  background-size: 62px 62px;
  transform: rotate(-6deg);
  opacity: .5;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .95), transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .95), transparent 80%);
}

.header-aurora::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -60%;
  width: 44%;
  height: 240%;
  background: linear-gradient(180deg, rgba(79, 227, 193, .26), rgba(200, 16, 46, .18) 68%, transparent);
  transform: rotate(16deg);
}

.header-shell {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  min-height: 76px;
  padding-block: clamp(12px, 2vw, 18px);
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--snow);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--maple), var(--maple-deep));
  box-shadow: 0 0 0 1px rgba(247, 249, 247, .18), 0 10px 24px -12px rgba(200, 16, 46, .9);
  transition: transform .3s var(--ease);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: -34%;
  right: -34%;
  top: 24%;
  height: 3px;
  border-radius: 3px;
  background: var(--aurora);
  transform: rotate(-30deg);
  box-shadow:
    0 9px 0 rgba(247, 249, 247, .8),
    0 18px 0 rgba(169, 214, 229, .6);
}

.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.05rem, 2.4vw, 1.38rem);
  letter-spacing: .02em;
  color: var(--snow);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--aurora);
}

/* ---------- 主导航 ---------- */
.primary-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: .94rem;
  color: rgba(247, 249, 247, .82);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--aurora), var(--glacier));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease);
}

.nav-link:hover {
  color: var(--snow);
  background: rgba(79, 227, 193, .13);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  background: var(--maple);
  color: var(--snow);
  box-shadow: 0 8px 20px -12px rgba(200, 16, 46, .95);
}

.nav-link[aria-current="page"]::after { transform: scaleX(0); }

/* ---------- 页头行动按钮 ---------- */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, var(--aurora), var(--glacier));
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(79, 227, 193, .95);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(79, 227, 193, 1);
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(169, 214, 229, .42);
  border-radius: 14px;
  background: rgba(247, 249, 247, .07);
  color: var(--snow);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover {
  background: rgba(79, 227, 193, .16);
  border-color: rgba(79, 227, 193, .7);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .26s var(--ease), opacity .2s var(--ease);
}

.site-header[data-open] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 常用入口磁贴 ---------- */
.entry-rail {
  padding-bottom: clamp(12px, 2vw, 18px);
}

.entry-rail__list {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 227, 193, .45) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.entry-rail__list::-webkit-scrollbar { height: 6px; }
.entry-rail__list::-webkit-scrollbar-track { background: transparent; }
.entry-rail__list::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(79, 227, 193, .42);
}

.entry-tile {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 15px 8px 12px;
  border: 1px solid rgba(169, 214, 229, .28);
  border-radius: var(--radius-pill);
  background: rgba(247, 249, 247, .07);
  color: rgba(247, 249, 247, .93);
  font-size: .86rem;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease);
}

.entry-tile::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 10px rgba(79, 227, 193, .95);
}

.entry-tile:hover {
  transform: translateY(-3px);
  background: rgba(79, 227, 193, .16);
  border-color: rgba(79, 227, 193, .62);
}

.entry-tile--amber::before {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(242, 169, 0, .95);
}

.entry-tile--aurora::before {
  background: var(--glacier);
  box-shadow: 0 0 10px rgba(169, 214, 229, .95);
}

.entry-tile--maple::before {
  background: var(--maple);
  box-shadow: 0 0 10px rgba(200, 16, 46, .95);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(56px, 9vw, 110px);
  color: rgba(247, 249, 247, .86);
  background:
    radial-gradient(120% 100% at 88% -10%, rgba(79, 227, 193, .18), transparent 62%),
    radial-gradient(90% 100% at 4% 0%, rgba(200, 16, 46, .24), transparent 64%),
    linear-gradient(162deg, var(--fir) 0%, var(--fir-deep) 56%, var(--fir-night) 100%);
  border-top: 1px solid rgba(79, 227, 193, .28);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--maple) 0%, var(--maple) 26%, var(--aurora) 26%, var(--aurora) 66%, var(--glacier) 66%, var(--glacier) 100%);
}

.footer-shell {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 68px) var(--gutter) clamp(22px, 4vw, 36px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(0, 1.6fr);
  gap: clamp(28px, 5vw, 64px);
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--snow);
  text-decoration: none;
}

.footer-brand-link::before {
  content: "";
  width: 9px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--maple), var(--amber));
  transform: skewX(-12deg);
}

.footer-note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: .94rem;
  line-height: 1.72;
  color: rgba(247, 249, 247, .72);
}

.footer-hours {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--aurora);
}

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

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--glacier);
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  padding-block: 2px;
  color: rgba(247, 249, 247, .84);
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--aurora);
  border-bottom-color: rgba(79, 227, 193, .6);
}

.footer-link--legal {
  font-size: .82rem;
  color: rgba(247, 249, 247, .68);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: clamp(28px, 5vw, 48px);
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(169, 214, 229, .22);
  border-radius: var(--radius-lg);
  background: rgba(247, 249, 247, .06);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--glacier);
}

.contact-value {
  color: var(--snow);
  font-size: .95rem;
  line-height: 1.6;
  word-break: break-word;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: clamp(24px, 4vw, 36px);
  padding-top: clamp(18px, 3vw, 24px);
  border-top: 1px solid rgba(169, 214, 229, .2);
  font-size: .82rem;
  color: rgba(247, 249, 247, .66);
}

.footer-copy { margin: 0; }

.footer-icp {
  margin: 0 0 0 auto;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .05em;
  color: rgba(247, 249, 247, .74);
}

/* ==========================================================================
   滚动进度与返回顶部（由脚本注入）
   ========================================================================== */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--aurora), var(--glacier) 48%, var(--maple) 100%);
  box-shadow: 0 0 14px rgba(79, 227, 193, .7);
  transition: width .12s linear;
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(79, 227, 193, .4);
  border-radius: 18px;
  background: var(--fir);
  color: var(--snow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  box-shadow: 0 18px 34px -20px rgba(4, 36, 31, .95);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              visibility 0s .25s, background-color .2s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              visibility 0s, background-color .2s var(--ease);
}

.to-top:hover { background: var(--maple); }

.to-top__icon {
  font-size: 1rem;
  line-height: 1;
}

.to-top__label {
  font-size: .6rem;
  letter-spacing: .12em;
  line-height: 1;
}

/* ==========================================================================
   显现动效
   ========================================================================== */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.has-js [data-reveal="shown"] {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .grid--thirds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 80;
    margin-left: 0;
    padding-inline: var(--gutter);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height .34s var(--ease), opacity .24s var(--ease),
                visibility 0s .34s;
  }

  .site-header[data-open] .primary-nav {
    max-height: min(70vh, 520px);
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    transition: max-height .4s var(--ease), opacity .3s var(--ease),
                visibility 0s;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(79, 227, 193, .32);
    border-radius: var(--radius-md);
    background: rgba(8, 61, 52, .97);
    box-shadow: 0 30px 56px -24px rgba(4, 36, 31, .95);
  }

  .nav-link {
    display: block;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: rgba(247, 249, 247, .9);
  }

  .nav-link::after { display: none; }

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

@media (max-width: 760px) {
  .grid--halves,
  .grid--thirds { grid-template-columns: minmax(0, 1fr); }

  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-icp { margin: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .brand-tag { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }

  .header-cta {
    padding: 9px 15px;
    font-size: .82rem;
  }

  .header-bar { min-height: 64px; }

  .footer-columns { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 8px; }

  .to-top { width: 50px; height: 50px; border-radius: 16px; }
}

/* ==========================================================================
   减少动态效果
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .has-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .entry-tile:hover,
  .header-cta:hover,
  .brand:hover .brand-mark,
  .to-top { transform: none; }
}
