/* sc-pages.css: one page transition for the whole site and the game (visual only).
   The outgoing page holds still and the incoming page fades in over it while rising a few pixels. Only
   opacity and transform animate, so the compositor runs it smoothly even while the new page (the game
   especially) is still busy starting up. The header and the page frame keep their own view-transition
   names, so they stay still. Loaded on every page, including /play. */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  html:not(#sc-vt)[data-site-variant]::view-transition-group(root) { animation: none !important; }
  html:not(#sc-vt)[data-site-variant]::view-transition-old(root) {
    animation: none !important; opacity: 1 !important;
    mix-blend-mode: normal !important;
  }
  html:not(#sc-vt)[data-site-variant]::view-transition-new(root) {
    animation: sc-page-in .26s cubic-bezier(.2, .8, .2, 1) both !important;
    mix-blend-mode: normal !important;
  }
}
@keyframes sc-page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html:not(#sc-vt)[data-site-variant]::view-transition-old(root),
  html:not(#sc-vt)[data-site-variant]::view-transition-new(root) { animation: none !important; }
}

/* Mineral chip contrast & light-theme custom property preservation */
html:not([data-theme="light"]) body#top .material-chip,
html:not([data-theme="light"]) body#top[data-page] .material-chip {
  background: var(--gem-bg, #342f18) !important;
  color: var(--gem-ink, #f4df86) !important;
  border-color: color-mix(in srgb, var(--gem-ink, #f4df86) 62%, var(--gem-bg, #342f18)) !important;
}
html[data-theme="light"] body#top .material-chip,
html[data-theme="light"] body#top[data-page] .material-chip {
  background: var(--gem-light-bg, #e6eef7) !important;
  color: var(--gem-light-ink, #1b465f) !important;
  border-color: color-mix(in srgb, var(--gem-light-ink, #1b465f) 72%, var(--gem-light-bg, #e6eef7)) !important;
}

/* Footer copyright & credit contrast (>= 7.3:1 in Dark & Light themes) */
.footer-copyright,
.footer-credit,
.footer-credit a,
.compact-footer-copy {
  color: var(--muted) !important;
  opacity: 1 !important;
}

/* 404 & global makers-origin-title display typeface */
body:not([data-page]) .makers-origin-title,
.makers-origin-title {
  font-family: var(--sc-font-display) !important;
}

/* Unfocused skip-link completely hidden off-screen until keyboard focus */
.skip-link:not(:focus):not(:focus-visible) {
  transform: translateY(-200%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.skip-link:is(:focus, :focus-visible) {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
