/* Playful touches shared by every page (see js/fx.js):
   springy press on key buttons, a cursor label, the sound switch. */

/* ---- Springy buttons: only the ones that matter ---- */
.fx-press {
  transition: scale 0.28s cubic-bezier(0.3, 1.6, 0.5, 1), background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) { .fx-press:hover { scale: 1.045; } }
.fx-press:active { scale: 0.92; transition-duration: 0.08s; }

/* ---- Cursor label ---- */
.fx-cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 9995;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--navy, #0c0054);
  color: #fff;
  font-family: var(--font-body, sans-serif);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translate(-100px, -100px);
  transition: opacity 0.18s ease;
  will-change: transform;
}
.fx-cursor.is-on { opacity: 1; }

/* ---- Sound switch ---- */
.fx-sound {
  position: fixed;
  right: 14px; bottom: 14px;
  z-index: 9980;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px 8px 10px;
  border: 0; border-radius: 999px;
  background: #fff;
  color: var(--navy, #0c0054);
  font-family: var(--font-body, sans-serif);
  font-size: 0.74rem; font-weight: 600;
  box-shadow: 0 6px 18px rgba(12, 0, 84, 0.25);
  cursor: pointer;
}
.fx-sound svg { width: 16px; height: 16px; }
.fx-sound .fx-waves { display: none; }
.fx-sound[aria-pressed="true"] { background: var(--blue, #0052ff); color: #fff; }
.fx-sound[aria-pressed="true"] .fx-waves { display: inline; }
.fx-sound[aria-pressed="true"] .fx-slash { display: none; }
.fx-sound:focus-visible { outline: 3px solid var(--blue, #0052ff); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .fx-press, .fx-press:hover, .fx-press:active { scale: 1; }
}

/* ---- Landing hero: hover the photo and the 3D version appears in exactly the same spot ---- */
.hero-photo-img--3d {
  position: absolute;
  left: 0; top: 0;
  filter: none;
  opacity: 0;
  pointer-events: none;
  animation: none;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 1.3, 0.4, 1);
  transform: translateY(6px) scale(0.985);
  transform-origin: 50% 100%;
}
.hero-photo.is-3d .hero-photo-img--3d { opacity: 1; transform: none; }
.hero-photo .hero-photo-img:not(.hero-photo-img--3d) { transition: filter 0.45s ease; }
/* filter, not opacity: the entrance animation holds opacity at 1 */
.hero-photo.is-3d .hero-photo-img:not(.hero-photo-img--3d) { filter: grayscale(1) contrast(1.05) opacity(0); }
@media (max-width: 900px) { .hero-photo-img--3d { margin-left: -3.15%; } }
@media (prefers-reduced-motion: reduce) { .hero-photo-img--3d { transition: opacity 0.2s ease; transform: none; } }

/* The reaction game on the landing page: always visible and playable. By default (small screens, iOS, reduced motion) it simply
   follows the footer; on larger screens css/landing-polish.css tucks it behind the page and the footer slides up to reveal it. */
.games.games--landing { padding: clamp(24px, 4vw, 40px) 20px 36px; }

/* Small screens: the sound switch is just the speaker icon, so it covers less of the page */
@media (max-width: 640px) {
  .fx-sound { padding: 9px; right: 10px; bottom: 10px; }
  .fx-sound span { display: none; }
}
