﻿.investments-page {
  position: relative;
}

.investments-page__flow {
  display: grid;
  gap: 18px;
}

.investments-page__header {
  max-width: 920px;
  margin-bottom: 10px;
}

.investments-page__header .lede {
  max-width: 820px;
}

.investments-story-list {
  display: grid;
}

.investment-story {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  padding: 58px 0;
  border-top: 1px solid rgba(15, 76, 129, 0.1);
}

.investment-story:first-child {
  border-top: 0;
  padding-top: 18px;
}

.investment-story--reverse {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.investment-story--reverse .investment-story__content {
  order: 2;
}

.investment-story--reverse .investment-story__media {
  order: 1;
}

.investment-story__content {
  display: grid;
  gap: 16px;
  max-width: 740px;
}

.investment-story__kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.investment-story__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ndc-blue-deep), var(--ndc-blue-mid));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.15);
}

.investment-story__title {
  margin: 0;
  font-family: var(--ndc-font-head);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
}

.investment-story__title a {
  color: var(--ndc-blue-deep);
}

.investment-story__title a:hover {
  color: var(--ndc-blue-mid);
}

.investment-story__date {
  margin: 0;
  color: var(--ndc-muted);
  font-size: 0.95rem;
}

.investment-story__body {
  max-width: 68ch;
  color: var(--ndc-ink);
  font-size: 1.03rem;
  line-height: 1.9;
}

.investment-story__body p {
  margin: 0 0 1rem;
}

.investment-story__body p:last-child {
  margin-bottom: 0;
}

.investment-story__media {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
}

.investment-story__media img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.001);
  transition: transform 360ms ease, filter 360ms ease;
}

.investment-story:hover .investment-story__media img {
  transform: scale(1.02);
  filter: saturate(1.04);
}

.investment-detail {
  display: grid;
  gap: 0;
}

.investment-detail__hero {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

.investment-detail__hero h1 {
  margin: 0;
}

.investment-detail__date {
  margin: 0;
  color: var(--ndc-muted);
}

.investment-detail__grid {
  align-items: start;
}

.investment-detail__content {
  display: grid;
  gap: 22px;
}

.investment-detail__figure {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--ndc-border);
  box-shadow: var(--ndc-shadow);
}

.investment-detail__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.investment-detail__back {
  width: fit-content;
}

@media (max-width: 1024px) {
  .investment-story,
  .investment-story--reverse {
    grid-template-columns: 1fr;
  }

  .investment-story--reverse .investment-story__content,
  .investment-story--reverse .investment-story__media {
    order: initial;
  }
}

