/* ============================================================
   巨量影视 · 视觉设计体系（胶片放映室）
   对标 PPT「演示用PPT一键成片(4)」：取工业化四段与电影静帧质感，
   弃品红霓虹、流体底、英文眉题。色彩分层：页 / 主 / 复 / 子 / 孙。
   ============================================================ */

:root {
  /* 暗房片厂 v3 · 对齐验收原图 */
  --page: #09090A;
  --surface: #101012;
  --raised: #101012;
  --inset: #0C0C0E;
  --hair: rgba(143, 118, 64, 0.12);
  --ink: #09090A;
  --cream: #E8E2D8;
  --mute: #7A756E;
  --faint: #5a5650;
  --crimson: #A03434;
  --crimson-deep: #7A2828;
  --crimson-soft: #1A1010;
  --crimson-2: #A03434;
  --gold: #8F7640;
  --gold-light: #A08A55;
  --gold-dim: #5C4C2A;
  --amber-warm: #8F7640;

  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-slow: 1.4s;
  --dur-mid: 0.7s;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--page);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 页底：暗房，无品红流体 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--page);
  z-index: -3;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.halo {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: -2;
}
.halo--gold {
  width: 42vmax;
  height: 42vmax;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201, 168, 106, 0.07) 0%, rgba(201, 168, 106, 0) 64%);
}
.halo--crimson {
  width: 32vmax;
  height: 32vmax;
  right: -8vmax;
  bottom: -6vmax;
  background: radial-gradient(circle, rgba(127, 29, 34, 0.14) 0%, rgba(127, 29, 34, 0) 64%);
}
@keyframes halo-breathe {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

/* ---------- Canvas 粒子尘埃 ---------- */
#dust {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- 顶部导航 ---------- */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 56px);
  background: linear-gradient(to bottom, rgba(10, 8, 8, 0.92) 0%, rgba(10, 8, 8, 0) 100%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}
.brand__seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--gold-light);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  background: var(--crimson);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.08em;
}
.masthead__nav {
  display: flex;
  gap: clamp(18px, 2.5vw, 40px);
}
.masthead__nav a {
  color: rgba(247, 234, 211, 0.72);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: color 0.3s;
  position: relative;
}
.masthead__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1.5px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.4s var(--ease-out);
}
.masthead__nav a:hover { color: var(--gold-light); }
.masthead__nav a:hover::after { width: 100%; }
.masthead__nav a.nav--active { color: var(--gold-light); }
.masthead__nav a.nav--active::after { width: 100%; }
.masthead__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ---------- 按钮 ---------- */
.btn {
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: 0.04em;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.35s, color 0.35s, border-color 0.35s;
  position: relative;
}
.btn:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}
.btn--gold {
  color: #1a1208;
  font-weight: 700;
  background: var(--gold);
  box-shadow: none;
}
.btn--gold:hover {
  transform: translateY(-1px);
  background: var(--gold-light);
  box-shadow: none;
}
.btn--ghost {
  color: var(--cream);
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--hair);
}
.btn--ghost:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.06);
}
.btn--sm { padding: 9px 22px; font-size: 14px; }
.btn--lg { padding: 16px 40px; font-size: 16px; }
.btn__inner { position: relative; z-index: 1; }

/* ---------- 首屏舞台 ---------- */
.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px clamp(20px, 4vw, 56px) 96px;
  overflow: hidden;
  isolation: isolate;
}

/* 金色追光：从顶部斜射而下 */
.spotlight {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 28vw;
  height: 140%;
  transform: translateX(-50%) rotate(4deg);
  background: linear-gradient(to bottom,
    rgba(201, 168, 106, 0) 0%,
    rgba(201, 168, 106, 0.08) 36%,
    rgba(201, 168, 106, 0) 100%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
@keyframes spotlight-sway {
  from { transform: translateX(-50%) rotate(4deg) skewX(0deg); opacity: 0.85; }
  to   { transform: translateX(-50%) rotate(9deg) skewX(1.5deg); opacity: 1; }
}

/* 聚光底部辉光椭圆 */
.footlight {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 58vmax;
  height: 16vmax;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(246, 226, 122, 0.22) 0%, rgba(212, 175, 55, 0.08) 45%, rgba(212, 175, 55, 0) 70%);
  filter: blur(12px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- 大幕：左右两片 ---------- */
.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  background: linear-gradient(to bottom, #4a1216 0%, #2a0c0e 100%);
  z-index: -1;
  opacity: 0.7;
}
.curtain--left {
  left: 0;
  transform-origin: left center;
  border-right: 2px solid rgba(246, 226, 122, 0.4);
}
.curtain--right {
  right: 0;
  transform-origin: right center;
  border-left: 2px solid rgba(246, 226, 122, 0.4);
}
/* 大幕褶皱：重复垂直线条营造织物质感 */
.curtain__pleat {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to right,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 26px,
    rgba(0, 0, 0, 0.28) 28px,
    rgba(0, 0, 0, 0) 30px,
    rgba(255, 255, 255, 0.06) 44px,
    rgba(255, 255, 255, 0) 46px);
}
/* 大幕底部金边 */
.curtain--left::after,
.curtain--right::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), var(--gold-light), var(--gold-dim), transparent);
  opacity: 0.6;
}
/* 加载动画：两侧向中央合拢后拉开 */
.stage.is-live .curtain--left { animation: curtain-open-left 1.6s var(--ease-out) 0.15s both; }
.stage.is-live .curtain--right { animation: curtain-open-right 1.6s var(--ease-out) 0.15s both; }
@keyframes curtain-open-left {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}
@keyframes curtain-open-right {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ---------- 中央文案 ---------- */
.stage__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: none;
}

