/* ============================================================
   layout.css — 栅格 · 区块版式 · 响应式（375/768/1024/1440）
   画册编辑风格：full-bleed 出血大图、非对称双栏、120px 留白带
   ============================================================ */

/* ============ 12 列栅格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-3);
}

/* 锚点跳转偏移：避开 sticky 导航（64px）遮挡 */
section[id] {
  scroll-margin-top: 76px;
}

/* ============ 顶部导航 ============ */
.tp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
}

.tp-nav__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  height: 64px;
}

.tp-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--fs-body);
}

.tp-nav__brand svg {
  flex: none;
}

.tp-nav__links {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-small);
}

.tp-nav__links a {
  flex: none;
  white-space: nowrap;
  color: var(--color-ink-sub);
}
.tp-nav__links a:hover {
  color: var(--color-accent);
}

.tp-nav__cta {
  height: 40px;
  padding: 0 var(--sp-2);
  font-size: var(--fs-small);
}

/* 移动端：横向滚动导航 */
@media (max-width: 767px) {
  .tp-nav__brand {
    flex: none;
    white-space: nowrap;
    font-size: var(--fs-small);
  }
  .tp-nav__links {
    margin-left: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: var(--sp-2);
  }
  .tp-nav__links::-webkit-scrollbar {
    display: none;
  }
  /* 特异性需高于 components.css 的 .tp-btn（同权重后加载会覆盖） */
  .tp-nav .tp-nav__cta {
    display: none;
  }
}

/* ============ Hero（full-bleed 大图） ============ */
.tp-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--color-white);
  overflow: hidden;
  background: var(--color-primary);
}

.tp-hero__media {
  position: absolute;
  inset: 0;
}

.tp-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 深蓝压暗渐变，保证白字对比度 */
.tp-hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 31, 58, 0.55) 0%,
    rgba(11, 31, 58, 0.42) 45%,
    rgba(11, 31, 58, 0.88) 100%
  );
}

.tp-hero__in {
  position: relative;
  padding: var(--sp-6) var(--sp-3) var(--sp-4);
  width: 100%;
}

.tp-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-small);
  letter-spacing: 0.24em;
  color: var(--color-accent);
  border: 1px solid rgba(176, 141, 87, 0.55);
  border-radius: 999px;
  padding: 4px var(--sp-2);
  margin-bottom: var(--sp-3);
}

.tp-hero h1 {
  color: var(--color-white);
  max-width: 880px;
}

.tp-hero__sub {
  font-size: var(--fs-sub);
  color: rgba(255, 255, 255, 0.82);
  max-width: 720px;
  margin-top: var(--sp-2);
}

/* Hero 关键数字条 */
.tp-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: var(--sp-3);
}

.tp-hero__stat .num {
  display: block;
  font-size: 40px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.1;
}

.tp-hero__stat small {
  display: block;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.72);
  margin-top: var(--sp-1);
}

@media (max-width: 767px) {
  .tp-hero {
    min-height: 88vh;
  }
  .tp-hero h1 {
    font-size: 34px;
  }
  .tp-hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .tp-hero__stat .num {
    font-size: 30px;
  }
}

/* ============ 非对称双栏（画册核心版式） ============ */
/* 项目区块：文字铺满，配图作整块背景 */
.tp-split {
  display: block;
}
.tp-split__body {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 项目卡片正文：两端对齐（首行缩进非必须，已去除） */
.tp-project .tp-split__body p {
  text-align: justify;
  text-justify: inter-ideograph;
}
/* 正文内加粗引导语改金色：全局 strong/b 为深蓝主色，在深蓝蒙版上会隐形 */
.tp-project .tp-split__body strong,
.tp-project .tp-split__body b {
  color: var(--color-accent);
}

/* 图注（画册规范：必填） */
.tp-figcap {
  font-size: var(--fs-caption);
  color: var(--color-ink-faint);
  margin-top: var(--sp-1);
  line-height: 1.6;
}

.tp-figcap b {
  color: var(--color-ink-sub);
  font-weight: 600;
}

@media (max-width: 1023px) {
  .tp-split__body {
    max-width: 100%;
  }
}

/* ============ full-bleed 图带 ============ */
.tp-bleed {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  overflow: hidden;
  background: var(--color-primary);
}

.tp-bleed__media {
  position: absolute;
  inset: 0;
}
.tp-bleed__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tp-bleed__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 58, 0.62);
}

