/* Mobile only */
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: #000;
}
body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  overflow: hidden;
}

:root {
  --psd-margin: 12px;
  /* Join Now overlay – adjust to match PSD on your screen */
  --join-left: 18.43%;
  --join-top: 34.15%;
  --join-width: 65.15%;
  --join-height: 12.66%;
  /* Optional nudge (e.g. 2px 1px or 1% 0) */
  --join-nudge-x: 0;
  --join-nudge-y: 0;
}

/* Always mobile-sized: full screen on phone, phone frame on desktop */
.mobile-frame {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  max-width: 430px;
  max-height: 932px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.psd-wrap {
  position: relative;
  z-index: 1;
  margin: var(--psd-margin);
  width: calc(100% - 2 * var(--psd-margin));
  height: calc(100% - 2 * var(--psd-margin));
  max-width: calc(100% - 2 * var(--psd-margin));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fixed aspect ratio = PSD (1080×1920) so overlay % positions stay correct on all screens */
.psd-aspect-box {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 1080 / 1920;
  flex-shrink: 0;
}

.psd-aspect-box .psd-link {
  position: absolute;
  inset: 0;
  text-decoration: none;
}

.psd-aspect-box .psd-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Join Now button overlay – position via variables above */
.join-btn-link {
  position: absolute;
  left: var(--join-left);
  top: var(--join-top);
  width: var(--join-width);
  height: var(--join-height);
  z-index: 2;
  text-decoration: none;
}

.join-btn {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
  mix-blend-mode: darken;
  transform: translate(var(--join-nudge-x), var(--join-nudge-y));
}

/* Telegram icon – bottom right of PSD (link wraps img) */
.telegram-link {
  position: absolute;
  right: -64px;
  bottom: 13px;
  width: 226px;
  height: 239px;
  z-index: 2;
  text-decoration: none;
}

.telegram-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
