/* 5 Stars — intro video popup */
:root {
  --vp-accent: #623823;
  --vp-dark: #040401;
  --vp-stroke: rgba(98, 56, 35, 0.5);
}

.vp-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 4, 1, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.vp-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.vp-panel {
  position: relative;
  width: auto;
  max-width: calc(100vw - 32px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--vp-dark);
  border: 0.5px solid var(--vp-stroke);
  transform: translateY(26px) scale(0.96);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.vp-overlay.is-open .vp-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.vp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 60px 14px 18px;
  border-bottom: 0.5px solid var(--vp-stroke);
}
.vp-head img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.vp-head-txt strong {
  display: block;
  font-family: "Epilogue", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  color: var(--vp-dark);
}
.vp-head-txt span {
  font-size: 12px;
  color: rgba(4, 4, 1, 0.6);
}

.vp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  background: var(--vp-dark);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 3;
}
.vp-close:hover {
  background: var(--vp-accent);
  transform: rotate(90deg);
}

/* The frame always keeps the video's exact original 9:16 aspect ratio.
   Height is capped only by the viewport; width follows from the ratio,
   so nothing is ever cropped, stretched or shrunk. */
.vp-media {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  height: min(calc(100vh - 48px), calc((100vw - 32px) * 16 / 9));
  width: auto;
}
.vp-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 0.5px solid var(--vp-stroke);
}
.vp-foot p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(4, 4, 1, 0.65);
}
.vp-foot a {
  flex: none;
  padding: 10px 18px;
  border-radius: 40px;
  background: var(--vp-accent);
  color: #fff !important;
  font-size: 13px;
  font-family: "Epilogue", sans-serif;
  border: 0.5px solid var(--vp-stroke);
  transition: background 0.25s ease;
}
.vp-foot a:hover {
  background: var(--vp-dark);
}

/* Reopen pill */
.vp-reopen {
  position: fixed;
  left: 20px;
  bottom: 24px;
  z-index: 9990;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 40px;
  background: var(--vp-dark);
  color: #fff;
  border: 0.5px solid var(--vp-stroke);
  cursor: pointer;
  font-family: "Epilogue", sans-serif;
  font-size: 13px;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, background 0.25s ease;
}
.vp-reopen.is-shown {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.vp-reopen:hover {
  background: var(--vp-accent);
}
.vp-reopen .vp-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--vp-accent);
  border: 0.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.vp-reopen.is-shown .vp-play {
  animation: vp-pulse 2.4s ease-out infinite;
}
@keyframes vp-pulse {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Mobile: sheet from below */
@media only screen and (max-width: 767px) {
  .vp-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .vp-panel {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .vp-overlay.is-open .vp-panel {
    transform: translateY(0);
  }
  .vp-media {
    /* Same exact 9:16 ratio on mobile: height fills the screen up to the
       viewport, width follows the ratio — nothing is cut. */
    height: min(calc(100vh - 32px), calc(100vw * 16 / 9));
    height: min(calc(100svh - 32px), calc(100vw * 16 / 9));
    width: auto;
    max-width: 100vw;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
  }
  .vp-panel::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 4px;
    border-radius: 4px;
    background: rgba(98, 56, 35, 0.35);
    z-index: 3;
  }
  .vp-head {
    padding-top: 20px;
  }
  .vp-foot {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .vp-reopen {
    left: 14px;
    bottom: 86px;
    padding: 8px 14px 8px 8px;
    font-size: 12px;
  }
}

/* The dialog is intentionally video-only: no site header, branding, copy or links. */
.vp-panel .vp-head,
.vp-panel .vp-foot,
.vp-panel::before {
  display: none;
}

/* Tap-to-play with sound prompt */
.vp-sound-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(4, 4, 1, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Epilogue", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.vp-sound-play.is-shown { display: flex; }
.vp-sound-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--vp-accent);
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 4px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.vp-sound-play:hover .vp-sound-icon {
  transform: scale(1.08);
  background: var(--vp-dark);
}

/* Expand / fullscreen button */
.vp-expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 4, 1, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.vp-expand:hover {
  background: var(--vp-accent);
  transform: scale(1.06);
}

/* Fullscreen: let the video fill the whole screen */
.vp-media:fullscreen,
.vp-media:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  aspect-ratio: auto;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vp-media:fullscreen video,
.vp-media:-webkit-full-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vp-media:fullscreen .vp-expand,
.vp-media:-webkit-full-screen .vp-expand {
  right: 18px;
  bottom: 18px;
}

@media only screen and (max-width: 767px) {
  .vp-sound-play { font-size: 13px; gap: 12px; }
  .vp-sound-icon { width: 56px; height: 56px; font-size: 18px; }
  .vp-expand { right: 10px; bottom: 10px; width: 36px; height: 36px; }
}
