.academy-name-field.is-entering {
  animation: academy-onboarding-enter var(--motion-fast) var(--motion-ease) both;
}

#authSubmit,
#academyBootstrapSubmit {
  position: relative;
}

#authSubmit:disabled,
#academyBootstrapSubmit[aria-busy="true"] {
  cursor: wait;
  opacity: .9;
}

#authSubmit:disabled::before,
#academyBootstrapSubmit[aria-busy="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: academy-onboarding-spin 700ms linear infinite;
}

.academy-bootstrap-view {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--surface-page) 78%, transparent);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--motion-fast) ease-out;
}

.academy-bootstrap-view.is-visible {
  opacity: 1;
}

.academy-bootstrap-card {
  width: min(100%, 460px);
  padding: 30px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  transform: translateY(8px);
  filter: blur(4px);
  transition:
    opacity var(--motion-normal) var(--motion-ease),
    transform var(--motion-normal) var(--motion-ease),
    filter var(--motion-normal) var(--motion-ease);
}

.academy-bootstrap-card.is-entering {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.academy-bootstrap-card.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(2px);
  transition-duration: var(--motion-fast);
  transition-timing-function: ease-out;
}

.academy-bootstrap-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.academy-bootstrap-card h1 {
  margin: 0;
  color: var(--text-primary);
  font-family: inherit;
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.academy-bootstrap-copy {
  margin: 12px 0 24px;
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.6;
}

.academy-bootstrap-form {
  display: grid;
  gap: 14px;
}

.academy-bootstrap-form .field input {
  min-height: 46px;
}

.academy-bootstrap-submit {
  width: 100%;
  min-height: 46px;
  color: var(--text-on-accent);
  background: var(--accent-primary);
}

.academy-bootstrap-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.academy-bootstrap-message {
  min-height: 20px;
  margin: 0;
  color: var(--status-danger);
}

@keyframes academy-onboarding-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes academy-onboarding-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .academy-bootstrap-view {
    padding: 16px;
  }

  .academy-bootstrap-card {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .academy-name-field.is-entering,
  #authSubmit:disabled::before,
  #academyBootstrapSubmit[aria-busy="true"]::before {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .academy-bootstrap-view,
  .academy-bootstrap-card {
    transition-duration: .01ms !important;
  }

  .academy-name-field.is-entering,
  .academy-bootstrap-card,
  .academy-bootstrap-card.is-entering,
  .academy-bootstrap-card.is-leaving {
    transform: none !important;
    filter: none !important;
  }

  #authSubmit:disabled::before,
  #academyBootstrapSubmit[aria-busy="true"]::before {
    transform: none !important;
    border-right-color: currentColor;
    opacity: .65;
  }
}
