.hero {
  --mx: 0;
  --my: 0;
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--nav-height));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 3.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle 28rem at calc(72% + var(--mx) * 40px) calc(42% + var(--my) * 24px), rgba(181, 107, 255, 0.32), transparent 58%),
    radial-gradient(ellipse 50% 55% at 78% 42%, rgba(107, 47, 212, 0.5), transparent 62%),
    radial-gradient(ellipse 40% 40% at 18% 70%, rgba(58, 160, 232, 0.16), transparent 55%),
    #06040c;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(142, 212, 255, 0.08), transparent 35%),
    repeating-linear-gradient(90deg, rgba(181, 107, 255, 0.04) 0 2px, transparent 2px 48px);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(155, 77, 255, 0.11) 2px, transparent 2px),
    linear-gradient(90deg, rgba(142, 212, 255, 0.07) 2px, transparent 2px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 82%, transparent);
  pointer-events: none;
  animation: grid-drift 28s linear infinite;
}

.hero-torii {
  position: absolute;
  right: 6%;
  top: 10%;
  width: min(44vw, 30rem);
  height: 74%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.34;
  filter: drop-shadow(0 0 28px rgba(181, 107, 255, 0.45));
  background:
    linear-gradient(#2a103f, #2a103f) 18% 18% / 64% 10% no-repeat,
    linear-gradient(#3a1860, #3a1860) 10% 28% / 80% 8% no-repeat,
    linear-gradient(#1a0a28, #1a0a28) 22% 18% / 8% 70% no-repeat,
    linear-gradient(#1a0a28, #1a0a28) 70% 18% / 8% 70% no-repeat;
  transform: translate3d(calc(var(--mx) * -18px), calc(var(--my) * -12px), 0);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, transparent 40%, rgba(6, 4, 12, 0.55) 100%),
    linear-gradient(90deg, rgba(6, 4, 12, 0.9) 0%, rgba(6, 4, 12, 0.28) 58%, rgba(6, 4, 12, 0.6) 100%);
  pointer-events: none;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero-icon-wrap {
  position: relative;
  width: min(100%, 28rem);
  justify-self: end;
}

.hero-icon-wrap picture {
  display: block;
  width: 100%;
}

.hero-ring {
  position: absolute;
  inset: -10px;
  z-index: 0;
  border: 3px solid var(--glow);
  box-shadow:
    0 0 18px rgba(142, 212, 255, 0.45),
    0 0 40px rgba(181, 107, 255, 0.28),
    inset 0 0 18px rgba(181, 107, 255, 0.2);
  animation: ring-pulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

.hero-mark {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 3px solid #000;
  box-shadow:
    var(--bevel-light),
    var(--bevel-dark),
    0 0 40px rgba(155, 77, 255, 0.45),
    0 0 80px rgba(80, 160, 255, 0.18);
  image-rendering: pixelated;
  background: #000;
}

.hero-kicker {
  font-family: var(--font-ui);
  color: var(--glow);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(142, 212, 255, 0.45);
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.9;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 0 18px rgba(155, 77, 255, 0.4));
}

.hero h1 span {
  background: linear-gradient(180deg, #e9d7ff 0%, #b56bff 42%, #8ed4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: smp-glow 3.6s ease-in-out infinite;
}

.hero-tag {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  color: var(--silver);
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 0.85rem;
}

.hero .lede {
  margin-bottom: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-hotbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.hotbar-slot {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.15rem 0.7rem 0.28rem;
  border: 2px solid #000;
  background: #0e0a14;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.7), inset -2px -2px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--silver);
  text-shadow: 1px 1px 0 #000;
}

.hotbar-slot.hotbar-ip {
  color: var(--glow);
  box-shadow:
    inset 2px 2px 0 rgba(0, 0, 0, 0.7),
    inset -2px -2px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 2px rgba(142, 212, 255, 0.45),
    0 0 16px rgba(142, 212, 255, 0.2);
}

@media (max-width: 860px) {
  .hero {
    min-height: auto;
    text-align: center;
    padding-bottom: 2.5rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hero-icon-wrap {
    order: -1;
    width: min(72vw, 18rem);
    justify-self: center;
  }

  .hero-actions,
  .hero-hotbar {
    justify-content: center;
  }

  .hero .lede,
  .hero-tag {
    margin-inline: auto;
  }

  .hero-torii {
    opacity: 0.16;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid,
  .hero-ring,
  .hero h1 span {
    animation: none;
  }
}
