:root {
  --ink: #140a0c;
  --wine: #5c1a22;
  --cinnabar: #8b1e2d;
  --gold: #f0c35a;
  --gold-bright: #ffe29a;
  --gold-deep: #b8862d;
  --cream: #f7ecd2;
  --muted: rgba(247, 236, 210, 0.68);
  --font-brand: "Ma Shan Zheng", "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-title: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Serif SC", "Songti SC", serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --mx: 0;
  --my: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body {
  position: relative;
  cursor: auto;
}

img,
a {
  -webkit-user-drag: none;
  user-select: none;
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere__photo {
  position: absolute;
  inset: -10%;
  background:
    linear-gradient(180deg, rgba(20, 10, 12, 0.5), rgba(20, 10, 12, 0.84)),
    url("./assets/bg-home.jpg") center / cover no-repeat;
  transform: scale(1.08) translate3d(calc(var(--mx) * -12px), calc(var(--my) * -8px), 0);
  filter: saturate(0.88) contrast(1.08) sepia(0.12);
  animation: drift 18s ease-in-out infinite alternate;
  will-change: transform;
}

.atmosphere__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 28%, rgba(92, 26, 34, 0.52), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(20, 10, 12, 0.96), transparent 55%),
    linear-gradient(180deg, rgba(20, 10, 12, 0.28), rgba(20, 10, 12, 0.78));
}

.atmosphere__glow {
  position: absolute;
  left: 50%;
  top: 16%;
  width: min(78vw, 620px);
  height: min(78vw, 620px);
  transform: translate(-50%, -20%);
  background: radial-gradient(circle, rgba(240, 195, 90, 0.34), transparent 68%);
  filter: blur(10px);
  animation: pulse 5.5s ease-in-out infinite;
}

.atmosphere__cloud {
  position: absolute;
  width: min(48vw, 360px);
  height: min(18vw, 120px);
  opacity: 0.18;
  background:
    radial-gradient(ellipse 40% 55% at 30% 55%, rgba(255, 226, 154, 0.55), transparent 70%),
    radial-gradient(ellipse 45% 60% at 58% 48%, rgba(255, 226, 154, 0.4), transparent 72%),
    radial-gradient(ellipse 35% 50% at 78% 58%, rgba(240, 195, 90, 0.35), transparent 70%);
  filter: blur(2px);
  animation: cloud-drift 26s ease-in-out infinite alternate;
}

.atmosphere__cloud--a {
  top: 12%;
  left: -8%;
}

.atmosphere__cloud--b {
  top: 22%;
  right: -10%;
  width: min(42vw, 300px);
  animation-duration: 34s;
  animation-direction: alternate-reverse;
  opacity: 0.14;
}

.atmosphere__ring {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(88vw, 520px);
  height: min(88vw, 520px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(240, 195, 90, 0.16);
  box-shadow:
    0 0 40px rgba(240, 195, 90, 0.08) inset,
    0 0 60px rgba(240, 195, 90, 0.06);
  animation: spin 32s linear infinite;
}

.atmosphere__ring::before,
.atmosphere__ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright), var(--gold-deep) 55%, transparent 70%);
  box-shadow: 0 0 18px rgba(255, 226, 154, 0.65);
}

.atmosphere__ring::before {
  width: 10px;
  height: 10px;
  top: -5px;
  left: calc(50% - 5px);
}

.atmosphere__ring::after {
  width: 7px;
  height: 7px;
  bottom: 18%;
  right: 8%;
  opacity: 0.75;
}

.atmosphere__ring--slow {
  width: min(98vw, 640px);
  height: min(98vw, 640px);
  border-color: rgba(240, 195, 90, 0.1);
  animation-duration: 52s;
  animation-direction: reverse;
  opacity: 0.7;
}

.atmosphere__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(2.5rem, 6vh, 4rem);
  padding:
    calc(var(--safe-top) + clamp(2rem, 6vh, 4rem))
    1.25rem
    calc(var(--safe-bottom) + 2rem);
  text-align: center;
}

.brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  opacity: 0;
  transform: translateY(22px) scale(0.96);
}

.brand.is-in {
  animation: brand-in 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.brand__halo {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(70vw, 360px);
  height: min(28vw, 140px);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(255, 226, 154, 0.35), transparent 70%);
  filter: blur(18px);
  animation: halo-breathe 3.2s ease-in-out infinite;
  pointer-events: none;
}

.brand__orbit {
  position: absolute;
  top: 38%;
  left: 50%;
  width: min(92vw, 460px);
  height: min(42vw, 210px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.brand__spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px rgba(255, 226, 154, 0.9);
  animation: orbit 7.5s linear infinite;
  animation-delay: calc(var(--i) * -1.25s);
  offset-path: ellipse(48% 58% at 50% 50%);
  offset-distance: calc(var(--i) * 16.66%);
}

@supports not (offset-path: ellipse(50% 50%)) {
  .brand__spark {
    animation: spark-float 3.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.35s);
    transform: rotate(calc(var(--i) * 60deg)) translateX(min(38vw, 190px));
  }
}

.brand__banner {
  position: relative;
  display: block;
  width: min(88vw, 420px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5));
  animation: brand-float 4.8s ease-in-out infinite;
  transform-origin: center;
}

