/* Deimos — rank 1.
   Gothic horror. Blood eclipse, ruined keep, bone and ember on near-black. */

[data-level="deimos"] {
  --font-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --rule-colour: color-mix(in srgb, var(--accent) 30%, transparent);
}

[data-level="deimos"] .hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(
    176deg,
    #fff4ef 0%,
    #f2d9d2 32%,
    #c98d80 62%,
    #7d3a30 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Carved-stone edge: a hot rim below, a cold shadow above. */
  filter:
    drop-shadow(0 1px 0 #40100c)
    drop-shadow(0 0 1.6rem color-mix(in srgb, var(--accent) 55%, transparent));
}

[data-level="deimos"] .level-hero__rank {
  color: #ffb27a;
}

[data-level="deimos"] .texture--grain::after {
  opacity: 0.4;
}

/* eclipse set-piece ------------------------------------------------------ */

.sig--eclipse {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  overflow: hidden;
  border-top: var(--rule) solid var(--rule-colour);
}

.ecl__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 42%,
      color-mix(in srgb, var(--accent) 26%, transparent) 0%,
      transparent 58%
    ),
    linear-gradient(180deg, #14090a 0%, #0a0506 70%);
  pointer-events: none;
}

.ecl__orb {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(52vmin, 30rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #ff7a55 0%,
    #ff2f21 34%,
    #b8130f 72%,
    #ff4a2a 93%,
    #5c0705 100%
  );
  box-shadow:
    0 0 8rem color-mix(in srgb, var(--accent) 60%, transparent),
    0 0 16rem color-mix(in srgb, var(--accent) 34%, transparent);
}

.ecl__bolt {
  position: absolute;
  left: 50%;
  top: 42%;
  translate: -50% -50%;
  width: min(52vmin, 30rem);
  aspect-ratio: 1;
  opacity: 0.85;
  animation: ecl-flash 5.5s steps(1) infinite;
}

.ecl__bolt--b {
  animation-delay: 2.4s;
  scale: -1 1;
}

@keyframes ecl-flash {
  0%,
  6%,
  100% {
    opacity: 0;
  }
  2%,
  4% {
    opacity: 0.9;
  }
}

/* Ridge lines stacked in front of the orb, each moving at its own rate. */
.ecl__ridge {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 0;
  height: 62%;
  background: #0d0708;
  pointer-events: none;
}

.ecl__ridge--far {
  height: 46%;
  background: #180c0d;
  clip-path: polygon(
    0 46%, 9% 30%, 17% 42%, 27% 24%, 36% 38%, 47% 20%,
    58% 36%, 68% 22%, 79% 40%, 89% 28%, 100% 44%, 100% 100%, 0 100%
  );
}

.ecl__ridge--near {
  height: 34%;
  background: #0a0506;
  clip-path: polygon(
    0 58%, 12% 34%, 22% 52%, 34% 28%, 45% 48%, 56% 26%,
    67% 46%, 78% 30%, 88% 50%, 100% 34%, 100% 100%, 0 100%
  );
}

.ecl__copy {
  position: relative;
  z-index: 3;
  text-align: center;
}

.ecl__line {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-6);
  color: var(--ink);
  text-shadow: 0 0 2rem #0a0506, 0 0 3.5rem #0a0506;
}

.ecl__sub {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.7;
  margin-inline: auto;
  text-shadow: 0 0 1.4rem #0a0506;
}

@media (prefers-reduced-motion: reduce) {
  .ecl__bolt {
    animation: none !important;
    opacity: 0.55 !important;
  }
}
