/* ══════════════════════════════════════════════════════════════════════
   Motionweb Studio（摩讯）— 站点样式
   深色为默认气质，浅色为完整对等实现。无框架、无渐变堆砌。
   ══════════════════════════════════════════════════════════════════════ */

/* ── 设计令牌 ─────────────────────────────────────────────────────────── */

:root {
  --font-sans: "Inter", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", ui-monospace,
    Menlo, Consolas, monospace;
  --font-serif: "Source Han Serif SC", "Songti SC", Georgia, serif;

  --wrap: 1180px;
  --radius: 10px;
  --radius-sm: 6px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

/* 深色（默认） */
:root,
:root[data-theme="dark"] {
  --bg: #0d1420;
  --bg-alt: #111a29;
  --bg-raise: #162132;
  --line: #24344a;
  --line-soft: #1b283a;
  --ink: #eef2f7;
  --ink-soft: #9fb0c6;
  --ink-faint: #67788f;
  --accent: #4fd1c5;
  --accent-ink: #06231f;
  --accent-2: #7c8cff;
  --warn: #f0a15f;
  color-scheme: dark;
}

/* 浅色 */
:root[data-theme="light"] {
  --bg: #f4f2ee;
  --bg-alt: #eceae4;
  --bg-raise: #ffffff;
  --line: #d9d5cc;
  --line-soft: #e5e2da;
  --ink: #16202e;
  --ink-soft: #55637a;
  --ink-faint: #8b96a8;
  --accent: #0f7d72;
  --accent-ink: #f2fffd;
  --accent-2: #4453d4;
  --warn: #a8620f;
  color-scheme: light;
}

/* ── 基础 ─────────────────────────────────────────────────────────────── */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.22;
  font-weight: 640;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ── 页头 ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--accent);
}

.brand__mark {
  display: inline-flex;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 660;
  font-size: 0.98rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand__sub {
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle__icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px currentColor;
  background: linear-gradient(to right, currentColor 0 50%, transparent 50% 100%);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle span {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  left: 0;
  transform: none;
}

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

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

/* ── 按钮 ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 560;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.btn:hover {
  color: var(--accent-ink);
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn--sm {
  padding: 8px 15px;
  font-size: 0.87rem;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn__arrow {
  transition: transform var(--dur) var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ── 区块与通用 ───────────────────────────────────────────────────────── */

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 60ch;
}

.section__head {
  max-width: 66ch;
  margin-bottom: 44px;
}

.section__head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin-bottom: 14px;
}

/* ── 首页 hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 92px 0 76px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 78% 12%, #000 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.05rem);
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  font-size: 1.1rem;
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 22px;
}

.hero__panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dot {
  width: 10px;
  height: 10px;
  /* deslop-ignore: 窗口装饰圆点，非头像 */
  border-radius: 50%;
  background: var(--line);
}

.hero__panel-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-left: 4px;
}

.code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.85;
  color: var(--ink-soft);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
}

.code .k {
  color: var(--accent-2);
}

.code .s {
  color: var(--accent);
}

.code .c {
  color: var(--ink-faint);
}

/* ── 数据条 ───────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--bg);
  padding: 26px 22px;
}

.stat__num {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat__num small {
  font-size: 0.95rem;
  color: var(--ink-faint);
  margin-left: 2px;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ── 能力网格 ─────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 26px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card__icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.06rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card__list {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-faint);
}

/* ── 作品 ─────────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.filter {
  font: inherit;
  font-size: 0.88rem;
  padding: 7px 15px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 100px;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.filter:hover {
  color: var(--ink);
  border-color: var(--ink-faint);
}

.filter[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* 主题分节里成对出现，刻意用两列大卡片而非三列 */
.work-grid--pair {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  max-width: 900px;
}

.work {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.work:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.work[hidden] {
  display: none;
}

.work__visual {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}

.work__visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.work__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.work__kind {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.work__year {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-faint);
}

.work h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.work p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  flex: 1;
}

.work__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

/* ── 实验室条目 ───────────────────────────────────────────────────────── */

.notes {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.note {
  background: var(--bg);
  padding: 26px 24px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 28px;
  transition: background var(--dur) var(--ease);
}

.note:hover {
  background: var(--bg-alt);
}

.note__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.9;
}

.note__meta b {
  display: block;
  color: var(--accent);
  font-weight: 500;
}

.note h3 {
  font-size: 1.02rem;
  margin-bottom: 9px;
}

.note p {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.note__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

/* ── 团队 ─────────────────────────────────────────────────────────────── */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 24px;
}

