/*
  Copyright (C) 2026 Quant1X <wangfengxy@sina.cn>
  SPDX-License-Identifier: AGPL-3.0-only
*/

/* ==========================================================================
   MOPR 官网样式
   参考 Apple 官网的滑动展示节奏：整屏分镜 + 滚动驱动动画。
   配色为亮色体系（白 / #f5f5f7 交替分带），深色文字，彩色光晕作为视觉重心。
   无构建依赖，直接以静态文件方式打开即可。
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-tint: #f5f5f7;

  --fg: #1d1d1f;
  --fg-soft: #494950;
  --fg-dim: #6e6e73;
  --fg-faint: rgba(0, 0, 0, 0.13);

  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);

  --accent: #0052d9;
  --accent-2: #7d5bff;

  --nav-h: 52px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }

.wrap {
  width: min(1140px, 88vw);
  margin: 0 auto;
}

.h2 {
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 650;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.stage-head { text-align: center; margin-bottom: clamp(28px, 5vh, 56px); }

/* ---------- 分带底色：白 / 浅灰交替 ---------- */
.hero-stage,
.manifesto,
.principles,
.roadmap { background: var(--bg); }

.concepts,
.bench,
.langs,
.footer { background: var(--bg-tint); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  transition: transform 0.45s var(--ease);
}

.nav.is-hidden { transform: translateY(-100%); }

.nav__progress {
  position: absolute;
  inset: auto 0 -1px 0;
  height: 2px;
  overflow: hidden;
}

