/* KAZINO MICKŪNAI — the reference artwork is the interface.
   Transparent hitboxes sit exactly on its baked-in controls. */

:root {
  color-scheme: dark;
  background: #000;
  color: #fff;
  font-family: Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; }

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 12px;
  overflow: hidden;
  isolation: isolate;
  background: #050302;
}

.hero__backdrop {
  position: absolute;
  inset: -12%;
  z-index: 0;
  background: url('assets/hero-reference.png') center / cover no-repeat;
  filter: blur(38px) brightness(0.3) saturate(1.25);
  opacity: 0.9;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(150, 88, 12, 0.22), transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.35) 70%, #000 100%);
}

.stage {
  position: relative;
  z-index: 2;
  width: min(100%, calc((100svh - 24px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.85);
}

.stage__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.hitbox {
  position: absolute;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hitbox:focus-visible,
.hitbox--language button:focus-visible {
  outline: 2px solid #ffe698;
  outline-offset: 3px;
  border-radius: 999px;
}

.hitbox--brand { left: 3%; top: 3%; width: 31%; height: 16%; }
.hitbox--home { left: 40.7%; top: 4.5%; width: 15%; height: 7.3%; border-radius: 999px; }
.hitbox--language {
  right: 4.5%;
  top: 4.5%;
  width: 15%;
  height: 7.3%;
  display: flex;
}

.hitbox--language button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.hitbox--language button[aria-pressed="true"] {
  background: rgba(246, 196, 83, 0.18);
  box-shadow: inset 0 0 0 2px rgba(255, 230, 152, 0.85), 0 0 14px rgba(246, 196, 83, 0.4);
}

.hitbox--play {
  left: 14%;
  top: 64%;
  width: 35%;
  height: 16%;
  border-radius: 999px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.hitbox--play:hover {
  transform: scale(1.025);
  filter: brightness(1.12);
  box-shadow: 0 0 0 2px rgba(255, 230, 152, 0.7), 0 0 34px rgba(246, 196, 83, 0.4);
}

.hitbox--play:active { transform: scale(0.97); }

.message {
  position: absolute;
  z-index: 3;
  left: 30.5%;
  top: 88%;
  transform: translate(-50%, 12px);
  margin: 0;
  padding: 8px 15px;
  border: 1px solid rgba(245, 198, 83, 0.65);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24, 14, 5, 0.97), rgba(8, 5, 2, 0.97));
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.8), 0 0 26px rgba(246, 196, 83, 0.28);
  color: #ffe8a2;
  font: 600 clamp(11px, 1.5vw, 16px) / 1.2 Arial, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.message.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Phones: the exact same frame from the top is repeated down the whole
   screen. No zoom, no blur — every copy is the original 16:9 picture, and
   app.js adds working hitboxes to each visible copy. */
@media (max-width: 700px) and (orientation: portrait) {
  .hero {
    padding: 0;
    place-items: start center;
  }

  .hero__backdrop,
  .hero::after { display: none; }

  .stage {
    --art-h: calc(100vw * 9 / 16);
    width: 100vw;
    height: 100vh;
    height: 100svh;
    aspect-ratio: auto;
    overflow: hidden;
    box-shadow: none;
    background: url('assets/hero-reference.png') repeat-y center top / 100% auto;
  }

  .stage__image {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .hitbox--brand { left: 2%; top: 0; width: 34%; height: 44px; }
  .hitbox--home { left: 38%; top: 0; width: 20%; height: 44px; }
  .hitbox--language { right: 2%; top: 0; width: 22%; height: 44px; }
  .hitbox--play { left: 14%; top: calc(var(--art-h) * 0.62); width: 35%; height: 44px; }

  .message {
    left: 50%;
    top: auto;
    bottom: calc(26px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 32px);
    min-height: 40px;
    padding: 9px 16px;
    font-size: 12.5px;
    white-space: normal;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
