/* ============================================
   XIM Studio — 子页面专用样式表
   极简黑白 · 电影级沉浸
   共享底座：所有品牌子页面共用
   ============================================ */

/* ---------- 设计令牌（与 home.css 保持一致） ---------- */
:root {
  --bg-deep: #000000;
  --bg-dark: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #181818;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-active: rgba(255, 255, 255, 0.25);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.35);
  --accent: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --accent-glow-strong: rgba(255, 255, 255, 0.15);

  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --space-section: 8rem;
  --space-section-mobile: 4rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* ---------- 选中 ---------- */
::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ---------- 噪点纹理 ---------- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 自定义光标 ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px; height: 6px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.cursor.hovering .cursor-ring {
  width: 60px; height: 60px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.cursor.clicking .cursor-ring {
  transform: translate(-50%, -50%) scale(0.8);
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  z-index: 10000;
}
.scroll-progress-bar {
  height: 100%; width: 0%;
  background: #ffffff;
  transition: width 0.1s linear;
}

/* ---------- 导航栏（子页面版） ---------- */
.sub-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 9999;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  transition: all var(--transition-base);
}

.sub-nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  mix-blend-mode: normal;
}

.sub-nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-decoration: none;
}

.sub-nav-logo span {
  font-weight: 300;
  opacity: 0.5;
}

.sub-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.sub-nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-fast);
}

.sub-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: #ffffff;
  transition: width var(--transition-base), left var(--transition-base);
}

.sub-nav-link:hover { color: #ffffff; }
.sub-nav-link:hover::after { width: 100%; left: 0; }

.sub-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
  z-index: 10001;
}

.sub-nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #ffffff;
  transition: all 0.3s ease;
  transform-origin: center;
}

.sub-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.sub-nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sub-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 768px) {
  .sub-nav { padding: 1rem 1.5rem; }
  .sub-nav.scrolled { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .sub-nav-links { display: none; }
  .sub-nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .sub-nav { padding: 0.875rem 1.25rem; }
}

/* ---------- 移动端菜单 ---------- */
.sub-mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.97);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.sub-mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.sub-mobile-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.sub-mobile-link:hover { color: #ffffff; }

/* ---------- 页面转场遮罩 ---------- */
.page-transition {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100003;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.page-transition-half {
  flex: 1;
  background: #000000;
  transform: scaleY(0);
  transform-origin: top;
}

.page-transition-half:last-child { transform-origin: bottom; }

/* ---------- 子页面通用内容区 ---------- */
.sub-hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.sub-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.5) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.sub-hero-content {
  text-align: center;
  z-index: 2;
  padding: 2rem;
  max-width: 800px;
}

.sub-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.sub-hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- 通用 section ---------- */
.sub-section {
  position: relative;
  padding: var(--space-section) 2rem;
  z-index: 1;
  background: var(--bg-dark);
}

.sub-section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.sub-section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.sub-section-label::after {
  content: '◆';
  display: block;
  font-size: 0.4rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  opacity: 0.4;
}

.sub-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.sub-section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 300;
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 9990;
  width: 44px; height: 44px;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- 页脚 ---------- */
.sub-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

.sub-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.sub-footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.sub-footer-brand span { opacity: 0.5; font-weight: 300; }

.sub-footer-links {
  display: flex;
  gap: 2rem;
}

.sub-footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.sub-footer-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--text-secondary);
  transition: width var(--transition-base);
}

.sub-footer-link:hover { color: var(--text-primary); }
.sub-footer-link:hover::after { width: 100%; }

.sub-footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.sub-section-divider {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 80%, transparent 100%);
}

/* ---------- 通用按钮 ---------- */
.sub-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  overflow: hidden;
  transition: all var(--transition-base), transform var(--transition-bounce);
}

.sub-btn-primary {
  background: #ffffff;
  color: #000000;
  border: none;
}

.sub-btn-primary:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

.sub-btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border-medium);
}

.sub-btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.sub-btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.sub-btn-back:hover { color: var(--text-primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .sub-section { padding: var(--space-section-mobile) 1.25rem; }
  .back-to-top { bottom: 1.25rem; right: 1.25rem; width: 40px; height: 40px; }
  .sub-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .sub-footer-links { flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
}
