/* ============================================================
   layout.css — 全屏容器、导航、竖排装饰、圆点
   ============================================================ */

/* ---------------- 全屏滚动容器 ---------------- */
.fp {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.fp__wrap {
  will-change: transform;
  transition: transform var(--dur) var(--ease);
}

.fp__page {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--c-bg);
}

/* 允许最后一屏内部滚动（新闻 + 页脚） */
.fp__page.js-scroll { overflow-y: auto; overflow-x: hidden; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 clamp(0.2rem, 0.768rem, 0.56rem);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(0.12rem);
  box-shadow: 0 0.01rem 0 rgba(29, 33, 41, .06);
  transition: background .5s ease, box-shadow .5s ease;
}

/* 首屏为深色时导航透明反白 */
body.is-dark .nav {
  background: transparent;
  box-shadow: none;
}

/* ---- 品牌 ---- */
.brand { display: block; line-height: 1; }

.brand__mark {
  display: block;
  font-family: var(--f-en);
  font-size: 0.27rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--c-brand);
  transition: color .5s ease;
}
.brand__mark i {
  font-style: normal;
  color: var(--c-ink);
  transition: color .5s ease;
}
.brand__mark em {
  font-style: normal;
  font-size: 0.2rem;
  color: var(--c-brand-2);
  margin-left: 0.01rem;
  vertical-align: 0.02rem;
}
.brand__sub {
  display: block;
  font-family: var(--f-en);
  font-size: 0.07rem;
  font-weight: 600;
  letter-spacing: .285em;
  color: var(--c-ink-3);
  margin-top: 0.05rem;
  transition: color .5s ease;
}

