/* Add these rules after your existing hero styles. */

.hero-visual {
  display: grid;
  min-width: 0;
  place-items: center;
}

.hero-video-card {
  width: min(100%, 24rem);
  margin: 0;
}

.hero-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #287cb3;
  border-radius: inherit;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;

  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;

  color: #fff;
  background: rgb(35 51 71 / 88%);
  border: 2px solid rgb(255 255 255 / 85%);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-video-toggle:hover {
  background: #233347;
}

.hero-video-toggle:focus-visible {
  outline: 3px solid #fa6400;
  outline-offset: 3px;
}

.hero-video-toggle__icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.hero-video-toggle__icon--play {
  display: none;
  margin-left: 0.125rem;
}

.hero-video-toggle[data-state="paused"]
  .hero-video-toggle__icon--pause {
  display: none;
}

.hero-video-toggle[data-state="paused"]
  .hero-video-toggle__icon--play {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Use this only if your existing hero grid does not already size the columns. */
.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

@media (max-width: 800px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-video-card {
    width: min(100%, 21rem);
  }

  .hero-video-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
