/* Loader HTML/CSS reused from the supplied for-loader.zip. Only rally art, copy and palette are adapted. */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #eeede9 url("../assets/lobby/desert-rally-loader.webp")
    center/cover;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 4vw;
  overflow-y: auto;
  box-sizing: border-box;
}
.title-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}
.title-top > span:first-child {
  background: #111;
  color: #fff;
  padding: 8px 10px;
}
.title-copy {
  margin-left: 57%;
  width: 39%;
  padding: 15px 0;
}
.title-ball {
  display: flex;
  width: 66px;
  height: 66px;
  background: #111;
  border-radius: 50%;
  color: #fff;
  align-items: center;
  justify-content: center;
  font:
    700 44px "Space Grotesk",
    sans-serif;
  margin-bottom: 25px;
}
.title-copy .eyebrow {
  font-size: 9px;
}
.title-copy h1 {
  font-size: clamp(45px, 7.2vw, 110px);
  line-height: 0.86;
  letter-spacing: -1px;
  margin: 14px 0 22px;
  font-weight: 900;
}
.title-copy h1 em {
  font-size: 0.85em;
}
.title-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 37px;
}
.loading-caption {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  gap: 10px;
  white-space: nowrap;
}
.loading-track {
  height: 4px;
  background: #1112;
  margin-top: 12px;
}
.loading-track > div {
  height: 100%;
  width: var(--loading-progress, 0%);
  background: #111;
  transition: width 0.2s;
}
.title-copy button {
  border: 0;
  border-top: 1px solid #1115;
  border-bottom: 1px solid #1115;
  padding: 17px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font:
    800 19px "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  background: none;
  color: #111;
  cursor: pointer;
  width: 100%;
}
.title-copy button:hover {
  background: #111;
  color: white;
  padding-left: 10px;
  padding-right: 10px;
}
.title-copy button:focus-visible {
  outline-color: #111;
}
.title-copy button span {
  font-size: 25px;
}
.title-footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
}
.title-footer > span:first-child {
  color: #fff;
  background: #111;
  padding: 8px;
}
.title-footer > span:last-child {
  text-align: right;
  line-height: 1.7;
  font-size: 8px;
}
#loading-error {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .title-copy {
    margin-left: 54%;
    width: 43%;
  }
  .title-copy h1 {
    font-size: 8vw;
  }
  .title-ball {
    width: 50px;
    height: 50px;
    font-size: 35px;
  }
}
@media (max-width: 600px) {
  .title-copy {
    margin: 0;
    width: 100%;
    align-self: end;
    padding: 26px;
    background: #f0efeadc;
    backdrop-filter: blur(8px);
  }
  #title-screen {
    padding: 20px;
    background-position: 28% center;
    gap: 20px;
  }
  .title-top {
    font-size: 8px;
    align-items: center;
  }
  .title-copy h1 {
    font-size: clamp(36px, 12vw, 64px);
    margin: 15px 0 20px;
  }
  .title-ball {
    display: none;
  }
  .title-tagline {
    font-size: 8px;
    margin-bottom: 27px;
  }
  .title-footer > span:first-child {
    display: none;
  }
  .title-footer {
    justify-content: end;
  }
  .title-copy button {
    font-size: 20px;
  }
  .title-copy .eyebrow {
    font-size: 8px;
  }
  .title-footer > span:last-child {
    background: #f0efeac9;
    padding: 8px;
  }
  .loading-caption {
    font-size: 7px;
  }
}
@media (max-height: 600px) and (min-width: 601px) {
  .title-ball {
    display: none;
  }
  .title-copy h1 {
    font-size: clamp(28px, 8vh, 50px);
  }
  .title-tagline {
    margin-bottom: 25px;
  }
}
@media (min-width: 901px) {
  .title-copy {
    margin-left: auto;
    margin-right: 2vw;
    width: clamp(250px, 23vw, 440px);
    padding-right: 0;
  }
  .title-copy h1 {
    font-size: clamp(64px, 6.1vw, 110px);
  }
}
.title-ball {
  background: none;
  border-radius: 0;
  object-fit: contain;
}
.title-ball svg {
  display: block;
  width: 100%;
  height: 100%;
}
.title-top {
  font-size: clamp(12px, 0.8vw, 16px);
}
.title-top > span:first-child {
  padding: 10px 14px;
}
.title-footer {
  font-size: clamp(12px, 0.8vw, 15px);
}
.title-footer > span:first-child {
  padding: 10px 12px;
}
.title-footer > span:last-child {
  font-size: clamp(11px, 0.75vw, 14px);
  line-height: 1.7;
}
.title-copy .eyebrow {
  font-size: clamp(11px, 0.72vw, 14px);
}
.title-tagline {
  font-size: clamp(11px, 0.75vw, 14px);
}
.loading-caption {
  font-size: clamp(11px, 0.75vw, 14px);
  line-height: 1.5;
}
.loading-track {
  height: 5px;
  margin-top: 14px;
}
@media (max-width: 900px) and (min-width: 601px) {
  .title-copy {
    margin-left: auto;
    margin-right: 1.5vw;
    width: 30vw;
  }
  .title-copy h1 {
    font-size: 6.8vw;
  }
  .title-top,
  .title-footer {
    font-size: 11px;
  }
  .title-footer > span:last-child {
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  .title-top {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .title-top > span:first-child {
    padding: 8px 10px;
  }
  .title-copy .eyebrow,
  .title-tagline,
  .loading-caption {
    font-size: 11px;
    letter-spacing: 1px;
  }
  .title-footer > span:last-child {
    font-size: 10px;
  }
}

#title-screen {
  color: var(--rally-cream);
  background:
    linear-gradient(
      90deg,
      rgba(88, 54, 37, 0.08) 30%,
      rgba(88, 54, 37, 0.3) 48%,
      rgba(88, 54, 37, 0.9) 66%,
      #583625 78%
    ),
    #583625 url("../assets/lobby/desert-rally-loader.webp") center/cover;
}
#title-screen .title-copy h1 em,
#title-screen .title-copy .eyebrow,
#title-screen .loading-caption,
#title-screen .title-top > span:last-child {
  color: var(--rally-sand);
}
#title-screen .title-tagline,
#title-screen .title-footer > span:last-child {
  color: #f1e1c6;
}
#title-screen .title-ball {
  padding: 12px;
  background: #d86b2b;
  border: 1px solid var(--rally-sand);
  border-radius: 50%;
}
#title-screen .title-ball svg circle:first-child {
  fill: var(--rally-sand);
}
#title-screen .title-ball svg circle:last-child {
  fill: var(--rally-cream);
  opacity: 0.65;
}
#title-screen .loading-track {
  background: #f0cc8333;
}
#title-screen #loading-fill {
  background: var(--rally-sand);
}
#title-screen .title-copy button {
  color: var(--rally-sand);
  border-color: #f0cc8370;
}
#title-screen .title-copy button:hover {
  color: var(--rally-ink);
  background: var(--rally-sand);
}
#title-screen .title-copy button:focus-visible {
  outline-color: var(--rally-sand);
}
#title-screen .title-top > span:first-child,
#title-screen .title-footer > span:first-child {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 32px;
  padding: 9px 12px;
  border-left: 3px solid var(--rally-sand);
  background: rgba(55, 33, 22, 0.94);
  color: var(--rally-cream);
  font:
    700 clamp(11px, 0.75vw, 14px) / 1.7 "Space Grotesk",
    sans-serif;
  letter-spacing: 1px;
  white-space: nowrap;
}
#title-screen .title-footer > span:first-child {
  align-self: flex-end;
}
@media (min-width: 601px) and (max-width: 900px) {
  #title-screen .title-top > span:first-child,
  #title-screen .title-footer > span:first-child {
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  #title-screen {
    background-image:
      linear-gradient(180deg, #58362526, #58362570 40%, #583625eb 78%),
      url("../assets/lobby/desert-rally-loader.webp");
    background-position: 20% center;
  }
  #title-screen .title-copy {
    background: #583625e8;
    border-top: 1px solid #f0cc8360;
  }
  #title-screen .title-footer {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  #title-screen .title-top > span:first-child,
  #title-screen .title-footer > span:first-child {
    font-size: 10px;
  }
  #title-screen .title-footer > span:last-child {
    background: transparent;
    padding: 0;
  }
}

/* Loader copy and controls remain readable on small and short screens. */
.title-top,
.title-footer {
  flex-wrap: wrap;
  gap: 12px;
}
#title-screen .title-copy {
  flex-shrink: 0;
}
#title-screen .title-copy .eyebrow,
#title-screen .title-tagline,
#title-screen .loading-caption {
  font-size: clamp(11px, 0.9vw, 14px);
  line-height: 1.5;
}
#title-screen .title-copy button {
  min-height: 44px;
  white-space: normal;
}
@media (max-width: 600px) {
  #title-screen {
    padding: 16px;
    gap: 16px;
  }
  #title-screen .title-top > span {
    white-space: normal;
    font-size: 11px;
  }
  #title-screen .title-copy {
    min-width: 0;
    max-width: 100%;
  }
  #title-screen .title-footer > span:last-child {
    font-size: 11px;
  }
}
