/*
 * ET Group Justice: shared design system. Ported from John's Justice designs (V4 layout and motion, V4.5 palette),
 * Nov 2026. Everything is scoped under the wrapper .etgj (the plugin's <div id="etgj" class="etgj ...">), class prefix
 * etgj-. No rules on html, body or bare elements outside .etgj. Page-only styles live in css/pages/<page>.css,
 * the sub-nav in css/subnav.css.
 *
 * Layout system (from the design)
 * 1. One grid: 12 columns, 20px gutter (--gap), the theme's page margin (5vw), content capped at 1440px.
 * 2. Containers span whole columns: 12, 6 + 6, 4 + 4 + 4, 3 + 3 + 3 + 3. Text starts on column 1 or 7.
 * 3. Hairline cells: rows of cells divided by 1px rules, 32px (--cell-pad) either side of a rule.
 * 4. Sections are dark frosted-glass "sheets" over a live pixel field, separated by gaps that show the field.
 * 5. Phones (960px and under) and reduced motion: sheets are fixed rounded cards.
 * Breakpoints: 1180px (sub-nav collapses, stats 2 + 2), 960px (single column), 520px (phone type, full-width buttons).
 */

@property --rule-w { syntax: '<percentage>'; inherits: false; initial-value: 100%; }

/* ---------- Tokens ---------- */
.etgj {
  /* icons: Phosphor arrow-up-right and caret-down, as masks */
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z%22/%3E%3C/svg%3E");
  --icon-caret: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22currentColor%22%3E%3Cpath d=%22M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z%22/%3E%3C/svg%3E");

  /* widths: content never wider than 1440px, sheets stop at 1920px; --etgj-edge is the side padding that does both */
  --etgj-max: 1440px;
  --etgj-sheet-max: 1920px;
  --etgj-edge: max(var(--sp-wrapper, 5vw), calc((100% - var(--etgj-max)) / 2));

  /* colour: base navy under the pixel field, glass, text, accent */
  --base: #0E1A2B;
  --base-deep: #08111D;
  --neutral-rgb: 20, 21, 23;               /* #141517, the near-black behind sections after the hero */
  --sheet: rgba(12, 20, 33, .58);
  --sheet-blur: 20px;
  --sheet-edge: rgba(255, 255, 255, .08);
  --ink: #F4F5F7;                          /* headings, controls */
  --ink-2: #C3CAD5;                        /* body text */
  --grey: #8F98A7;                         /* labels, secondary */
  --line: rgba(255, 255, 255, .13);
  --red: #E21F26;                          /* buttons only */
  --red-hover: #C8161D;
  --red-bright: #FF5258;                   /* link arrows */
  --accent-grad: linear-gradient(90deg, #E8451F, #B03F99);   /* active markers only */
  --accent-grad-v: linear-gradient(180deg, #E8451F, #B03F99);
  --rule-grad: linear-gradient(var(--line), var(--line));
  --rule-h: 1px;
  --focus: #8FAEE6;

  /* type: DM Sans for headings, Inter for text; six sizes, two weights (400 text, 500 controls) */
  --ff-display: "DM Sans", "Inter", Arial, sans-serif;
  --ff: "Inter", Arial, sans-serif;
  --fs-display: clamp(36px, 4.2vw, 60px);  /* hero headline, stat figures */
  --fs-title: clamp(30px, 3vw, 44px);      /* section titles (H2) */
  --fs-subtitle: clamp(24px, 2.2vw, 32px); /* card, product and feature titles, closing line */
  --fs-heading: clamp(20px, 1.7vw, 24px);  /* steps, strips, posts, people */
  --fs-body: 17px;
  --fs-small: 15px;                        /* buttons, sub-nav, labels */

  /* space and shape */
  --cols: 12;
  --gap: 20px;
  --cell-pad: 32px;
  --head-gap: 64px;
  --radius: 24px;                          /* hero media */
  --radius-media: 12px;                    /* photos, tiles */
  --gutter: var(--sp-wrapper, 5vw);
  --subnav-h: 64px;
  --sheet-y: clamp(80px, 9vw, 128px);      /* space below a section */
  --sheet-top: clamp(56px, 6vw, 88px);     /* space above a section's title */

  /* motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-reveal: 500ms;
  --stagger: 100ms;

  position: relative;
  font-family: var(--ff);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--base);
  color-scheme: dark;
  overflow-x: clip;
}
.etgj, .etgj *, .etgj *::before, .etgj *::after { box-sizing: border-box; }
.etgj p, .etgj li, .etgj dd, .etgj h1, .etgj h2, .etgj h3, .etgj dt { text-wrap: pretty; }
.etgj :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ---------- Grid ---------- */
.etgj .etgj-wrap { position: relative; padding: 0 var(--etgj-edge); }
.etgj .etgj-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.etgj .etgj-full { grid-column: 1 / -1; }
.etgj p.etgj-full { margin-top: 24px; }

.etgj .etgj-head { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; margin-bottom: var(--head-gap); }
.etgj .etgj-head > :first-child { grid-column: 1 / 6; }
.etgj .etgj-head > :nth-child(2) { grid-column: 7 / -1; }
.etgj .etgj-head--link { align-items: end; }
.etgj .etgj-head--link > :nth-child(2) { justify-self: end; }
.etgj .etgj-head--stack { row-gap: 16px; }
.etgj .etgj-head--stack > :first-child, .etgj .etgj-head--stack > :nth-child(2) { grid-column: 1 / 8; }

/* ---------- Type ---------- */
.etgj .etgj-h2 { margin: 0; font: 400 var(--fs-title)/1.1 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-statement { margin: 0; font: 400 var(--fs-body)/1.5 var(--ff); color: var(--ink-2); }
.etgj .etgj-eyebrow { margin: 0 0 12px; font-size: var(--fs-small); line-height: 1.4; color: var(--grey); }

/* ---------- Links and buttons ---------- */
.etgj .etgj-link {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 var(--fs-body)/1.3 var(--ff); color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--line);
}
.etgj .etgj-link::after {
  content: ""; flex: none; width: 18px; height: 18px; background: var(--red-bright);
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
          mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform .26s var(--ease-out);
}
.etgj .etgj-link:hover { text-decoration-color: currentColor; }
.etgj .etgj-link:hover::after { transform: translate(3px, -3px); }

.etgj .etgj-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; border-radius: 6px;
  font: 500 var(--fs-small)/1.25 var(--ff); text-align: center; text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--red);
  transition: background-color .2s ease, transform .14s var(--ease-out);
}
.etgj .etgj-btn:hover { background: var(--red-hover); color: #fff; }
.etgj .etgj-btn:active { transform: scale(0.97); }

/* ---------- The live pixel field behind everything (js: pixels) ----------
   Sticky to the viewport, bounded by the .etgj wrapper; the content follows it, one screen up. */
.etgj .etgj-bg { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; z-index: 0; pointer-events: none; }
.etgj .etgj-bg canvas { display: block; width: 100%; height: 100%; }
.etgj > :not(.etgj-bg, .etgj-subnav, script) { position: relative; z-index: 1; }

/* ---------- Sheets: one per section ----------
   Hero: navy frosted glass, square top corners under the sub-nav. Sections after it: neutral glass card with a fine
   grain and a rim, over a near-black backdrop that fades in and out at the section's ends. On desktop with motion,
   js (sheets) drives --sheet-inset from 0 (in view: full width) to 32px. */
.etgj .etgj-sheet {
  --rim-x: 16px; --rim-r: 20px; --fade: 200px;
  position: relative; isolation: isolate; color: var(--ink-2); max-width: var(--etgj-sheet-max); margin-inline: auto;
}
.etgj.etgj-sheets-linked .etgj-sheet { --sheet-radius: 36px; --rim-x: var(--sheet-inset, 0px); --rim-r: var(--sheet-radius); }
.etgj .etgj-sheet::before, .etgj .etgj-sheet::after {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: var(--rim-x); right: var(--rim-x);
  border-radius: var(--rim-r); pointer-events: none;
}
.etgj .etgj-sheet__inner { padding-top: var(--sheet-top); padding-bottom: var(--sheet-y); }

/* the hero: navy glass, clipped into the card shape */
.etgj .etgj-sheet--hero {
  background: var(--sheet);
  -webkit-backdrop-filter: blur(var(--sheet-blur)) saturate(1.3); backdrop-filter: blur(var(--sheet-blur)) saturate(1.3);
  clip-path: inset(0 16px round 0 0 20px 20px);
}
.etgj.etgj-sheets-linked .etgj-sheet--hero { clip-path: inset(0 var(--sheet-inset, 0px) round 0 0 var(--sheet-radius) var(--sheet-radius)); }
.etgj .etgj-sheet--hero::before, .etgj .etgj-sheet--hero::after { border-radius: 0 0 var(--rim-r) var(--rim-r); }
.etgj .etgj-sheet--hero::before {
  box-shadow: inset 0 -1.5px 0 rgba(255, 255, 255, .1), inset 1.5px 0 0 rgba(255, 255, 255, .04), inset -1.5px 0 0 rgba(0, 0, 0, .35), inset 0 -36px 60px -36px rgba(255, 255, 255, .06);
}
.etgj .etgj-sheet--hero::after {
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .03) 50%, rgba(255, 255, 255, .08) calc(100% - 120px), rgba(255, 255, 255, .32));
  -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);
}

