* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #f8e6d7;
}

body {
  overflow: auto;
}

.viewport-shell {
  min-height: 100svh;
  width: 100%;
  display: grid;
  place-items: center;
  background: #f8e6d7;
}

/*
  The artboard keeps the original image ratio.
  This prevents cropping and keeps all clickable areas aligned.
*/
.artboard {
  position: relative;
  width: min(100vw, calc(100svh * var(--ratio)));
  aspect-ratio: var(--ratio);
  flex: none;
  overflow: hidden;
  background: #f8e6d7;
}

.home-artboard {
  --ratio: 1.5; /* 1536 / 1024 */
}

.how-artboard {
  --ratio: 1.7746967071; /* 2048 / 1154 */
}

.artboard > img:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.hotspot {
  position: absolute;
  z-index: 20;
  display: block;
  cursor: pointer;
}

/* Home image button positions */
.how-hotspot {
  top: 3.9%;
  left: 54.9%;
  width: 8.2%;
  height: 6.6%;
  border-radius: 14px;
}

.join-hotspot {
  top: 3.9%;
  left: 64.5%;
  width: 31.2%;
  height: 6.6%;
  border-radius: 14px;
}


/* Right-hand phone replacement on the How page */
.phone-overlay {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  width: 31.2%;
  height: 100%;
  opacity: 0;
  transform: scale(.985);
  filter: blur(1.2px);
  pointer-events: none;
  overflow: hidden;
  background: #fff;
  transition:
    opacity .75s cubic-bezier(.22,.61,.36,1),
    transform .75s cubic-bezier(.22,.61,.36,1),
    filter .75s cubic-bezier(.22,.61,.36,1);
}

.phone-overlay.visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.phone-overlay img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

/* On narrow screens, preserve the complete image and allow vertical scrolling */
@media (max-width: 720px) {
  .viewport-shell {
    min-height: auto;
    align-items: start;
  }

  .artboard {
    width: 100vw;
    height: auto;
  }
}

/* Optional focus indicator for keyboard users */
.hotspot:focus-visible {
  outline: 4px solid rgba(230, 117, 0, .9);
  outline-offset: -4px;
}


/* Visible Home button on the How page */
.visible-home-button {
  position: absolute;
  z-index: 30;
  top: 18px;
  left: 18px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(191,89,0,.35);
  box-shadow: 0 10px 28px rgba(71,43,22,.18);
  color: #7b3f00;
  text-decoration: none;
  font: 700 16px/1 Arial, Helvetica, sans-serif;
  backdrop-filter: blur(10px);
}

.visible-home-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.visible-home-button:focus-visible {
  outline: 3px solid rgba(230,117,0,.85);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .visible-home-button {
    top: 10px;
    left: 10px;
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
  }
}
