/* ============================================
   OLIABO SCIENCE NARRATIVE — Pure single-column editorial text
   Used for Act II 2A and Act III 3A intros.
   ============================================ */

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

/* ─── Layout — text-only by default; with image, two columns ─── */
.osn__layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: flex-start;
}

.osn__layout--center { align-items: center; }

@media (min-width: 960px) {
  .osn--has-image .osn__layout--left {
    display: grid;
    /* Image column is narrower than the text column so the image
       reads as a supporting moment, not a parallel sell. */
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .osn--has-image .osn__layout--left {
    gap: var(--space-4xl, 96px);
  }
}

/* ─── Image frame ──────────────────────────────────────── */
.osn__image {
  position: relative;
  width: 100%;
  /* Mobile: keep the image visually balanced with the text column
     by capping its width below the container — never feels like a
     hero image, just a supporting moment. */
  max-width: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(60, 66, 46, 0.06);
}

@media (min-width: 960px) {
  .osn__image {
    max-width: none;
  }
}

/* Aspect-ratio modifiers — landscape options listed first;
   default is 5:4 landscape per IA. The ratio class lives on the
   same element as .osn__image, so use compound selectors. */
.osn__image.osn--ratio-5-4 { aspect-ratio: 5 / 4; }
.osn__image.osn--ratio-4-3 { aspect-ratio: 4 / 3; }
.osn__image.osn--ratio-3-2 { aspect-ratio: 3 / 2; }
.osn__image.osn--ratio-1-1 { aspect-ratio: 1 / 1; }
.osn__image.osn--ratio-4-5 { aspect-ratio: 4 / 5; }
.osn__image.osn--ratio-3-4 { aspect-ratio: 3 / 4; }

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

/* Placeholder — solid sage tint matching the EVOO section's
   .ose__placeholder pattern. Visible in the editor before an
   image is uploaded so the slot is always discoverable. */
.osn__placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(60, 66, 46, 0.10) 0%, rgba(60, 66, 46, 0.04) 100%);
}

/* When alignment is centered, the image slot is hidden — centered
   single-column treatment doesn't pair with a side image. */
.osn__layout--center .osn__image {
  display: none;
}

.osn__inner {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.osn__inner--left {
  margin: 0;
  text-align: left;
  align-items: flex-start;
}

.osn__inner--center {
  margin: 0 auto;
  text-align: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .osn__inner { gap: var(--space-lg); }
}

.osn__eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-primary);
  line-height: 1.4;
}

.osn__heading {
  margin: 0;
  font-size: clamp(2rem, 4.5vw + 0.5rem, 3.75rem);
  line-height: 0.98;
  letter-spacing: 0.015em;
  color: var(--clr-primary);
  display: flex;
  flex-direction: column;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.osn__heading-line1 {
  display: block;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--clr-primary);
}

.osn__heading-line2 {
  display: block;
  font-weight: 400;
  /* Upright Cormorant per design guide §5 — never italic */
  color: var(--clr-primary);
  letter-spacing: 0;
  font-size: 0.85em;
  line-height: 1.05;
  margin-top: var(--space-xs);
}

.osn__body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--clr-text-secondary);
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  .osn__body { font-size: var(--font-size-lg); }
}

.osn__body p {
  margin: 0 0 var(--space-md);
}

.osn__body p:last-child { margin-bottom: 0; }

.osn__body em {
  /* Inline emphasis stays restrained — body italic for tradition vs. why distinction */
  font-style: italic;
  color: var(--clr-primary);
}

.osn__body strong {
  font-family: var(--font-primary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  color: var(--clr-primary);
}

/* ─── Dark variant ─── */
.osn.bg-accent-dark .osn__eyebrow { color: var(--clr-brand-accent); }
.osn.bg-accent-dark .osn__heading-line1 { color: var(--clr-text-inverse); }
.osn.bg-accent-dark .osn__heading-line2 { color: var(--clr-brand-accent); }
.osn.bg-accent-dark .osn__body { color: var(--clr-text-inverse); opacity: 0.82; }
.osn.bg-accent-dark .osn__body em { color: var(--clr-text-inverse); }
.osn.bg-accent-dark .osn__body strong { color: var(--clr-text-inverse); }

.osn.bg-accent-dark .osn__image {
  background: rgba(253, 252, 250, 0.05);
}

.osn.bg-accent-dark .osn__placeholder {
  background:
    linear-gradient(135deg, rgba(253, 252, 250, 0.10) 0%, rgba(253, 252, 250, 0.04) 100%);
}
