/* Video preview: a plain link to the file, upgraded to the modal player by heloc-video.js.
   The landscape thumbnail is shown whole (contain), never cropped; layout next to
   the personal note lives in heloc-greeting.css. */
.video-preview {
  min-width: 0;
}

.video-preview-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(214, 170, 92, 0.55);
  border-radius: 12px;
  background: #fff;
  color: var(--mama-navy);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.25s ease;
}

.video-preview-link:hover {
  border-color: var(--mama-brass-dark);
  box-shadow: 0 8px 24px rgba(11, 18, 32, 0.12);
}

.video-preview-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mama-navy);
}

.video-preview-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Bottom right, over the photo, so it never covers the words printed on the left of the image. */
.video-preview-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 18, 32, 0.72);
  border: 2px solid var(--mama-brass);
}

.video-preview-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -5px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.video-preview-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 4px 4px;
}

.video-preview-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.video-preview-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--mama-muted);
}

.video-preview-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--mama-navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.video-preview-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--mama-muted);
  text-align: center;
}

.hero-copy .video-preview-note {
  color: rgba(255, 255, 255, 0.82);
}

@media (hover: hover) and (pointer: fine) {
  .brand img:hover,
  .brand:focus-visible img {
    transform: scale(3);
    z-index: 30;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  }

  .video-preview-link:hover,
  .video-preview-link:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  }
}

/* Video dialog: sized so a 9:16 video fits the viewport on phones and desktops. */
.video-dialog {
  width: fit-content;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #0b1220;
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.video-dialog::backdrop {
  background: rgba(11, 18, 32, 0.82);
}

.video-dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
}

.video-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-dialog-bar h2 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.video-dialog-close {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.video-dialog-player {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(calc(100vh - 96px), 860px);
  height: min(calc(100dvh - 96px), 860px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 8px;
  background: #000;
  object-fit: contain;
}

.video-dialog-hint {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.video-dialog-error {
  max-width: 340px;
  padding: 16px 4px;
  text-align: center;
}

.video-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-dialog-player[hidden],
.video-dialog-error[hidden],
.video-dialog-hint[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .video-preview-link:hover,
  .video-preview-link:focus-visible {
    transform: none;
  }
}
