/* ================================================================
   Beat Ultimate — Apple-inspired Design System
   Shared across index.html, shop.html, culture.html
   ================================================================ */

/* ============ 设计参数 ============ */
:root {
  --nav-h: 48px;
  --max-w: 1080px;
  --bg: #000000;
  --bg-card: #1c1c1e;
  --text: #f5f5f7;
  --text-mute: #86868b;
  --text-dim: #6e6e73;
  --border: rgba(255,255,255,.08);
  --border-hover: rgba(255,255,255,.18);
  --radius: 18px;
  --radius-lg: 22px;
  --radius-pill: 980px;
  --spring-damping: 1.0;
  --spring-response: 0.4;
}

/* ============ 基础重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

html.menu-locked { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

::selection { background: rgba(255,255,255,.25); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ============ 导航栏 ============ */
.nav {
  height: var(--nav-h);
  background: rgba(0,0,0,.32);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease, background-color .4s ease;
}

.nav.is-scrolled {
  background: rgba(0,0,0,.72);
  border-bottom-color: var(--border);
}

.nav.menu-open {
  background: #000;
  border-bottom-color: transparent;
}

.nav-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}

.nav-link {
  font-size: 13px;
  letter-spacing: .05em;
  color: rgba(255,255,255,.62);
  transition: color .3s ease;
}

.nav-link:hover { color: #fff; }
.nav-link.is-current { color: #fff; }

/* 汉堡按钮 */
.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -12px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--text);
  transition: transform .4s ease, top .4s ease;
}

.nav-toggle span:nth-child(1) { top: 19px; }
.nav-toggle span:nth-child(2) { top: 25px; }

.menu-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.nav-toggle:active {
  transform: scale(.94);
  transition: transform .1s ease-out;
}

/* 手机菜单 */
.mobile-menu {
  position: fixed;
  z-index: 40;
  top: var(--nav-h);
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  padding: 32px 24px;
  background: rgba(0,0,0,.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0,-12px,0);
  transition: opacity .45s ease, visibility .45s, transform .45s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-menu li {
  opacity: 0;
  transform: translate3d(0,8px,0);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--i,0) * .05s + .1s);
  list-style: none;
}

.mobile-menu.is-open li {
  opacity: 1;
  transform: none;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  transition: color .3s ease;
}

.mobile-menu a:hover { color: var(--text-mute); }

/* ============ Hero 首屏 ============ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 24px;
  text-align: center;
}

.hero-group { will-change: transform, opacity; }

.hero-title {
  font-size: clamp(3.5rem, 10.5vw, 9.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
  background: linear-gradient(180deg, #fff 30%, #a1a1a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  font-size: clamp(1.0625rem, .9rem + .8vw, 1.5rem);
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--text-mute);
}

.hero-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--text-mute);
}

@media (max-width: 539px) {
  .hero-title { font-size: 19vw; line-height: 1.02; letter-spacing: -.04em; }
  .hero-word { display: block; }
}

/* ============ 通用板块 ============ */
.section {
  position: relative;
  padding-block: clamp(7rem, 16vw, 13rem);
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(var(--max-w), calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}

.label {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-mute);
}

.statement {
  max-width: 22em;
  margin-inline: auto;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .005em;
  color: var(--text-mute);
  text-wrap: balance;
}

.statement b { font-weight: inherit; color: #fff; }

.page-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 30%, #a1a1a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.sub-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -.03em;
}

/* ============ LOGO ============ */
.logo {
  width: 100%;
  height: auto;
  filter: invert(1) contrast(1.25);
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, rgba(0,0,0,.7) 72%, transparent 92%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, rgba(0,0,0,.7) 72%, transparent 92%);
}

.logo-wrap {
  position: relative;
}

.logo-wrap::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.06) 0%, transparent 65%);
  pointer-events: none;
}

.wordmark {
  aspect-ratio: 12/1;
  overflow: hidden;
}

.wordmark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: invert(1) contrast(1.25);
}

/* ============ 卡片 ============ */
.card {
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(200px, 26vw, 340px);
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 45%), rgba(28,28,30,.72);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  backdrop-filter: blur(12px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 48px -32px rgba(0,0,0,.9);
  will-change: transform;
  transition: border-color .4s ease, background-color .4s ease, box-shadow .4s ease;
  cursor: default;
}