/* sections after the hero: the card on ::before, its 1px edge on ::after. The neutral backdrop with two faint glows
   is painted inside the card (--sheet-backdrop, ::before's bottom layer), not across the sheet's full width, so no
   dark strip shows beside a card while it insets or past the 1920px cap (John, Nov 26) */
.etgj .etgj-sheet:not(.etgj-sheet--hero) {
  --ink-2: #C8CACE; --grey: #93969C; --line: rgba(255, 255, 255, .12);
  background: none;
  --sheet-backdrop:
    radial-gradient(40% 46% at 4% 42%, rgba(176, 63, 153, .16), transparent 70%),
    radial-gradient(38% 42% at 97% 64%, rgba(232, 69, 31, .1), transparent 70%),
    linear-gradient(180deg, rgba(var(--neutral-rgb), 0), rgb(var(--neutral-rgb)) var(--fade), rgb(var(--neutral-rgb)) calc(100% - var(--fade)), rgba(var(--neutral-rgb), 0));
}
/* alternate the glows so neighbouring sections don't match (sections and gaps alternate, so every other section) */
.etgj .etgj-sheet:not(.etgj-sheet--hero):nth-of-type(even) {
  --sheet-backdrop:
    radial-gradient(44% 48% at 94% 38%, rgba(124, 116, 214, .14), transparent 70%),
    radial-gradient(36% 40% at 8% 70%, rgba(232, 69, 31, .09), transparent 70%),
    linear-gradient(180deg, rgba(var(--neutral-rgb), 0), rgb(var(--neutral-rgb)) var(--fade), rgb(var(--neutral-rgb)) calc(100% - var(--fade)), rgba(var(--neutral-rgb), 0));
}
.etgj .etgj-sheet:not(.etgj-sheet--hero)::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02) 30%, rgba(255, 255, 255, .02) 70%, rgba(255, 255, 255, .05)),
    var(--sheet-backdrop);
  -webkit-backdrop-filter: blur(32px) saturate(1.5); backdrop-filter: blur(32px) saturate(1.5);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .1), inset 0 -1.5px 0 rgba(255, 255, 255, .1),
    inset 1.5px 0 0 rgba(255, 255, 255, .04), inset -1.5px 0 0 rgba(0, 0, 0, .35),
    inset 0 36px 60px -36px rgba(255, 255, 255, .06), inset 0 -36px 60px -36px rgba(255, 255, 255, .06);
}
.etgj .etgj-sheet:not(.etgj-sheet--hero)::after {
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08) 120px, rgba(255, 255, 255, .03) 50%, rgba(255, 255, 255, .08) calc(100% - 120px), rgba(255, 255, 255, .32));
  -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);
}

