:root {
  --art-w: 1845;
  --art-h: 1400;
  --gold: #e8c56a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #000;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
}

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 2vw, 1.5rem);
}

.artboard {
  position: relative;
  width: min(92vw, calc(92svh * (var(--art-w) / var(--art-h))));
  aspect-ratio: var(--art-w) / var(--art-h);
  isolation: isolate;
}

.art-back,
.art-title,
.art-glow,
.art-title-small {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.art-back {
  z-index: 1;
}

.art-title {
  z-index: 2;
  transform-origin: center top;
  filter:
    drop-shadow(0 1rem 0.65rem rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 1.25rem rgba(255, 195, 51, 0.23))
    drop-shadow(0 0 3.5rem rgba(255, 168, 15, 0.16));
  animation: title-float 7.8s ease-in-out infinite, title-gem-pulse 9s ease-in-out infinite;
}

.art-glow {
  z-index: 3;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 240ms ease;
}

.art-title-small {
  z-index: 6;
}

.artboard.is-join-hover .art-glow,
.artboard:has(.join-hotspot:hover) .art-glow,
.artboard:has(.join-hotspot:focus-visible) .art-glow {
  opacity: 1;
}

/* Invisible clickable region over the painted JOIN US plate */
.join-hotspot {
  position: absolute;
  z-index: 4;
  left: 40%;
  top: 61%;
  width: 20%;
  height: calc(8% + (10 / var(--art-h) * 100%));
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  outline: none;
}

.join-hotspot:focus-visible {
  box-shadow: 0 0 0 2px rgba(232, 197, 106, 0.55);
}

.status-live {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.users-count {
  /* Aligned to painted Users: label (~28px left, ~44px up from prior anchor) */
  position: absolute;
  left: calc(64.55% - (28 / var(--art-w) * 100%));
  top: calc(79.55% - (44 / var(--art-h) * 100%));
  min-width: 2.2em;
  margin: 0;
  color: #cfc8bc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.68rem, 1.45vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-variant-numeric: tabular-nums;
}

@keyframes title-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-0.24rem) scale(1.002); }
}

@keyframes title-gem-pulse {
  0%, 100% { filter:
    drop-shadow(0 1rem 0.65rem rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 1.25rem rgba(255, 195, 51, 0.23))
    drop-shadow(0 0 3.5rem rgba(255, 168, 15, 0.16));
  }
  48% { filter:
    drop-shadow(0 1rem 0.65rem rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 1.5rem rgba(255, 211, 87, 0.32))
    drop-shadow(0 0 4.2rem rgba(255, 170, 28, 0.2));
  }
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .page-shell {
    padding: 0.4rem;
  }

  .artboard {
    width: min(100vw, calc(100svh * (var(--art-w) / var(--art-h))));
  }

  .users-count {
    font-size: clamp(0.62rem, 2.6vw, 0.95rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
