/* ============================================================
   吉普莉特 Jipulite · 全静态个人站
   字体：Noto Sans SC（细体 200/300）· 商用免费
   ============================================================ */

:root {
  --ink-dark: #1e1a20;      /* 首页文字：黑 */
  --ink-light: #f4f1f5;     /* 非首页文字：白 */
  --accent: #a8324e;        /* 玫瑰红 */
  --accent-soft: #c96e86;
  --font: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei Light", "Microsoft YaHei", "DengXian", sans-serif;
  --font-en: "Cormorant Garamond", "Noto Sans SC", serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--ink-dark);
  transition: color .8s var(--ease);
  cursor: default;
  user-select: none;
  background: #0c0a0e;
}
/* 非首页：文字变白 */
body:not([data-sec="home"]) { color: var(--ink-light); }

.mono { font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: .06em; }

/* ---------------- 背景（分层：底板 + 人物层） ----------------
   外层 .bg-para 承载 JS 视差（scale 1.111 + translate，内联样式）；
   内层 .bg-float / .bg-char 承载 CSS 呼吸与飘舞动画，两层互不覆盖 */
.bg-para {
  position: fixed; inset: 0; z-index: 0;
  transform: scale(1.111);
  will-change: transform;
  transition: filter 1s var(--ease);
}
/* 注意：不能用 background 简写携带背景色——人物层元素复用此类，
   不透明底色会盖住下层的底板（透明区直接显示底板，后备色由 body 提供） */
