:root {
  --bg: #050605;
  --accent: #f9d849;
  --mx: 50%;
  --my: 46%;
  --mx-trail: 50%;
  --my-trail: 46%;
  --trail-alpha: 0;
  --spot-size: 46.5vmin;
  --shadow-x: 0px;
  --shadow-y: 14px;
  --hero-bg-image: url("./tombg.png");
  --hero-bg-size: cover;
  --hero-bg-repeat: no-repeat;
  --hero-bg-position: center;
  --light-strength: 3;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.hero {
  position: relative;
  height: 100vh;
  /* 100vw 在有垂直滚动条的桌面浏览器里会把滚动条宽度算进去，改用 100%。 */
  width: 100%;
  background: radial-gradient(circle at 50% 45%, rgba(249, 216, 73, 0.06), transparent 60%), var(--bg);
  /* .hero__bg::before 用 scale(1.02) 做柔化，会向右多出约 1% 宽度，
     桌面因此出现 14px 横向溢出。clip 只裁切、不创建滚动容器。 */
  overflow: hidden;
  overflow: clip;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hero.hero--uv {
  --spot-size: 31.5vmin;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: translateZ(0);
}

.hero__bg::before,
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-size: var(--hero-bg-size);
  background-repeat: var(--hero-bg-repeat);
  background-position: var(--hero-bg-position);
}

.hero__bg::before {
  filter: blur(3px) brightness(0.62) saturate(0.92) contrast(1.06);
  transform: scale(1.02);
}

.hero__bg::after {
  filter: brightness(0.98) saturate(1.02) contrast(1.08);
  -webkit-mask-image: radial-gradient(
    circle var(--spot-size) at var(--mx) var(--my),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 34%,
    rgba(0, 0, 0, 0) 58%
  );
  mask-image: radial-gradient(
    circle var(--spot-size) at var(--mx) var(--my),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 34%,
    rgba(0, 0, 0, 0) 58%
  );
}

.hero__bgTrail {
  position: absolute;
  inset: 0;
  opacity: var(--trail-alpha);
  pointer-events: none;
  transform: translateZ(0);
}

.hero__bgTrail::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-size: var(--hero-bg-size);
  background-repeat: var(--hero-bg-repeat);
  background-position: var(--hero-bg-position);
  filter: brightness(0.96) saturate(1.01) contrast(1.08);
  -webkit-mask-image: radial-gradient(
    circle calc(var(--spot-size) * 1.05) at var(--mx-trail) var(--my-trail),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 18%,
    rgba(0, 0, 0, 0) 54%
  );
  mask-image: radial-gradient(
    circle calc(var(--spot-size) * 1.05) at var(--mx-trail) var(--my-trail),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 18%,
    rgba(0, 0, 0, 0) 54%
  );
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle var(--spot-size) at var(--mx) var(--my),
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.08) 18%,
      rgba(0, 0, 0, 0.82) 55%,
      rgba(0, 0, 0, 0.92) 75%,
      rgba(0, 0, 0, 0.98) 100%
    ),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.65) 75%, rgba(0, 0, 0, 0.92) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28) 22%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.hero__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
}

.hero.hero--uv .hero__veil::after {
  background: none;
  opacity: 0;
}

.hero__content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto auto auto 1.2fr;
  align-items: center;
  justify-items: center;
  padding: 7vmin 6vmin;
  text-align: center;
}

.hero__title {
  margin: 0;
  grid-row: 2;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: clamp(38px, 6.8vw, 96px);
  color: var(--accent);
  text-shadow:
    var(--shadow-x) var(--shadow-y) 0 rgba(0, 0, 0, 0.82),
    calc(var(--shadow-x) * 1.9) calc(var(--shadow-y) * 1.9) 28px rgba(0, 0, 0, 0.58),
    0 0 22px rgba(249, 216, 73, 0.22),
    0 0 64px rgba(249, 216, 73, 0.12);
  transform: translateZ(0);
}

.hero.hero--uv .hero__title {
  text-shadow:
    var(--shadow-x) var(--shadow-y) 0 rgba(0, 0, 0, 0.82),
    calc(var(--shadow-x) * 1.9) calc(var(--shadow-y) * 1.9) 30px rgba(0, 0, 0, 0.58),
    0 0 26px rgba(249, 216, 73, 0.32),
    0 0 86px rgba(249, 216, 73, 0.18);
}

.hero__subtitle {
  grid-row: 4;
  margin: 16px 0 0;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 650;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.55);
}

.hero__divider {
  grid-row: 3;
  width: min(680px, 86vw);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(249, 216, 73, 0.65), transparent);
  margin-top: 16px;
  filter: drop-shadow(0 0 10px rgba(249, 216, 73, 0.1));
}

.hero__actions {
  grid-row: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  margin-top: 22px;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease,
    filter 160ms ease;
}

.hero__btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(115deg, transparent 0%, rgba(249, 216, 73, 0.0) 30%, rgba(249, 216, 73, 0.55) 50%, rgba(249, 216, 73, 0.0) 70%, transparent 100%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.hero__btn:hover,
.hero__btn:focus-visible {
  transform: translateY(-1px);
  color: rgba(0, 0, 0, 0.88);
  background: rgba(249, 216, 73, 0.92);
  border-color: rgba(249, 216, 73, 0.22);
  filter: brightness(1.02);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.42),
    0 0 22px rgba(249, 216, 73, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.hero__btn:hover::after,
.hero__btn:focus-visible::after {
  opacity: 1;
  animation: heroBtnSweep 650ms ease forwards;
}

@keyframes heroBtnSweep {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

.hero__tagline {
  grid-row: 6;
  margin: 24px 0 0;
  font-size: clamp(10px, 1.3vw, 14px);
  letter-spacing: 0.34em;
  color: rgba(255, 255, 255, 0.56);
  max-width: 80ch;
  line-height: 1.25;
}

@media (max-width: 480px) {
  .hero__title {
    letter-spacing: 0.06em;
  }
  .hero__tagline {
    letter-spacing: 0.22em;
  }
  .hero__actions {
    flex-direction: column;
    gap: 18px;
    width: 100%;
  }
  .hero__btn {
    width: min(340px, 86vw);
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__veil,
  .hero__veil::after {
    transition: none !important;
  }
}
