*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
#main { display: flex; flex-direction: column; flex: 1 0 auto; }
.cta-band { margin-top: auto; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: inherit; line-height: 1.3; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:where(img[width][height]) { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input:focus, button:focus { outline: none; }
:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: rgba(var(--brand-rgb), .18); }
[hidden] { display: none !important; }

.wrap { padding-left: var(--pad-x); padding-right: var(--pad-x); }
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.blend { mix-blend-mode: multiply; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* 图片加载完成后淡入 */
.js img[data-fade] { opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.js img[data-fade].is-loaded { opacity: 1; }

/* 滚动入场：只在 JS 可用时先隐藏 */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); transition-delay: var(--rd, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  :root { --pad-x: 20px; }
}
