/* Landing page: the Bedrock card (see bedrock-card.js) */

/* until the script has rebuilt the card, keep the old title out of sight (shown anyway after 5 s) */
a.cr-card[href="/conquest-bedrock"] .cr-ov { opacity: 0; animation: bxShow 0s 5s forwards; }
@keyframes bxShow { to { opacity: 1; } }

/* all three cards: on short or stacked (phone) layouts the logos are 40% of a wide card and would be pushed
   out of the top; cap them by the screen height (round logos, so capping the width keeps them round) */
.cr-card .cr-ov > img, .bx-logos > img:first-child { max-width: min(17vh, 27vw); }
/* the text scales down with the screen height too (min(): unchanged on large screens) */
.cr-card .cr-ov > div:nth-child(2) { font-size: min(33px, 5.2vh, 9.5vw) !important; line-height: 1 !important; }
.cr-card .cr-ov > div:nth-child(3) { font-size: min(19px, 3.1vh, 5.4vw) !important; line-height: 1.2 !important; }
.cr-card .cr-ov > .cr-desc { font-size: min(20px, 3.1vh, 4.2vw) !important; line-height: 1.2 !important; }

.bx-card { overflow: visible !important; cursor: default; container-type: inline-size; }
.bx-clip { position: absolute; inset: 0; overflow: hidden; }
/* the card's white inner frame stays on top of the menu */
.bx-card > div:not(.bx-clip):not(.bx-menu) { z-index: 6; pointer-events: none; }
.bx-card .cr-desc { visibility: hidden; }
.bx-slides { position: absolute; inset: 0; z-index: 0; transition: transform .25s ease-out; }
.bx-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0;
  object-fit: cover; opacity: 0;
}
.bx-slide.on { opacity: 1; }

/* logos: the first one sizes the box, the others are centred on it */
/* full width, so the first logo keeps the same % width as the logos on the other cards */
.bx-logos { position: relative; width: 100%; display: flex; justify-content: center; align-items: center; flex: 0 0 auto; }
.bx-logo { transition: opacity 1s ease; }
.bx-logo:not(.on) { opacity: 0; }
/* wide logos (Historia Rome) get the same height as the round ones */
.bx-logo.bx-over {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: auto; height: 100%; max-width: 92%; object-fit: contain; margin: 0;
}

/* the menu */
.bx-menu {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  background: #121212; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.bx-card:hover .bx-menu, .bx-card:focus-within .bx-menu, .bx-card.open .bx-menu { opacity: 1; pointer-events: auto; }
.bx-head {
  flex: 0 0 auto; padding: 6px 6px 7px; text-align: center; color: #ececec;
  background: linear-gradient(#202020, #111); box-shadow: 0 2px 0 #000; position: relative; z-index: 1; overflow: hidden;
}
/* faint Conquest emblem as a large, tilted background image behind the header text */
.bx-head::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 85%; aspect-ratio: 548 / 513;
  transform: translate(-38%, -50%) rotate(-18deg); background: var(--bx-head-logo) center / contain no-repeat;
  opacity: .13; pointer-events: none;
}
.bx-head b, .bx-head small { position: relative; }
.bx-head b { display: block; font: 700 clamp(15px, min(11cqw, 5vh), 34px)/1.05 "Nyala 0", "Times New Roman", serif; }
.bx-head small { display: block; font-size: clamp(10px, min(5.5cqw, 2.6vh), 16px); line-height: 1.1; color: #d8d8d8; }
.bx-entry {
  position: relative; flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #ececec; text-decoration: none; border-top: 2px solid #000; outline: none;
}
.bx-entry:hover, .bx-entry:focus-visible { text-decoration: none; color: #fff; }
.bx-ebg { position: absolute; inset: 0; overflow: hidden; }
.bx-ebg img {
  display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover;
  filter: brightness(.6); transition: transform .45s ease, filter .3s ease;
}
.bx-entry:hover .bx-ebg img, .bx-entry:focus-visible .bx-ebg img { transform: scale(1.07); filter: brightness(.85); }
.bx-etxt { position: relative; padding: 0 6px; text-shadow: 0 2px 6px #000, 0 0 3px #000; }
.bx-etxt b { display: block; font: 700 clamp(14px, min(11.5cqw, 4.6vh), 34px)/1.05 "Nyala 0", "Times New Roman", serif; transition: color .2s; }
.bx-etxt small { display: block; font-size: clamp(10px, min(6.2cqw, 2.6vh), 17px); line-height: 1.15; }
a.bx-entry:hover b, a.bx-entry:focus-visible b { color: #d6ff00; }
a.bx-entry:focus-visible { box-shadow: inset 0 0 0 2px #d6ff00; }
.bx-soon { cursor: default; }
.bx-soon em {
  display: block; font-style: normal; font-size: clamp(9px, min(5.4cqw, 2.3vh), 15px); color: #e4c84a;
  max-height: 0; opacity: 0; overflow: hidden; transition: opacity .25s, max-height .25s;
}
.bx-soon:hover em, .bx-soon:focus em { max-height: 20px; opacity: 1; }

/* "New!" sticks out over the card's left edge */
.bx-badge {
  position: absolute; left: -14%; top: -9%; width: 42%; max-width: 150px; margin: 0; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); transform-origin: 60% 60%; animation: bxFlame 1.8s ease-in-out infinite;
}
@keyframes bxFlame {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(-3deg) scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .bx-badge { animation: none; transform: rotate(-6deg); }
  .bx-slide, .bx-logo { transition: none; }
}
