/* ============================================
   REVAMP VIDEO BANNER — Banner statement + video player
   Built off revamp-join-banner; adds a 2-col video column
   with an orientation toggle (left / right).
   ============================================ */

.rvb {
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .rvb { min-height: 520px; display: flex; align-items: center; }
}

/* ─── Background image + overlay
   Both layers ONLY render when an image is uploaded; the
   section's bg-* class shows through naturally otherwise.
   Overlay color is now configurable via --rvb-overlay-color. ── */
.rvb__image-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rvb__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rvb__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--rvb-overlay-color, #2d3122);
  opacity: var(--rvb-overlay-opacity, 0.55);
  pointer-events: none;
}

.rvb__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ─── 2-column grid ─────────────────────────────────────── */
.rvb__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 900px) {
  .rvb__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-3xl);
  }
}

/* ─── Content column ────────────────────────────────────── */
.rvb__content {
  max-width: 640px;
  min-width: 0;
}

.rvb__eyebrow {
  margin: 0 0 var(--space-lg);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
}

.rvb__heading {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0.018em;
  font-size: clamp(2.25rem, 5vw + 0.5rem, 4.5rem);
  display: flex;
  flex-direction: column;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.rvb__heading-line1 {
  display: block;
  text-transform: uppercase;
  font-weight: 600;
}

.rvb__heading-line2 {
  display: block;
  font-weight: 400;
  /* Upright Cormorant — never italic per design guide §5 */
  letter-spacing: 0;
  font-size: 0.85em;
  line-height: 1.0;
  margin-top: var(--space-xs);
}

.rvb__subtext {
  margin: var(--space-lg) 0 0;
  max-width: 520px;
  font-size: var(--font-size-base);
  font-weight: 300;
  line-height: 1.65;
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  .rvb__subtext { font-size: 17px; }
}

/* ============================================
   Copy color modes
   .rvb--copy-light → on dark bg or over an image
   .rvb--copy-dark  → on light bg, no image
   ============================================ */
.rvb--copy-light .rvb__eyebrow { color: var(--clr-brand-accent); }
.rvb--copy-light .rvb__heading-line1 { color: var(--clr-text-inverse); }
.rvb--copy-light .rvb__heading-line2 { color: var(--clr-brand-accent); }
.rvb--copy-light .rvb__subtext { color: var(--clr-text-inverse); opacity: 0.88; }

.rvb--copy-dark .rvb__eyebrow { color: var(--clr-primary); }
.rvb--copy-dark .rvb__heading-line1 { color: var(--clr-primary); }
.rvb--copy-dark .rvb__heading-line2 { color: var(--clr-primary); }
.rvb--copy-dark .rvb__subtext { color: var(--clr-text-secondary); }

/* ─── Video column ──────────────────────────────────────── */
.rvb__video-col {
  min-width: 0;
}

.rvb__video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.rvb__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

/* Embedded iframe (YouTube/Vimeo) — disable hover cursor since the
   embed handles its own player UI. */
.rvb__video-frame--embed {
  cursor: default;
}

.rvb__video-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 25%, rgba(181, 168, 130, 0.22), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(242, 223, 207, 0.10), transparent 55%),
    linear-gradient(160deg, #2d3122 0%, #3c422e 100%);
  position: relative;
}

.rvb__video-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(253, 252, 250, 0.04) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

/* ─── Play / Pause overlay ─────────────────────────────── */
.rvb__play,
.rvb__pause {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: rgba(253, 252, 250, 0.94);
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, opacity 0.25s ease;
}

@media (min-width: 768px) {
  .rvb__play,
  .rvb__pause {
    width: 76px;
    height: 76px;
  }
}

.rvb__play svg {
  margin-left: 3px;
}

.rvb__play:hover,
.rvb__pause:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.rvb__play:focus-visible,
.rvb__pause:focus-visible {
  outline: 2px solid var(--clr-brand-accent);
  outline-offset: 4px;
}

.rvb__pause {
  opacity: 0;
  pointer-events: none;
}

.rvb.is-playing .rvb__play {
  opacity: 0;
  pointer-events: none;
}

.rvb.is-playing .rvb__video-frame:hover .rvb__pause,
.rvb.is-playing .rvb__video-frame:focus-within .rvb__pause {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   ORIENTATION TOGGLE
   Default: video right (content order 1, video order 2).
   Flip via .rvb--video-left modifier.
   Mobile always stacks content first regardless of toggle.
   ============================================ */
.rvb__content { order: 1; }
.rvb__video-col { order: 2; }

@media (min-width: 900px) {
  .rvb--video-left .rvb__content { order: 2; }
  .rvb--video-left .rvb__video-col { order: 1; }
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .rvb__play,
  .rvb__pause {
    transition: none;
  }
  .rvb__play:hover,
  .rvb__pause:hover {
    transform: translate(-50%, -50%);
  }
}
