/*
 * ET Group Justice: Overview (/justice/) only. Loaded after justice.css and subnav.css.
 * Blocks: Explore solutions (paths), the experience feature, the courtroom network (js: pages/overview.js),
 * HybridCourts / VirtualCorrections products, VirtualCorrections units.
 */

/* ---------- Explore solutions for your justice spaces: its own section, three path cards (4 + 4 + 4), each card one link ---------- */
.etgj .etgj-build { padding-bottom: var(--sheet-y); }
.etgj .etgj-build--own { padding-top: var(--sheet-top); }
.etgj .etgj-path { display: flex; flex-direction: column; align-items: flex-start; }
.etgj .etgj-path__name { margin: 0 0 16px; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-path__list { flex: 1; margin: 0 0 24px; padding: 0; list-style: none; }
.etgj .etgj-path__list li { display: flex; gap: 14px; padding: 4px 0; }
.etgj .etgj-path__list li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: .72em; background: var(--grey); }
.etgj .etgj-path__link::before { content: ""; position: absolute; inset: 0; }
.etgj .etgj-path:hover .etgj-path__link { text-decoration-color: currentColor; }
.etgj .etgj-path:hover .etgj-path__link::after { transform: translate(3px, -3px); }

/* ---------- Centred head: only over the symmetrical network, columns 3 to 10 ---------- */
.etgj .etgj-head--center { row-gap: 24px; text-align: center; }
.etgj .etgj-head--center > :first-child, .etgj .etgj-head--center > :nth-child(2) { grid-column: 3 / 11; }
.etgj .etgj-head--center > .etgj-statement { max-width: 40em; margin-inline: auto; text-wrap: balance; }

/* ---------- The courtroom network ----------
   Without JS: the courtroom and a plain list of the parties. With JS (.is-live): cards placed round the courtroom and
   joined by lines on a canvas; narrow screens (.is-compact): the courtroom on top, the parties in two columns. */
