.crm-boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  min-height: 100dvh;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem 1.25rem;
  font-family: Poppins, system-ui, sans-serif;
  text-align: center;
  color: var(--crm-boot-text, #1f2937);
  background:
    radial-gradient(ellipse 90% 70% at 50% -5%, color-mix(in srgb, var(--crm-accent, #4f46e5) 28%, transparent), transparent 58%),
    radial-gradient(ellipse 55% 45% at 100% 100%, color-mix(in srgb, var(--crm-accent-strong, #4338ca) 16%, transparent), transparent 55%),
    var(--crm-boot-bg, #f4f7fb);
}

.crm-boot__glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(56px);
  pointer-events: none;
  opacity: 0.55;
  animation: crm-boot-glow 7s ease-in-out infinite;
}

.crm-boot__glow--a {
  top: 12%;
  left: 8%;
  width: 10rem;
  height: 10rem;
  background: color-mix(in srgb, var(--crm-accent, #4f46e5) 50%, transparent);
}

.crm-boot__glow--b {
  right: 4%;
  bottom: 14%;
  width: 13rem;
  height: 13rem;
  background: color-mix(in srgb, var(--crm-accent-strong, #4338ca) 35%, transparent);
  animation-delay: -3.2s;
}

.crm-boot__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(15, 23, 42, 0.08) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.crm-boot__stage {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 20rem);
  flex-direction: column;
  align-items: center;
}

.crm-boot__mark {
  margin-bottom: 1.35rem;
  animation: crm-boot-mark-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.crm-boot__icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.crm-boot__icon-wrap::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--crm-accent, #4f46e5) 40%, transparent);
  animation: crm-boot-ring 2.4s ease-out 0.55s infinite;
  pointer-events: none;
}

.crm-boot__logo {
  display: block;
  width: 88px;
  height: 88px;
  overflow: visible;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--crm-accent, #4f46e5) 40%, transparent));
  animation: crm-boot-icon-breathe 3.2s ease-in-out 1.45s infinite;
}

.crm-boot__disc {
  transform-origin: 24px 24px;
  animation: crm-boot-disc 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.crm-boot__book,
.crm-boot__spine,
.crm-boot__tabs,
.crm-boot__face,
.crm-boot__shoulders,
.crm-boot__tick {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.crm-boot__book { animation: crm-boot-draw 0.42s ease 0.2s forwards; }
.crm-boot__spine { animation: crm-boot-draw 0.2s ease 0.52s forwards; }
.crm-boot__tabs { animation: crm-boot-draw 0.22s ease 0.66s forwards; }
.crm-boot__face { animation: crm-boot-draw 0.26s ease 0.8s forwards; }
.crm-boot__shoulders { animation: crm-boot-draw 0.24s ease 0.92s forwards; }

.crm-boot__seal {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: crm-boot-badge 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.92s forwards;
}

.crm-boot__tick { animation: crm-boot-draw 0.28s ease 1.16s forwards; }

.crm-boot__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--crm-boot-muted, #64748b);
  animation: crm-boot-text-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.crm-boot__title {
  margin: 0.15rem 0 0;
  font-size: clamp(2.15rem, 8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  animation: crm-boot-text-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.crm-boot__label {
  margin: 1.15rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--crm-boot-muted, #64748b);
  animation: crm-boot-text-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

.crm-boot__bar {
  margin-top: 1.35rem;
  width: 9.5rem;
  height: 3px;
  overflow: hidden;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--crm-accent, #4f46e5) 18%, transparent);
  animation: crm-boot-text-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.crm-boot__bar-fill {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--crm-accent, #4f46e5) 40%, white), var(--crm-accent, #4f46e5), var(--crm-accent-strong, #4338ca));
  animation: crm-boot-bar 1.65s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.crm-boot--exiting {
  animation: crm-boot-out 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes crm-boot-glow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -12px) scale(1.08); }
}

@keyframes crm-boot-mark-in {
  from { opacity: 0; transform: translateY(18px) scale(0.82); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes crm-boot-disc {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes crm-boot-draw { to { stroke-dashoffset: 0; } }

@keyframes crm-boot-badge {
  0% { transform: scale(0); }
  70% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

@keyframes crm-boot-ring {
  0% { transform: scale(0.92); opacity: 0.65; }
  100% { transform: scale(1.22); opacity: 0; }
}

@keyframes crm-boot-icon-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}

@keyframes crm-boot-text-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes crm-boot-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

@keyframes crm-boot-out {
  to { opacity: 0; transform: scale(1.03); filter: blur(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .crm-boot,
  .crm-boot__glow,
  .crm-boot__mark,
  .crm-boot__logo,
  .crm-boot__icon-wrap::after,
  .crm-boot__disc,
  .crm-boot__book,
  .crm-boot__spine,
  .crm-boot__tabs,
  .crm-boot__face,
  .crm-boot__shoulders,
  .crm-boot__seal,
  .crm-boot__tick,
  .crm-boot__eyebrow,
  .crm-boot__title,
  .crm-boot__label,
  .crm-boot__bar,
  .crm-boot__bar-fill,
  .crm-boot--exiting {
    animation: none !important;
  }

  .crm-boot--exiting { opacity: 0; }

  .crm-boot__book,
  .crm-boot__spine,
  .crm-boot__tabs,
  .crm-boot__face,
  .crm-boot__shoulders,
  .crm-boot__tick {
    stroke-dashoffset: 0;
  }

  .crm-boot__seal { transform: none; }
}
