/* Everpaw landing – MVP
   The stage keeps the artwork's 1672x941 ratio and fits inside the viewport.
   Hotspots are positioned in % of the stage, so they stay aligned at any size. */

:root {
  --art-w: 1672;
  --art-h: 941;
  --gold: 255, 204, 77;          /* rgb of the glow */
  --gold-strong: 255, 176, 32;
  --wood: #3b2414;
}

* { box-sizing: border-box; }

html { background: #1a0f08; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Blurred copy of the art fills the letterbox bars on non-16:9 screens */
body::before {
  content: "";
  position: fixed;
  inset: -40px;
  background: url("assets/home-bg.webp") center / cover no-repeat, #1a0f08;
  filter: blur(28px) brightness(0.45) saturate(1.2);
  z-index: -1;
}

.stage {
  position: relative;
  width: min(100vw, calc(100vh * var(--art-w) / var(--art-h)));
  width: min(100vw, calc(100dvh * var(--art-w) / var(--art-h)));
  aspect-ratio: 1672 / 941;
  container-type: inline-size;   /* enables cqw units for scaled radii */
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.stage__art {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hotspots { position: absolute; inset: 0; }

/* ---------- Hotspot buttons ---------- */
.hotspot {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  /* --r is a corner radius in artwork pixels, scaled with the stage */
  border-radius: calc(var(--r, 14) * 100cqw / 1672);
  outline: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.hotspot:hover,
.hotspot:focus-visible {
  background-color: rgba(var(--gold), 0.10);
  box-shadow:
    inset 0 0 0 2px rgba(var(--gold), 0.85),
    0 0 14px 3px rgba(var(--gold), 0.55);
}

.hotspot:active {
  transform: scale(0.98);
  background-color: rgba(var(--gold), 0.18);
}

/* Pulsing highlight for the playable game */
.hotspot--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: paw-pulse 2.2s ease-in-out infinite;
}

@keyframes paw-pulse {
  0%, 100% {
    box-shadow: inset 0 0 0 2px rgba(var(--gold), 0.15), 0 0 0 0 rgba(var(--gold-strong), 0);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(var(--gold), 0.75), 0 0 22px 6px rgba(var(--gold-strong), 0.55);
  }
}

/* Debug mode (?debug=1): outline every hotspot with its id */
.debug .hotspot {
  box-shadow: inset 0 0 0 2px rgba(255, 0, 80, 0.9);
  background: rgba(255, 0, 80, 0.12);
}
.debug .hotspot::before {
  content: attr(data-id);
  position: absolute;
  left: 2px; top: 2px;
  font: 600 10px/1 monospace;
  color: #fff;
  background: rgba(255, 0, 80, 0.85);
  padding: 2px 3px;
  border-radius: 3px;
}

/* ---------- "Coming soon" toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.75em 1.4em;
  font-size: clamp(16px, 2.4vw, 28px);
  font-weight: 700;
  color: #fff6dc;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  background: linear-gradient(#6b4022, var(--wood));
  border: 3px solid rgb(var(--gold));
  border-radius: 18px;
  box-shadow: 0 0 24px rgba(var(--gold), 0.5), 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- Portrait hint (phones/tablets held upright) ---------- */
.rotate-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 15;
  align-items: center;
  gap: 0.6em;
  width: max-content;
  max-width: 92vw;
  padding: 0.6em 0.6em 0.6em 1em;
  font-size: 15px;
  font-weight: 700;
  color: #fff6dc;
  background: rgba(59, 36, 20, 0.95);
  border: 2px solid rgb(var(--gold));
  border-radius: 999px;
}
.rotate-hint__close {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
}
@media (orientation: portrait) and (max-width: 1024px) {
  .rotate-hint:not(.is-dismissed) { display: flex; }
}

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  padding: 12px;
  text-align: center;
  color: #fff;
  background: #7a1f1f;
}

@media (prefers-reduced-motion: reduce) {
  .hotspot, .toast { transition: none; }
  .hotspot--featured::after {
    animation: none;
    box-shadow: inset 0 0 0 2px rgba(var(--gold), 0.6), 0 0 14px 3px rgba(var(--gold-strong), 0.4);
  }
}
