/* CW-WEB-ORG-SCENE-1 / 1R — cumulative organisation-scale scene.
   Scoped to .org-*. Deep #300950 stage; cards are deliberately varied
   vivid #7540F5 gradients — two carry substantial persimmon #ED6942
   accents with persimmon-highlighted headings. Reuses shared foundation
   tokens and the canonical .pw-card chrome. Base state is a readable
   static composition; the pinned cumulative choreography applies only
   once JS adds html.js-orgscene. */

.org-scene {
  position: relative;
  scroll-margin-top: var(--nav-h);
  background:
    radial-gradient(115% 85% at 12% -5%, rgba(117, 64, 245, .45) 0%, transparent 55%),
    radial-gradient(80% 70% at 96% 108%, rgba(67, 17, 107, .9) 0%, transparent 60%),
    linear-gradient(168deg, var(--cw-violet) 0%, #1D042F 100%);
  color: var(--cw-bone);
}
.org-stage {
  position: relative;
  max-width: 1240px; margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(30px, 6vh, 64px)) 24px clamp(44px, 7vh, 72px);
}
.org-head {
  text-align: center; max-width: 980px;
  margin: 0 auto clamp(26px, 4.5vh, 52px);
}
.org-head h2 {
  margin: 0 0 16px;
  font-family: var(--display); font-stretch: condensed; font-weight: 700;
  font-size: clamp(34px, 6.4vw, 90px); line-height: 1.02; letter-spacing: -.025em;
  text-shadow: var(--glow-heading);
}
.org-accent { color: var(--persimmon-light); }
.org-lede {
  margin: 0 auto; max-width: 62ch;
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55;
  color: rgba(247, 244, 237, .82);
}

/* Base composition — a readable grid of the five kinds, no motion needed. */
.org-constellation {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.org-links { display: none; }
.org-entity { padding: 26px 28px; }
.org-entity h3 {
  margin: 0 0 10px;
  font-family: var(--display); font-stretch: condensed; font-weight: 700;
  font-size: 24px; line-height: 1.12; letter-spacing: -.01em;
  color: var(--cw-bone);
}
.org-entity p {
  margin: 0; font-size: 15px; line-height: 1.6;
  color: rgba(247, 244, 237, .86);
}

/* Deliberate per-entity variation — vivid purple bodies; organisation and
   federation carry the persimmon accents. */
.org-entity[data-org-entity="local"] {
  background: linear-gradient(155deg, #8A5BFA 0%, var(--cw-purple) 55%, #4A16B4 100%);
  border-color: rgba(185, 169, 242, .55);
  box-shadow: var(--light-top-violet), 0 30px 60px -18px rgba(117, 64, 245, .5);
}
.org-entity[data-org-entity="organisation"] {
  background: linear-gradient(150deg, #8A5BFA 0%, var(--cw-purple) 42%, #B03E2E 118%);
  border-color: rgba(237, 105, 66, .62);
  box-shadow: var(--light-top-persimmon), 0 30px 64px -18px rgba(237, 105, 66, .45);
}
.org-entity[data-org-entity="organisation"] h3 { color: var(--persimmon-light); }
.org-entity[data-org-entity="network"] {
  background: linear-gradient(160deg, #9B70FF 0%, var(--cw-purple) 48%, #5B2FE0 100%);
  border-color: rgba(185, 169, 242, .62);
  box-shadow: var(--light-top-violet), 0 34px 66px -18px rgba(117, 64, 245, .62);
}
.org-entity[data-org-entity="federation"] {
  background: linear-gradient(205deg, #8A5BFA 0%, var(--cw-purple) 40%, #C24A32 118%);
  border-color: rgba(237, 105, 66, .62);
  box-shadow: var(--light-top-persimmon), 0 30px 64px -18px rgba(237, 105, 66, .45);
}
.org-entity[data-org-entity="federation"] h3 { color: var(--persimmon-light); }
.org-entity[data-org-entity="institution"] {
  background: linear-gradient(155deg, #7E4BF0 0%, #5C28CF 55%, #3A0F7A 100%);
  border-color: rgba(185, 169, 242, .5);
  box-shadow: var(--light-top-violet), 0 30px 60px -18px rgba(117, 64, 245, .5);
}

/* Constellation slots — centres as % of the composition area; verified
   no clip/overlap at 1440px and ~861–1100px laptop widths for cards
   clamp(240px, 26vw, 350px). */
.org-entity[data-org-entity="local"]        { --ex: 15%; --ey: 72%; }
.org-entity[data-org-entity="organisation"] { --ex: 25%; --ey: 19%; }
.org-entity[data-org-entity="network"]      { --ex: 50%; --ey: 55%; }
.org-entity[data-org-entity="federation"]   { --ex: 74%; --ey: 17%; }
.org-entity[data-org-entity="institution"]  { --ex: 84%; --ey: 66%; }

.org-dots {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: flex; justify-content: center; gap: 10px;
}
.org-dots li {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--violet-tint);
  background: var(--violet-tint); opacity: .4;
}

/* ---------- enhanced: pinned cumulative constellation ---------- */
html.js-orgscene .org-stage {
  height: 100svh; overflow: hidden; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h); padding-bottom: 20px;
}
html.js-orgscene .org-head {
  flex: 0 0 auto;
  margin-bottom: clamp(14px, 3vh, 32px);
}
html.js-orgscene .org-constellation {
  display: block; flex: 1 1 auto; min-height: 320px;
}
html.js-orgscene .org-links {
  display: block; position: absolute; inset: 0;
  width: 100%; height: 100%; overflow: visible;
}
html.js-orgscene .org-links line {
  stroke: var(--violet-tint); stroke-opacity: .55;
  stroke-width: 1.8px; vector-effect: non-scaling-stroke;
}
html.js-orgscene .org-links line[data-org-tone="warm"] {
  stroke: var(--cw-persimmon); stroke-opacity: .6;
}
html.js-orgscene .org-dots { flex: 0 0 auto; margin-top: 16px; }

@media (min-width: 861px) {
  html.js-orgscene .org-entity {
    position: absolute; left: var(--ex); top: var(--ey);
    width: clamp(240px, 26vw, 350px); margin: 0;
  }
}

/* Laptop band — the enlarged cards cannot keep five absolute centres
   inside the shorter stage without clipping, so compose a readable
   3+2 constellation; connection lines stay desktop-only. */
@media (min-width: 861px) and (max-width: 1100px) {
  html.js-orgscene .org-constellation {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; align-content: center;
  }
  html.js-orgscene .org-entity {
    position: static; width: auto; padding: 18px 20px;
  }
  html.js-orgscene .org-entity h3 { font-size: 19px; }
  html.js-orgscene .org-entity p { font-size: 13.5px; }
  html.js-orgscene .org-links { display: none; }
}

@media (max-width: 860px) {
  html.js-orgscene .org-head h2 { font-size: clamp(30px, 8.5vw, 44px); }
  html.js-orgscene .org-lede { font-size: 13.5px; }
  html.js-orgscene .org-head { margin-bottom: 14px; }
  html.js-orgscene .org-constellation {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; align-content: center; flex: 1 1 auto; min-height: 0;
  }
  html.js-orgscene .org-entity { padding: 14px 16px; }
  html.js-orgscene .org-entity h3 { font-size: 16px; margin-bottom: 6px; }
  html.js-orgscene .org-entity p { font-size: 12px; line-height: 1.5; }
  html.js-orgscene .org-links { display: none; }
}
