/* Anything — Editorial Typography × Liquid Glass × Single Screen */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/instrument-serif@5.1.0/files/instrument-serif-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/instrument-serif@5.1.0/files/instrument-serif-latin-400-italic.woff2") format("woff2");
}

:root {
  --bg: #040508;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --gold: #f5c451;
  --serif: "Instrument Serif", "Didot", "Bodoni MT", "Baskerville", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }

/* ---------- 背景层：全屏视频 / 3D 星球 ---------- */

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.72;
}

#cosmos {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  cursor: grab;
}

#cosmos:active { cursor: grabbing; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(56% 52% at 64% 50%, rgba(108, 149, 255, 0.09), transparent 72%),
    linear-gradient(90deg, rgba(4, 5, 8, 0.8) 0%, rgba(4, 5, 8, 0.3) 48%, rgba(4, 5, 8, 0.12) 100%),
    radial-gradient(100% 100% at 50% 50%, transparent 44%, rgba(4, 5, 8, 0.68) 100%);
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 右上角：双图标液态毛玻璃语言切换 ---------- */

.lang-switch {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 30;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.025) 100%);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.lang-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.34s var(--ease);
  pointer-events: none;
}

.lang-switch[data-lang="en"] .lang-thumb {
  transform: translateX(26px);
}

.lang-item {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: color 0.22s;
}

.lang-item svg {
  width: 12px;
  height: 12px;
}

.lang-item:hover { color: rgba(255, 255, 255, 0.82); }
.lang-item.active { color: #ffffff; }

/* ---------- 唯一一屏前景 ---------- */

.stage {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 clamp(28px, 8.5vw, 128px);
  pointer-events: none;
}

.hero {
  pointer-events: auto;
}

/* 衬线编辑体大字 + 逐字聚焦入场 */
.word {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(78px, 12.2vw, 162px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.72);
  user-select: none;
}

.word span {
  display: inline-block;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  opacity: 0;
  transform: translateY(0.18em) scale(0.97);
  filter: blur(12px);
  background: linear-gradient(180deg, #ffffff 18%, #e4ecff 78%, #bac8e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: letterFocus 980ms var(--ease) forwards;
  animation-delay: calc(var(--i) * 48ms + 60ms);
}

.word span:first-child {
  font-style: italic;
  padding-left: 0.14em;
  margin-left: -0.14em;
  padding-right: 0.08em;
  margin-right: -0.04em;
}

@keyframes letterFocus {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* ---------- 紧凑液态毛玻璃操作坞 ---------- */

.dock {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  animation: dockRise 920ms var(--ease) 440ms both;
}

@keyframes dockRise {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.glass-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.26s var(--ease), border-color 0.25s, box-shadow 0.28s, background 0.25s;
}

.btn-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(100px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 70%);
  transition: opacity 0.25s ease;
}

.glass-btn:hover .btn-glow { opacity: 1; }

/* 下载：透亮冷白液态毛玻璃（紧凑一体胶囊） */
.glass-primary {
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.23) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: #ffffff;
  box-shadow:
    0 14px 34px -12px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.glass-primary:hover {
  transform: translateY(-1.5px);
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.31) 0%, rgba(255, 255, 255, 0.14) 100%);
  box-shadow:
    0 18px 40px -10px rgba(108, 149, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.os-ico {
  flex: none;
  color: #ffffff;
  opacity: 0.92;
}

.os-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(5, 7, 14, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.84);
}

/* 鼓励一下：暖金微光烟熏毛玻璃（无多余图标，纯字克制） */
.glass-support {
  padding: 0 18px;
  border-color: rgba(245, 196, 81, 0.34);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.14) 0%, rgba(245, 196, 81, 0.05) 100%);
  color: #fff2cc;
  box-shadow:
    0 14px 34px -12px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 232, 163, 0.38);
}

.glass-support .btn-glow {
  background: radial-gradient(100px circle at var(--mx, 50%) var(--my, 50%), rgba(245, 196, 81, 0.34), transparent 70%);
}

.glass-support:hover {
  transform: translateY(-1.5px);
  border-color: rgba(245, 196, 81, 0.62);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.22) 0%, rgba(245, 196, 81, 0.08) 100%);
  box-shadow:
    0 18px 40px -10px rgba(245, 196, 81, 0.26),
    inset 0 1px 0 rgba(255, 238, 186, 0.54);
  color: #ffffff;
}

/* ---------- 毛玻璃弹窗 ---------- */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(14px);
}

.modal-card {
  position: relative;
  z-index: 1;
  padding: 34px 32px 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.84) 0%, rgba(9, 11, 18, 0.92) 100%);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 36px 90px -24px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: modalIn 260ms var(--ease) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.icon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 16px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.icon-close:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }

.icon-back {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.icon-back:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }

.choice-grid[hidden], .qr-reveal[hidden] { display: none; }

.choice-grid {
  display: flex;
  gap: 14px;
  padding-top: 8px;
}

.choice-tile {
  width: 124px;
  height: 118px;
  padding: 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.24s var(--ease), border-color 0.22s, background 0.22s, box-shadow 0.24s;
}

.choice-tile:hover {
  transform: translateY(-2px);
}

.tile-support:hover {
  border-color: rgba(245, 196, 81, 0.52);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.16) 0%, rgba(245, 196, 81, 0.04) 100%);
  box-shadow: 0 14px 32px -12px rgba(245, 196, 81, 0.28);
}

.tile-contact:hover {
  border-color: rgba(128, 168, 255, 0.52);
  background: linear-gradient(180deg, rgba(128, 168, 255, 0.16) 0%, rgba(128, 168, 255, 0.04) 100%);
  box-shadow: 0 14px 32px -12px rgba(108, 149, 255, 0.28);
}

.tile-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tile-support .tile-ico { color: var(--gold); }
.tile-contact .tile-ico { color: #9ec0ff; }

.tile-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.qr-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  animation: modalIn 220ms var(--ease) both;
}

.qr-img-lg {
  width: 210px;
  height: 210px;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  cursor: zoom-in;
}

.qr-reveal-label {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 灯箱 & Toast ---------- */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(3, 4, 8, 0.92);
  cursor: zoom-out;
}

.lightbox img {
  width: min(320px, 84vw);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translate(-50%, 14px);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 15, 24, 0.84);
  backdrop-filter: blur(16px);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s var(--ease);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .lang-switch { top: 20px; right: 20px; }
  .stage { align-items: flex-end; padding-bottom: 13vh; }
  .word { margin-bottom: 22px; }
  .qr-grid { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .word span { animation: none; opacity: 1; transform: none; filter: none; }
  .dock { animation: none; }
}
