/* =========================================
   DON'T FALL — ANIMATED SPLASH SCREEN
   ========================================= */

.splash-screen {
  --splash-bg: var(--bg);
  --splash-green: var(--accent);
  --splash-cyan: var(--accent);
  --splash-purple: var(--coin);
  --splash-muted: var(--muted);

  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;

  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 42%, #1b2218 0%, transparent 43%),
    radial-gradient(ellipse at 15% 90%, #252821 0%, transparent 38%),
    var(--splash-bg);

  opacity: 1;
  transition:
    opacity 550ms ease,
    transform 550ms cubic-bezier(.7, 0, .2, 1),
    filter 550ms ease;

  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.splash-screen *,
.splash-screen *::before,
.splash-screen *::after {
  box-sizing: border-box;
}

.splash-screen--exit {
  opacity: 0;
  transform: scale(1.055);
  filter: blur(8px);
  pointer-events: none;
}

.splash-screen__particles,
.splash-screen__grid,
.splash-screen__scanlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.splash-screen__particles {
  z-index: -1;
}

.splash-screen__grid {
  z-index: -2;
  opacity: 0.22;

  background-image:
    linear-gradient(rgba(181, 247, 71, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 247, 71, 0.07) 1px, transparent 1px);

  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 80%);
  animation: splash-grid-drift 20s linear infinite;
}

.splash-screen__scanlines {
  z-index: 5;
  opacity: 0.12;

  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.5) 4px
  );

  animation: splash-scan 8s linear infinite;
}

.splash-screen__topbar,
.splash-screen__footer {
  position: absolute;
  right: clamp(20px, 5vw, 76px);
  left: clamp(20px, 5vw, 76px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  z-index: 3;
  color: var(--splash-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.splash-screen__topbar {
  top: clamp(22px, 4vh, 42px);
  animation: splash-slide-down 800ms 100ms both;
}

.splash-screen__brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.splash-screen__brand-icon {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(181, 247, 71, 0.65);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(181, 247, 71, 0.08);
}

.splash-screen__brand-dot {
  color: var(--splash-green);
}

.splash-screen__status {
  display: flex;
  align-items: center;
  gap: 9px;
}

.splash-screen__status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: var(--splash-green);
  box-shadow: 0 0 12px var(--splash-green);
  animation: splash-status-pulse 1.8s ease-in-out infinite;
}

.splash-screen__content {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: min(94vw, 920px);
  padding: 80px 0 70px;
  text-align: center;
}

.splash-screen__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  color: var(--splash-green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;

  animation: splash-rise-in 700ms 200ms both;
}

.splash-screen__eyebrow > span {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--splash-green);
  box-shadow: 0 0 10px var(--splash-green);
}

/* Emblem */

.splash-screen__emblem {
  position: relative;
  display: grid;
  place-items: center;

  width: clamp(110px, 15vw, 150px);
  aspect-ratio: 1;
  margin: 27px 0 12px;

  animation: splash-rise-in 800ms 300ms both;
}

.splash-screen__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

.splash-screen__ring--outer {
  inset: 0;
  border-top-color: var(--splash-green);
  border-right-color: rgba(181, 247, 71, 0.3);
  border-bottom-color: rgba(181, 247, 71, 0.1);

  box-shadow: 0 0 25px rgba(181, 247, 71, 0.08);
  animation: splash-ring-spin 8s linear infinite;
}

.splash-screen__ring--middle {
  inset: 12%;
  border-left: 2px solid var(--splash-green);
  border-bottom: 1px solid rgba(181, 247, 71, 0.3);

  animation: splash-ring-reverse 6s linear infinite;
}

.splash-screen__ring--inner {
  inset: 24%;
  border: 1px dashed rgba(227, 173, 66, 0.7);
  animation: splash-ring-spin 12s linear infinite;
}

.splash-screen__emblem-core {
  display: block;
  width: 56%;
  aspect-ratio: 1;
  border: 1px solid rgba(181, 247, 71, 0.65);
  border-radius: 22%;
  object-fit: cover;
  box-shadow: 0 0 32px rgba(181, 247, 71, 0.13);

  animation: splash-core-pulse 3s ease-in-out infinite;
}

.splash-screen__hero-image {
  display: block;
  width: min(62vw, 440px);
  max-width: 82%;
  height: auto;
  margin: 16px auto 10px;
  border-radius: 26px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  filter: drop-shadow(0 12px 26px rgba(181, 247, 71, 0.12));
  animation: splash-hero-fade 850ms 420ms cubic-bezier(.2, .8, .2, 1) forwards;
}

.splash-screen__hero-image.is-fallback {
  width: min(30vw, 180px);
  margin-top: 8px;
  border-radius: 18px;
}

.splash-screen__orbit-dot {
  position: absolute;
  top: 8%;
  left: 13%;
  width: 7px;
  height: 7px;
  border-radius: 50%;

  background: var(--splash-cyan);
  box-shadow: 0 0 16px var(--splash-cyan);
  animation: splash-orbit 8s linear infinite;
}

/* Title */

.splash-screen__title {
  position: relative;
  margin: 5px 0 0;

  font-size: clamp(58px, 11.3vw, 124px);
  font-weight: 1000;
  line-height: 0.9;
  letter-spacing: -0.085em;
  white-space: nowrap;

  color: var(--text);
  text-shadow: 0 0 35px rgba(181, 247, 71, 0.08);

  animation: splash-title-in 900ms 400ms cubic-bezier(.16, 1, .3, 1) both;
}

.splash-screen__title em {
  color: var(--splash-green);
  font-style: normal;

  text-shadow:
    0 0 18px rgba(181, 247, 71, 0.35),
    0 0 60px rgba(181, 247, 71, 0.12);
}

.splash-screen__title-period {
  color: var(--splash-purple);
  text-shadow: 0 0 32px rgba(227, 173, 66, 0.45);
}

.splash-screen__title::after {
  content: attr(data-text);

  position: absolute;
  inset: 0;

  color: var(--splash-cyan);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;

  animation: splash-glitch 5s 1.6s infinite;
}

.splash-screen__subtitle {
  margin: 20px 0 0;

  color: #bac3b1;
  font-size: clamp(10px, 1.6vw, 13px);
  font-weight: 800;
  letter-spacing: 0.28em;

  animation: splash-rise-in 700ms 600ms both;
}

.splash-screen__tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  margin-top: 19px;

  color: #a8b19e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;

  animation: splash-rise-in 700ms 700ms both;
}

