:root {
  /* Derive the welcome icon accent from the active theme's dice color */
  --welcome-icon-accent-source: var(--dice, #60a5fa);
  --welcome-icon-accent: color-mix(
    in srgb,
    var(--welcome-icon-accent-source) 86%,
    var(--text-primary, #e2e8f0) 14%
  );
  --welcome-icon-base: var(--welcome-icon-accent);
  --welcome-icon-stroke: color-mix(
    in srgb,
    var(--welcome-icon-base) 70%,
    #ffffff 30%
  );
  --welcome-icon-glow-primary: color-mix(
    in srgb,
    var(--welcome-icon-base) 55%,
    rgba(255, 255, 255, 0.85) 45%
  );
  --welcome-icon-glow-secondary: color-mix(
    in srgb,
    var(--welcome-icon-base) 35%,
    rgba(255, 255, 255, 0.45) 65%
  );
  --welcome-icon-highlight: color-mix(
    in srgb,
    var(--welcome-icon-base) 25%,
    rgba(255, 255, 255, 0.92) 75%
  );
  --welcome-icon-shadow: color-mix(
    in srgb,
    rgba(8, 18, 32, 0.78) 55%,
    var(--welcome-icon-base) 45%
  );
}

.floating-hexagon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-hexagon__core {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-hexagon__core svg {
  color: var(--welcome-icon-stroke) !important;
  /* DISABLED: Glow effect removed */
  filter: none !important;
  transition: filter 240ms ease;
}

.floating-hexagon__core svg line {
  stroke: currentColor !important;
}

.floating-hexagon--hero {
  margin-bottom: 32px;
}

.floating-hexagon--compact {
  width: 60px;
  height: 60px;
}

.floating-hexagon--compact .floating-hexagon__core svg {
  transform-origin: center;
}

body.has-floating-hexagon .floating-hexagon {
  perspective: 1100px;
  transform-style: preserve-3d;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift: -12px;
  --tilt-intensity: 0;
}

body.has-floating-hexagon .floating-hexagon__core {
  transform-style: preserve-3d;
  transform: translate3d(0, var(--lift), 0) rotateX(var(--tilt-x))
    rotateY(var(--tilt-y));
  transition: transform 220ms ease;
  will-change: transform;
}

body.has-floating-hexagon .floating-hexagon::before,
body.has-floating-hexagon .floating-hexagon::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}

body.has-floating-hexagon .floating-hexagon::before {
  inset: -24% -22% 44%;
  background: radial-gradient(
    ellipse at top,
    var(--welcome-icon-highlight) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  filter: blur(22px);
  opacity: calc(0.2 + (1 - var(--tilt-intensity, 0)) * 0.25);
  mix-blend-mode: screen;
  z-index: 1;
}

body.has-floating-hexagon .floating-hexagon::after {
  inset: auto 12%;
  bottom: -34px;
  height: clamp(28px, 9vw, 56px);
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--welcome-icon-shadow) 82%, rgba(0, 0, 0, 0.04) 18%)
      0%,
    rgba(0, 0, 0, 0) 72%
  );
  opacity: calc(0.45 + var(--tilt-intensity, 0) * 0.25);
  transform: translateY(calc(var(--tilt-intensity, 0) * -8px))
    scale(calc(0.92 + var(--tilt-intensity, 0) * 0.22));
  filter: blur(14px);
  z-index: 0;
}

body.has-floating-hexagon
  .floating-hexagon.is-pointer-active
  .floating-hexagon__core {
  transition-duration: 160ms;
}

body.has-floating-hexagon
  .floating-hexagon.is-pointer-active
  .floating-hexagon__core
  svg {
  /* DISABLED: Glow effect removed */
  filter: none !important;
}

body.has-floating-hexagon .floating-hexagon.is-pointer-active::before {
  opacity: calc(0.32 + (1 - var(--tilt-intensity, 0)) * 0.3);
}

body.has-floating-hexagon .floating-hexagon.is-pointer-active::after {
  opacity: calc(0.5 + var(--tilt-intensity, 0) * 0.32);
}

body.has-floating-hexagon .floating-hexagon--compact .floating-hexagon__core {
  --lift: -8px;
}

body.has-floating-hexagon .floating-hexagon--compact::before {
  inset: -28% -28% 52%;
  filter: blur(18px);
  opacity: calc(0.18 + (1 - var(--tilt-intensity, 0)) * 0.22);
}

body.has-floating-hexagon .floating-hexagon--compact::after {
  bottom: -20px;
  height: clamp(18px, 6vw, 32px);
  filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
  body.has-floating-hexagon .floating-hexagon__core,
  body.has-floating-hexagon
    .floating-hexagon.is-pointer-active
    .floating-hexagon__core {
    transition-duration: 0.01ms;
  }

  body.has-floating-hexagon .floating-hexagon__core svg {
    transition-duration: 0.01ms;
  }
}