.nav__progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav__inner {
  height: 100%;
  width: min(1140px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__brand {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  flex: none;
}

.nav__links {
  display: flex;
  gap: 26px;
  flex: 1;
  font-size: 14px;
  color: var(--fg-dim);
}

.nav__links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active { color: var(--fg); }
.nav__links a.is-active::after { transform: scaleX(1); }


/* ---------- 右侧段落指示点 ---------- */
.rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 11px;
  color: var(--fg-dim);
}

.rail a i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.rail a span {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.rail a:hover span,
.rail a.is-active span { opacity: 1; transform: none; }
.rail a.is-active { color: var(--accent); }
.rail a.is-active i { opacity: 1; transform: scale(1.5); }

/* ---------- Hero ---------- */
.hero-stage { position: relative; height: 190vh; }

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(44% 38% at 50% 36%, rgba(0, 82, 217, 0.24), transparent 70%),
    radial-gradient(36% 32% at 74% 66%, rgba(125, 91, 255, 0.2), transparent 72%),
    radial-gradient(34% 30% at 24% 70%, rgba(0, 190, 175, 0.16), transparent 72%),
    radial-gradient(26% 24% at 34% 26%, rgba(255, 105, 150, 0.12), transparent 72%);
  filter: blur(34px);
  will-change: transform, opacity;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 84px 84px;
  -webkit-mask-image: radial-gradient(62% 55% at 50% 45%, #000 16%, transparent 100%);
  mask-image: radial-gradient(62% 55% at 50% 45%, #000 16%, transparent 100%);
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 6vw;
  will-change: transform, opacity;
}

.eyebrow {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(76px, 17vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  font-weight: 700;
  background: linear-gradient(180deg, #1d1d1f 24%, #6b6b72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  margin-top: clamp(16px, 3vh, 30px);
  font-size: clamp(20px, 2.6vw, 36px);
  letter-spacing: 0.02em;
  font-weight: 550;
}

.hero__sub-en {
  margin-top: 8px;
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.hero__lead {
  margin-top: clamp(22px, 4vh, 42px);
  font-size: clamp(16px, 1.5vw, 21px);
  color: var(--fg-soft);
}

.hero__lead em {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 650;
}

.hero__hint {
  position: absolute;
  bottom: 34px;
  left: calc(50% - 23px);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--fg-dim);
  will-change: opacity;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease), transform 0.35s var(--ease);
}

.hero__hint svg {
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
}

.hero__hint path {
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: chevron 2.1s var(--ease) infinite;
}

.hero__hint:hover {
  color: var(--fg);
  border-color: rgba(0, 0, 0, 0.34);
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(2px);
}

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

/* 滚出首屏后随 Hero 一起失效，避免残留可点区域 */
.hero__hint.is-gone { pointer-events: none; }

@keyframes chevron {
  0% { opacity: 0; transform: translateY(-4px); }
  32% { opacity: 1; }
  62% { opacity: 1; }
  100% { opacity: 0; transform: translateY(4px); }
}

/* ---------- 定位：逐字点亮 ---------- */
.manifesto { position: relative; height: 260vh; }

.manifesto__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
}

.manifesto__sticky .section-label { margin-bottom: 34px; }

.manifesto__text {
  max-width: 1000px;
  text-align: center;
  font-size: clamp(24px, 3.6vw, 54px);
  line-height: 1.42;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.manifesto__text .w {
  color: var(--fg-faint);
  transition: color 0.5s var(--ease);
}

.manifesto__text .w.is-lit { color: var(--fg); }

/* ---------- 核心概念：层叠卡片 ---------- */
.concepts { position: relative; height: 300vh; }

.concepts__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
}

.concepts__stack {
  position: relative;
  width: min(860px, 88vw);
  height: clamp(250px, 38vh, 340px);
}

.concept-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(26px, 4vw, 56px);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(0, 82, 217, 0.08), transparent 62%),
    #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
  will-change: transform, opacity;
}

.concept-card__index {
  position: absolute;
  top: clamp(20px, 3vw, 34px);
  right: clamp(24px, 3vw, 40px);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(0, 0, 0, 0.28);
}

.concept-card__title {
  font-size: clamp(34px, 5.4vw, 70px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 680;
  background: linear-gradient(120deg, #1d1d1f 32%, #0052d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.concept-card__sub {
  font-size: clamp(15px, 1.5vw, 20px);
  color: var(--accent);
  letter-spacing: 0.08em;
}

.concept-card__desc {
  margin-top: 12px;
  font-size: clamp(15px, 1.5vw, 21px);
  color: var(--fg-soft);
  max-width: 46ch;
}

.concepts__dots { display: flex; gap: 9px; margin-top: 34px; }

.concepts__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.16);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}

.concepts__dots i.is-active { background: var(--accent); transform: scale(1.4); }

/* ---------- 基准体系：横向滚动画廊 ---------- */
.bench { position: relative; }

.bench__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.bench__sticky .stage-head { margin-bottom: clamp(20px, 4vh, 44px); }

.bench__viewport { overflow: hidden; }

.bench__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  padding: 0 max(6vw, calc((100vw - 1140px) / 2));
  will-change: transform;
}

.bench-card {
  flex: none;
  width: min(46vw, 560px);
  min-height: clamp(240px, 40vh, 330px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: clamp(22px, 2.6vw, 38px);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.07);
}

.bench-card__tag {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: auto;
}

.bench-card__title {
  font-size: clamp(24px, 2.7vw, 38px);
  letter-spacing: -0.02em;
  font-weight: 640;
}

.bench-card__desc { color: var(--fg-soft); font-size: clamp(14px, 1.3vw, 17px); }

.bench-card--accent {
  background: linear-gradient(150deg, rgba(0, 82, 217, 0.12), rgba(125, 91, 255, 0.1)), #fff;
  border-color: rgba(0, 82, 217, 0.3);
}

.bench-card--accent .bench-card__tag { color: var(--fg); }