/* Feature sheet: the hero's navy glass over the pixel field, no neutral backdrop (a section that breaks the rhythm) */
.etgj .etgj-sheet.etgj-sheet--feature:not(.etgj-sheet--hero) { --ink-2: #C3CAD5; --grey: #8F98A7; --line: rgba(255, 255, 255, .13); background: none; }
.etgj .etgj-sheet.etgj-sheet--feature:not(.etgj-sheet--hero)::before {
  background: var(--sheet);
  -webkit-backdrop-filter: blur(var(--sheet-blur)) saturate(1.3); backdrop-filter: blur(var(--sheet-blur)) saturate(1.3);
}
/* Closing sheet: a warm red-magenta glow under the call to action */
.etgj .etgj-sheet.etgj-sheet--closing:not(.etgj-sheet--hero) {
  --sheet-backdrop:
    radial-gradient(40% 280px at 50% calc(100% - 210px), rgba(226, 31, 38, .22), transparent 72%),
    radial-gradient(60% 420px at 50% calc(100% - 260px), rgba(176, 63, 153, .2), transparent 72%),
    radial-gradient(40% 46% at 6% 30%, rgba(124, 116, 214, .1), transparent 70%),
    linear-gradient(180deg, rgba(var(--neutral-rgb), 0), rgb(var(--neutral-rgb)) var(--fade), rgb(var(--neutral-rgb)) calc(100% - var(--fade)), rgba(var(--neutral-rgb), 0));
}

/* Gaps between sheets: the pixel field shows clearly */
.etgj .etgj-gap { height: clamp(96px, 11vw, 160px); }
.etgj .etgj-gap--wide { height: clamp(160px, 19vw, 272px); }

/* ---------- Hero: text on 1 to 6, media on 7 to 12 ---------- */
.etgj .etgj-hero { padding-top: clamp(72px, 7vw, 104px); }
.etgj .etgj-hero__text { grid-column: 1 / 7; padding-right: var(--gap); }
.etgj .etgj-hero__title { margin: 0 0 40px; font: 400 var(--fs-display)/1.05 var(--ff-display); letter-spacing: -0.03em; color: var(--ink); max-width: 11em; overflow-wrap: normal; }
.etgj .etgj-hero__lede { margin: 0 0 40px; padding-left: 24px; border-left: 1px solid var(--line); font: 400 var(--fs-body)/1.5 var(--ff); color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
.etgj .etgj-hero__media { grid-column: 7 / -1; position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--base-deep); }
.etgj .etgj-hero__video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Disclosure on an AI-generated visual (house rule); HTML text so Weglot translates it */
.etgj .etgj-ai-label {
  position: absolute; left: 12px; bottom: 12px; z-index: 1; padding: 5px 10px; border-radius: 6px;
  background: rgba(6, 13, 23, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 12px/1.2 var(--ff); letter-spacing: .01em; color: rgba(255, 255, 255, .9); pointer-events: none;
}

/* ---------- Logo band: a slow marquee (the list runs twice; reduced motion gets a static wrapping row) ---------- */
.etgj .etgj-logos { margin-top: clamp(56px, 6vw, 80px); padding-bottom: clamp(48px, 5vw, 72px); }
.etgj .etgj-logos__label { grid-column: 1 / -1; margin: 0 0 20px; font-size: var(--fs-small); color: var(--grey); }
.etgj .etgj-marquee { grid-column: 1 / -1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.etgj .etgj-marquee__track { display: flex; width: max-content; animation: etgj-marquee 60s linear infinite; }
.etgj .etgj-logo-band { display: flex; flex: none; align-items: center; gap: 0 clamp(48px, 5vw, 80px); margin: 0; padding: 0 clamp(24px, 2.5vw, 40px); list-style: none; }
.etgj .etgj-logo-band > li { display: flex; flex: none; align-items: center; min-height: 72px; }
.etgj .etgj-logo { display: block; width: auto; max-width: 200px; height: 40px; object-fit: contain; filter: brightness(0) invert(1); opacity: .62; }
.etgj .etgj-logo--padded { height: 60px; }   /* files with wide built-in margins */
.etgj .etgj-logo--tone { height: 48px; filter: grayscale(1) brightness(1.35) contrast(.9); opacity: .7; }   /* solid crests: greyscale, not white */
.etgj .etgj-logo--crest { height: 60px; }   /* round badges read small at wordmark height */
@keyframes etgj-marquee { to { transform: translateX(-50%); } }

/* ---------- Hairline cells: a row of cells on the columns, divided by 1px rules ---------- */
.etgj .etgj-cells { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin: 0; padding: 0; list-style: none; position: relative;
  background: var(--rule-grad) left top / var(--rule-w, 100%) var(--rule-h) no-repeat, var(--rule-grad) left bottom / var(--rule-w, 100%) var(--rule-h) no-repeat; }
.etgj .etgj-cells > * { position: relative; align-self: stretch; padding: var(--cell-pad) 0 calc(var(--cell-pad) + 8px); }
/* a row that ends its section: no bottom rule, and the section's usual space below */
.etgj .etgj-cells:last-child { background: var(--rule-grad) left top / var(--rule-w, 100%) var(--rule-h) no-repeat; }
.etgj .etgj-sheet__inner:has(> .etgj-cells:last-child) { padding-bottom: calc(var(--sheet-y) - var(--cell-pad) - 8px); }
.etgj .etgj-cells > * + * { padding-left: var(--cell-pad); }
.etgj .etgj-cells > * + *::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); transform-origin: top; }
.etgj .etgj-cells > :where(:not(:last-child)) { padding-right: calc(var(--cell-pad) - var(--gap)); }
.etgj .etgj-cells--2 > * { grid-column: span 6; }
.etgj .etgj-cells--3 > * { grid-column: span 4; }
.etgj .etgj-cells--4 > * { grid-column: span 3; }
.etgj .etgj-cells--6 > * { grid-column: span 2; }
@media (min-width: 961px) {
  /* rows of three: the middle cell centred between its two dividers */
  .etgj .etgj-cells--3 > :nth-child(3n+2) { padding-left: calc(var(--cell-pad) / 2 + var(--gap) / 2); padding-right: calc(var(--cell-pad) / 2 - var(--gap) / 2); }
}

/* ---------- Photos: one shape per use (3:2 cards, 16:10 posts, 16:9 features) ---------- */
.etgj .etgj-media { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: 0 0 24px; border-radius: var(--radius-media); background: rgba(255, 255, 255, .04); }
.etgj .etgj-posts .etgj-media { aspect-ratio: 16 / 10; }
/* in a row of cells the first cell is wider (no divider padding): one height keeps photos and titles level */
.etgj .etgj-cells .etgj-media { aspect-ratio: auto; height: clamp(180px, 18vw, 272px); }
.etgj .etgj-posts.etgj-cells .etgj-media { height: clamp(150px, 14vw, 216px); }

/* ---------- Strip: a heading on 1 to 6 and a line or link on 7 to 12, under a row of cells ---------- */
.etgj .etgj-strip { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding-top: 36px; }
.etgj .etgj-strip > :first-child { grid-column: 1 / 7; }
.etgj .etgj-strip > :nth-child(2) { grid-column: 7 / -1; }
.etgj .etgj-strip > .etgj-link { justify-self: end; }
.etgj .etgj-strip__title { margin: 0; font: 400 var(--fs-heading)/1.25 var(--ff-display); color: var(--ink); }
.etgj .etgj-strip > div > p:not(.etgj-eyebrow) { margin: 8px 0 0; }
.etgj .etgj-strip > p { margin: 0; }
.etgj .etgj-strip > div > .etgj-link { margin-top: 20px; }

/* ---------- Case study: photo on 1 to 6, text from 7 ---------- */
.etgj .etgj-case { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
.etgj .etgj-case__img { grid-column: 1 / 7; margin: 0; }
.etgj .etgj-case__text { grid-column: 7 / -1; padding-left: var(--cell-pad); }
.etgj .etgj-case__text .etgj-h2 { margin-bottom: 24px; }
.etgj .etgj-case__text p:not(.etgj-eyebrow) { margin: 0 0 28px; }

/* ---------- Stats: 3 + 3 + 3 + 3 between rules ---------- */
.etgj .etgj-stats__label { grid-column: 1 / -1; margin: var(--head-gap) 0 20px; font-size: var(--fs-small); color: var(--grey); }
.etgj .etgj-stats { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin: 0; padding: 0; list-style: none; position: relative;
  background: var(--rule-grad) left top / var(--rule-w, 100%) var(--rule-h) no-repeat, var(--rule-grad) left bottom / var(--rule-w, 100%) var(--rule-h) no-repeat; }
.etgj .etgj-stat { grid-column: span 3; position: relative; align-self: stretch; display: flex; flex-direction: column; gap: 12px; padding: 32px 0 40px; }
.etgj .etgj-stat + .etgj-stat { padding-left: var(--cell-pad); }
.etgj .etgj-stat + .etgj-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); transform-origin: top; }
.etgj .etgj-stat__figure { font: 400 var(--fs-display)/1.05 var(--ff-display); letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
@media (min-width: 1181px) { .etgj .etgj-stat__figure { font-size: min(var(--fs-display), 3.6vw); } }
.etgj .etgj-stat__label { font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }

/* ---------- Rail and features: a sticky heading and rail on 1 to 5, the features on 7 to 12 (js: rail) ---------- */
.etgj .etgj-apart__side { grid-column: 1 / 6; position: sticky; top: calc(var(--etg-header-h, 0px) + var(--subnav-h) + 40px); }
.etgj .etgj-apart__side .etgj-h2 { margin-bottom: 40px; }
.etgj .etgj-rail { position: relative; max-width: 26em; }
.etgj .etgj-rail__list { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.etgj .etgj-rail__marker {
  position: absolute; left: -2px; top: 0; width: 3px; height: var(--marker-h, 0px); border-radius: 2px;
  background: var(--accent-grad-v); opacity: 0; transform: translateY(var(--marker-y, 0px));
  transition: transform .5s var(--ease-out), height .5s var(--ease-out), opacity .3s ease;
}
.etgj .etgj-rail__marker.is-on { opacity: 1; }
.etgj .etgj-rail a { display: block; padding: 10px 0 10px 20px; font: 400 var(--fs-body)/1.35 var(--ff); color: var(--grey); text-decoration: none; transition: color .2s ease; }
.etgj .etgj-rail a:hover, .etgj .etgj-rail a.is-current { color: var(--ink); }
.etgj .etgj-features { grid-column: 7 / -1; grid-row: 1; position: relative; background: var(--rule-grad) left top / var(--rule-w, 100%) var(--rule-h) no-repeat; }
.etgj .etgj-feature { padding: 40px 0 48px; background: var(--rule-grad) left bottom / var(--rule-w, 100%) var(--rule-h) no-repeat; scroll-margin-top: calc(var(--etg-header-h, 0px) + var(--subnav-h) + 40px); }
.etgj .etgj-feature__title { margin: 0 0 16px; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-feature p { margin: 0 0 20px; }
.etgj .etgj-feature__img { aspect-ratio: 16 / 9; margin-bottom: 28px; }
.etgj .etgj-feature__logo { display: grid; place-items: center; aspect-ratio: 16 / 9; margin-bottom: 28px; border-radius: var(--radius-media); background: linear-gradient(180deg, #F4F5F7, #E3E6EA); }
.etgj .etgj-feature__logo img { width: 42%; height: auto; }

/* ---------- Flow: numbered steps joined by a line, the photo beside each ---------- */
.etgj .etgj-flow { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; margin: 0; padding: 0; list-style: none; position: relative;
  background: var(--rule-grad) left top / var(--rule-w, 100%) var(--rule-h) no-repeat, var(--rule-grad) left bottom / var(--rule-w, 100%) var(--rule-h) no-repeat; }
.etgj .etgj-flow__step { --num-mt: calc((var(--fs-heading) * 1.25 + 6px + var(--fs-small) * 1.4 - 40px) / 2); grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; grid-template-rows: auto 1fr; align-items: start; position: relative; padding: 32px 0; }
.etgj .etgj-flow__step + .etgj-flow__step { --step-top: 0px; padding-top: 0; }
.etgj .etgj-flow__step:not(:last-child)::before { content: ""; position: absolute; left: 20px; top: calc(var(--step-top, 32px) + var(--num-mt) + 48px); bottom: calc(8px - var(--num-mt)); width: 1px; background: var(--line); }
.etgj .etgj-flow__num { grid-column: 1; margin-top: var(--num-mt); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font: 500 13px/1 var(--ff); font-variant-numeric: tabular-nums; color: var(--ink); }
.etgj .etgj-flow__title { grid-column: 2 / 7; margin: 0; font: 400 var(--fs-heading)/1.25 var(--ff-display); color: var(--ink); }
.etgj .etgj-flow__title span { display: block; margin-top: 6px; font: 400 var(--fs-small)/1.4 var(--ff); color: var(--grey); }
.etgj .etgj-flow__step p { grid-column: 2 / 6; grid-row: 2; margin: 0; padding: 16px 0 0; }
.etgj .etgj-flow__img { grid-column: 7 / -1; grid-row: 1 / span 2; aspect-ratio: 2 / 1; margin: 0 0 16px; }

/* ---------- Video: a 16:9 click-to-play facade (Courts build section, Overview experience section). The poster is
   the video's own thumbnail; after a click justice.js swaps in the youtube-nocookie player in the same frame. ---------- */
.etgj .etgj-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #0d1522; }
.etgj .etgj-video__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.etgj .etgj-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.etgj .etgj-video__icon { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--red); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: background-color .2s ease, transform .25s var(--ease-out); }
.etgj .etgj-video__icon svg { width: 26px; height: 26px; margin-left: 4px; }
.etgj .etgj-video__play:hover .etgj-video__icon { background: var(--red-hover); transform: scale(1.05); }
.etgj .etgj-video__play:hover .etgj-video__poster { transform: scale(1.02); }
.etgj .etgj-video__play:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 12px; }
.etgj .etgj-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .etgj .etgj-video__poster, .etgj .etgj-video__icon { transition: none; } }
@media (max-width: 960px) { .etgj .etgj-video__icon { width: 60px; height: 60px; } }

/* ---------- People: portrait cards, 3 + 3 + 3 + 3 ---------- */
.etgj .etgj-people > li, .etgj .etgj-people > li + li { text-align: center; padding-left: calc(var(--cell-pad) / 2 + var(--gap) / 2); padding-right: calc(var(--cell-pad) / 2 - var(--gap) / 2); }
.etgj .etgj-people > li:nth-child(4n) { padding-left: calc(var(--cell-pad) / 2); padding-right: calc(var(--cell-pad) / 2); }
.etgj .etgj-people > li:nth-child(4n+1)::before { display: none; }
.etgj .etgj-people > li:nth-child(4n+1):nth-child(n+5)::before { display: block; top: 0; bottom: auto; width: calc(400% + 3 * var(--gap)); height: 1px; transform: none; }
.etgj .etgj-person__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; margin: 0 0 20px; border-radius: var(--radius-media); background: rgba(255, 255, 255, .04); }
.etgj .etgj-person__name { margin: 0 0 4px; font: 400 var(--fs-heading)/1.25 var(--ff-display); color: var(--ink); }
.etgj .etgj-person__role { margin: 0; font-size: var(--fs-small); line-height: 1.45; color: var(--grey); }

/* ---------- Posts: projects and insights cards, 4 + 4 + 4, each card one link ---------- */
.etgj .etgj-posts > * { display: flex; flex-direction: column; }
.etgj .etgj-post__type { margin: 0 0 10px; font-size: var(--fs-small); color: var(--grey); }
.etgj .etgj-post__title { flex: 1; margin: 0 0 24px; font: 400 var(--fs-heading)/1.25 var(--ff-display); letter-spacing: -0.01em; color: var(--ink); }
.etgj .etgj-post__link { align-self: flex-start; }
.etgj .etgj-post__link::before { content: ""; position: absolute; inset: 0; }
.etgj .etgj-post:hover .etgj-post__link { text-decoration-color: currentColor; }
.etgj .etgj-post:hover .etgj-post__link::after { transform: translate(3px, -3px); }

/* ---------- Closing: two-tone headline and the call to action, centred (the Justice CTA band) ---------- */
.etgj .etgj-closing { grid-column: 2 / 12; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--sheet-y); }
.etgj .etgj-closing__title { max-width: 26em; margin: 0 0 40px; font: 400 var(--fs-subtitle)/1.3 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .etgj-closing__lede { color: var(--grey); }

/* ---------- Motion: reveals (js: reveals). Hidden states only under .etgj-js and without reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .etgj.etgj-js .etgj-hero__title, .etgj.etgj-js .etgj-hero__lede, .etgj.etgj-js .etgj-hero .etgj-btn {
    opacity: 0; translate: 0 20px; animation: etgj-rise 600ms var(--ease) forwards;
  }
  .etgj.etgj-js .etgj-hero__title { animation-delay: 80ms; }
  .etgj.etgj-js .etgj-hero__lede { animation-delay: 240ms; }
  .etgj.etgj-js .etgj-hero .etgj-btn { animation-delay: 340ms; }

  /* Nov 25: scroll reveals switched off on every Justice page (John's design, motion.css): text, images, cards and hairlines sit at rest.
     justice.js still adds .is-in, which now changes nothing. */
}
@keyframes etgj-rise { to { opacity: 1; translate: none; } }

