/* New-mission command authorisation. The exact Blackstar mark remains a live
   project asset; the surrounding frame is CSS so the treatment scales cleanly. */
.commence-overlay {
  position: absolute;
  z-index: 115;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  color: #fff3ca;
  background:
    radial-gradient(circle at 62% 48%, rgba(15, 83, 83, 0.16), transparent 24%),
    linear-gradient(90deg, rgba(2, 7, 8, 0.3), rgba(2, 7, 8, 0.1) 36%, rgba(2, 7, 8, 0.24));
  opacity: 0;
}

.commence-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 244, 207, 0.025) 0,
    rgba(255, 244, 207, 0.025) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
}

.commence-overlay.is-active { animation: commence-veil-in 180ms ease-out both; }
.commence-overlay.is-leaving { animation: commence-veil-out 260ms ease-in both; }

.commence-overlay__panel {
  position: relative;
  left: 9.5%;
  display: grid;
  place-items: center;
  width: min(800px, 57%);
  min-height: 338px;
  box-sizing: border-box;
  padding: 76px 72px 45px;
  border: 1px solid rgba(235, 182, 74, 0.88);
  border-radius: 3px;
  color: #fff4cf;
  background:
    linear-gradient(90deg, rgba(4, 10, 10, 0.92), rgba(8, 18, 17, 0.84) 50%, rgba(5, 10, 9, 0.93)),
    rgba(4, 8, 8, 0.9);
  box-shadow:
    inset 0 0 0 9px rgba(230, 172, 59, 0.08),
    inset 0 0 0 11px rgba(230, 172, 59, 0.22),
    0 24px 54px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
}

.commence-overlay__panel::before,
.commence-overlay__panel::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  width: 42px;
  border-block: 1px solid rgba(235, 182, 74, 0.66);
}

.commence-overlay__panel::before {
  left: 24px;
  border-left: 1px solid rgba(235, 182, 74, 0.66);
}

.commence-overlay__panel::after {
  right: 24px;
  border-right: 1px solid rgba(235, 182, 74, 0.66);
}

.commence-overlay.is-active .commence-overlay__panel {
  animation: commence-panel-in 440ms cubic-bezier(0.16, 0.82, 0.28, 1) 90ms both;
}

.commence-overlay.is-leaving .commence-overlay__panel {
  animation: commence-panel-out 210ms ease-in both;
}

.commence-overlay__medallion {
  position: absolute;
  z-index: 2;
  top: -52px;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(241, 192, 94, 0.86);
  border-radius: 50%;
  background: radial-gradient(circle, #201a0f 0 58%, #8d6c30 59% 61%, #12140f 62% 100%);
  box-shadow:
    0 0 0 7px rgba(6, 14, 13, 0.72),
    0 0 0 8px rgba(226, 174, 72, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.55);
}

.commence-overlay__medallion img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter:
    sepia(1)
    saturate(0.72)
    hue-rotate(355deg)
    brightness(1.05)
    contrast(1.17)
    drop-shadow(0 0 5px rgba(255, 212, 117, 0.24));
}

.commence-overlay__kicker,
.commence-overlay__status {
  margin: 0;
  color: #e9c67d;
  font-family: var(--font-label);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.commence-overlay h2 {
  margin: 20px 0 12px;
  color: #fff6d7;
  font-family: var(--font-ui);
  font-size: clamp(70px, 6.4vw, 102px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: 0.07em;
  text-shadow:
    0 4px 0 rgba(63, 43, 18, 0.72),
    0 0 22px rgba(82, 196, 195, 0.18);
}

.commence-overlay__status {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 17px;
  font-size: 15px;
}

.commence-overlay__rule {
  display: block;
  width: min(540px, 80%);
  height: 3px;
  margin-top: 24px;
  background: linear-gradient(90deg, transparent, #e8b958 10%, #f8da87 88%, transparent);
  box-shadow: 0 0 8px rgba(246, 193, 83, 0.66);
}

.commence-overlay__rule::after {
  content: "";
  display: block;
  float: right;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-radius: 50%;
  background: #ffe29a;
  box-shadow: 0 0 9px #e9b64c;
}

.commence-overlay__corner {
  position: absolute;
  width: 19px;
  height: 19px;
  border-color: #20dfdf;
  filter: drop-shadow(0 0 4px rgba(32, 223, 223, 0.5));
}

.commence-overlay__corner--top-left {
  top: 32px;
  left: 36px;
  border-top: 3px solid;
  border-left: 3px solid;
}

.commence-overlay__corner--top-right {
  top: 32px;
  right: 36px;
  border-top: 3px solid;
  border-right: 3px solid;
}

.commence-overlay__corner--bottom-left {
  bottom: 32px;
  left: 36px;
  border-bottom: 3px solid;
  border-left: 3px solid;
}

.commence-overlay__corner--bottom-right {
  right: 36px;
  bottom: 32px;
  border-right: 3px solid;
  border-bottom: 3px solid;
}

@keyframes commence-veil-in { to { opacity: 1; } }
@keyframes commence-veil-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes commence-panel-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes commence-panel-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(1.01);
  }
}

@media (max-width: 980px), (max-height: 680px) {
  .commence-overlay__panel {
    left: 8%;
    width: min(720px, 64%);
    min-height: 284px;
    padding: 65px 54px 34px;
  }

  .commence-overlay__medallion {
    top: -42px;
    width: 84px;
    height: 84px;
  }

  .commence-overlay__medallion img {
    width: 62px;
    height: 62px;
  }

  .commence-overlay__kicker,
  .commence-overlay__status { font-size: 12px; }

  .commence-overlay h2 {
    margin-block: 16px 8px;
    font-size: clamp(52px, 6vw, 76px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .commence-overlay.is-active,
  .commence-overlay.is-leaving,
  .commence-overlay.is-active .commence-overlay__panel,
  .commence-overlay.is-leaving .commence-overlay__panel {
    animation-duration: 1ms !important;
  }
}

html[data-motion="reduced"] .commence-overlay.is-active,
html[data-motion="reduced"] .commence-overlay.is-leaving,
html[data-motion="reduced"] .commence-overlay.is-active .commence-overlay__panel,
html[data-motion="reduced"] .commence-overlay.is-leaving .commence-overlay__panel {
  animation-duration: 1ms !important;
}
