@font-face {
  font-family: "Roboto Condensed";
  src: url("/assets/roboto-condensed.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("/assets/roboto-condensed-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #f4f5f8;
  --ink: #282a2c;
  --dark: #1e1e1e;
  --blue: #1863dc;
  --page-width: 1280px;
  --header-height: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 200 16px "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  font-optical-sizing: auto;
}

a { color: inherit; }
button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.frame {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
}

.site-layout {
  display: flow-root;
  min-height: 100vh;
  margin: 0 auto 50px;
}

.site-header {
  display: flex;
  align-items: center;
  height: var(--header-height);
}

.site-logo {
  display: inline-flex;
  margin-top: 3px;
  font-weight: 700;
}

.site-logo img { display: block; }

.site-layout--showcase {
  width: calc(100% - 2 * clamp(16px, 3vw, 40px));
}

.site-layout--showcase .frame { max-width: 1120px; }

.hero-media {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: clamp(16px, 2.4vw, 30px);
  background: #fff;
  box-shadow: 0 6px 24px #2529330e;
}

.hero picture, .hero img {
  display: block;
  width: 100%;
}

.hero img {
  height: auto;
  /* Crop the outline baked into the supplied artwork. */
  transform: scale(1.025);
}

.hero-action {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  padding: 8px 16px;
  border-radius: 4px;
  background: #00b1a9;
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
}

.hero-action:hover { background: #009b94; }

.game-category { margin-block: clamp(18px, 3vw, 28px); }

.category-heading {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0;
  color: var(--dark);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.game-card {
  display: block;
  min-width: 0;
  color: var(--dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.game-card img, .card-placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #e4e5eb;
}

.game-card span:not(.card-placeholder) {
  display: block;
  padding-inline: 5px;
  margin-top: 4px;
}

.site-footer {
  padding: 32px;
  background: var(--dark);
  color: white;
}

.footer-copy {
  padding-block: 32px;
  text-align: center;
}

.footer-copy p {
  line-height: 23px;
  margin: 0;
}

.footer-terms { text-align: left; }

.footer-icon {
  display: flex;
  justify-content: center;
  padding-block: 32px;
}

.age-badge {
  display: grid;
  width: 60px;
  aspect-ratio: 1;
  place-content: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
}

.footer-links a {
  display: block;
  padding: 5px;
  margin: 5px;
}

.language-selector {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-block: 32px;
}

.language-selector a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

.language-selector img {
  height: 100%;
  object-fit: contain;
}

.legal-content {
  overflow-wrap: anywhere;
}

.legal-content a { text-decoration: underline; }

.game-view {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

.game-header {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: var(--header-height);
  background: var(--canvas);
}

.game-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 88rem;
  padding-inline: 28px;
  margin-inline: auto;
}

.game-header a {
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
}

.game-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
}

.game-frame, .game-unavailable {
  position: relative;
  width: 100%;
}

.game-frame {
  height: 70dvh;
  border: 0;
  backdrop-filter: blur(100px);
}

.game-unavailable {
  color: white;
  text-align: center;
}

.consent-banner, .consent-dialog {
  background: white;
  color: #212121;
  font-weight: 400;
}

.consent-banner {
  position: fixed;
  z-index: 20;
  bottom: 40px;
  left: 40px;
  width: min(440px, calc(100vw - 80px));
  max-height: 100vh;
  overflow: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  box-shadow: 0 -1px 10px #acabab4d;
  padding: 24px 24px 12px;
}

.consent-banner h2, .consent-dialog h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.consent-banner p, .consent-dialog-content p {
  margin: 0;
  font-size: 14px;
  line-height: 24px;
}

.consent-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.consent-actions button {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid var(--blue);
  border-radius: 2px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

.consent-actions button.consent-outline {
  background: white;
  color: var(--blue);
  font-weight: 500;
}

.consent-actions button:hover { filter: brightness(.92); }

.consent-banner .consent-credit {
  margin-top: 16px;
  color: #595959;
  text-align: center;
  font-size: 12px;
  line-height: 24px;
}

.consent-revisit {
  position: fixed;
  z-index: 20;
  left: 15px;
  bottom: 15px;
  display: grid;
  width: 45px;
  aspect-ratio: 1;
  place-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0056a7;
  color: white;
  cursor: pointer;
}

.consent-dialog {
  width: min(575px, calc(100vw - 28px));
  max-height: 85vh;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 6px;
}

.consent-dialog::backdrop { background: #0006; }

.consent-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #dedede;
}

.consent-dialog-heading h2 { margin: 0; }

.consent-close {
  border: 0;
  background: white;
  color: #212121;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.consent-dialog-content { padding: 16px 24px; }

.consent-category {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  border-top: 1px solid #dedede;
  padding-top: 16px;
}

.consent-category span { color: #167a32; }
.consent-category input { accent-color: var(--blue); }

.consent-dialog-actions {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid #dedede;
}

@media (max-width: 992px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-view {
    align-items: flex-start;
    min-height: calc(100dvh + var(--header-height));
    padding-top: var(--header-height);
  }
  .game-frame { height: calc(100dvh - 75px); }
  .game-header-inner { justify-content: flex-end; }

  .game-header a {
    display: block;
    width: 30px;
    aspect-ratio: 1;
    margin-right: -13px;
    border-radius: 50%;
    background: var(--dark) url("/assets/game-close.svg") center / 15px no-repeat;
    transform: translateY(15px);
  }

  .game-header a span { display: none; }
}

@media (max-width: 992px) and (orientation: landscape) {
  .game-frame { height: calc(100dvh - var(--header-height)); }
}

@media (max-width: 500px) {
  .site-layout:not(.site-layout--showcase) { width: min(96vw, 100%); }
}

@media (max-width: 560px) {
  .consent-banner { bottom: 0; left: 0; width: min(440px, 100%); }
}

@media (max-width: 440px) {
  .consent-actions { flex-direction: column; gap: 10px; }
}
