html,
body {
  margin: 0;
  min-height: 100%;
  background: #f9fafb;
}

html[data-theme='dark'],
html[data-theme='dark'] body {
  background: #171717;
}

/* Crawler-only shell from Symfony - hide until Vue mounts (styles in lazy chunks load too late). */
.seo-prerender {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app-splash {
  --splash-primary: #3b82f6;
  --splash-muted: #6b7280;
  --splash-title: #111827;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: inherit;
  color: var(--splash-muted);
  font-family: 'Exo 2', system-ui, -apple-system, sans-serif;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

html[data-theme='dark'] #app-splash {
  --splash-primary: #60a5fa;
  --splash-muted: #9ca3af;
  --splash-title: #f3f4f6;
}

#app-splash.app-splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash__anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 220px);
  padding: 0 16px;
}

.app-splash__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.app-splash__status {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--splash-muted);
  animation: app-splash-status 2.6s ease infinite;
}

.app-splash__dots::after {
  content: '...';
  display: inline-block;
  width: 1.1em;
  overflow: hidden;
  vertical-align: bottom;
  animation: app-splash-dots 1.1s steps(3, end) infinite;
}

.app-splash__vortex {
  position: relative;
  width: min(40vw, 140px);
  height: min(40vw, 140px);
}

.app-splash__orbit-word {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: clamp(7px, 2vw, 8px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--splash-primary);
  opacity: 0;
}

.app-splash__orbit-word:nth-of-type(1) {
  animation: app-splash-orbit-word 2.6s ease infinite;
  --a: 0deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(2) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.08s;
  --a: 51deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(3) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.16s;
  --a: 103deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(4) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.24s;
  --a: 154deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(5) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.32s;
  --a: 206deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(6) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.4s;
  --a: 257deg;
  --r: min(16vw, 58px);
}

.app-splash__orbit-word:nth-of-type(7) {
  animation: app-splash-orbit-word 2.6s ease infinite 0.48s;
  --a: 309deg;
  --r: min(16vw, 58px);
}

.app-splash__vortex-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  z-index: 2;
  animation: app-splash-vortex-logo 2.6s ease infinite;
}

html[data-theme='dark'] .app-splash__vortex-logo {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-splash__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--splash-title);
  animation: app-splash-title 2.6s ease infinite;
}

.app-splash__static {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.app-splash__static-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme='dark'] .app-splash__static-logo {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.app-splash__static-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--splash-title);
}

.app-splash__static-status {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--splash-muted);
}

.app-splash__static-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(59, 130, 246, 0.18);
  border-top-color: var(--splash-primary);
  border-radius: 50%;
}

html[data-theme='dark'] .app-splash__static-spinner {
  border-color: rgba(96, 165, 250, 0.18);
}

@keyframes app-splash-status {
  0%,
  12%,
  100% {
    opacity: 0.55;
  }

  50%,
  78% {
    opacity: 1;
  }
}

@keyframes app-splash-dots {
  0% {
    width: 0.25em;
  }

  33% {
    width: 0.55em;
  }

  66%,
  100% {
    width: 1.1em;
  }
}

@keyframes app-splash-orbit-word {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r)))
      rotate(calc(-1 * var(--a)));
  }

  15% {
    opacity: 0.9;
  }

  45% {
    opacity: 0.9;
    transform: translate(-50%, -50%) rotate(calc(var(--a) + 180deg))
      translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a) - 180deg));
  }

  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}

@keyframes app-splash-vortex-logo {
  0%,
  55%,
  100% {
    opacity: 0;
    transform: scale(0.5);
  }

  65%,
  88% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes app-splash-title {
  0%,
  58%,
  100% {
    opacity: 0;
    transform: translateY(6px);
    letter-spacing: 0.34em;
  }

  68%,
  88% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.24em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__anim {
    display: none;
  }

  .app-splash__static {
    display: flex;
  }

  .app-splash__status,
  .app-splash__orbit-word,
  .app-splash__vortex-logo,
  .app-splash__title {
    animation: none;
  }
}