.bench__bar {
  width: min(1140px, 88vw);
  height: 2px;
  margin: clamp(20px, 3vh, 34px) auto 0;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.bench__bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- 设计原则 ---------- */
.principles { padding: clamp(90px, 14vh, 180px) 0; }

/* 标题是一句话，桌面端保持单行；窄屏折行时两行长度均衡 */
.principles .h2 { max-width: 24em; text-wrap: balance; }

.principles__q {
  margin-top: 22px;
  font-size: clamp(20px, 2.4vw, 34px);
  color: var(--accent);
  font-weight: 620;
  letter-spacing: -0.02em;
}

.principles__list {
  margin-top: clamp(46px, 8vh, 96px);
  border-top: 1px solid var(--line);
}

.principle {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 5vw, 80px);
  padding: clamp(28px, 4.5vh, 52px) 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.26;
  transition: opacity 0.55s var(--ease);
}

/* 叙事式展开：未激活时内容下沉，滚到焦点时自下升起 */
.principle__head,
.principle > p {
  transform: translateY(18px);
  transition: transform 0.62s var(--ease);
}

.principle.is-active .principle__head,
.principle.is-active > p { transform: none; }

.principle::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 100%;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.62s var(--ease);
}

.principle.is-active { opacity: 1; }
.principle.is-active::before { transform: scaleX(1); }

.principle__head { display: flex; gap: 18px; align-items: baseline; }

.principle__no {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
  flex: none;
  padding-top: 6px;
}

.principle.is-active .principle__no { color: var(--accent); }

.principle h3 {
  font-size: clamp(21px, 2.3vw, 33px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 620;
}

.principle p { color: var(--fg-dim); font-size: clamp(15px, 1.35vw, 18px); }
.principle.is-active p { color: var(--fg-soft); }

/* ---------- 语言与版本 ---------- */
.langs { position: relative; height: 250vh; }

.langs__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
}

.langs__list {
  width: min(1040px, 92vw);
  border-top: 1px solid var(--line);
}

.lang-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(140px, 1.1fr) minmax(90px, 0.7fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 20px;
  padding: clamp(18px, 2.6vh, 30px) 6px;
  border-bottom: 1px solid var(--line);
  will-change: transform, opacity;
}

.lang-row__name {
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 660;
  letter-spacing: -0.03em;
}

.lang-row__role {
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}

.lang-row__ver {
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 620;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.lang-row__note { font-size: clamp(12px, 1.15vw, 15px); color: var(--fg-dim); }

.langs__note {
  width: min(1040px, 92vw);
  margin-top: clamp(26px, 4vh, 46px);
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--fg-dim);
}

.langs__note b { color: var(--fg); font-weight: 620; }

/* ---------- 路线图 ---------- */
.roadmap { padding: clamp(90px, 14vh, 180px) 0; }

.roadmap__status {
  margin-top: 18px;
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--fg-soft);
}

.roadmap__body { position: relative; margin-top: clamp(40px, 7vh, 80px); padding-left: 46px; }

.roadmap__line {
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.roadmap__line i {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleY(0);
  transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.step { position: relative; padding-bottom: clamp(34px, 5vh, 62px); }
.step:last-child { padding-bottom: 0; }

.step::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
}

.step__no {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
}

.step h3 {
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  font-weight: 620;
}

.step p { margin-top: 8px; color: var(--fg-dim); font-size: clamp(14px, 1.3vw, 17px); max-width: 60ch; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vh, 90px) 0 clamp(40px, 6vh, 70px);
  color: var(--fg-dim);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.footer__slogan { margin-top: 8px; line-height: 1.5; font-size: 13px; }

.footer__meta { text-align: right; display: grid; gap: 8px; }

.footer__badge {
  justify-self: end;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--fg);
}

/* 页脚仓库入口：GitHub / Gitee 图标按钮 */
.footer__links {
  justify-self: end;
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.icon-link {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease), transform 0.3s var(--ease);
}

.icon-link svg { width: 19px; height: 19px; fill: currentColor; display: block; }

