.brand-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f4efe6;
  background:
    radial-gradient(circle at 50% 30%, rgba(188, 153, 99, 0.16), transparent 31%),
    linear-gradient(140deg, #16100b 0%, #261b13 54%, #090706 100%);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.brand-loader.is-done {
  opacity: 0;
  visibility: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: #050403;
  opacity: 0;
  visibility: hidden;
}

html.brand-loader-lock body::after {
  opacity: 1;
  visibility: visible;
  transition: none;
}

html.brand-loader-ready body::after {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.82s;
}

.brand-loader::before {
  content: "1911";
  position: absolute;
  inset: auto 0 -0.14em 0;
  text-align: center;
  font-family: var(--font-display, Georgia, serif);
  font-size: min(28vw, 22rem);
  line-height: 0.78;
  color: rgba(244, 239, 230, 0.035);
  letter-spacing: 0;
}

.brand-loader__frame {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(0.72rem, 2vw, 1.08rem);
  padding: 0 1.5rem;
  text-align: center;
}

.brand-loader__logo {
  width: clamp(168px, 28vw, 280px);
  height: auto;
  opacity: 0;
  transform: translateY(12px);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.42));
  animation: d1911-loader-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}

.brand-loader__name {
  display: none;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.12rem, 2.2vw, 1.65rem);
  font-weight: 500;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  animation: d1911-loader-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.42s forwards;
}

.brand-loader__line {
  position: relative;
  display: block;
  width: min(17rem, 68vw);
  padding-top: 1.12rem;
  font-size: clamp(0.76rem, 1.2vw, 0.9rem);
  line-height: 1.35;
  color: rgba(244, 239, 230, 0.84);
  opacity: 0;
  transform: translateY(8px);
  animation: d1911-loader-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s forwards;
}

.brand-loader__line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.24rem;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.18);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.12);
}

.brand-loader__line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.24rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #bc9963 0%, #f4efe6 58%, #bc9963 100%);
  box-shadow: 0 0 18px rgba(188, 153, 99, 0.32);
  transform: scaleX(0);
  transform-origin: left;
  animation: d1911-loader-progress var(--brand-loader-duration, 1200ms) cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.brand-loader__percent {
  min-width: 4ch;
  color: rgba(244, 239, 230, 0.66);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  animation: d1911-loader-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
}

html.brand-loader-lock,
html.brand-loader-lock body {
  overflow: hidden;
}

@keyframes d1911-loader-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes d1911-loader-progress {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-loader,
  .brand-loader__logo,
  .brand-loader__name,
  .brand-loader__line,
  .brand-loader__percent,
  .brand-loader__line::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }

  .brand-loader__logo,
  .brand-loader__name,
  .brand-loader__percent,
  .brand-loader__line {
    opacity: 1;
    transform: none;
  }

  .brand-loader__line::after {
    transform: scaleX(1);
  }

  body::after {
    transition-duration: 0.001ms !important;
  }
}