.card:hover {
  border-color: var(--border-hover);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,0) 45%), #0e0e0e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 36px 64px -28px rgba(0,0,0,1);
}

.card:active {
  transform: scale(.985)!important;
  transition: transform .1s ease-out;
}

.card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  background: radial-gradient(320px circle at var(--cx,50%) var(--cy,50%), rgba(255,255,255,.08) 0%, rgba(255,255,255,.02) 40%, transparent 70%);
}

.card:hover .card-glow { opacity: 1; }

.card-title {
  font-size: clamp(1.375rem, 1.1rem + .8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -.005em;
  color: #fff;
}

.card-text {
  margin-top: .75rem;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
  letter-spacing: .01em;
  color: var(--text-mute);
}

/* ============ 商品卡片 ============ */
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(28,28,30,.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color .4s ease, transform .4s ease, box-shadow .4s ease;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 36px 64px -28px rgba(0,0,0,1);
}

.product-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1c1c1e, #0a0a0a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.28,0,.18,1);
}

.product-card:hover .product-img img {
  transform: scale(1.03);
}

/* ============ 徽章 ============ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
}

/* ============ 按钮 / 渠道 ============ */
.channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  transition: all .3s ease;
  text-decoration: none;
}

.channel-taobao {
  background: #fff;
  color: #000;
}

.channel-taobao:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
}

.channel-douyin {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}

.channel-douyin:hover {
  border-color: rgba(255,255,255,.6);
  transform: translateY(-2px);
}

/* ============ 音乐播放器 ============ */
.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}

.play-btn:hover { transform: scale(1.08); }
.play-btn.playing { background: #1a1a1a; color: #fff; }

.progress-bar {
  height: 3px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width .1s linear;
}

/* ============ 漫画封面 ============ */
.chapter-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #1c1c1e, #0a0a0a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chapter-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.28,0,.18,1);
}

.card:hover .chapter-cover img { transform: scale(1.03); }

.chapter-num {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: rgba(255,255,255,.08);
  letter-spacing: -.04em;
}

/* ============ 联系 ============ */
.contact-mail {
  font-size: clamp(1.125rem, .75rem + 2.6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  color: rgba(255,255,255,.92);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  text-decoration-color: rgba(255,255,255,.25);
  transition: color .4s ease, text-decoration-color .4s ease;
}

.contact-mail:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,.9);
}

/* ============ 登录弹窗 ============ */
#login-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

#login-modal > div:first-child {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #1c1c1e;
}

/* ============ 页脚 ============ */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ============ 滚动驱动透明度 ============ */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  will-change: opacity, transform;
}

.js .intro {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .intro { opacity: 1; transform: none; }
}

/* ============ 鼠标光影 ============ */
.section-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity .6s ease;
  background: radial-gradient(520px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.05) 0%, rgba(255,255,255,.018) 40%, transparent 72%);
}

.section-glow.is-active { opacity: 1; }

.section-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  opacity: 0;
  transition: opacity .6s ease;
  background: radial-gradient(380px circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.06) 0%, transparent 70%);
}

.section-glow.is-active::after { opacity: .6; }

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,.055) 0%, rgba(255,255,255,.02) 35%, transparent 70%);
  transform: translate3d(-50%,-50%,0);
  will-change: transform;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .8s ease-out;
}

.cursor-glow.is-active { opacity: 1; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.7));
  z-index: 60;
  pointer-events: none;
}

/* ============ 无障碍 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card:hover { transition: none; }
  .card:active { transform: none!important; }
  .mobile-menu, .mobile-menu li { transition: none; }
  .nav-toggle:active { transform: none; }
}

@media (prefers-reduced-motion: reduce), (prefers-reduced-transparency: reduce) {
  .card-glow, .section-glow, .cursor-glow { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: rgba(0,0,0,.92); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav.is-scrolled { background: #000; }
  .mobile-menu { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  .nav { border-bottom: 1px solid rgba(255,255,255,.3); }
  .card { border-color: rgba(255,255,255,.2); }
  .card:hover { border-color: rgba(255,255,255,.4); }
  .statement { color: #a8a8ad; }
}

/* ============ 响应式微调 ============ */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
}

@media (max-width: 767px) {
  .nav ul.hidden { display: none; }
}