.brand.is-in .brand__banner {
  animation:
    brand-pop 0.85s cubic-bezier(0.22, 1, 0.36, 1) both,
    brand-float 4.8s ease-in-out 0.85s infinite,
    shimmer-glow 3.6s ease-in-out 1s infinite;
}

.brand__line {
  margin: 0;
  max-width: 22em;
  font-family: var(--font-brand);
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  letter-spacing: 0.28em;
  color: var(--gold-bright);
  text-shadow:
    0 2px 0 #3a1016,
    0 0 18px rgba(240, 195, 90, 0.35);
  animation: line-flicker 5s ease-in-out infinite;
}

.entries {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  opacity: 0;
  transform: translateY(18px);
}

.entries.is-in {
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

.entry {
  position: relative;
  display: grid;
  gap: 0.35rem;
  min-width: 8.5rem;
  padding: 0.95rem 1.45rem;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.28s ease;
  overflow: hidden;
}

@media (hover: none), (pointer: coarse) {
  .entry {
    cursor: pointer;
  }
}

.entry + .entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(240, 195, 90, 0.5), transparent);
}

.entry__burst {
  position: absolute;
  inset: 20% 10%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 226, 154, 0.28), transparent 70%);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.entry__label {
  position: relative;
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: 0.18em;
  color: #fff1c2;
  text-shadow:
    0 1px 0 #5a1520,
    0 3px 0 #2a0b10,
    0 0 22px rgba(240, 195, 90, 0.4);
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease,
    letter-spacing 0.25s ease,
    filter 0.25s ease;
}

.entry[data-tone="digital"] .entry__label {
  letter-spacing: 0.22em;
}

.entry__hint {
  position: relative;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.25s ease;
}

.entries.is-in .entry {
  animation: entry-land 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.entries.is-in .entry:nth-child(1) { animation-delay: 0.28s; }
.entries.is-in .entry:nth-child(2) { animation-delay: 0.4s; }
.entries.is-in .entry:nth-child(3) { animation-delay: 0.52s; }
.entries.is-in .entry:nth-child(4) { animation-delay: 0.64s; }
.entries.is-in .entry:nth-child(5) { animation-delay: 0.76s; }

.entry[data-tone="custom"] .entry__label {
  letter-spacing: 0.16em;
}

.entries[data-loading="1"] {
  min-height: 4.5rem;
}

.entry:hover,
.entry:focus-visible {
  transform: translateY(-4px) scale(1.04);
  outline: none;
  filter: drop-shadow(0 10px 24px rgba(240, 195, 90, 0.18));
}

.entry:hover .entry__burst,
.entry:focus-visible .entry__burst {
  opacity: 1;
  transform: scale(1.15);
}

.entry:hover .entry__label,
.entry:focus-visible .entry__label {
  color: #fffadf;
  letter-spacing: 0.24em;
  filter: brightness(1.08);
  text-shadow:
    0 1px 0 #5a1520,
    0 3px 0 #2a0b10,
    0 0 18px rgba(255, 226, 154, 0.7),
    0 0 36px rgba(240, 195, 90, 0.45);
}

.entry:hover .entry__hint,
.entry:focus-visible .entry__hint {
  color: rgba(247, 236, 210, 0.9);
}

.entry:active {
  transform: translateY(-1px) scale(0.98);
}

.entry:focus-visible .entry__label {
  box-shadow: inset 0 -2px 0 var(--gold);
}

@media (max-width: 640px) {
  .entries {
    flex-direction: column;
    width: min(100%, 280px);
    gap: 0.35rem;
  }

  .entry {
    min-width: 0;
    padding: 1rem 0.5rem;
  }

  .entry + .entry::before {
    left: 18%;
    right: 18%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 195, 90, 0.4), transparent);
  }

  .atmosphere__ring {
    top: 30%;
    opacity: 0.75;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes brand-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes brand-pop {
  0% {
    transform: scale(0.86);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35)) brightness(1.3);
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)) brightness(1);
  }
}

@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes shimmer-glow {
  0%,
  100% {
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 0 rgba(255, 226, 154, 0));
  }
  50% {
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 28px rgba(255, 226, 154, 0.35));
  }
}

@keyframes halo-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes line-flicker {
  0%,
  100% {
    opacity: 0.78;
  }
  40% {
    opacity: 1;
  }
  55% {
    opacity: 0.86;
  }
}

@keyframes entry-land {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.65;
    transform: translate(-50%, -20%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -16%) scale(1.08);
  }
}

@keyframes drift {
  from {
    transform: scale(1.08) translate3d(calc(var(--mx) * -12px - 1%), calc(var(--my) * -8px), 0);
  }
  to {
    transform: scale(1.12) translate3d(calc(var(--mx) * -12px + 1.2%), calc(var(--my) * -8px - 1%), 0);
  }
}

@keyframes cloud-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(6%, 4%, 0);
  }
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes orbit {
  to {
    offset-distance: calc(100% + var(--i) * 16.66%);
  }
}

@keyframes spark-float {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere__photo,
  .atmosphere__glow,
  .atmosphere__ring,
  .atmosphere__cloud,
  .brand,
  .brand__banner,
  .brand__halo,
  .brand__spark,
  .brand__line,
  .entries,
  .entry {
    animation: none !important;
  }

  .brand,
  .entries,
  .entry {
    opacity: 1;
    transform: none;
  }
}