.splash-screen__tags i {
  display: block;
  width: 4px;
  height: 4px;

  background: var(--splash-purple);
  box-shadow: 0 0 9px var(--splash-purple);
  transform: rotate(45deg);
}

.splash-screen__loading {
  width: min(100%, 320px);
  margin: 34px auto 0;
  text-align: left;
  animation: splash-rise-in 700ms 800ms both;
}

.splash-screen__loading-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  color: #dbe2d5;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.splash-screen__loading-percentage {
  color: var(--splash-green);
  font-variant-numeric: tabular-nums;
}

.splash-screen__loading-track {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(181, 247, 71, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.splash-screen__loading-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--splash-green);
  box-shadow: 0 0 12px rgba(181, 247, 71, 0.75);
  transition: width 220ms ease;
}

.splash-screen__loading-detail {
  min-height: 12px;
  margin: 9px 0 0;
  color: #a8b19e;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.splash-screen--error .splash-screen__loading-fill {
  background: #f07765;
  box-shadow: 0 0 12px rgba(240, 119, 101, 0.65);
}

.splash-screen--error .splash-screen__loading-status,
.splash-screen--error .splash-screen__loading-detail {
  color: #ff9b89;
}

/* Footer */

.splash-screen__footer {
  display: flex;
  bottom: clamp(22px, 4vh, 40px);
  font-size: 8px;
  letter-spacing: 0.12em;

  animation: splash-slide-up 800ms 300ms both;
}

.splash-screen__footer-accent {
  color: var(--splash-green);
}

.splash-screen__footer-center {
  color: #a8b19e;
  text-align: center;
}

.splash-screen__footer > span:last-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes splash-rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-title-in {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(24px) scale(0.94);
  }

  65% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-4px) scale(1.015);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-hero-fade {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-slide-down {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-slide-up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes splash-ring-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes splash-orbit {
  0% {
    transform: rotate(0deg) translateX(0);
  }

  25% {
    transform: translate(55px, 35px);
  }

  50% {
    transform: translate(105px, 65px);
  }

  75% {
    transform: translate(55px, 90px);
  }

  100% {
    transform: translate(0, 0);
  }
}

@keyframes splash-core-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 32px rgba(181, 247, 71, 0.13),
      inset 0 0 20px rgba(181, 247, 71, 0.08);
  }

  50% {
    transform: scale(1.07);
    box-shadow:
      0 0 45px rgba(181, 247, 71, 0.3),
      inset 0 0 25px rgba(181, 247, 71, 0.14);
  }
}

@keyframes splash-status-pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes splash-glitch {
  0%, 91%, 94%, 97%, 100% {
    opacity: 0;
    transform: translate(0);
  }

  92% {
    opacity: 0.6;
    transform: translate(4px, -2px);
    clip-path: inset(12% 0 70% 0);
  }

  93% {
    opacity: 0.5;
    transform: translate(-4px, 2px);
    clip-path: inset(58% 0 20% 0);
  }

  95% {
    opacity: 0.7;
    transform: translate(2px, 0);
    clip-path: inset(35% 0 45% 0);
  }
}

@keyframes splash-grid-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 48px 48px;
  }
}

@keyframes splash-scan {
  from {
    background-position-y: 0;
  }

  to {
    background-position-y: 100px;
  }
}
