:root {
  color-scheme: light dark;
  --surface: #ffffff;
  --surface-text: #0d0d0d;
  --surface-dark: #0d0d0d;
  --surface-text-dark: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--surface);
  color: var(--surface-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  opacity: 1;
  transition: opacity 300ms ease;
  z-index: 9999;
}

.preloader[hidden] {
  display: none !important;
}

.preloader picture,
.preloader img {
  width: min(80vw, 300px);
  height: auto;
  max-height: 80vh;
  display: block;
}

/* Ensure both logos display at the same size regardless of their intrinsic dimensions */
.preloader picture img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

body:not(.is-loading) .preloader {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--surface-dark);
    color: var(--surface-text-dark);
  }

  .preloader {
    background: var(--surface-dark);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader {
    transition: none;
  }
}