/* ============================================
   OLIABO SCIENCE IMAGE
   Atmospheric breathing-room photography between
   data-heavy sections. Full-bleed cinematic by default;
   editor can switch to contained layout or other
   aspect ratios. Optional small tracked-caps caption.
   Swiss-Grid Editorial × Mediterranean warmth.
   ============================================ */

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

.osi__figure {
  position: relative;
  margin: 0;
  width: 100%;
  background: rgba(60, 66, 46, 0.06);
  overflow: hidden;
}

.osi--ratio-21-9 .osi__figure { aspect-ratio: 21 / 9; }
.osi--ratio-16-9 .osi__figure { aspect-ratio: 16 / 9; }
.osi--ratio-3-2  .osi__figure { aspect-ratio: 3 / 2; }
.osi--ratio-4-3  .osi__figure { aspect-ratio: 4 / 3; }
.osi--ratio-1-1  .osi__figure { aspect-ratio: 1 / 1; }

@media (max-width: 767px) {
  .osi--ratio-21-9 .osi__figure { aspect-ratio: 16 / 10; }
  .osi--ratio-16-9 .osi__figure { aspect-ratio: 4 / 3; }
}

.osi--contained .osi__figure {
  border-radius: var(--radius-lg);
}

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

.osi__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(60, 66, 46, 0.05),
      rgba(60, 66, 46, 0.05) 10px,
      rgba(60, 66, 46, 0.10) 10px,
      rgba(60, 66, 46, 0.10) 20px
    );
}

.osi__placeholder-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.osi__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-color, #3c422e);
  opacity: var(--overlay-opacity, 0.25);
  pointer-events: none;
}

.osi__caption {
  position: absolute;
  left: var(--space-lg);
  bottom: var(--space-lg);
  z-index: 2;
  max-width: 480px;
}

@media (min-width: 768px) {
  .osi__caption { left: var(--space-xl); bottom: var(--space-xl); }
}

@media (min-width: 1024px) {
  .osi__caption { left: var(--space-2xl); bottom: var(--space-2xl); }
}

.osi__caption-text {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(253, 252, 250, 0.92);
  color: var(--clr-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.4;
  border-radius: 2px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@media (min-width: 1024px) {
  .osi__caption-text { font-size: 12px; }
}

.osi.bg-accent-dark .osi__caption-text {
  background: rgba(31, 38, 21, 0.85);
  color: var(--clr-brand-accent);
}
