@font-face {
  font-family: 'Manrope';
  src: url('/fonts/ManropeVariable.ttf') format('truetype');
  font-display: swap;
  font-weight: 200 800;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGroteskVariable.ttf') format('truetype');
  font-display: swap;
  font-weight: 300 700;
}

:root {
  --boot-background: #0e0e10;
  --boot-text: #f6f5f7;
  --boot-muted: #99969e;
  --boot-line: #302e32;
  --boot-accent: #ff9f43;
  color-scheme: dark;
  background: var(--boot-background);
}

:root[data-theme='light'] {
  --boot-background: #f6f8fa;
  --boot-text: #17181b;
  --boot-muted: #6c7179;
  --boot-line: #d9dde2;
  color-scheme: light;
}

:root[data-accent='amber'] { --boot-accent: #f6b73c; }
:root[data-accent='coral'] { --boot-accent: #ff7867; }
:root[data-accent='rose'] { --boot-accent: #ef6488; }
:root[data-accent='violet'] { --boot-accent: #a879f5; }
:root[data-accent='indigo'] { --boot-accent: #7187f4; }
:root[data-accent='blue'] { --boot-accent: #4f9cf9; }
:root[data-accent='cyan'] { --boot-accent: #35bed2; }
:root[data-accent='emerald'] { --boot-accent: #45c99a; }
:root[data-accent='lime'] { --boot-accent: #94c83d; }

html,
body,
#root { min-height: 100%; margin: 0; background: var(--boot-background); }

.boot-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--boot-text);
  background-color: var(--boot-background);
  background-image:
    linear-gradient(color-mix(in srgb, var(--boot-line) 28%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--boot-line) 28%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
}

.boot-loader::before {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, color-mix(in srgb, var(--boot-background) 58%, transparent), var(--boot-background));
  pointer-events: none;
}

.boot-loader__brand,
.boot-loader__message,
.boot-loader__progress { position: relative; z-index: 1; }

.boot-loader__brand { display: flex; align-items: center; gap: 15px; }
.boot-loader__symbol { width: 58px; height: 58px; display: grid; place-items: center; color: var(--boot-accent); filter: drop-shadow(0 10px 24px color-mix(in srgb, var(--boot-accent) 20%, transparent)); }
.boot-loader__symbol svg { width: 100%; height: 100%; overflow: visible; }
.boot-loader__frame { fill: color-mix(in srgb, var(--boot-accent) 5%, transparent); stroke: currentColor; stroke-width: 2.25; }
.boot-loader__fold { fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; stroke-width: 2.25; }
.boot-loader__prompt { fill: none; stroke: var(--boot-text); stroke-linecap: square; stroke-linejoin: miter; stroke-width: 2.6; }
.boot-loader__cursor { fill: none; stroke: var(--boot-text); stroke-linecap: square; stroke-width: 2.6; animation: boot-cursor 1.05s steps(1, end) infinite; }
.boot-loader__wordmark { display: flex; align-items: baseline; gap: 7px; font-family: 'Space Grotesk', Manrope, sans-serif; font-size: clamp(27px, 5vw, 34px); line-height: 1; }
.boot-loader__wordmark strong { font-weight: 700; }
.boot-loader__wordmark span { color: var(--boot-muted); font-weight: 470; }
.boot-loader__message { width: min(100%, 520px); min-height: 42px; margin: 27px 0 0; color: var(--boot-muted); font-size: 13px; line-height: 1.55; text-align: center; text-wrap: balance; }
.boot-loader__progress { width: min(220px, 54vw); height: 2px; margin-top: 18px; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--boot-line) 72%, transparent); }
.boot-loader__progress i { position: absolute; inset-block: 0; left: 0; width: 42%; border-radius: inherit; background: var(--boot-accent); box-shadow: 0 0 16px color-mix(in srgb, var(--boot-accent) 45%, transparent); animation: boot-progress 1.45s cubic-bezier(.65, 0, .35, 1) infinite; }

@keyframes boot-cursor { 0%, 48% { opacity: 1; } 49%, 100% { opacity: .12; } }
@keyframes boot-progress { from { transform: translateX(-115%); } to { transform: translateX(350%); } }

@media (prefers-reduced-motion: reduce) {
  .boot-loader__cursor { animation-duration: 2.4s; }
  .boot-loader__progress i { width: 100%; animation: none; opacity: .72; transform: none; }
}
