/* Keep the shared case-study structure; only the five studies get a stronger stage. */
.case-page--polarity { --polarity-night: #020b18; }

.case-page--polarity .case-hero {
  width: 100vw;
  margin: -2rem calc((100vw - var(--shell)) / -2) 0;
  padding: clamp(3rem, 5vw, 5.5rem) calc((100vw - var(--shell)) / 2);
  background: linear-gradient(120deg, #e8eef4, #dce8f0 58%, #e4ebf0);
}
.case-page--polarity .case-intro h1 { color: #3f6175; }
.case-page--polarity .case-facts { padding-top: 0; border-top: 0; }
.case-page--polarity .case-facts dt { color: #58798c; font-weight: 500; }

.case-caption--link-only { justify-content: flex-end; }

.polarity-projection {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.65fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  margin: 1rem 0 clamp(3.5rem, 7vw, 7rem);
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 0;
}

.polarity-projection-copy h2,
.polarity-process-copy h2 {
  margin: 0 0 1.2rem;
  font: 300 clamp(2rem, 3.25vw, 3.5rem)/1 var(--serif);
  letter-spacing: -.035em;
}

.polarity-projection-copy > p:not(.eyebrow),
.polarity-process-copy > p:not(.eyebrow) {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.8;
}

.polarity-outcomes { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.polarity-outcomes > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.polarity-outcomes dt { color: #786e86; font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.polarity-outcomes dd { margin: 0; font: 300 1rem var(--serif); }
.polarity-projection-film { min-width: 0; }
.polarity-projection .case-film { aspect-ratio: 16 / 10; }

.polarity-process { margin-bottom: 0; }
.polarity-process-row {
  display: grid;
  grid-template-columns: minmax(15rem, .55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  min-height: 23rem;
  padding: clamp(2.5rem, 5vw, 5rem) 0;
  border-top: 1px solid var(--line);
}
.polarity-process-row:last-child { border-bottom: 1px solid var(--line); }
.polarity-canvas .eyebrow { color: #587f96; }
.polarity-music .eyebrow { color: #84718e; }
.polarity-motion .eyebrow { color: #a66f5d; }

.polarity-tower-diagram {
  width: min(100%, 38rem);
  height: 17rem;
  justify-self: center;
  color: #867f76;
}
.polarity-tower-diagram text { fill: currentColor; font: 9px var(--sans); letter-spacing: 1.2px; }
.polarity-tower-outline { stroke-width: 1.65; }

.polarity-score {
  position: relative;
  min-height: 15rem;
  padding: 2.5rem 0 1rem;
}
.polarity-beats {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #aaa39b;
}
.polarity-beats li { position: relative; height: 7.5rem; border-left: 1px solid rgba(37, 35, 32, .12); }
.polarity-beats li:last-child { border-right: 1px solid rgba(37, 35, 32, .12); }
.polarity-beats span { position: absolute; left: 50%; bottom: -.22rem; width: .42rem; height: .42rem; border-radius: 50%; background: #f7f4ee; border: 1px solid #888177; transform: translateX(-50%); }
.polarity-beats small { position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .62rem; }
.polarity-sequences { position: absolute; inset: 3.2rem 0 auto; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: .3rem; height: 4.4rem; }
.polarity-sequences i { align-self: center; height: 1.4rem; background: linear-gradient(90deg, #e3b194, #d5c7d9); }
.polarity-sequences i:nth-child(1) { grid-column: 1 / 2; }
.polarity-sequences i:nth-child(2) { grid-column: 2 / 3; height: 1.6rem; }
.polarity-sequences i:nth-child(3) { grid-column: 3 / 6; height: 2.4rem; }
.polarity-sequences i:nth-child(4) { grid-column: 6 / 7; height: 1.5rem; }
.polarity-sequences i:nth-child(5) { grid-column: 7 / 8; height: 1.7rem; }
.polarity-sequences i:nth-child(6) { grid-column: 8 / 9; height: 1.6rem; }
.polarity-sequences i:nth-child(7) { grid-column: 9 / 11; height: 2.2rem; }
.polarity-sequences i:nth-child(8) { grid-column: 11 / 13; height: 3rem; }
.polarity-sequences i:nth-child(9) { grid-column: 13 / 14; height: 1.5rem; }
.polarity-wave { height: 2.4rem; margin-top: 1.4rem; opacity: .45; background: repeating-linear-gradient(90deg, transparent 0 3px, #66605a 3px 4px); clip-path: polygon(0 48%, 4% 42%, 8% 60%, 12% 30%, 16% 67%, 20% 39%, 24% 55%, 28% 25%, 32% 71%, 36% 43%, 40% 58%, 44% 34%, 48% 66%, 52% 27%, 56% 74%, 60% 44%, 64% 58%, 68% 32%, 72% 69%, 76% 39%, 80% 56%, 84% 29%, 88% 70%, 92% 40%, 96% 58%, 100% 48%, 100% 52%, 96% 46%, 92% 60%, 88% 32%, 84% 73%, 80% 44%, 76% 63%, 72% 35%, 68% 72%, 64% 42%, 60% 60%, 56% 30%, 52% 75%, 48% 34%, 44% 68%, 40% 42%, 36% 61%, 32% 29%, 28% 75%, 24% 45%, 20% 61%, 16% 33%, 12% 70%, 8% 40%, 4% 58%, 0 52%); }
.polarity-source { margin-top: 1rem !important; font-size: .74rem !important; font-style: italic; }

.polarity-motion {
  width: 100vw;
  margin-inline: calc((100vw - var(--shell)) / -2);
  padding-inline: calc((100vw - var(--shell)) / 2);
  border-bottom: 0 !important;
  background: linear-gradient(110deg, #f1d8c8 0%, #e6dfeb 50%, #d7e7f0 100%);
}
.polarity-motion-system { display: grid; align-items: center; }
.polarity-movements { width: min(66%, 20rem); justify-self: center; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.35rem, 1vw, .7rem); margin: 0; padding: 0; list-style: none; }
.polarity-movements li { aspect-ratio: 1; display: grid; place-content: center; gap: .4rem; border: 1px solid rgba(37, 35, 32, .17); border-radius: 50%; text-align: center; background: rgba(247, 244, 238, .09); }
.polarity-movements span { font: 300 1.55rem/1 var(--serif); }
.polarity-movements small { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }

.case-page--polarity .case-contribution { margin-bottom: 2rem; }

.polarity-resolution {
  width: 100vw;
  margin: 0 calc((100vw - var(--shell)) / -2) clamp(1.25rem, 2.5vw, 2rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) calc((100vw - var(--shell)) / 2) clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(circle at 50% 100%, rgba(24, 93, 145, .22), transparent 40%),
    var(--polarity-night);
  color: #f7f4ee;
}

.polarity-resolution > .eyebrow {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  color: #d9ad8d;
}

.polarity-resolution .case-studies--poles {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.65rem, 2.4vw, 2.5rem);
  padding: 0;
  background: transparent;
}

.polarity-resolution .case-studies a {
  background: transparent;
  border-radius: 0;
}

.polarity-resolution .case-studies--poles img {
  height: clamp(23rem, 40vw, 39rem);
  object-fit: contain;
  object-position: center bottom;
}

.polarity-resolution .case-study-caption {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: .45rem;
  border-top: 1px solid rgba(247, 244, 238, .18);
  text-align: center;
}
.polarity-resolution .case-study-caption h3 { white-space: nowrap; }

.polarity-resolution .case-study-caption > span { color: #278ed9; }
.polarity-resolution li:nth-child(odd) .case-study-caption > span { color: #ef7b35; }
.polarity-resolution .case-study-caption h3 { color: rgba(247, 244, 238, .72); font-weight: 400; }

@media (min-width: 801px) {
  .polarity-process-row {
    grid-template-columns: minmax(14rem, .72fr) minmax(0, 1.28fr);
    gap: clamp(3rem, 6vw, 6rem);
    padding-inline: clamp(2.5rem, 6vw, 6rem);
  }
  .polarity-motion {
    padding-inline: calc((100vw - var(--shell)) / 2 + clamp(2.5rem, 6vw, 6rem));
  }
}

@media (max-width: 800px) {
  .case-page--polarity .case-intro h1 { font-size: clamp(2.35rem, 6vw, 2.9rem); }
  .case-page--polarity .case-lead { max-width: none; }
  .polarity-projection-copy h2,
  .polarity-process-copy h2 { font-size: clamp(1.55rem, 3.6vw, 1.75rem); }
  .polarity-projection,
  .polarity-process-row { grid-template-columns: 1fr; gap: 1.75rem; }
  .polarity-projection-copy,
  .polarity-process-copy { width: 100%; }
  .polarity-projection-copy > p:not(.eyebrow),
  .polarity-process-copy > p:not(.eyebrow) { max-width: none; }
  .polarity-projection { margin-bottom: 3.5rem; }
  .polarity-projection-copy { display: grid; grid-template-columns: 1fr; }
  .polarity-projection-copy .polarity-outcomes { max-width: 30rem; }
  .polarity-process-row { min-height: 0; }
  .polarity-tower-diagram { height: 14rem; }
  .polarity-score { min-height: 13rem; }
  .polarity-motion-system { grid-template-columns: 1fr; }
  .polarity-resolution .case-studies--poles { gap: .45rem; }
  .polarity-resolution .case-studies--poles img { height: clamp(18rem, 68vw, 30rem); }
  .polarity-resolution .case-study-caption { display: flex; }
  .polarity-resolution .case-study-caption h3 { display: block; color: rgba(247, 244, 238, .9); font-size: .82rem; line-height: 1.35; }
}

@media (max-width: 520px) {
  .polarity-projection-copy h2,
  .polarity-process-copy h2 { font-size: 1.6rem; }
  .polarity-outcomes > div { grid-template-columns: 5.5rem 1fr; }
  .polarity-score { overflow: hidden; }
  .polarity-beats small { font-size: .6rem; }
  .polarity-sequences { gap: .12rem; }
  .polarity-movements { gap: .35rem; }
  .polarity-movements { width: min(70%, 16rem); }
  .polarity-movements span { font-size: 1.35rem; }
  .polarity-resolution { padding-block: 2.5rem; }
  .polarity-resolution > .eyebrow { margin-bottom: 1rem; }
  .polarity-resolution .case-studies--poles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem .45rem; }
  .polarity-resolution .case-studies--poles img { height: auto; }
  .polarity-resolution .case-study-caption { gap: .3rem; padding-top: .4rem; }
  .polarity-resolution .case-study-caption h3 { font-size: .78rem; }
}