/* 图标沿用各自品牌色，不做统一着色 */
.icon-link--github { color: #181717; }
.icon-link--gitee { color: #c71d23; }

.icon-link:hover {
  border-color: rgba(0, 0, 0, 0.32);
  border-color: color-mix(in srgb, currentColor 38%, transparent);
  background: rgba(0, 0, 0, 0.04);
  background: color-mix(in srgb, currentColor 7%, transparent);
  transform: translateY(-2px);
}

.icon-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* 页脚法律声明：协议条款、风险提示与数据来源说明 */
.footer__legal {
  margin-top: clamp(30px, 5vh, 56px);
  padding-top: clamp(18px, 3vh, 30px);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-dim);
}

.footer__legal a {
  color: var(--fg-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* 页脚备案信息：按要求置于主页底部居中位置，独立于法律声明段 */
.footer__icp {
  text-align: center;
  margin-top: 1.5em;
  font-size: 0.9em;
}

.footer__icp a {
  color: var(--fg-soft);
  text-decoration: none;
}

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

/* 公安联网备案：编号 京公网安备11010502063178号，置于 ICP 备案下方 */
.footer__gongan {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
}

.footer__gongan a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-soft);
  text-decoration: none;
}

/* 徽标为 36×40 竖版，固定高度、宽度按比例自适应，避免被压扁 */
.footer__gongan img {
  width: auto;
  height: 16px;
  display: block;
}

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

/* ---------- 入场动画（仅 JS 可用时生效） ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* ---------- 无脚本退化：内容必须完整可读 ---------- */
/* 下列状态原本依赖脚本驱动，脚本不可用时直接落到终态 */
html:not(.js) .principle { opacity: 1; }
html:not(.js) .principle__head,
html:not(.js) .principle > p { transform: none; }

/* 层叠卡片改为纵向流式排布，避免三张卡叠在一起 */
html:not(.js) .concepts__stack { display: grid; gap: 20px; height: auto; }
html:not(.js) .concept-card { position: static; }
html:not(.js) .concepts__dots { display: none; }

/* 横向画廊交还给浏览器，保证后面的卡片可达 */
html:not(.js) .bench__viewport { overflow-x: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .rail { display: none; }
  .principle { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 48px; }

  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }

  .hero-stage { height: 160vh; }
  .manifesto { height: 220vh; }
  .concepts { height: 280vh; }
  .langs { height: 240vh; }

  .bench-card { width: 78vw; }

  .lang-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 14px;
    padding: 18px 4px;
  }

  .lang-row__note { grid-column: 1 / -1; }

  .footer__meta { text-align: left; }
  .footer__badge { justify-self: start; }
  .footer__links { justify-self: start; }
  .roadmap__body { padding-left: 34px; }
  .roadmap__line { left: 6px; }
  .step::before { left: -32px; }
}

/* 矮屏（横屏手机 / 小笔电）：压缩整屏分镜的内边距，避免内容溢出视口 */
@media (max-height: 700px) {
  .lang-row { padding: 12px 6px; }
  .lang-row__name { font-size: clamp(20px, 2.6vw, 34px); }
  .concepts__stack { height: clamp(200px, 34vh, 280px); }
  .stage-head { margin-bottom: 20px; }
}

/* ---------- 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .principle { opacity: 1; }

  .principle__head,
  .principle > p { transform: none; }

  .hero-stage, .manifesto, .concepts, .langs { height: auto; }

  .hero, .manifesto__sticky, .concepts__sticky, .langs__sticky {
    position: static;
    height: auto;
    padding: clamp(80px, 14vh, 160px) 6vw;
  }

  .bench { height: auto !important; }
  .bench__sticky { position: static; height: auto; padding: clamp(80px, 14vh, 160px) 0; }
  .bench__viewport { overflow-x: auto; }
  .bench__track { transform: none !important; }
  .bench__bar { display: none; }

  .manifesto__text .w { color: var(--fg); }
  .concept-card { position: static; opacity: 1 !important; transform: none !important; }
  .concepts__stack { height: auto; display: grid; gap: 20px; }
  .concepts__dots { display: none; }
  .lang-row { opacity: 1 !important; transform: none !important; }

  .hero__hint path { animation: none; opacity: 1; }
}