.etgj .etgj-network { grid-column: 1 / -1; margin: 0 0 var(--head-gap); padding: clamp(32px, 4.5vw, 72px) 0; }
.etgj .etgj-net { position: relative; }
.etgj .etgj-net__canvas { position: absolute; left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .55)) drop-shadow(0 0 5px rgba(206, 74, 120, .35)); }
.etgj .etgj-net__court { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: #fff; }
.etgj .etgj-net__court img { width: auto; height: 36px; }
.etgj .etgj-net__parties { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.etgj .etgj-net__party { display: flex; align-items: center; gap: 14px; font: 400 var(--fs-body)/1.3 var(--ff); color: var(--ink); }
.etgj .etgj-net__cell { display: grid; place-items: center; flex: none; width: 48px; height: 48px; color: #CFC4F0; }
.etgj .etgj-net__cell svg { width: 24px; height: 24px; }
.etgj .etgj-net__cell img { width: auto; height: 26px; }
.etgj .etgj-net.is-live .etgj-net__parties { display: block; }
.etgj .etgj-net.is-live .etgj-net__court, .etgj .etgj-net.is-live .etgj-net__party {
  position: absolute; z-index: 1; margin: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .11), inset 0 1px 0 rgba(255, 255, 255, .2), 0 2px 6px rgba(0, 0, 0, .3), 0 14px 30px -10px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  border-radius: 12px;
}
.etgj .etgj-net.is-live .etgj-net__party { display: flex; align-items: center; gap: 14px; padding: 0 16px 0 10px; font-size: var(--fs-small); line-height: 1.35; }
.etgj .etgj-net.is-live .etgj-net__party[data-side="left"] { flex-direction: row-reverse; text-align: right; padding: 0 10px 0 16px; }
.etgj .etgj-net.is-live .etgj-net__cell { width: 44px; height: 44px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #E3E6EC; }
.etgj .etgj-net.is-live .etgj-net__court {
  flex-direction: column; justify-content: center; gap: 12px; text-align: center; border-radius: 14px; font-size: var(--fs-subtitle);
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .07));
  box-shadow: inset 0 0 0 1px rgba(176, 63, 153, .6), inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 8px rgba(0, 0, 0, .35), 0 22px 44px -12px rgba(0, 0, 0, .65), 0 0 40px -8px rgba(176, 63, 153, .3);
}
.etgj .etgj-net.is-live .etgj-net__court img { height: 44px; }
.etgj .etgj-net.is-compact .etgj-net__party, .etgj .etgj-net.is-compact .etgj-net__party[data-side="left"] { flex-direction: column; justify-content: center; gap: 10px; padding: 16px 12px; text-align: center; line-height: 1.35; }
.etgj .etgj-net.is-compact .etgj-net__cell { width: 40px; height: 40px; }
.etgj .etgj-net.is-compact .etgj-net__cell svg { width: 20px; height: 20px; }
.etgj .etgj-net.is-compact .etgj-net__court { flex-direction: row; gap: 12px; padding: 0 16px; }
.etgj .etgj-net.is-compact .etgj-net__court img { height: 32px; }
/* the story: each card hidden until the script brings it in */
.etgj .etgj-net.is-live.is-story .etgj-net__court, .etgj .etgj-net.is-live.is-story .etgj-net__party { opacity: 0; translate: 0 6px; transition: opacity .35s ease, translate .35s ease; }
.etgj .etgj-net.is-live .etgj-net__court.is-in, .etgj .etgj-net.is-live .etgj-net__party.is-in { opacity: 1; translate: none; }
/* glint: a soft highlight travels once round a card's edge now and then */
@property --glint { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.etgj .etgj-net.is-live .etgj-net__party::after, .etgj .etgj-net.is-live .etgj-net__court::after {
  content: ""; position: absolute; z-index: 2; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--glint), transparent 0deg 250deg, rgba(255, 255, 255, .12) 290deg, rgba(255, 255, 255, .5) 325deg, rgba(255, 255, 255, .12) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
}
.etgj .etgj-net .is-glint::after { animation: etgj-glint 2.8s cubic-bezier(.45, 0, .25, 1); }
@keyframes etgj-glint { 0% { --glint: -40deg; opacity: 0; } 20% { opacity: 1; } 75% { opacity: 1; } 100% { --glint: 320deg; opacity: 0; } }

/* ---------- HybridCourts | VirtualCorrections (2 cells), each card one link ---------- */
.etgj .etgj-product { display: flex; flex-direction: column; align-items: flex-start; }
.etgj .etgj-product__mark { display: block; width: auto; height: 48px; margin-bottom: 24px; }
.etgj .etgj-product__name { margin: 0 0 14px; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-product p { flex: 1; margin: 0 0 24px; }
.etgj .etgj-product__link::before { content: ""; position: absolute; inset: 0; }

/* ---------- VirtualCorrections units: product shots on a light tile (the white backdrop multiplies away) ---------- */
.etgj .etgj-unit__img { position: relative; height: clamp(220px, 20vw, 300px); margin-bottom: 24px; border-radius: var(--radius-media); background: linear-gradient(180deg, #ECEEF1, #D6D9DE); overflow: hidden; }
.etgj .etgj-unit__img img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; mix-blend-mode: multiply; }
.etgj .etgj-unit__name { margin: 0 0 10px; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-unit p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .etgj .etgj-net .is-glint::after { animation: none; } }

@media (max-width: 960px) {
  .etgj .etgj-head--center { row-gap: 20px; text-align: left; }   /* justice.css sets 20px here too, but this file loads after it */
  .etgj .etgj-head--center > :first-child, .etgj .etgj-head--center > :nth-child(2) { grid-column: 1 / -1; }
  .etgj .etgj-head--center > .etgj-statement { margin-inline: 0; text-wrap: pretty; }
  .etgj .etgj-unit__img { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Nov 24 (John's home.css) ---------- */
/* The experience feature has no eyebrow or link, so the paragraph ends the text column: no bottom margin, so the
   centred text sits level with the photo. */
.etgj .etgj-case--general .etgj-case__text p:last-child { margin-bottom: 0; }
.etgj .etgj-case--general .etgj-case__text > * { text-wrap: pretty; }
/* "Explore solutions for your justice spaces" runs to two lines: balance splits it evenly (pretty leaves "spaces" alone). */
.etgj .etgj-build--own .etgj-head .etgj-h2 { text-wrap: balance; }

/* Robbie, Nov 27: the lifecycle step titles a size up and medium weight, so they hold against the photos. The step
   number stays centred on the title plus its service line. */
.etgj .etgj-flow__step { --flow-title: clamp(22px, 1.95vw, 28px); --num-mt: calc((var(--flow-title) * 1.2 + 6px + var(--fs-small) * 1.4 - 40px) / 2); }
.etgj .etgj-flow__title { font-size: var(--flow-title); font-weight: 500; line-height: 1.2; }
