/* Preview-only photography carousel; the original homepage is unchanged. */
.beyond-research {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 36px;
}

.beyond-research-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.beyond-research-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.beyond-research-gallery {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  text-underline-offset: 4px;
}

.beyond-research-viewport {
  --visible-photos: 3;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  touch-action: pan-y pinch-zoom;
  border-radius: 4px;
}

.beyond-research.is-carousel-ready .beyond-research-viewport {
  overflow: clip;
  scroll-snap-type: none;
  overflow-anchor: none;
}

.beyond-research.is-carousel-ready .beyond-research-grid {
  will-change: transform;
}

.beyond-research-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.beyond-research-photo {
  display: block;
  flex: 0 0 calc((100% - (var(--visible-photos) - 1) * 20px) / var(--visible-photos));
  min-width: 0;
  color: var(--text-muted);
  border-radius: 4px;
  scroll-snap-align: start;
  -webkit-user-drag: none;
  user-select: none;
}

.beyond-research-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

.beyond-research-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  -webkit-user-drag: none;
  transition: none;
}

.beyond-research-photo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.5;
}

.beyond-research-photo time {
  font-variant-numeric: tabular-nums;
}

.beyond-research-photo:hover {
  color: var(--text);
  text-decoration: none;
}

.beyond-research-viewport:focus-visible,
.beyond-research-controls button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.beyond-research-photo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.beyond-research-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  color: var(--text-muted);
}

.beyond-research-controls[hidden],
.beyond-research-controls button[hidden] {
  display: none;
}

.beyond-research-controls button {
  appearance: none;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 400;
  min-height: 36px;
  padding: 4px 0;
}

.beyond-research-controls button:hover {
  color: var(--text);
}

.beyond-research-navigation {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.beyond-research-navigation button {
  min-width: 36px;
  font-size: 20px;
}

.beyond-research-position {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.beyond-research-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .beyond-research.is-carousel-ready .beyond-research-photo img {
    animation: beyond-research-breathe 9s ease-in-out infinite alternate;
    animation-play-state: paused;
    will-change: transform;
  }

  .beyond-research[data-carousel-playing="true"] .beyond-research-photo img {
    animation-play-state: running;
  }
}

@keyframes beyond-research-breathe {
  from { transform: translateZ(0) scale(1); }
  to { transform: translateZ(0) scale(1.012); }
}

/* Only the carousel adapts; the rest of the mobile homepage is unchanged. */
@media (max-width: 800px) {
  .beyond-research-viewport {
    --visible-photos: 2;
  }
}

@media (max-width: 600px) {
  .beyond-research-viewport {
    --visible-photos: 1;
  }
}