.person__avatar {
  /* deslop-ignore: 方块，刻意不用圆形头像 */
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.person h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.person__role {
  font-size: 0.84rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.person p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ── 时间线 ───────────────────────────────────────────────────────────── */

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  padding-bottom: 28px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 8px;
  width: 9px;
  height: 9px;
  /* deslop-ignore: 时间轴节点圆点 */
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline b {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.timeline strong {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.timeline p {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ── 页头区块 ─────────────────────────────────────────────────────────── */

.page-head {
  padding: 76px 0 44px;
  border-bottom: 1px solid var(--line-soft);
}

.page-head h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.75rem);
  margin-bottom: 18px;
  letter-spacing: -0.025em;
}

/* ── 表单 ─────────────────────────────────────────────────────────────── */

.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.65;
}

.field__hint {
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.form__note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  border-left: 2px solid var(--line);
  padding-left: 12px;
}

/* ── 价格卡 ───────────────────────────────────────────────────────────── */

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 20px;
}

.tier {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tier--featured {
  border-color: var(--accent);
}

.tier__flag {
  position: absolute;
  top: -11px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 100px;
}

.tier h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.tier__hint {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.tier__price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.tier__price small {
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-family: var(--font-sans);
}

.tier ul {
  display: grid;
  gap: 11px;
}

.tier li {
  font-size: 0.91rem;
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
}

.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 11px;
  height: 2px;
  background: var(--accent);
}

/* ── 联系信息表 ───────────────────────────────────────────────────────── */

.contact-list {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 26px;
}

.contact-item {
  background: var(--bg);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}

.contact-item dt {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.contact-item dd {
  margin: 0;
  font-size: 0.95rem;
}

.contact-item dd a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
}

.contact-item dd a:hover {
  border-bottom-color: currentColor;
}

/* ── 分栏 ─────────────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 60px;
  align-items: start;
}

.split--even {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.prose p + p {
  margin-top: 16px;
}

.prose p {
  color: var(--ink-soft);
}

/* ── 原则列表 ─────────────────────────────────────────────────────────── */

.principles {
  display: grid;
  gap: 22px;
}

.principle h3 {
  font-size: 0.99rem;
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.principle h3::before {
  content: counter(pc, decimal-leading-zero);
  counter-increment: pc;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.principles {
  counter-reset: pc;
}

.principle p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  padding-left: 30px;
}

/* ── 引用条 ───────────────────────────────────────────────────────────── */

.quote-band {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-raise);
  padding: 30px 32px;
}

.quote-band blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.16rem;
  line-height: 1.7;
}

.quote-band cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

/* ── CTA 带 ───────────────────────────────────────────────────────────── */

.band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
  padding: 42px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.band h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.band p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ── 入场动画 ─────────────────────────────────────────────────────────
   渐进增强：默认完全可见。只有 JS 确认可用时，才加上 .js-motion 到 <html>
   并让尚未进入视口的 .reveal 暂时隐藏。这样 JS 失效 / 报错 / 被拦截时
   内容依然完整可读，不会出现"白屏"。 */

.reveal {
  opacity: 1;
  transform: none;
}

html.js-motion .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

html.js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── 页脚 ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
  padding: 56px 0 30px;
  margin-top: 0;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-soft);
}

.footer__brand p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 34ch;
}

.footer__col h4 {
  font-size: 0.83rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
  font-weight: 500;
}

.footer__col ul {
  display: grid;
  gap: 9px;
}

.footer__col li,
.footer__col a {
  font-size: 0.89rem;
  color: var(--ink-soft);
}

.footer__col a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-size: 0.84rem;
  color: var(--ink-faint);
}

/* ── 响应式 ───────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: 60px 0 52px;
  }
  .page-head {
    padding: 54px 0 34px;
  }
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px 20px 20px;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
      visibility var(--dur) var(--ease);
  }
  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    padding: 12px 14px;
    font-size: 1rem;
  }
  .header-cta .btn {
    display: none;
  }
  .theme-toggle {
    order: -1;
  }
  .note {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .band {
    padding: 30px 24px;
  }
  .footer__top {
    grid-template-columns: 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .quote-band {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 18px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .contact-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .brand__sub {
    display: none;
  }
  .hero h1 {
    font-size: 1.72rem;
    letter-spacing: -0.022em;
  }
  .page-head h1 {
    font-size: 1.5rem;
  }
  .hero__panel,
  .quote-band,
  .band {
    padding: 20px;
  }
  .code {
    font-size: 0.72rem;
  }
  .stat__num {
    font-size: 1.6rem;
  }
  .person,
  .card {
    padding: 20px;
  }
}

/* 兜底：任何情况下都不让页面横向滚动 */
html,
body {
  overflow-x: hidden;
}

/* 长英文串 / 链接不撑破容器 */
.prose,
.note,
.work__body,
.card,
.person,
.lede {
  overflow-wrap: break-word;
  word-break: break-word;
}