.bg-img {
  position: absolute; inset: 0;
  background-image: url("../assets/demo/plate.jpg");
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.bg-img.bg-char { background-image: url("../assets/demo/character.png"); }
/* 人物呼吸：以脚底为轴（51.5%,100%），胸口缓缓抬起 */
.bg-char {
  transform-origin: 51.5% 100%;
  animation: charBreathe 4.6s var(--ease) infinite;
}
@keyframes charBreathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.006); } }
/* 人物飘舞：上下悬浮，周期与呼吸错开 */
.bg-float {
  position: absolute; inset: 0;  /* transform 动画元素会成为 abs 定位的包含块，必须撑满 */
  animation: charHover 6.5s ease-in-out infinite;
}
@keyframes charHover { 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(9px); } }
@media (prefers-reduced-motion: reduce) {
  .bg-char, .bg-float { animation: none !important; }
}
.bg-shade {
  position: fixed; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(10,8,12,.30), rgba(10,8,12,.62) 70%),
    linear-gradient(rgba(10,8,12,.25), rgba(10,8,12,.55));
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}
body:not([data-sec="home"]) .bg-shade { opacity: 1; }
body:not([data-sec="home"]) .bg-para { filter: brightness(.82) saturate(.92); }
.grain {
  position: fixed; inset: 0; z-index: 2; opacity: .05; pointer-events: none;
  background-image: repeating-conic-gradient(#fff 0 0.0004turn, #000 0 0.0008turn);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

/* ---------------- 主菜单（左侧） ---------------- */
.menu {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 30;
  width: 240px;
  padding: 34px 0 28px 44px;
  display: flex; flex-direction: column;
  background: linear-gradient(90deg, rgba(255,255,255,.42), rgba(255,255,255,0) 88%);
  transition: background .9s var(--ease);
}
body:not([data-sec="home"]) .menu {
  background: linear-gradient(90deg, rgba(12,9,14,.5), rgba(12,9,14,0) 88%);
}
.menu-brand { margin-bottom: 44px; }
.menu-brand-en {
  display: block; font-family: var(--font-en); font-size: 21px; letter-spacing: .34em;
  color: currentColor;
}
.menu-brand-zh {
  display: block; margin-top: 4px; font-size: 12px; font-weight: 300;
  letter-spacing: .5em; opacity: .66;
}
.menu-list { list-style: none; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.menu-list li { display: flex; }
.menu-item {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-family: var(--font); font-weight: 200; color: currentColor;
  font-size: 19px; letter-spacing: .22em; text-align: left;
  padding: 8px 0 8px 18px;
  position: relative;
  transition: font-size .34s var(--ease), opacity .34s var(--ease), padding .34s var(--ease);
}
.menu-item::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 8px; height: 1px; background: currentColor; opacity: .5;
  transition: width .34s var(--ease), opacity .3s;
}
/* 悬停：文字放大，其余菜单项被挤压 */
.menu-list:hover .menu-item { font-size: 14px; opacity: .45; padding-left: 12px; }
.menu-list:hover .menu-item::before { width: 4px; }
.menu-list .menu-item:hover,
.menu-list .menu-item.is-active:hover { font-size: 30px; opacity: 1; padding-left: 24px; }
.menu-list .menu-item:hover::before { width: 16px; opacity: 1; }
.menu-item.is-active { font-weight: 400; }
.menu-item.is-active::before { width: 16px; opacity: .9; }
.menu-foot { display: flex; flex-direction: column; gap: 8px; }
.menu-foot a {
  color: currentColor; text-decoration: none; font-size: 12.5px; letter-spacing: .18em;
  opacity: .62; transition: opacity .3s, letter-spacing .3s;
}
.menu-foot a:hover { opacity: 1; letter-spacing: .26em; }

/* ---------------- 视口内容 ---------------- */
.stage { position: fixed; inset: 0; z-index: 10; }
.sec {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6vh 6vw 6vh calc(240px + 4vw);
  opacity: 0; visibility: hidden;
  transform: translateY(46px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), visibility 0s linear .7s;
  overflow: hidden auto;
}
.sec.is-active {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  transition: opacity .8s var(--ease) .12s, transform .8s var(--ease) .12s, visibility 0s;
}
.sec::-webkit-scrollbar { width: 0; }

/* 子元素错落入场 */
.sec .anim {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.sec.is-active .anim { opacity: 1; transform: none; }
.sec.is-active .anim:nth-child(1) { transition-delay: .18s; }
.sec.is-active .anim:nth-child(2) { transition-delay: .28s; }
.sec.is-active .anim:nth-child(3) { transition-delay: .38s; }
.sec.is-active .anim:nth-child(4) { transition-delay: .48s; }
.sec.is-active .anim:nth-child(5) { transition-delay: .58s; }
.sec.is-active .anim:nth-child(6) { transition-delay: .68s; }

/* ---------------- 首页 ---------------- */
.sec-home { justify-content: center; }
.st {
  font-size: 12px; letter-spacing: .52em; font-weight: 300; opacity: .7;
  margin-bottom: 26px;
}
.sec-home h1 {
  font-weight: 200; font-size: clamp(56px, 7.4vw, 108px); letter-spacing: .12em;
  line-height: 1.04;
}
.sec-home h1 .en {
  display: block; font-family: var(--font-en); font-style: italic; font-weight: 300;
  font-size: clamp(26px, 2.6vw, 40px); letter-spacing: .3em; opacity: .72; margin-top: 6px;
}
.tagline { margin-top: 26px; font-size: 19px; letter-spacing: .14em; font-weight: 300; }
.tagline .rose { color: var(--accent); margin-left: 6px; }
body:not([data-sec="home"]) .tagline .rose { color: var(--accent-soft); }
.desc { margin-top: 14px; font-size: 14.5px; line-height: 2; letter-spacing: .1em; opacity: .78; }
.home-actions { margin-top: 36px; display: flex; gap: 18px; }
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--font);
  font-size: 14px; letter-spacing: .2em; padding: 13px 30px;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s, border-color .3s;
  text-decoration: none; display: inline-block;
}
.btn:hover { transform: translateY(-3px); }
.btn-solid {
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 26px -10px rgba(168,50,78,.55);
}
.btn-solid:hover { box-shadow: 0 16px 32px -10px rgba(168,50,78,.7); }
.btn-ghost {
  background: transparent; color: currentColor;
  border: 1px solid currentColor;
}
.btn-ghost:hover { opacity: 1; background: rgba(127,127,127,.12); }
.home-meta { margin-top: 44px; font-size: 12px; letter-spacing: .3em; opacity: .55; }

/* ---------------- 各区块标题 ---------------- */
.sec-head { margin-bottom: 4.2vh; max-width: 860px; }
.sec-head h2 {
  font-weight: 200; font-size: clamp(34px, 3.6vw, 52px); letter-spacing: .3em;
}
.sec-head p { margin-top: 10px; font-size: 14px; letter-spacing: .12em; opacity: .72; }

/* ---------------- 个人简介 ---------------- */
.about-wrap {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 40px; max-width: 1400px; width: 100%;
  align-items: start;
}
.about-card {
  background: rgba(14,10,16,.5);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12);
  padding: clamp(26px, 3vw, 46px);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.7);
}
.about-lead { font-size: 19px; line-height: 1.9; letter-spacing: .08em; margin-bottom: 18px; font-weight: 300; }
.about-lead .em { color: var(--accent-soft); }
.about-card p { font-size: 14.5px; line-height: 2.15; letter-spacing: .06em; opacity: .92; margin-bottom: 14px; }
.about-card p b { font-weight: 400; color: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
  font-size: 12px; letter-spacing: .1em; padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; opacity: .85;
}
.about-facts {
  background: rgba(14,10,16,.36);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.1);
  padding: 30px 28px;
}
.about-facts h4 { font-weight: 300; font-size: 16px; letter-spacing: .3em; margin-bottom: 18px; }
.about-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.about-facts dt { font-size: 12.5px; opacity: .55; letter-spacing: .14em; white-space: nowrap; }
.about-facts dd { font-size: 13px; letter-spacing: .05em; line-height: 1.6; }
.about-facts .btn { margin-top: 22px; padding: 10px 20px; font-size: 12.5px; }

