/* SRVM uses the shared project-detail components in index.html.
 * Layout adapters reuse the design system spacing, 44px controls
 * and 2px focus ring documented in nio-et9-design-system.html.
 */
.srvm-story {
  --blue: #245fc2;
  --space-6: 1.5rem;
}

.srvm-story :is(button, a):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Concept surface requested alongside the annotated source illustration. */
.srvm-story .srvm-concept {
  align-items: center;
  background: #F6F6F6;
  border-top: 0;
  padding: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 768px) {
  .srvm-story .srvm-concept { padding: var(--space-6); }
}

/* Gallery composition reuses DS subtitles, captions and 44px circle controls. */
.srvm-gallery-stage { position: relative; }
.srvm-gallery-slide {
  position: relative;
  margin: 0;
  background: #F6F6F6;
}
.srvm-gallery-slide[hidden] { display: none; }
.srvm-gallery-title {
  position: absolute;
  z-index: 1;
  top: clamp(1.5rem, 3vw, 3rem);
  left: clamp(1.5rem, 3vw, 3rem);
  right: clamp(1.5rem, 3vw, 3rem);
  margin: 0;
  pointer-events: none;
}
.srvm-gallery-image { display: block; }
.srvm-gallery-image img { display: block; width: 100%; height: auto; }
.srvm-gallery-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.srvm-gallery-pagination {
  text-align: center;
  margin-top: var(--space-6);
}
.srvm-gallery-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: inherit;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.srvm-gallery-control[data-srvm-gallery-step="-1"] { left: var(--space-6); }
.srvm-gallery-control[data-srvm-gallery-step="1"] { right: var(--space-6); }
.srvm-gallery-stage:hover .srvm-gallery-control,
.srvm-gallery-control:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
/* Touch devices have no hover; retain usable on-image controls. */
@media (hover: none) {
  .srvm-gallery-control { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .srvm-gallery-control { transition: none; }
}
@media (max-width: 768px) {
  .srvm-gallery-slide { padding-top: 6rem; }
  .srvm-gallery-title { font-size: clamp(1.125rem, 1.6vw, 1.5rem); }
}

/* Four equal observation thumbnails; full-size links retain the originals. */
#srvm-drive .pd-case-section-copy { min-width: 0; }
.srvm-story .srvm-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.srvm-field-grid .pd-img-wrap { aspect-ratio: 4 / 3; }
.srvm-field-grid img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 768px) {
  .srvm-story .srvm-field-grid {
    grid-template-columns: repeat(4, minmax(8rem, 1fr));
    overflow-x: auto;
  }
}