/* Reduced motion: no marquee, no animated rules or markers */
@media (prefers-reduced-motion: reduce) {
  .etgj .etgj-marquee { -webkit-mask-image: none; mask-image: none; }
  .etgj .etgj-marquee__track { width: auto; animation: none; }
  .etgj .etgj-marquee__track > [aria-hidden] { display: none; }
  .etgj .etgj-logo-band { flex-wrap: wrap; flex: 1; gap: 24px clamp(32px, 4vw, 56px); padding: 0; }
  .etgj .etgj-rail__marker, .etgj .etgj-btn, .etgj .etgj-link::after { transition: none; }
}
/* ET's "Simplify Visuals" toggle (body[data-a11y-toggle=active]) stops CSS animations site-wide: show the hero at rest */
body[data-a11y-toggle="active"] .etgj :is(.etgj-hero__title, .etgj-hero__lede, .etgj-hero .etgj-btn, .etgj-hero__media) { opacity: 1 !important; translate: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .etgj .etgj-stat { grid-column: span 6; }
  .etgj .etgj-stat:nth-child(3) { padding-left: 0; background: var(--rule-grad) left top / 100% var(--rule-h) no-repeat; }
  .etgj .etgj-stat:nth-child(3)::before { display: none; }
  .etgj .etgj-stat:nth-child(4) { background: var(--rule-grad) left top / 100% var(--rule-h) no-repeat; }
}