/* ---------------- 艺术长廊 ---------------- */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px; max-width: 1400px; width: 100%;
  align-content: start;
}
.gal-item {
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(14,10,16,.4);
  box-shadow: 0 20px 46px -22px rgba(0,0,0,.65);
}
.gal-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 4 / 3.4;
  transform: scale(1.02);
  transition: transform .7s var(--ease), filter .7s var(--ease);
}
.gal-item:hover img { transform: scale(1.09); filter: brightness(1.08); }
.gal-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(5,3,7,.78));
  color: #fff; font-size: 12.5px; letter-spacing: .14em;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.gal-item:hover .gal-cap { opacity: 1; transform: none; }
.gal-cap small { display: block; opacity: .6; margin-top: 3px; letter-spacing: .2em; }

/* ---------------- 精彩切片 ---------------- */
.credit { color: var(--accent-soft); text-decoration: none; border-bottom: 1px dashed currentColor; }
.clip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px; max-width: 1400px; width: 100%; align-content: start;
}
.clip-item {
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(14,10,16,.45);
  box-shadow: 0 20px 46px -22px rgba(0,0,0,.65);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.clip-item:hover { transform: translateY(-4px); box-shadow: 0 26px 56px -22px rgba(0,0,0,.8); }
.clip-cover { position: relative; overflow: hidden; }
.clip-cover img {
  width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover;
  transform: scale(1.02); transition: transform .6s var(--ease);
}
.clip-item:hover .clip-cover img { transform: scale(1.07); }
.clip-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(6,4,8,.28); opacity: 0; transition: opacity .4s var(--ease);
}
.clip-item:hover .clip-play { opacity: 1; }
.clip-play span {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(168,50,78,.92); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 8px 24px -6px rgba(0,0,0,.6);
}
.clip-dur {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(6,4,8,.82); color: #fff; font-size: 11px;
  padding: 3px 8px; border-radius: 4px; letter-spacing: .06em;
}
.clip-title {
  padding: 12px 14px 6px; font-size: 13.5px; line-height: 1.6;
  letter-spacing: .04em; color: inherit;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clip-meta {
  padding: 0 14px 12px; font-size: 11px; letter-spacing: .08em; opacity: .55;
  display: flex; gap: 12px;
}
/* 切片播放 Modal */
.clip-modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6,4,8,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.clip-modal.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.clip-modal-body { width: min(92vw, 980px); }
.clip-player {
  position: relative; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
}
.clip-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-modal-info { margin-top: 16px; color: rgba(255,255,255,.88); }
.clip-modal-info h3 { font-weight: 300; font-size: 17px; letter-spacing: .08em; }
.clip-modal-info p { margin-top: 6px; font-size: 12px; letter-spacing: .12em; opacity: .6; }
.clip-modal-info a { color: var(--accent-soft); text-decoration: none; font-size: 12.5px; letter-spacing: .1em; }
.clip-modal-info a:hover { text-decoration: underline; }
.clip-close {
  position: absolute; top: 24px; right: 26px;
  appearance: none; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
  width: 46px; height: 46px; font-size: 26px; font-family: var(--font-en);
  transition: background .3s;
}
.clip-close:hover { background: rgba(255,255,255,.18); }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6,4,8,.9); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
.lb-body { max-width: 84vw; max-height: 84vh; text-align: center; }
.lb-body img {
  max-width: 84vw; max-height: 76vh; object-fit: contain;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
  border: 1px solid rgba(255,255,255,.14);
  transform: scale(.94); transition: transform .45s var(--ease);
}
.lightbox.is-open .lb-body img { transform: scale(1); }
.lb-body figcaption {
  margin-top: 16px; color: rgba(255,255,255,.85);
  font-size: 13.5px; letter-spacing: .2em; font-weight: 300;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; appearance: none; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
  font-family: var(--font-en); transition: background .3s, transform .3s;
}
.lb-close { top: 26px; right: 30px; width: 46px; height: 46px; font-size: 26px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; }
.lb-prev { left: 26px; } .lb-next { right: 26px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.18); }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

