/* 茜洋科技官网 · 单页
   保留原有的「全屏视频 + 居中文字」视觉，改用常规文档流布局，
   解决旧版绝对定位导致的中文重叠（移动端尤其明显）。 */

:root {
  --ink: #221C21;
  --brand: #D6336C;
  --line: rgba(255, 255, 255, .22);
  --text: #FFFFFF;
  --text-soft: rgba(255, 255, 255, .82);
  --text-dim: rgba(255, 255, 255, .62);

  --nav-h: 72px;
  --foot-h: 88px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #0E0A0C;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- 背景 ---------- */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(14, 10, 12, .62) 0%, rgba(14, 10, 12, .18) 34%, rgba(14, 10, 12, .28) 62%, rgba(14, 10, 12, .78) 100%);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
  /* 顶部蒙版：保证浅色天空背景下导航文字依然可读 */
  background: linear-gradient(to bottom, rgba(10, 7, 8, .82) 0%, rgba(10, 7, 8, .46) 58%, rgba(10, 7, 8, 0) 100%);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.links {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  padding-bottom: 8px;
}

.links a {
  font-size: 15px;
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
  transition: color .15s ease;
}

.links a:hover { color: var(--text); }

.links a.on { color: var(--text); font-weight: 600; }

/* 悬停跟随的小条：由 main.js 控制位置与宽度；默认停当前页 */
.nav-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--brand);
  opacity: 1;
  transform: translateX(0);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1), width .26s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

/* ---------- 主视觉 ---------- */
.hero {
  position: absolute;
  inset: 0;
  padding: calc(var(--nav-h) + 24px) var(--gutter) calc(var(--foot-h) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

.title {
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 18px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.slogan {
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: .22em;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.line {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
  color: var(--text-soft);
}

.line.soft { color: var(--text-dim); }

.thanks {
  margin-top: 26px;
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.8;
  color: var(--text-dim);
}

.thanks a { color: var(--text-soft); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .28); }
.thanks a:hover { color: var(--text); }

/* ---------- 页脚 ---------- */
.foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  min-height: var(--foot-h);
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  z-index: 10;
}

.foot a { color: var(--text-dim); text-decoration: none; }
.foot a:hover { color: var(--text-soft); }

/* ---------- 音乐开关 ---------- */
.music {
  position: fixed;
  right: var(--gutter);
  bottom: calc(var(--foot-h) + 8px);
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
}

.music:hover { background: rgba(255, 255, 255, .2); }

.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i {
  width: 2px;
  background: var(--text);
  border-radius: 1px;
  animation: eq 1s ease-in-out infinite;
}
.eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq i:nth-child(2) { height: 11px; animation-delay: .18s; }
.eq i:nth-child(3) { height: 8px; animation-delay: .36s; }

.music.paused .eq i { animation-play-state: paused; opacity: .45; }

@keyframes eq {
  0%, 100% { transform: scaleY(.5); }
  50% { transform: scaleY(1); }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 720px) {
  :root { --nav-h: 56px; --foot-h: 72px; --gutter: 14px; }

  .nav { gap: 10px; }
  .brand { font-size: 16px; letter-spacing: .04em; }
  .links { gap: 14px; }
  .links a { font-size: 13px; padding: 4px 0; }
  .links a.on::after { bottom: -3px; width: 14px; }

  .title { margin-bottom: 10px; letter-spacing: .08em; }
  .slogan { margin-bottom: 12px; letter-spacing: .14em; }
  .thanks { margin-top: 16px; }
  .line { line-height: 1.8; }

  .foot { font-size: 10px; gap: 4px; padding-left: 12px; padding-right: 12px; }
  .foot p { max-width: 100%; overflow-wrap: anywhere; }

  .music { width: 34px; height: 34px; right: 12px; bottom: calc(var(--foot-h) + 6px); }
}

/* 超窄屏（iPhone SE 等 320–360px） */
@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .links { gap: 10px; }
  .links a { font-size: 12px; }
  .foot { font-size: 9px; }
}

/* 极矮屏（横屏手机）：收紧间距，避免文字顶到导航/页脚 */
@media (max-height: 520px) {
  .hero { padding-top: calc(var(--nav-h) + 8px); padding-bottom: calc(var(--foot-h) + 8px); }
  .title { font-size: clamp(26px, 5vw, 40px); margin-bottom: 8px; }
  .slogan { margin-bottom: 10px; }
  .thanks { margin-top: 12px; }
  .line { line-height: 1.6; }
}

/* ---------- 子页面（关于 / 资讯） ---------- */
.bg-still {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../assets/city.jpg") center / cover no-repeat;
  filter: saturate(.85);
}

body.subpage { overflow-y: auto; }

.sheet {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 48px) var(--gutter) calc(var(--foot-h) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.sheet-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: .1em; }

.sheet-lead { margin-top: 12px; color: var(--text-soft); font-size: clamp(13px, 1.3vw, 16px); }

.sheet-body {
  margin-top: 32px;
  max-width: 640px;
  text-align: left;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 2;
}

.sheet-body p + p { margin-top: 14px; }

.empty {
  margin-top: 40px;
  padding: 40px 28px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  background: rgba(255, 255, 255, .05);
}

.empty-title { font-size: 17px; font-weight: 600; }
.empty-desc { margin-top: 8px; font-size: 13px; color: var(--text-dim); line-height: 1.9; }

.back {
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  padding-bottom: 2px;
}
.back:hover { color: var(--text); }