/* Langeberg case study detail — dark article layout on the immersive
   double-border system. Scoped to this page. */
.case-study-immersive-page {
  --csd-ink: #eef4fb;
  --csd-cyan: #5fd8ff;
  background: #03070f;
  color: var(--csd-ink);
}

.csd-poster {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../img/optimized/langeberg-orchards.webp") center / cover no-repeat;
  filter: saturate(.84) contrast(1.04) brightness(.68);
  transform: scale(1.02);
  animation: csd-poster-drift 28s ease-in-out infinite alternate;
}
@keyframes csd-poster-drift {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  100% { transform: scale(1.09) translate3d(-0.6%, -0.8%, 0); }
}
.csd-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(3,8,18,.78), rgba(3,8,18,.48) 53%, rgba(3,8,18,.74)), linear-gradient(180deg, rgba(3,8,18,.50), rgba(3,8,18,.82) 42%, rgba(3,8,18,.95));
}

.case-study-immersive-page .csd-content { position: relative; z-index: 3; }
.case-study-immersive-page .site-nav { background: linear-gradient(to bottom, rgba(3,8,18,.92), rgba(3,8,18,.62) 70%, rgba(3,8,18,0)); }

.csd-hero {
  min-height: min(520px, 84svh);
  display: flex;
  align-items: center;
  padding: 150px 0 50px;
}
.csd-hero__content { width: min(760px, calc(100% - 48px)); margin: 0 auto; }
.csd-back { display: inline-block; margin-bottom: 20px; color: #9fb2c6; font-size: .82rem; font-weight: 700; text-decoration: none; transition: color .2s ease; }
.csd-back:hover { color: #fff; }
.csd-back span { color: var(--csd-cyan); }
.csd-hero__brand { width: fit-content; max-width: 100%; margin: 0 0 28px; }
.csd-hero__brand img { display: block; width: min(220px, 44vw); max-height: 112px; object-fit: contain; object-position: left center; filter: brightness(1.16) saturate(.9); }
.case-study-immersive-page .eyebrow {
  margin: 0;
  color: var(--csd-cyan);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.csd-hero h1 {
  max-width: 18ch;
  margin: 16px 0 18px;
  color: #fff;
  font-size: clamp(2.3rem, 3.8vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1;
}
.csd-hero__lead { max-width: 60ch; margin: 0; color: #b7c6d8; font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.6; }

.csd-body { padding: 0 0 clamp(60px, 7vw, 100px); }
.csd-body .container { display: flex; justify-content: center; }
.csd-article {
  position: relative;
  width: min(820px, calc(100% - 48px));
  padding: clamp(32px, 4vw, 60px);
  opacity: 0;
  transition: opacity .55s ease;
}
.csd-article.is-visible { opacity: 1; }
/* Section-by-section choreography: the card shell fades in fast (above),
   then each block inside — meta strip, prose section, quote — lifts up on
   its own beat as it crosses into view, so scrolling this page reveals
   content progressively instead of dumping the whole article at once. */
.csd-meta,
.csd-section,
.csd-quote {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}
.csd-meta.is-visible,
.csd-section.is-visible,
.csd-quote.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.csd-impact li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.csd-impact li:nth-child(1) { transition-delay: .05s; }
.csd-impact li:nth-child(2) { transition-delay: .14s; }
.csd-impact li:nth-child(3) { transition-delay: .23s; }
.csd-impact li:nth-child(4) { transition-delay: .32s; }
.csd-section.is-visible .csd-impact li { opacity: 1; transform: translateY(0); }
.case-study-immersive-page .glass-card__housing {
  background-color: rgba(9,13,20,.5);
  box-shadow: 0 26px 60px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(16px) saturate(.95);
  -webkit-backdrop-filter: blur(16px) saturate(.95);
}
.case-study-immersive-page .glass-card__depth {
  background: linear-gradient(160deg, rgba(9,20,38,.72), rgba(4,10,22,.62));
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.06), inset 0 0 0 1px rgba(120,190,235,.1);
  backdrop-filter: blur(26px) saturate(1.1);
  -webkit-backdrop-filter: blur(26px) saturate(1.1);
}
/* secondary.css ships a light-theme .glass-card:hover treatment (bright
   white panel) meant for clickable cards on the light pages. This article
   is a static reading surface, not a link, so hovering it should do
   nothing — restate the resting values to cancel that inherited glow. */
.case-study-immersive-page .glass-card:hover .glass-card__housing {
  background-color: rgba(9,13,20,.5);
  box-shadow: 0 26px 60px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.08);
}
.case-study-immersive-page .glass-card:hover .glass-card__depth {
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.06), inset 0 0 0 1px rgba(120,190,235,.1);
}
.csd-article > *:not(.glass-card__housing):not(.glass-card__depth) { position: relative; z-index: 2; }

.csd-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 24px;
  margin: 0 0 clamp(32px, 4vw, 48px);
  padding-bottom: clamp(28px, 3vw, 40px);
  border-bottom: 1px solid rgba(120,190,235,.16);
}
.csd-meta dt { margin-bottom: 6px; color: var(--csd-cyan); font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.csd-meta dd { margin: 0; color: #dbe6f2; font-size: .92rem; font-weight: 700; }

.csd-article h2 { margin: clamp(30px, 3.5vw, 44px) 0 14px; color: #fff; font-size: clamp(1.4rem, 2vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; }
.csd-article h2:first-of-type { margin-top: 0; }
.csd-article > p { margin: 0 0 16px; color: #b9c7d8; font-size: 1.02rem; line-height: 1.72; }

.csd-impact { display: grid; gap: 16px; margin: 8px 0 clamp(30px, 3.5vw, 44px); padding: 0; list-style: none; }
.csd-impact li { display: flex; gap: 16px; align-items: flex-start; }
.csd-impact__badge { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(95,216,255,.14); color: var(--csd-cyan); }
.csd-impact__badge svg { width: 16px; height: 16px; }
.csd-impact p { margin: 3px 0 0; color: #b9c7d8; font-size: .98rem; line-height: 1.6; }

.csd-quote {
  margin: clamp(30px, 3.5vw, 44px) 0;
  padding: clamp(24px, 3vw, 34px);
  border-left: 3px solid var(--csd-cyan);
  background: rgba(95,216,255,.06);
  border-radius: 0 6px 6px 0;
}
.csd-quote p { margin: 0 0 12px; color: #fff; font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.csd-quote cite { color: var(--csd-cyan); font-size: .82rem; font-weight: 700; font-style: normal; }

.csd-video { position: relative; margin: 8px 0 clamp(20px, 3vw, 32px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #0b1b33; }
.csd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.csd-cta { padding: 0; background: #062349; }
.csd-cta__band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 200px;
  padding: clamp(36px, 4vw, 56px) clamp(28px, 5vw, 72px);
  background: linear-gradient(110deg, #062349, #075886);
}
.csd-cta__band h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-weight: 900; letter-spacing: -.03em; }
.csd-cta__band p { margin: 0; color: #cfe4ec; }

@media (max-width: 640px) {
  .csd-hero { padding: 128px 0 40px; min-height: 0; }
  .csd-hero h1 { max-width: 15ch; font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .csd-hero__brand { margin-bottom: 24px; }
  .csd-hero__brand img { width: min(190px, 64vw); max-height: 96px; }
  .csd-meta { grid-template-columns: repeat(2, 1fr); }
  .csd-cta__band { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .csd-article,
  .csd-meta,
  .csd-section,
  .csd-quote,
  .csd-impact li,
  .csd-poster {
    transition: none;
    animation: none;
    transform: none;
  }
}