/* ---------------- 移动端菜单按钮 ---------------- */
.menu-toggle {
  display: none;
  position: fixed; top: 18px; left: 18px; z-index: 80;
  width: 44px; height: 44px;
  appearance: none; border: 1px solid currentColor; border-radius: 50%;
  background: rgba(127,127,127,.12); color: currentColor; cursor: pointer;
  padding: 0;
  transition: background .3s, transform .3s var(--ease);
}
.menu-toggle:active { transform: scale(.92); }
.menu-toggle span {
  display: block; width: 18px; height: 1.4px; margin: 3.4px auto;
  background: currentColor; opacity: .9;
  transition: transform .35s var(--ease), opacity .3s;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(4.8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-4.8px) rotate(-45deg); }

/* ---------------- 背景音乐开关（右上角） ---------------- */
.music-btn {
  position: fixed; top: 18px; right: 18px; z-index: 80;
  width: 44px; height: 44px;
  appearance: none; border: 1px solid currentColor; border-radius: 50%;
  background: rgba(127,127,127,.12); color: currentColor; cursor: pointer;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, transform .3s var(--ease);
}
.music-btn:hover { background: rgba(127,127,127,.22); }
.music-btn:active { transform: scale(.92); }
.music-btn .bars {
  display: flex; gap: 2.5px; align-items: flex-end; height: 16px;
}
.music-btn .bars i {
  display: block; width: 2.5px; height: 5px; border-radius: 1.5px;
  background: currentColor; opacity: .45;
}
/* 播放中：四根柱子错峰跳动 */
.music-btn.is-playing .bars i { opacity: .95; animation: eq 1.15s ease-in-out infinite; }
.music-btn.is-playing .bars i:nth-child(1) { animation-delay: 0s; }
.music-btn.is-playing .bars i:nth-child(2) { animation-delay: .28s; }
.music-btn.is-playing .bars i:nth-child(3) { animation-delay: .55s; }
.music-btn.is-playing .bars i:nth-child(4) { animation-delay: .82s; }
@keyframes eq { 0%,100% { height: 5px; } 50% { height: 14px; } }
/* 停止：柱子静止压低 + 斜杠 */
.music-btn:not(.is-playing) .bars i { animation: none; height: 4px; }
.music-btn .slash {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 1.8px; border-radius: 1px;
  margin: -0.9px 0 0 -11px;
  background: currentColor; transform: rotate(-45deg);
  opacity: 0; transition: opacity .3s;
}
.music-btn:not(.is-playing) .slash { opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  .music-btn .bars i { animation: none !important; }
}

/* ---------------- 移动端 Modal 菜单 ---------------- */
.menu-modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(7,5,10,.82);
  backdrop-filter: blur(18px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s linear .4s;
}
.menu-modal.is-open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.menu-modal-inner {
  width: min(78vw, 340px); text-align: center;
  transform: translateY(26px);
  transition: transform .4s var(--ease);
}
.menu-modal.is-open .menu-modal-inner { transform: none; }
.menu-modal-brand { margin-bottom: 40px; color: var(--ink-light); }
.menu-modal-brand .menu-brand-en { font-size: 24px; letter-spacing: .4em; }
.menu-modal-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.menu-modal-item {
  appearance: none; border: 0; background: none; cursor: pointer; width: 100%;
  font-family: var(--font); font-weight: 200; color: var(--ink-light);
  font-size: 26px; letter-spacing: .3em; padding: 12px 0;
  opacity: .82;
  transition: font-size .3s var(--ease), opacity .3s, letter-spacing .3s;
}
.menu-modal-item:active, .menu-modal-item:hover { font-size: 32px; opacity: 1; letter-spacing: .38em; }
.menu-modal-item.is-active { font-weight: 400; opacity: 1; }
.menu-modal-foot {
  margin-top: 42px; display: flex; justify-content: center; gap: 26px;
}
.menu-modal-foot a {
  color: var(--ink-light); text-decoration: none; font-size: 12.5px;
  letter-spacing: .18em; opacity: .6;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .menu { width: 190px; padding-left: 26px; }
  .sec { padding-left: calc(190px + 3vw); }
  .about-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* 窄屏 cover 裁切严重：取景窗左移，人物整体右移避开文字区（两层同规则保持对位） */
  .bg-img { background-position: 40% center; }
  /* 左侧主菜单收起，改用 Modal */
  .menu { display: none; }
  .menu-toggle { display: block; }
  .sec {
    padding: 12vh 6vw 8vh;
    justify-content: flex-start;
  }
  .sec-home { justify-content: center; }
  .st { letter-spacing: .3em; font-size: 11px; margin-bottom: 18px; }
  .sec-home h1 { letter-spacing: .08em; }
  .tagline { font-size: 16px; }
  .home-meta { letter-spacing: .18em; line-height: 1.8; }
  .about-wrap { grid-template-columns: 1fr; gap: 26px; }
  .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .home-actions { flex-direction: column; gap: 12px; align-items: stretch; max-width: 300px; }
}
