/* The download page (3.31.0, site theme 4.0.0): one forged button for the visitor's device, a framed scene from the
   game, one panel per platform with its own install steps, version and checksum, and the release notes. Builds on
   site.css. */

/* ------------------------------------------------------------------ hero */
.dl-hero .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); }
.dl-hero h1 { max-width: 15ch; }
.dl-cta { display: grid; gap: 14px; justify-items: start; margin-top: 4px; }

.btn-hero {
  gap: 16px;
  min-height: 80px;
  padding: 14px 30px 14px 16px;
  text-align: left;
}
.dl-cta-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  color: var(--gold-hi);
  background: #211b18;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(28, 13, 3, .4);
}
.btn-hero .dl-cta-icon svg { width: 26px; height: 26px; }
.dl-cta-text { display: grid; gap: 6px; }
.dl-cta-main { font: 800 clamp(19px, 2vw, 23px)/1 var(--display); }
.dl-cta-meta {
  font: 700 14px/1.2 var(--body);
  letter-spacing: .02em;
  color: #4a2a0a;
  font-variant-numeric: lining-nums tabular-nums;
}
.dl-also { color: var(--muted); font-size: 16px; max-width: 46ch; }

/* the scene: the game's screenshot in its frame, the hall's seal pinned to the corner */
.dl-shot { position: relative; margin: 0; }
.dl-shot .frame { animation: dl-settle .9s var(--ease-out) both; }
.dl-badge {
  position: absolute;
  top: -24px;
  left: -18px;
  width: clamp(84px, 10vw, 128px);
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .6));
  animation: dl-pop .9s .12s var(--ease-out) both;
}
@keyframes dl-settle { from { transform: translateY(16px); } }
@keyframes dl-pop { from { transform: scale(.7); } }

/* ------------------------------------------------------------------ platforms */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
}
.platform {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px clamp(18px, 2vw, 26px) 22px;
  background: var(--well);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
/* the visitor's own device: raised, a full gold edge, its tag on the top edge */
.platform.is-recommended {
  background: var(--panel-hi);
  border-color: var(--gold);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .45);
}
.platform-tag {
  display: none;
  position: absolute;
  top: -12px;
  right: 16px;
  padding: 5px 11px;
  font: 700 12px/1 var(--display);
  letter-spacing: .05em;
  color: var(--on-gold);
  background: var(--ember);
  border-radius: 999px;
}
.platform.is-recommended .platform-tag { display: block; }

.platform-head { display: flex; align-items: center; gap: 14px; }
.platform-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  color: var(--gold);
  background: var(--well-2);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.platform-icon svg { width: 26px; height: 26px; }
.platform h3 { font-size: 22px; }
.platform-meta {
  margin-top: 4px;
  font: 600 15px/1.3 var(--body);
  color: var(--muted);
  font-variant-numeric: lining-nums tabular-nums;
}
.platform-meta.is-off { color: var(--dread); }
.platform-need { color: var(--text); font-size: 16px; }

/* install steps: small numerals cut into lozenges, in a column */
.install { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.install li { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.install li::before {
  counter-increment: step;
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font: 800 14px/1 var(--display);
  color: var(--gold);
  font-variant-numeric: lining-nums;
  background: var(--lozenge) center / contain no-repeat;
}
.install b { font: 700 16px/1.25 var(--display); color: var(--text); align-self: center; }
.install span { grid-column: 2; color: var(--muted); font-size: 15px; line-height: 1.5; }
.install em { font-style: normal; color: var(--text); font-weight: 700; }

.platform-btn { margin-top: auto; width: 100%; font-size: 16px; }
.platform-btn.is-off { opacity: .5; pointer-events: none; }

.checksum summary {
  cursor: pointer;
  width: fit-content;
  color: var(--muted);
  font: 500 14px/1.4 var(--body);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.checksum summary:hover { color: var(--gold); }
.checksum code { display: block; margin-top: 8px; padding: 8px 10px; font-size: 12px; word-break: break-all; }

/* ------------------------------------------------------------------ what's new */
.dl-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 72ch; }
.dl-notes li { position: relative; padding-left: 26px; color: var(--text); }
.dl-notes li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .55em;
  width: 7px;
  height: 7px;
  background: var(--ember);
  border-radius: 50%;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .platforms { grid-template-columns: 1fr; }
  .platform.is-recommended { order: -1; }
}
@media (max-width: 900px) {
  .dl-hero .hero-grid { grid-template-columns: 1fr; }
  .dl-shot { max-width: 560px; justify-self: center; margin-top: 8px; }
}
@media (max-width: 520px) {
  .btn-hero { width: 100%; padding-inline: 14px 16px; gap: 12px; }
  .dl-cta-icon { width: 44px; height: 44px; }
  .dl-badge { top: -18px; left: -6px; }
}
.platform-btn .ext { font-family: var(--body); font-weight: 700; font-size: .95em; letter-spacing: 0; }
@media (max-width: 520px) {
  .dl-kind { display: none; }
  .dl-cta-main { font-size: 19px; }
  .dl-cta-meta { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-shot .frame, .dl-badge { animation: none; }
}