body.is-dark .brand__mark   { color: #fff; }
body.is-dark .brand__mark i { color: var(--c-brand-2); }
body.is-dark .brand__sub    { color: rgba(255, 255, 255, .68); }

/* ---- 菜单 ---- */
.nav__menu {
  margin-left: auto;
  display: flex;
  gap: clamp(0.2rem, 0.6144rem, 0.58rem);
}

.nav__link {
  position: relative;
  font-size: 0.14rem;
  letter-spacing: .06em;
  color: var(--c-ink-2);
  padding: 0.04rem 0;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 0.02rem;
  background: var(--c-brand);
  transform: translateX(-50%);
  transition: width .34s var(--ease);
}
.nav__link:hover { color: var(--c-brand); }
.nav__link.is-active { color: var(--c-brand); }
.nav__link.is-active::after { width: 0.18rem; }

body.is-dark .nav__link { color: rgba(255, 255, 255, .78); }
body.is-dark .nav__link:hover,
body.is-dark .nav__link.is-active { color: #fff; }
body.is-dark .nav__link.is-active::after { background: var(--c-brand-2); }

/* ---- 语言 ---- */
.nav__lang {
  display: flex;
  align-items: center;
  margin-left: clamp(0.2rem, 0.576rem, 0.5rem);
  padding-left: clamp(0.16rem, 0.4608rem, 0.34rem);
  border-left: 0.01rem solid var(--c-line);
  font-family: var(--f-en);
  font-size: 0.12rem;
  letter-spacing: .1em;
  transition: border-color .5s ease;
}
.lang {
  color: var(--c-ink-4);
  padding: 0.02rem 0.01rem;
  transition: color .3s ease;
}
.lang:hover { color: var(--c-brand); }
.lang.is-active { color: var(--c-ink); font-weight: 700; }
.lang__slash {
  color: var(--c-ink-4);
  margin: 0 0.03rem;
  transform: skewX(-16deg);
  display: inline-block;
}
body.is-dark .nav__lang  { border-color: rgba(255, 255, 255, .22); }
body.is-dark .lang       { color: rgba(255, 255, 255, .55); }
body.is-dark .lang.is-active { color: #fff; }

/* ---------------- 两侧竖排装饰 ---------------- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rail--left  { left: 0; }
.rail--right { right: 0; }

.rail__bar {
  position: absolute;
  width: 0.06rem;
  height: 26vh;
  background: var(--c-brand);
  transition: background .5s ease;
}
.rail--left .rail__bar  { top: 34vh; left: 0.28rem; }
.rail--right .rail__bar { top: 4vh; right: 0.1rem; }

.rail__text,
.rail__title,
.rail__sub {
  writing-mode: vertical-rl;
  font-family: var(--f-en);
  white-space: nowrap;
}

.rail--left .rail__text {
  position: absolute;
  top: 62vh;
  left: 0.24rem;
  font-size: 0.11rem;
  font-weight: 600;
  letter-spacing: .34em;
  color: var(--c-ink-3);
  transition: color .5s ease;
}

.rail--right .rail__title {
  position: absolute;
  top: 8vh;
  right: 0.28rem;
  font-size: 0.4rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  color: rgba(29, 33, 41, .07);
  transition: color .5s ease;
}
.rail--right .rail__sub {
  position: absolute;
  top: 9vh;
  right: 0.82rem;
  font-size: 0.08rem;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--c-ink-4);
  transition: color .5s ease;
}

body.is-dark .rail__bar          { background: var(--c-brand-2); }
body.is-dark .rail--left .rail__text  { color: rgba(255, 255, 255, .55); }
body.is-dark .rail--right .rail__title { color: rgba(255, 255, 255, .1); }
body.is-dark .rail--right .rail__sub   { color: rgba(255, 255, 255, .4); }

/* ---------------- 滚动提示 ---------------- */
.scroll-hint {
  position: fixed;
  right: 0.3rem;
  bottom: 12vh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  pointer-events: none;
  transition: opacity .5s ease;
}
.scroll-hint__mouse {
  width: 0.15rem;
  height: 0.24rem;
  border: 0.015rem solid var(--c-ink-3);
  border-radius: 0.09rem;
  position: relative;
}
.scroll-hint__mouse i {
  position: absolute;
  left: 50%;
  top: 0.05rem;
  width: 0.02rem;
  height: 0.05rem;
  margin-left: -1px;
  border-radius: 0.02rem;
  background: var(--c-ink-3);
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(0.08rem);  opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}
.scroll-hint__arrow {
  font-size: 0.11rem;
  color: var(--c-ink-3);
  line-height: 1;
}
.scroll-hint__line {
  width: 0.01rem;
  height: 0.52rem;
  background: linear-gradient(var(--c-ink-4), transparent);
}
body.is-dark .scroll-hint__mouse   { border-color: rgba(255, 255, 255, .6); }
body.is-dark .scroll-hint__mouse i { background: rgba(255, 255, 255, .8); }
body.is-dark .scroll-hint__arrow   { color: rgba(255, 255, 255, .6); }
body.is-dark .scroll-hint__line    { background: linear-gradient(rgba(255,255,255,.4), transparent); }
body.is-last .scroll-hint          { opacity: 0; }

/* ---------------- 圆点导航 ---------------- */
.dots {
  position: fixed;
  right: 0.26rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.13rem;
}
.dot {
  width: 0.07rem;
  height: 0.07rem;
  border-radius: 50%;
  background: var(--c-ink-4);
  opacity: .55;
  transition: all .34s var(--ease);
}
.dot:hover { opacity: 1; }
.dot.is-active {
  background: var(--c-brand);
  opacity: 1;
  transform: scale(1.5);
}
body.is-dark .dot { background: rgba(255, 255, 255, .5); }
body.is-dark .dot.is-active { background: var(--c-brand-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  :root { --rail-w: 56px; }
  .rail--right .rail__title { font-size: 34px; }
  .rail--right .rail__sub   { display: none; }
}

@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav__menu { gap: 16px; }
  .nav__link { font-size: 12px; }
  .brand__mark { font-size: 21px; }
  .brand__sub  { font-size: 6px; letter-spacing: .2em; }
  .rail, .dots, .scroll-hint { display: none; }
}

/* 窄屏：logo 一行、菜单单独一行且可横向滑动 */
@media (max-width: 640px) {
  :root { --nav-h: 96px; }

  .nav {
    flex-wrap: wrap;
    align-content: center;
    padding: 6px 16px 0;
  }
  .brand      { order: 1; }
  .brand__sub { display: none; }

  .nav__lang {
    order: 2;
    margin-left: auto;
    padding-left: 14px;
  }

  .nav__menu {
    order: 3;
    width: 100%;
    margin: 8px 0 0;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav__menu::-webkit-scrollbar { display: none; }
  .nav__link { padding-bottom: 0.08rem; }
}
