@font-face {
  font-family: "Preferans Logo";
  src: url("preferans-logo.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Match drawWelcomeScreen() in client/src/client.cpp. Use the logo's own
   width rather than the viewport so it scales inside a narrow panel, too. */
.preferans-logo {
  --logo-scale: 1;
  --logo-y: 0cqw;
  --logo-title-tracking: 0.068cqw;
  --logo-pro-left: 86.37cqw;
  display: block;
  position: relative;
  container-type: inline-size;
  width: 200px;
  max-width: 100%;
  aspect-ratio: 763 / 96;
  overflow: clip;
  font: 400 1rem/1 "Preferans Logo", "DejaVu Sans", sans-serif;
  font-kerning: none;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

/* The Cyrillic title is wider in the game. Scale both parts together to
   fit the same display width and keep the original lettering proportions. */
.preferans-logo:is(:lang(ru), :lang(uk)) {
  --logo-scale: calc(763 / 797);
  --logo-y: 0.27cqw;
  --logo-title-tracking: 0.049cqw;
  --logo-pro-left: 86.95cqw;
}

.preferans-logo-title {
  position: absolute;
  top: calc(-0.94cqw * var(--logo-scale) + var(--logo-y));
  left: calc(-0.79cqw * var(--logo-scale));
  color: #f8f8f8;
  font-size: calc(14.41cqw * var(--logo-scale));
  letter-spacing: var(--logo-title-tracking);
  text-shadow: calc(0.524cqw * var(--logo-scale)) calc(0.524cqw * var(--logo-scale)) rgb(189 147 249 / 45%);
}

.preferans-logo-pro {
  position: absolute;
  top: calc(0.71cqw * var(--logo-scale) + var(--logo-y));
  left: var(--logo-pro-left);
  color: #ffb86c;
  font-size: calc(6.05cqw * var(--logo-scale));
  letter-spacing: calc(-0.016cqw * var(--logo-scale));
  text-shadow: calc(0.393cqw * var(--logo-scale)) calc(0.393cqw * var(--logo-scale)) rgb(255 184 108 / 40%);
}

.preferans-logo-pro::after {
  content: "";
  position: absolute;
  top: calc(6.95cqw * var(--logo-scale));
  left: calc(-0.13cqw * var(--logo-scale));
  width: calc(13.25cqw * var(--logo-scale));
  height: calc(0.59cqw * var(--logo-scale));
  background: rgb(255 184 108 / 85%);
  transform: rotate(-2.83deg);
  transform-origin: left center;
}

@media (max-width: 520px) {
  .preferans-logo { width: 180px; }
}
