/**
 * Pre-React boot splash — loads synchronously from index.html.
 * Values mirror design-tokens.js (neutralSystem.background, brand.primary, loader.*).
 */
:root {
  --boot-bg: #f9fafb;
  --boot-brand: #193d95;
  --boot-loader-school-surface: #e6f1fb;
  --boot-loader-school-glyph: #185fa5;
  --boot-loader-community-surface: #e1f5ee;
  --boot-loader-community-glyph: #0f6e56;
  --boot-loader-briefcase-surface: #faeeda;
  --boot-loader-briefcase-glyph: #854f0b;
  --boot-loader-frame: 3.5rem;
  --boot-loader-badge: 3.25rem;
  --boot-loader-glyph: 1.125rem;
  --boot-loader-dot-lg: 0.875rem;
  --boot-loader-dot-sm: 0.625rem;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: var(--boot-bg);
}

.app-boot-loader {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--boot-bg);
}

.app-boot-loader__icons {
  position: relative;
  width: var(--boot-loader-frame);
  height: var(--boot-loader-frame);
}

.app-boot-loader__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: app-boot-icon-show 2400ms ease-in-out infinite;
}

.app-boot-loader__icon-badge {
  display: flex;
  width: var(--boot-loader-badge);
  height: var(--boot-loader-badge);
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.app-boot-loader__icon-badge svg {
  width: var(--boot-loader-glyph);
  height: var(--boot-loader-glyph);
  flex-shrink: 0;
}

.app-boot-loader__icon--school {
  animation-delay: 0ms;
}

.app-boot-loader__icon--school .app-boot-loader__icon-badge {
  background: var(--boot-loader-school-surface);
  color: var(--boot-loader-school-glyph);
}

.app-boot-loader__icon--community {
  animation-delay: 800ms;
}

.app-boot-loader__icon--community .app-boot-loader__icon-badge {
  background: var(--boot-loader-community-surface);
  color: var(--boot-loader-community-glyph);
}

.app-boot-loader__icon--briefcase {
  animation-delay: 1600ms;
}

.app-boot-loader__icon--briefcase .app-boot-loader__icon-badge {
  background: var(--boot-loader-briefcase-surface);
  color: var(--boot-loader-briefcase-glyph);
}

.app-boot-loader__dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-boot-loader__dots span {
  border-radius: 9999px;
  background: var(--boot-brand);
  animation: app-boot-dot-pulse 1400ms ease-in-out infinite;
}

.app-boot-loader__dots span:nth-child(1) {
  width: var(--boot-loader-dot-lg);
  height: var(--boot-loader-dot-lg);
}

.app-boot-loader__dots span:nth-child(2) {
  width: var(--boot-loader-dot-sm);
  height: var(--boot-loader-dot-sm);
  animation-delay: 200ms;
}

.app-boot-loader__dots span:nth-child(3) {
  width: var(--boot-loader-dot-sm);
  height: var(--boot-loader-dot-sm);
  animation-delay: 360ms;
}

@keyframes app-boot-icon-show {
  0% {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.88);
  }
  8% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  28% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  36% {
    opacity: 0;
    transform: translateY(-0.375rem) scale(0.93);
  }
  100% {
    opacity: 0;
  }
}

@keyframes app-boot-dot-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.5);
    opacity: 0.3;
  }
}
