body {
  margin: 0;
}

.loader-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #2e343a; /* brand cool-900 */
}

.loader svg {
  display: block;
  width: 140px;
  height: auto;
}

/* Base layer — flat neutral. */
.logo-path {
  fill: #79858d; /* brand cool-500 */
}

/* Colored overlay for the three main X paths, clipped to create a bottom-up fill.
   Runs once and holds at full via animation-fill-mode: forwards — Angular's bootstrap
   replaces the preloader at some point after this lands at 100%. */
.fill-overlay {
  -webkit-clip-path: inset(100% 0 0 0);
  clip-path: inset(100% 0 0 0);
  animation: fillRise 2.2s ease-in-out forwards;
  will-change: clip-path;
}

.fill-bottom {
  fill: #0082bd; /* brand blue-500 — lower part of the X */
}

.fill-top {
  fill: #76bb43; /* brand green-500 — upper wings */
}

@keyframes fillRise {
  0% {
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0);
  }
  100% {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}

/* Squares continue an independent color cycle on the base layer. */
.pulse-square {
  animation: squareColorPulse 2s ease-in-out infinite;
  will-change: fill;
}

/* Clockwise sweep: top-left → top-right → bottom-right → bottom-left → … */
.sq-tl { animation-delay: 0s; }
.sq-tr { animation-delay: 0.5s; }
.sq-br { animation-delay: 1s; }
.sq-bl { animation-delay: 1.5s; }

@keyframes squareColorPulse {
  0%, 80%, 100% {
    fill: #79858d; /* neutral */
  }
  20%, 30% {
    fill: #0082bd; /* brand primary blue */
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-square,
  .fill-overlay {
    animation: none;
  }
  .fill-overlay {
    -webkit-clip-path: inset(0 0 0 0);
    clip-path: inset(0 0 0 0);
  }
}