.tp-bleed__in {
  position: relative;
  padding: var(--sp-5) var(--sp-3);
}

.tp-bleed blockquote {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  line-height: 1.6;
  max-width: 860px;
  color: var(--color-white);
}

.tp-bleed cite {
  display: block;
  font-style: normal;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--sp-2);
}

/* ============ 项目深描区块（配图作背景，文字叠加） ============ */
.tp-project {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: var(--sp-5);
  color: var(--color-white);
  margin-bottom: var(--sp-4);
}
.tp-project::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  z-index: -2;
}
.tp-project::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(11, 31, 58, 0.97) 0%,
    rgba(11, 31, 58, 0.9) 50%,
    rgba(11, 31, 58, 0.62) 100%
  );
  z-index: -1;
}
/* 各项目背景图 */
.tp-project--tiemba::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-tiemba.webp);
}
.tp-project--sjtu-ntu::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-sjtu-ntu.webp);
}
.tp-project--fudan-washu::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-fudan-washu.webp);
}
.tp-project--chemba::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-chemba.webp);
}
.tp-project--snai-asu::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-snai-asu.webp);
}
.tp-project--bupt-lyon::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-bupt-lyon.webp);
}
.tp-project--tongji-uta::before {
  background-image: url(/topic/2026-sino-emba/releases/1/images/proj-tongji-uta.webp);
}

.tp-project__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.tp-project__no {
  font-family: var(--font-num);
  font-size: var(--fs-sub);
  font-weight: 700;
  color: var(--color-accent);
}

.tp-project__title {
  font-size: var(--fs-h3);
  color: var(--color-white);
}
.tp-project__tag {
  font-size: var(--fs-caption);
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 2px var(--sp-2);
}

/* 项目数据点（3-4 个） */
.tp-project__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
  padding: var(--sp-2) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.tp-project__fact .num {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.tp-project__fact small {
  display: block;
  font-size: var(--fs-caption);
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}

/* 项目来源图注（深蓝背景上） */
.tp-project .tp-figcap {
  color: rgba(255, 255, 255, 0.72);
  margin-top: var(--sp-2);
}
.tp-project .tp-figcap b {
  color: rgba(255, 255, 255, 0.85);
}

/* #know 全球校区网络插图 */
.tp-know-fig {
  border-radius: var(--radius-img);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-primary);
  margin-top: var(--sp-4);
}
.tp-know-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .tp-project__facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .tp-project {
    padding: var(--sp-4);
  }
}

/* ============ 页脚 ============ */
.tp-foot {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--sp-5) 0 var(--sp-4);
  font-size: var(--fs-small);
}

.tp-foot h4 {
  color: var(--color-white);
  margin-bottom: var(--sp-2);
}
.tp-foot__in {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-4);
}

/* 导航跨占右侧两列（原第 3 列被浪费，导致链接列过窄折行）；内部三等分 */
.tp-foot__nav {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.tp-foot__col ul {
  display: grid;
  gap: var(--sp-1);
}
.tp-foot__col a {
  color: rgba(255, 255, 255, 0.75);
}
.tp-foot__col a:hover {
  color: var(--color-accent);
}

.tp-foot__meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: var(--sp-3);
  margin-top: var(--sp-3);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 767px) {
  .tp-foot__in {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .tp-foot__nav {
    grid-column: auto;
    grid-template-columns: repeat(2, 1fr);
  }
}
