/* Studio page (/studio/). Loaded only there, through `stylesheets` in its front matter.
   Builds on the shared .video-hero, .cap-grid / .cap-card and .band styles in safetypool.css. */

/* Hero: Studio's own poster behind the video while it loads. */
.studio-hero {
  background-image: url("/assets/images/studio_background_poster.jpg");
}

/* Building blocks: 7 + 5 on top (from .cap-grid), then three panels of 4. */
.studio-cap-grid > .cap-card:nth-child(n + 3) {
  grid-column: span 4;
}
/* The Lights screenshot is a small crop, so keep it in its top-left corner
   rather than stretching it. */
.studio-lights > img {
  object-position: left top;
}

/* A single Studio panel (weather, time of day, placing a vehicle) shown at
   its own size on the dark card, so the UI text stays sharp. */
.studio-cap-grid > .cap-card.studio-panel {
  min-height: 22rem;
  justify-content: space-between;
}
.studio-panel-shot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.75rem 0;
}
.cap-card .studio-panel-shot img {
  position: static;
  z-index: auto;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 11rem;
  border-radius: 0.75rem;
  box-shadow: 0 1.25rem 2.5rem -1rem #000000b3;
  transition: transform 0.4s ease;
}
.cap-card.studio-panel:hover .studio-panel-shot img {
  transform: translateY(-0.25rem);
}

/* Time of day: one map, three lighting states, cross-faded. */
.studio-time-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.studio-time-head > div:first-child {
  max-width: 40rem;
}
/* Day / Sunset / Night slider: three segments, each with an icon and a bar that fills
   (like the feature reel) while that picture is shown, then hands over to the next. */
.studio-time-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.studio-time-switch[hidden] {
  display: none;
}
.studio-time-switch button {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0 0;
  border: 0;
  background: transparent;
  color: #fafafa99;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}
.studio-time-switch button:hover,
.studio-time-switch button[aria-pressed="true"] {
  color: var(--white);
}
.studio-time-switch button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 0.25rem;
}
.studio-time-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.studio-time-label svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.studio-time-switch button[aria-pressed="true"] svg {
  color: var(--tomato);
}
.studio-time-bar {
  display: block;
  height: 0.25rem;
  border-radius: 999px;
  background-color: #ffffff2e;
  overflow: hidden;
}
.studio-time-bar > span {
  display: block;
  height: 100%;
  background-color: var(--tomato);
  transform: scaleX(0);
  transform-origin: left;
}
.studio-time-frame {
  position: relative;
  margin-top: 1.25rem;
  aspect-ratio: 1920 / 1009;
  border-radius: 1rem;
  overflow: hidden;
  background-color: #11161c;
}
.studio-time-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.studio-time-frame img.is-active {
  opacity: 1;
}

/* Places: three equal picture cards. */
.studio-places > .cap-card,
.studio-places > .cap-card:nth-child(1),
.studio-places > .cap-card:nth-child(2) {
  grid-column: span 4;
  min-height: 22rem;
}

@media screen and (max-width: 991px) {
  .studio-cap-grid > .cap-card:nth-child(n + 3) {
    grid-column: span 6;
  }
  .studio-cap-grid > .cap-card:nth-child(5) {
    grid-column: span 12;
  }
  .studio-places > .cap-card:nth-child(n) {
    grid-column: span 6;
    min-height: 18rem;
  }
  .studio-places > .cap-card:nth-child(1) {
    grid-column: span 12;
  }
  .studio-time-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media screen and (max-width: 767px) {
  .studio-cap-grid > .cap-card:nth-child(n),
  .studio-places > .cap-card:nth-child(n) {
    grid-column: span 12;
  }
  .studio-time-switch {
    gap: 0.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .studio-time-frame img,
  .cap-card .studio-panel-shot img {
    transition: none;
  }
  .cap-card.studio-panel:hover .studio-panel-shot img {
    transform: none;
  }
}
