/* UNEC brand intro. The controller handles readiness, dismissal and load errors. */
#splash { display: none; }
html[data-splash] #splash { display: grid; }

#splash {
  --sp-navy: #00152e;
  --sp-cyan: #67d6f3;
  --sp-gold: #ffb21a;
  --k: 1;
  --sp-ease: cubic-bezier(.18, .82, .26, 1);
  position: fixed;
  inset: 0;
  z-index: 10000;
  isolation: isolate;
  place-items: center;
  overflow: hidden;
  background: var(--sp-navy);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  transition: opacity .32s ease;
}
html[data-splash="short"] #splash { --k: .42; transition-duration: .22s; }
#splash:not(.sp-go) *, #splash:not(.sp-go) *::before { animation-play-state: paused !important; }
#splash.is-leaving { opacity: 0; pointer-events: none; }

.sp-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 92% 48%, #125484 0%, transparent 54%),
    radial-gradient(ellipse at 3% 0%, #0868a2 0%, transparent 47%),
    linear-gradient(123deg, #052748, #021a31 54%, #063a66);
}
.sp-clock {
  position: absolute;
  width: 1px;
  height: 1px;
  animation: sp-clock calc(2.2s * var(--k)) linear both;
}
.sp-ribbons { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-ribbon-top {
  animation: sp-ribbon-top calc(.9s * var(--k)) var(--sp-ease) both;
}
.sp-ribbon-bottom {
  animation: sp-ribbon-bottom calc(.95s * var(--k)) calc(.1s * var(--k)) var(--sp-ease) both;
}

/* A shaded campus façade, placed behind the wordmark. */
.sp-campus {
  position: absolute;
  right: -3%;
  bottom: 8%;
  width: min(47vw, 940px);
  min-width: 410px;
  height: clamp(180px, 59vh, 600px);
  opacity: .66;
  transform: skewY(-15deg);
  transform-origin: right center;
  mask-image: linear-gradient(110deg, transparent 1%, #000 60%);
  animation: sp-campus-in calc(1.15s * var(--k)) var(--sp-ease) both;
}
.sp-campus-front, .sp-campus-wing {
  position: absolute;
  inset: 0 0 0 41%;
  border-top: 12px solid #102d4b;
  border-bottom: 12px solid #09243c;
  box-shadow: inset 0 5px #315f81, inset 0 -8px #153b5d;
  background:
    linear-gradient(180deg, #183f60 0 18%, transparent 18%, transparent 91%, #133352 91%),
    repeating-linear-gradient(90deg, #265477 0 7%, #173d5c 8% 12%, transparent 12% 16%, #163b5d 17% 19%),
    repeating-linear-gradient(0deg, #1b456a 0 18%, #061d33 18% 39%, #142f4a 40% 51%);
}
.sp-campus-wing { inset: 36% 55% 0 0; border-top-width: 7px; }
.sp-campus-front b {
  position: absolute;
  top: 5%;
  left: 20%;
  color: #061b32;
  font-size: clamp(16px, 3.6vw, 62px);
  font-weight: 900;
}

.sp-brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(7px, 1.5vh, 18px);
  text-align: center;
  padding: 0 18px;
  pointer-events: none;
}
.sp-crest {
  display: block;
  width: clamp(114px, min(45vw, 39vh, 310px), 310px);
  height: auto;
  filter: drop-shadow(0 6px 16px #001529b3);
  animation: sp-crest-in calc(.72s * var(--k)) calc(.23s * var(--k)) var(--sp-ease) both;
}
.sp-wordmark {
  display: grid;
  gap: 3px;
  text-shadow: 0 3px 14px #00152996;
  animation: sp-wordmark-in calc(.65s * var(--k)) calc(.67s * var(--k)) var(--sp-ease) both;
}
.sp-wordmark strong {
  font-size: clamp(54px, min(21vw, 18vh), 146px);
  line-height: .91;
  font-weight: 900;
  letter-spacing: -.055em;
}
.sp-wordmark span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .32em;
  font-size: clamp(20px, min(6.6vw, 6vh), 44px);
  line-height: 1.17;
  font-weight: 760;
  white-space: nowrap;
}
.sp-wordmark span::before, .sp-wordmark span::after {
  content: "";
  width: .95em;
  height: .11em;
  background: var(--sp-gold);
}

@keyframes sp-clock { from { opacity: .001 } to { opacity: .002 } }
@keyframes sp-campus-in { from { opacity: 0 } to { opacity: .66 } }
@keyframes sp-ribbon-top { from { opacity: 0; transform: translate(-7%, -7%) } to { opacity: 1; transform: none } }
@keyframes sp-ribbon-bottom { from { opacity: 0; transform: translate(7%, 7%) } to { opacity: 1; transform: none } }
@keyframes sp-crest-in { from { opacity: 0; transform: translateY(12px) scale(.91) } to { opacity: 1; transform: none } }
@keyframes sp-wordmark-in { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes sp-bar { from { transform: translateX(-100%) } to { transform: translateX(250%) } }

@media (max-width: 640px) {
  .sp-campus { bottom: 13%; right: -38%; opacity: .45; }
  .sp-ribbons { scale: 1.13; }
}
html.sp-lite .sp-campus,
html.sp-lite .sp-ribbons > g { animation: none; }

@media (prefers-reduced-motion: reduce) {
  #splash { transition-duration: .15s !important; }
  #splash .sp-clock { animation-duration: .4s !important; }
  #splash :is(.sp-campus, .sp-ribbon-top, .sp-ribbon-bottom, .sp-crest, .sp-wordmark, .sp-bar)::before,
  #splash :is(.sp-campus, .sp-ribbon-top, .sp-ribbon-bottom, .sp-crest, .sp-wordmark) { animation: none !important; }
}

.sp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sp-msg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + clamp(20px, 6vh, 56px));
  padding: 0 24px;
  text-align: center;
  pointer-events: none;
}
.sp-note {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .78);
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: opacity .35s ease, transform .35s ease;
}
#splash[data-sp-state="slow"] .sp-note { opacity: 1; transform: none; }
.sp-bar {
  display: block;
  position: relative;
  width: 120px;
  height: 2px;
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .14);
}
.sp-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, rgba(57, 169, 219, 0), #39A9DB, rgba(57, 169, 219, 0));
  animation: sp-bar 1.5s ease-in-out infinite;
}
.sp-fail { display: none; max-width: 380px; margin: 0 auto; }
#splash[data-sp-state="fail"] .sp-note { display: none; }
#splash[data-sp-state="fail"] .sp-fail { display: block; }
.sp-fail p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: #fff; }
.sp-fail .sp-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sp-fail button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .34);
  background: transparent;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}
.sp-fail .sp-retry { background: var(--sp-cyan); border-color: var(--sp-cyan); color: var(--sp-navy); }
.sp-fail button:focus-visible { outline: 2px solid var(--sp-gold); outline-offset: 2px; }