@media (max-width: 768px) {
  .investments-page__flow {
    gap: 8px;
  }

  .investment-story {
    padding: 40px 0;
    gap: 22px;
  }

  .investment-story__content {
    max-width: 100%;
  }

  .investment-story__title {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  .investment-detail__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Investments page — scroll-reveal & enhanced layout ─────────────────────
   Scoped entirely to .invest-reveal / .investment-story__* so zero bleed
   to any other page or component.
   ────────────────────────────────────────────────────────────────────────── */

/* Truncated summary — ~55 words, line-clamped to 5 lines */
.investment-story__summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ndc-ink, #1a2b3c);
  max-width: 60ch;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Actions row — CTA + share aligned center, always horizontal ─────────── */
.investment-story__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* Visit Site link — below the date, only renders when website_url is set */
.investment-story__website {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ndc-blue-mid, #003d80);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 180ms ease, gap 180ms ease;
}

.investment-story__website svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.investment-story__website:hover {
  color: var(--ndc-blue-deep, #002147);
  gap: 9px;
}

.investment-story__website:hover svg {
  transform: translate(1px, -1px);
}

/* CTA button — solid filled, always visible (scoped: doesn't touch other pages) */
.investment-story__cta.button {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #002147 0%, #003d80 100%);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 33, 71, 0.22);
  transition: background 220ms ease, box-shadow 220ms ease, transform 180ms ease;
  line-height: 1;
  white-space: nowrap;
  margin: 0 !important;
}

.investment-story__cta.button:hover,
.investment-story__cta.button:focus {
  background: linear-gradient(135deg, #001530 0%, #002b5c 100%);
  box-shadow: 0 10px 28px rgba(0, 33, 71, 0.3);
  transform: translateY(-2px);
  color: #fff !important;
}

/* Share — keep flush aligned center; lift menu above sibling stories */
.investment-story__actions .ndc-share {
  font-size: 0.9rem;
  /* Allow the dropdown to overflow story boundaries */
  overflow: visible;
  position: relative;
  z-index: 10;
}

/* Scoped z-index fix for share dropdown — does NOT touch global share.css */
.investment-story__actions .ndc-share__menu {
  z-index: 999;
}

/* When share is open, lift the whole story above siblings */
.investment-story:has(.ndc-share.is-open) {
  z-index: 50;
}

/* ── Media container — no card, raw image with depth ────────────────────── */
.investment-story__media {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow:
    0 2px  4px  rgba(0, 21, 48, 0.06),
    0 8px  20px rgba(0, 21, 48, 0.10),
    0 28px 56px rgba(0, 21, 48, 0.16);
}

.investment-story__media a {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.investment-story__media img {
  width: 100%;
  height: 100%;
  display: block;
  transition:
    transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter    600ms ease;
}

/* ── Cover mode (default — real photos) ──────────────────────────────────── */
.investment-story__media--cover {
  background: #0a1628;
}

.investment-story__media--cover img {
  object-fit: cover;
}

/* Bottom gradient for photos only */
.investment-story__media--cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 15, 40, 0.22) 0%,
    rgba(0, 15, 40, 0.04) 45%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 400ms ease;
}

.investment-story:hover .investment-story__media--cover img {
  transform: scale(1.05);
  filter: saturate(1.1) brightness(1.03);
}

.investment-story:hover .investment-story__media--cover::after {
  opacity: 0.5;
}

/* ── Contain mode (graphics / logos / branded assets) ────────────────────── */
.investment-story__media--contain {
  background: #f4f6fa;   /* neutral light bg so image doesn't float in void */
  display: flex;
  align-items: center;
  justify-content: center;
}

.investment-story__media--contain a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.investment-story__media--contain img {
  object-fit: contain;
  padding: 8%;           /* breathing room around the graphic */
  max-width: 100%;
  max-height: 100%;
  transition:
    transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter    500ms ease;
}

/* No overlay for graphic images */
.investment-story__media--contain::after {
  display: none;
}

.investment-story:hover .investment-story__media--contain img {
  transform: scale(1.04);
  filter: brightness(1.05);
}

/* ── Visual uniqueness — alternating accent strip per story ─────────────── */
/* Subtle left-edge color band on the content column */
.investment-story:nth-child(odd)  .investment-story__content { border-left: 3px solid #003d80; padding-left: 20px; }
.investment-story:nth-child(even) .investment-story__content { border-left: 3px solid #0c6b79; padding-left: 20px; }

/* Reverse stories: accent on right edge instead */
.investment-story--reverse:nth-child(odd)  .investment-story__content,
.investment-story--reverse:nth-child(even) .investment-story__content {
  border-left: none;
  border-right: 3px solid;
  padding-left: 0;
  padding-right: 20px;
}
.investment-story--reverse:nth-child(odd)  .investment-story__content { border-right-color: #003d80; }
.investment-story--reverse:nth-child(even) .investment-story__content { border-right-color: #0c6b79; }

/* Eyebrow colour matches accent */
.investment-story:nth-child(even) .investment-story__kicker-row .eyebrow { color: #0c6b79; }

/* Divider between stories */
.investment-story {
  position: relative;
}

.investment-story + .investment-story::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 61, 128, 0.12) 20%,
    rgba(0, 61, 128, 0.12) 80%,
    transparent 100%
  );
}

/* ── Scroll-reveal animation ──────────────────────────────────────────────── */

@keyframes invest-slide-left {
  from { opacity: 0; transform: translateX(-42px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes invest-slide-right {
  from { opacity: 0; transform: translateX(42px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Hidden state before JS fires */
.invest-reveal {
  opacity: 0;
}

/* Prefer-reduced-motion: skip animation entirely */
@media (prefers-reduced-motion: reduce) {
  .invest-reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Revealed state — JS adds .is-revealed */
.invest-reveal.is-revealed {
  animation-duration: 680ms;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-fill-mode: both;
  animation-delay: var(--invest-delay, 0ms);
}

.invest-reveal.is-revealed:not(.investment-story--reverse) {
  animation-name: invest-slide-left;
}

.invest-reveal.is-revealed.investment-story--reverse {
  animation-name: invest-slide-right;
}

/* ── Responsive additions ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .investment-story__media img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 768px) {
  .investment-story__summary {
    -webkit-line-clamp: 6;
    font-size: 0.97rem;
  }

  .investment-story__actions {
    gap: 10px;
  }

  /* Remove side borders on mobile — too tight */
  .investment-story:nth-child(odd)  .investment-story__content,
  .investment-story:nth-child(even) .investment-story__content,
  .investment-story--reverse:nth-child(odd)  .investment-story__content,
  .investment-story--reverse:nth-child(even) .investment-story__content {
    border: none;
    padding-left: 0;
    padding-right: 0;
  }

  /* On mobile, content slides up instead of sideways */
  @keyframes invest-slide-left  { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes invest-slide-right { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
}
