/* GAMECO Joplin signature motion: "Press Start".
   Owned by public/motion.js; token-driven; inert without JS. */

/* Pre-paint cover: the layout flags a first-visit home load before first
   paint; until motion.js lifts the flag, the screen is the veil's own
   midnight so the bare page never flashes through. */
html.gc-press-pending body::before {
  content: ""; position: fixed; inset: 0; z-index: 240;
  background: #070912;
  pointer-events: none;
  animation: gc-precover-failsafe .6s ease 4.4s forwards;
}
@keyframes gc-precover-failsafe { to { opacity: 0; visibility: hidden; } }

.gc-veil {
  position: fixed; inset: 0; z-index: 300;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px),
    radial-gradient(70% 55% at 50% 40%, #101736 0%, #070912 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem; padding: 24px; text-align: center;
  transition: opacity .38s ease, transform .38s ease;
}
.gc-veil img { width: min(430px, 82vw); height: auto; filter: drop-shadow(0 10px 34px rgba(18,165,212,.35)); }
.gc-veil.gc-in img { animation: gc-logo-in .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes gc-logo-in {
  0% { transform: scale(.7); opacity: 0; }
  55% { transform: scale(1.05) translateX(-3px); opacity: 1; }
  70% { transform: scale(1.02) translateX(3px); }
  100% { transform: scale(1) translateX(0); }
}
.gc-press {
  font-family: "Press Start 2P", monospace; color: #F26522;
  font-size: clamp(.72rem, 2.6vw, .95rem); letter-spacing: .06em;
  animation: gc-blink 0.92s steps(2, start) infinite;
  text-shadow: 0 0 14px rgba(242,101,34,.55);
}
@keyframes gc-blink { 50% { opacity: 0; } }
.gc-veil.gc-go { animation: gc-flash .3s ease both; }
@keyframes gc-flash { 0% { filter: brightness(1); } 40% { filter: brightness(1.65); } 100% { filter: brightness(1); } }
.gc-veil.gc-out { opacity: 0; transform: translateY(-2.5%); pointer-events: none; }

.gc-coin {
  margin-left: .65rem; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid #8a5a00; cursor: pointer; flex: none;
  background: radial-gradient(circle at 35% 32%, #FFE9A8, #F5C542 55%, #D99A16);
  color: #8a5a00; font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.45), inset 0 -3px 6px rgba(138,90,0,.35);
  transform-style: preserve-3d;
}
.gc-coin.gc-spin { animation: gc-coinspin .7s cubic-bezier(.3,.7,.4,1); }
@keyframes gc-coinspin { 0% { transform: rotateY(0); } 100% { transform: rotateY(1080deg); } }
.gc-oneup {
  position: fixed; z-index: 320; pointer-events: none;
  font-family: "Press Start 2P", monospace; font-size: .68rem; color: #7BE495;
  text-shadow: 0 0 10px rgba(123,228,149,.6);
  animation: gc-oneup 1.1s ease-out forwards;
}
@keyframes gc-oneup { 0% { opacity: 0; transform: translateY(6px); } 18% { opacity: 1; } 100% { opacity: 0; transform: translateY(-44px); } }

.gc-ready {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%) scale(.6);
  background: #F26522; color: #fff; border: 2px solid #070912;
  font-family: "Press Start 2P", monospace; font-size: .6rem; padding: .45rem .6rem;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5); white-space: nowrap;
  animation: gc-ready-pop 2.2s cubic-bezier(.2,1.3,.4,1) forwards;
}
@keyframes gc-ready-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(.6); }
  12% { opacity: 1; transform: translateX(-50%) scale(1.08); }
  20% { transform: translateX(-50%) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .gc-veil, .gc-coin, .gc-oneup, .gc-ready { display: none !important; }
}
