/* =========================================
   目录 (Table of Contents) - V12 (全站模糊显影最终版)
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --logo-visual-correction: -2vh;
  --bg-top-gap: 100px; 
  --bg-bottom-gap: 140px;
  --header-height: calc(max(24px, env(safe-area-inset-top)) + 36px + 20px);
}
@media (min-width: 601px) {
  :root { --bg-top-gap: clamp(72px, 12vh, 160px); --bg-bottom-gap: clamp(96px, 16vh, 200px); }
}

html, body {
  margin: 0; background: #fff; color: #000; overflow-x: hidden; width: 100%;
  font-family: system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}

/* 背景层 */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: var(--bg-top-gap); 
  height: calc(100vh - var(--bg-top-gap) - var(--bg-bottom-gap)); 
  background: center / cover no-repeat url('bg.svg');
  filter: contrast(0.85) brightness(0.94) saturate(0.9);
  opacity: 0.35; pointer-events: none; z-index: 0; transform: translateZ(0); 
}
/* ▼▼▼ 这是专门给 Shop 页面加的新背景 ▼▼▼ */
body.shop-page::before {
  /* ⚠️把下面单引号里的名字改成您真实的图片文件名 */
  background-image: url(IMG_3441.JPG); 
  
  /* 如果觉得背景太暗或太亮，可以调整这个数字 (0.1 - 1.0) */
  opacity: 0.7
}
a { color: inherit; text-decoration: none; }


/* =========================================
   2. UI 默认状态 (无动画)
   ========================================= */
body::after {
  content: ""; position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
  background: rgba(255, 255, 255, 0.30); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.03); z-index: 990; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
}
body.scrolled::after { opacity: 1; }

.brand-link {
  position: fixed; top: max(24px, env(safe-area-inset-top));
  height: 36px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; letter-spacing: 1px; color: #000; z-index: 1000;
  padding: 0 14px; border-radius: 8px; user-select: none; background: transparent;
  left: 50%; transform: translateX(-50%); /* 默认物理居中 */
  opacity: 1; 
}
@media (max-width: 600px) { .brand-link { font-size: 16px; padding: 0 12px; } }

.bottom-nav {
  position: fixed; bottom: max(60px, env(safe-area-inset-bottom)); left: 0; width: 100%;
  display: flex; justify-content: space-around; align-items: center; gap: 16px;
  z-index: 1000; font-size: 16px; 
  opacity: 1; transition: opacity 0.3s ease, transform 0.3s ease;
}
.bottom-nav a { padding: 10px 14px; }
.bottom-nav a.active { text-decoration: underline; text-underline-offset: 4px; }
body.scrolled .bottom-nav { opacity: 0 !important; transform: translateY(30px); pointer-events: none; }

.cart-link {
  position: fixed; top: max(24px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right));
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 1; 
}
.cart-link svg { width: 16px; height: 16px; display: block; }

/* 跑马灯 (默认状态) */
.marquee {
  position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 0; width: 100%;
  height: 16px; overflow: hidden; z-index: 900; opacity: .85; pointer-events: none;
  background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.marquee::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg,#bdbdbd 0 1px,transparent 1px 3px); opacity: .35; }
.marquee-inner { position: absolute; top: 0; left: 0; display: flex; align-items: center; height: 100%; white-space: nowrap; animation: marquee 100s linear infinite; }
.marquee-block { flex: 0 0 auto; font: 11px monospace; letter-spacing: 1.5px; }


/* =========================================
   3. [仅首页] 模糊显影动画序列
   ========================================= */
/* 1. 大标题 (H1) */
body.home-intro .center h1 {
  opacity: 0;
  animation: blurIn 2s ease-out 0.1s forwards;
}

/* 2. 所有其他元素 (小字, Logo, 菜单, 购物车, 跑马灯) */
body.home-intro .center .sub,
body.home-intro .brand-link,
body.home-intro .bottom-nav,
body.home-intro .cart-link,
body.home-intro .marquee {
  opacity: 0;
  animation: blurIn 2s ease-out 0.5s forwards;
}


/* =========================================
   4. [子页面] 模糊显影动画 (Project, Shop, Music)
   ========================================= */
/* 这里控制子页面的动画：每次进入都播放 */

/* 大标题 (.title / .archive-title) */
body:not(.home-intro) .archive-title,
body:not(.home-intro) .title {
  animation: blurIn 0.8s ease-out 0.1s both;
}

/* ▼▼▼ [新增] 小字 (.sub) - Music/Shop 页面的描述 ▼▼▼ */
body:not(.home-intro) .sub {
  animation: blurIn 0.8s ease-out 0.5s both; /* 比标题晚 0.1s 出现 */
}

/* 列表内容 (Gallery, Tracklist, Detail) */
body:not(.home-intro) .archive-gallery,
body:not(.home-intro) #nv-wrap,
body:not(.home-intro) .work-container {
  animation: blurIn 0.8s ease-out 0.5s both;
}


/* =========================================
   5. 交互组件
   ========================================= */
.top-trigger {
  position: fixed; top: max(24px, env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left));
  height: 36px; display: flex; align-items: center; padding: 0; z-index: 1002; cursor: pointer;
  transform: translate(calc(50vw - 36px), 75vh); 
  opacity: 0 !important; pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s linear;
}
body.scrolled .top-trigger { transform: translate(0, 0); opacity: 1 !important; pointer-events: auto; transition-delay: 0.1s; }