@media (max-width: 960px) {
  .etgj { --fs-body: 16px; --fs-small: 14px; --subnav-h: 56px; --radius: 18px; --head-gap: 40px; --gap: 16px; --cell-pad: 0px;
    --sheet-top: 44px; }   /* space above a section's first text or image: 56px until Nov 26 */
  .etgj .etgj-sheet:not(.etgj-sheet--hero) { --rim-x: 10px; --rim-r: 18px; --fade: 120px; }
  .etgj .etgj-sheet--hero { --rim-x: 10px; --rim-r: 18px; clip-path: inset(0 10px round 0 0 18px 18px); }
  .etgj .etgj-sheet .etgj-wrap { padding-left: calc(var(--gutter) + 10px); padding-right: calc(var(--gutter) + 10px); }
  /* one column (a plain list, not :is(), so each keeps its own specificity) */
  .etgj .etgj-head > :first-child,
  .etgj .etgj-head > :nth-child(2),
  .etgj .etgj-hero__text,
  .etgj .etgj-hero__media,
  .etgj .etgj-cells > *,
  .etgj .etgj-rail,
  .etgj .etgj-features,
  .etgj .etgj-stat,
  .etgj .etgj-closing,
  .etgj .etgj-strip > :first-child,
  .etgj .etgj-strip > :nth-child(2),
  .etgj .etgj-case__img,
  .etgj .etgj-case__text { grid-column: 1 / -1; }
  .etgj .etgj-head { row-gap: 20px; }
  .etgj .etgj-head--link { align-items: start; }
  .etgj .etgj-head--link > :nth-child(2) { justify-self: start; }
  .etgj .etgj-strip { row-gap: 16px; padding-top: 28px; }
  .etgj .etgj-strip > .etgj-link { justify-self: start; }
  .etgj .etgj-cells .etgj-media { height: auto; aspect-ratio: 3 / 2; }
  .etgj .etgj-posts.etgj-cells .etgj-media { height: auto; aspect-ratio: 16 / 10; }
  .etgj .etgj-case__text { padding: 32px 0 0; }
  /* hero: the media leads, directly under the sub-nav, then the headline */
  .etgj .etgj-hero { padding-top: 24px; }
  .etgj .etgj-hero__text { padding-right: 0; }
  .etgj .etgj-hero__media { grid-row: 1; margin: 0 0 40px; }
  /* cells and stats stack, each with a rule on top */
  .etgj .etgj-cells > * + *, .etgj .etgj-stat + .etgj-stat { padding-left: 0; background: var(--rule-grad) left top / 100% var(--rule-h) no-repeat; }
  .etgj .etgj-cells > * + *::before, .etgj .etgj-stat + .etgj-stat::before { display: none; }
  .etgj .etgj-cells > * { padding-top: 28px; padding-right: 0; padding-bottom: 32px; }
  .etgj .etgj-sheet__inner:has(> .etgj-cells:last-child) { padding-bottom: calc(var(--sheet-y) - 32px); }
  /* rail hidden, features full width */
  .etgj .etgj-rail { display: none; }
  .etgj .etgj-apart__side { position: static; grid-column: 1 / -1; }
  .etgj .etgj-apart__side .etgj-h2 { margin-bottom: var(--head-gap); }
  .etgj .etgj-features { grid-row: auto; }
  /* flow: number on the left, the step beside it */
  .etgj .etgj-flow__step { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: none; column-gap: 16px; }
  .etgj .etgj-flow__num { grid-row: 1 / span 2; }
  .etgj .etgj-flow__title, .etgj .etgj-flow__step p, .etgj .etgj-flow__img { grid-column: 2; }
  .etgj .etgj-flow__step p { grid-row: auto; padding-top: 12px; }
  .etgj .etgj-flow__img { grid-row: auto; margin-top: 16px; }
  /* people: a two-column photo grid, no rules */
  .etgj .etgj-people { background: none; row-gap: 32px; }
  .etgj .etgj-people > li, .etgj .etgj-people > li + li, .etgj .etgj-people > li:nth-child(4n) { grid-column: span 6; padding: 0; background: none; }
  .etgj .etgj-people > li + li::before, .etgj .etgj-people > li:nth-child(4n+1):nth-child(n+5)::before { display: none; }
  /* text links: a 44px tap target. Inline text with an inline arrow (not inline-flex), so when a label wraps the arrow
     follows its last word; it hangs in the 28px kept on the right, so it never wraps onto a line of its own (Nov 26) */
  .etgj .etgj-link { display: inline-block; min-height: 44px; padding-block: 11.6px; padding-right: 28px; }
  .etgj .etgj-link::after { display: inline-block; margin-left: 10px; margin-right: -28px; vertical-align: -3px; }
}

@media (max-width: 520px) {
  .etgj { --fs-display: clamp(28px, 8.2vw, 36px); }
  .etgj .etgj-btn { display: flex; width: 100%; white-space: normal; }
}