.eyebrow {
  display: none;
}

.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 11vw, 118px);
  line-height: 1.05;
  letter-spacing: 0.28em;
  margin-bottom: 28px;
  color: var(--cream);
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.title__line {
  display: block;
}
.title__line--gold {
  color: var(--gold);
  padding-bottom: 0.08em;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

.subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: rgba(247, 234, 211, 0.85);
  margin-bottom: 42px;
  max-width: 34em;
}

.stage__cta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}

.hint {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: rgba(247, 234, 211, 0.45);
  text-transform: uppercase;
}

/* ---------- 底部能力锚点 ---------- */
.stage__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
  padding: 22px clamp(20px, 4vw, 56px);
  border-top: 1px solid rgba(212, 175, 55, 0.16);
  background: linear-gradient(to top, rgba(20, 10, 12, 0.9) 0%, rgba(20, 10, 12, 0) 100%);
  opacity: 1;
}
.capability {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.capability__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  opacity: 0.7;
}
.capability__label {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: rgba(247, 234, 211, 0.72);
  white-space: nowrap;
}
.capability__state {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(247, 234, 211, 0.42);
}
.capability[data-ready="1"] .capability__state {
  color: var(--gold);
}

/* 滚动静默指示 */
.stage__scroll {
  position: absolute;
  right: clamp(22px, 4vw, 54px);
  bottom: 110px;
  z-index: 3;
  width: 1px;
  height: 64px;
  opacity: 0;
  transition: opacity 1s var(--ease-out) 1.4s;
}
.stage.is-live .stage__scroll { opacity: 0.8; }
.stage__scroll-line {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--gold-light));
  transform-origin: top;
  animation: scroll-drop 2.4s var(--ease-soft) infinite;
}
@keyframes scroll-drop {
  0%   { transform: scaleY(0); }
  55%  { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- 移动端（App 竖屏） ---------- */
@media (max-width: 820px) {
  .masthead {
    padding: 16px 20px;
  }
  .masthead__nav {
    display: none;
  }
  .masthead__actions .btn--ghost {
    display: none;
  }
  .brand__name {
    font-size: 16px;
  }
  .brand__seal {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .stage {
    padding: 110px 24px 120px;
  }
  .spotlight {
    width: 70vw;
  }
  .curtain {
    width: 60%;
  }

  .title {
    font-size: clamp(56px, 20vw, 84px);
    margin-bottom: 26px;
  }
  .subtitle {
    font-size: 15px;
    line-height: 1.85;
  }
  .stage__cta {
    flex-direction: column;
    width: min(100%, 320px);
    gap: 14px;
  }
  .stage__cta .btn--lg {
    width: 100%;
  }
  .hint {
    font-size: 11px;
    letter-spacing: 0.24em;
  }

  .stage__footer {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 18px 24px 26px;
  }
  .capability__tag { font-size: 10px; }
  .capability__label { font-size: 12px; letter-spacing: 0.06em; }

  .stage__scroll {
    display: none;
  }
}

/* ============================================================
   多视图布局（SPA）
   ============================================================ */
.views {
  position: relative;
}

.view {
  display: none;
  min-height: 100svh;
}
.view--home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

/* 视图切换（由 app.js 切换 body[data-view]） */
body[data-view="home"] .view--home { display: flex; }
body[data-view="agent"] .view--agent { display: block; }
body[data-view="market"] .view--market { display: block; }
body[data-view="canvas"] .view--canvas { display: block; }
body[data-view="library"] .view--library { display: block; }
body[data-view="detail"] .view--detail { display: block; }
body[data-view="player"] .view--player { display: block; }
body[data-view="studio"] .view--studio { display: block; }
body[data-view="assets"] .view--assets { display: block; }
body[data-view="me"] .view--me { display: block; }

/* 非首页时顶栏实底 */
body:not([data-view="home"]) .masthead {
  background: rgba(20, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}
body:not([data-view="home"]) .view--home {
  display: none !important;
}

/* 非首页时，粒子保持全屏 */
body:not([data-view="home"]) #dust {
  opacity: 0.5;
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