.dots-icon { display: flex; gap: 6px; padding: 10px; }
.dot { width: 5px; height: 5px; background: #000; border-radius: 50%; }

.convergence-stage { position: fixed; bottom: max(75px, env(safe-area-inset-bottom) + 15px); left: 50%; transform: translateX(-50%); width: 280px; height: 10px; z-index: 1001; opacity: 0; pointer-events: none; }
.c-dot { position: absolute; width: 8px; height: 8px; background: #000; border-radius: 50%; top: 1px; transition: opacity 0.2s ease; opacity: 0; }
.dot-1 { left: 0%; } .dot-2 { left: 33%; } .dot-3 { left: 66%; } .dot-4 { left: 100%; }
body.scrolled .convergence-stage { opacity: 1; }
body.scrolled .c-dot { opacity: 1; }
.converge-dots .c-dot { left: 50%; transform: scale(0); opacity: 0; transition: all 0.5s cubic-bezier(0.6, 0, 0.4, 1); }

.stage { position: fixed; inset: 0; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; z-index: 1; }
.center { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 24px; z-index: 1; }
.center > div { opacity: 1; }

.menu-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.92); z-index: 2000; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.overlay-link { font-size: 24px; letter-spacing: 2px; color: #000; text-decoration: none; transform: translateY(30px); opacity: 0; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease; }
.menu-overlay.open .overlay-link { transform: translateY(0); opacity: 1; }
.menu-overlay.open .overlay-link:nth-child(2) { transition-delay: 0.1s; }
.menu-overlay.open .overlay-link:nth-child(3) { transition-delay: 0.2s; }
.menu-overlay.open .overlay-link:nth-child(4) { transition-delay: 0.3s; }
.menu-overlay.open .overlay-link:nth-child(5) { transition-delay: 0.4s; }
.close-btn { position: absolute; top: max(24px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); height: 36px; display: flex; align-items: center; font-size: 14px; cursor: pointer; letter-spacing: 1px; color: #000; opacity: 0; transition: opacity 0.4s ease 0.5s; }
.menu-overlay.open .close-btn { opacity: 1; }

.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 3000; opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-modal { background: #fff; width: 90%; max-width: 480px; max-height: 80vh; overflow-y: auto; border-radius: 16px; padding: 32px 24px; text-align: center; transform: translateY(10px); opacity: 0; transition: all .3s ease; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.cart-overlay.open .cart-modal { transform: translateY(0); opacity: 1; }
.cart-title { font-size: 22px; margin: 0 0 8px; letter-spacing: 1px; }
.cart-desc { font-size: 16px; opacity: .9; letter-spacing: 1.2px; margin: 0 0 24px; }
.cart-close { padding: 12px 24px; border: 1px solid #e5e5e5; background: #fff; color: #000; cursor: pointer; border-radius: 8px; font-size: 12px; letter-spacing: 1px; transition: background 0.2s; }
.cart-close:active { background: #f0f0f0; }

.title, .archive-title { font-size: clamp(36px, 7.2vw, 96px); letter-spacing: 2px; margin: 0 0 12px; text-transform: uppercase; font-weight: 500; }
.sub { font-size: clamp(14px, 1.8vw, 20px); letter-spacing: 1px; opacity: .9; text-transform: uppercase; line-height: 2.4; }
.highlight { font-weight: 700; margin: 36px 0; display: inline-block; font-size: 1.2em; }
.lower { text-transform: none; letter-spacing: 0.2px; }

.archive-gallery { display: flex; flex-direction: column; align-items: center; gap: 250px; margin: 0 auto 300px; padding: 40px 24px 0; max-width: 1200px; position: relative; z-index: 1; }
.archive-item img { width: min(88vw, 1100px); border-radius: 8px; }
.caption { margin-top: 14px; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; opacity: .9; text-align: center; }

#nv-wrap { max-width: min(92vw, 960px); margin: 0 auto 300px; padding: 0 8px; position: relative; z-index: 1; }
#nv-wrap .tracklist { display: flex; flex-direction: column; gap: 96px; }
#nv-wrap .track-row { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 12px; }
#nv-wrap .track { width: min(92vw, 760px); margin: 0 auto; }
#nv-wrap .meta { display: flex; gap: 12px; align-items: center; }
#nv-wrap .idx { font: 12px ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; opacity: .8; }
#nv-wrap .name { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
#nv-wrap .time { font: 12px ui-monospace, Menlo, Consolas, monospace; min-width: 36px; text-align: center; opacity: .9; }
#nv-wrap .bar { appearance: none; width: 100%; height: 4px; background: rgba(0,0,0,0.133); border-radius: 999px; outline: none; }
#nv-wrap .bar::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #000; border: none; margin-top: -4px; }
#nv-wrap .bar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #000; border: none; }
#nv-wrap .pp { width: 32px; height: 32px; border: 1px solid #000; border-radius: 8px; background: #fff; display: grid; place-items: center; cursor: pointer; }
#nv-wrap .pp[data-state="play"]::after { content: "▶"; font-size: 12px; transform: translateX(1px); }
#nv-wrap .pp[data-state="pause"]::after { content: "❚❚"; font-size: 12px; }
#nv-wrap .highlight { margin-bottom: 120px !important; margin-top: 0; display: block; }
audio { display: none; }

.work-container { position: relative; z-index: 1; max-width: 960px; margin: 0 auto 160px; padding: 40px 24px 0; display: flex; flex-direction: column; gap: 48px; }
.work-img { width: 100%; height: auto; display: block; border-radius: 4px; }
.work-text { font-size: 16px; line-height: 1.8; opacity: 0.85; text-align: left; margin-bottom: 24px; }
.work-meta { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 24px; }
.back-to-archive { margin-top: 60px; text-align: center; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.5; transition: opacity 0.3s; cursor: pointer; }
.back-to-archive:hover { opacity: 1; }
.video-wrapper { width: 100%; margin-bottom: 24px; }
.work-video { width: 100%; height: auto; display: block; border-radius: 4px; background: #000; outline: none; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 150px; margin-top: 24px; width: 100%; }
.detail-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
@media (max-width: 600px) { .detail-grid { gap: 100px; } .detail-grid img { aspect-ratio: auto; } }

.work-audio-player { margin: 36px 0; padding: 0; }
.work-audio-player .audio-row { display: grid; grid-template-columns: 36px 1fr 40px 40px; align-items: center; gap: 12px; width: 100%; }
.work-audio-player .pp { width: 36px; height: 36px; border: 1px solid #000; border-radius: 8px; background: #fff; display: grid; place-items: center; cursor: pointer; box-sizing: border-box; }
.work-audio-player .pp::after { font-size: 12px; }
.work-audio-player .pp[data-state="play"]::after { content: "▶"; transform: translateX(1px); }
.work-audio-player .pp[data-state="pause"]::after { content: "❚❚"; }
.work-audio-player .bar { appearance: none; width: 100%; height: 4px; background: rgba(0,0,0,0.133); border-radius: 999px; outline: none; }
.work-audio-player .bar::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #000; border: none; margin-top: -4px; }
.work-audio-player .bar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #000; border: none; }
.work-audio-player .time { font: 12px ui-monospace, Menlo, Consolas, monospace; min-width: 36px; text-align: center; opacity: .9; }

/* =========================================
   6. 动画关键帧 (Keyframes)
   ========================================= */

/* [模糊显影动画] 从模糊变清晰，无位移 */
@keyframes blurIn {
  0% { opacity: 0; filter: blur(20px); }
  100% { opacity: 1; filter: blur(0); }
}

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }