/* ==========================================================================
   可楼物料志 · 深色展柜风样式
   仅原生 CSS,无外部资源
   ========================================================================== */

:root {
  --bg: #0a0c15;
  --bg-soft: #10131f;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f2eefb;
  --text-dim: #a89fc4;
  --text-faint: #6f6890;
  --accent: #9a5cff;
  --accent-2: #ff6fd0;
  --accent-3: #6fb0ff;
  --standee-w: min(356px, 82vw);   /* 立牌显示宽度(手机适配) */
  --angle: 0deg;                   /* 水平旋转,由 JS 驱动,恒在 ±9° */
  --tilt: 3deg;                    /* 轻微后仰,由 JS 驱动 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100svh;
  background:
    radial-gradient(120% 90% at 50% -10%, #171a2b 0%, var(--bg) 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(154, 92, 255, 0.4); color: #fff; }

button { font-family: inherit; }

/* ---------------------------------------------------------------- 背景氛围 */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.glow-a {
  width: 52vmax; height: 52vmax; left: -18vmax; top: -16vmax;
  background: radial-gradient(circle, rgba(94, 46, 180, 0.5), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.glow-b {
  width: 46vmax; height: 46vmax; right: -16vmax; bottom: -12vmax;
  background: radial-gradient(circle, rgba(210, 80, 170, 0.28), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

/* 细微胶片噪点(内联 data URI,无外部请求) */
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.035;
}

@keyframes drift-a { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-5vmax, -3vmax) scale(1.1); } }

/* ---------------------------------------------------------------- 首屏 */
.hero {
  position: relative;
  min-height: 100vh;   /* 旧浏览器回退 */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(28px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.masthead { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.28em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px rgba(255, 111, 208, 0.8);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.82); } }

.logo {
  margin-top: 10px;
  font-size: clamp(26px, 7.4vw, 34px);
  font-weight: 700; letter-spacing: 0.18em;
  background: linear-gradient(100deg, #fff 10%, #d9c8ff 55%, #ffb7e8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.tagline { margin-top: 6px; font-size: 13px; color: var(--text-dim); letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- 立牌舞台 */
.stage {
  position: relative;
  width: var(--standee-w);
  margin: 20px auto 0;
  perspective: 1300px;
  perspective-origin: 50% 30%;
  touch-action: pan-y;            /* 保留纵向滚动,横向交给立牌 */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.stage:active { cursor: grabbing; }

.stage-inner {
  position: relative;
  transform-style: preserve-3d;
}

/* 立牌:wrap 绕中轴水平旋转,内部绕底部轻微后仰 */
.standee-wrap {
  position: relative;
  z-index: 3;
  width: var(--standee-w);
  margin: 0 auto;
  transform-style: preserve-3d;
  transform: rotateY(var(--angle, 0deg));
  will-change: transform;
}
.standee {
  position: relative;
  transform-origin: 50% 100%;
  transform: rotateX(var(--tilt, 3deg));
  transform-style: preserve-3d;
}
.standee img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.42));
}

/* 边缘高光：克制的亚克力扫光，不盖住印刷主体 */
.edge-glare {
  position: absolute;
  inset: 1.5% 5%;
  pointer-events: none;
  border-radius: 45% 45% 18% 18%;
  background: linear-gradient(108deg,
    transparent 28%,
    rgba(255, 255, 255, 0.26) 43%,
    rgba(184, 220, 255, 0.12) 50%,
    transparent 61%);
  background-size: 230% 100%;
  background-position: 100% 0;
  mix-blend-mode: screen;
  opacity: 0.24;
  transition: opacity 120ms linear, background-position 120ms linear;
}
.edge-glare-b {
  display: none;
}

/* 亚克力椭圆底座：浅透、留白更充足，和实拍立牌的清雅色调统一 */
.acrylic-base {
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 136%;
  height: 72px;
  transform: translateX(-50%);
  z-index: 1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.34), transparent 48%),
    linear-gradient(180deg,
      rgba(225, 231, 229, 0.22) 0%,
      rgba(174, 207, 199, 0.12) 40%,
      rgba(70, 63, 95, 0.20) 72%,
      rgba(10, 8, 20, 0.54) 100%);
  border: 1px solid rgba(228, 238, 235, 0.26);
  box-shadow:
    inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    inset 0 3px 9px rgba(255, 255, 255, 0.20),
    0 26px 44px -20px rgba(0, 0, 0, 0.9);
}
.base-shine {
  position: absolute;
  left: 7%; right: 7%; top: 5%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.38), transparent 72%);
  pointer-events: none;
}

/* 插槽:底座中线上立牌插入处的缝隙,中央被立牌遮住,两侧露出 */
.slot {
  position: absolute;
  left: 50%; top: 50%;
  width: 100%;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(7, 5, 15, 0.92);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

/* 接触阴影:立牌底部在底座上的投影,中央被立牌遮住 */
.contact-shadow {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 112%;
  height: 30px;
  transform: translateX(-50%);
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), transparent 68%);
  filter: blur(5px);
  pointer-events: none;
}

.hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  pointer-events: none;
}

/* ---------------------------------------------------------------- 滚动提示 */
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-faint);
  font-size: 11px; letter-spacing: 0.32em;
  animation: cue-bob 2.2s ease-in-out infinite;
}
.cue-line {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, transparent, var(--accent-2), transparent);
  border-radius: 2px;
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-bob { 50% { transform: translateY(5px); } }
@keyframes cue-drop { 0% { transform: scaleY(0.4); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0.4); opacity: 0.4; } }

/* ---------------------------------------------------------------- 内容区 */
.content {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 22px 40px;
  display: flex; flex-direction: column; gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 22px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.info-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.info-head h2 {
  font-size: 20px; font-weight: 650; letter-spacing: 0.06em;
}

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  font-size: 12px; letter-spacing: 0.08em;
  color: #ffd3f0;
  background: rgba(255, 111, 208, 0.1);
  border: 1px solid rgba(255, 111, 208, 0.35);
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}
.badge-pulse::before { animation: pulse 1.8s ease-in-out infinite; }

.story {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
  padding-left: 12px;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--accent-2), var(--accent)) 1;
}
.story-sub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.meta-tags {
  margin-top: 18px;
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.meta-tags li {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #cdc3ec;
  padding: 5px 11px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.meta-tags li::before { content: "✦ "; color: var(--accent-2); font-size: 10px; }

/* ---------------------------------------------------------------- 按钮 */
.actions {
  display: flex; flex-direction: column; gap: 12px;
}
.btn {
  appearance: none; border: 0; cursor: pointer;
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 15px; letter-spacing: 0.06em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #6a2fd0, #b14fc2 60%, #e05a9e);
  background-size: 160% 100%;
  box-shadow: 0 10px 28px -10px rgba(154, 92, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { background-position: 90% 0; box-shadow: 0 14px 34px -10px rgba(176, 79, 194, 0.7); }

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }

.btn-link {
  color: var(--text-dim);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  padding: 6px 8px;
}
.btn-link:hover { color: #d9c8ff; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer {
  text-align: center;
  padding: 26px 20px max(34px, env(safe-area-inset-bottom));
}
.brand-line {
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--text-dim);
  background: linear-gradient(90deg, #c9b6ff, #ffb7e8, #9fd0ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.colophon {
  margin-top: 10px;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  left: 50%; bottom: max(28px, env(safe-area-inset-bottom));
  transform: translate(-50%, 24px);
  max-width: min(86vw, 420px);
  padding: 12px 18px;
  font-size: 14px; letter-spacing: 0.03em;
  color: #f6f1ff;
  background: rgba(24, 18, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 12px 34px -8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 桌面适配 */
@media (min-width: 720px) {
  .hero { padding-top: 44px; }
  .stage { margin-top: 26px; }

  .content {
    max-width: 700px;
    padding-top: 20px;
  }
  .panel { padding: 28px 30px; }
  .actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .btn { flex: 1 1 0; }
  .btn-link { flex: 1 1 100%; }
  .story { font-size: 17px; }
}

/* ---------------------------------------------------------------- 减弱动态偏好 */
@media (prefers-reduced-motion: reduce) {
  .glow, .dot, .scroll-cue, .cue-line, .badge-pulse::before {
    animation: none !important;
  }
  .edge-glare { transition: none; }
  .btn { transition: none; }
  html { scroll-behavior: auto; }
  * { scroll-behavior: auto !important; }
}
