/*
 * ET Group Justice: Contact a Justice Specialist (/justice/contact/) only. Loaded after justice.css and subnav.css.
 * Ported from John's Contact design: assets/css/contact.css and reveal.css, scoped under .etgj (the design's
 * .etg-justice wrapper is .etgj here). Class prefix cn- for page parts, as in the design.
 *
 * The form is ET's HubSpot embed (pages/contact.js, css: ''), styled here through HubSpot's own class names
 * (.hs-form, .hs-form-field, .hs-input, .legal-consent-container, .hs-button), as in the Nov 19 design.
 * Motion: the design's newer reveal system (reveal.js), ported into pages/contact.js; its CSS half is at the end of
 * this file and switches off justice.css's reveals here.
 */

.etgj [id] { scroll-margin-top: 96px; }

/* ================= HERO ================= */
.etgj .cn-hero { padding-bottom: var(--sheet-y); }
.etgj .cn-hero .etgj-hero__title { margin: 0; max-width: 9em; }
/* Nov 19 design: the hero intro keeps the system's vertical rule (justice.css .etgj-hero__lede's 1px line and 24px indent) */
.etgj .cn-hero .etgj-hero__lede { margin: 24px 0 0; max-width: 31em; }

/* ---------- What happens next: three numbered hairline rows (1, 2, 3: no leading zeros) ---------- */
.etgj .cn-next { margin-top: 48px; }
.etgj .cn-next__label { margin: 0 0 4px; font: 400 var(--fs-small)/1.4 var(--ff); letter-spacing: normal; color: var(--grey); }
.etgj .cn-next__list { margin: 0; padding: 0; list-style: none; max-width: 34em; }
.etgj .cn-next__list li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.etgj .cn-next__num { font: 400 var(--fs-heading)/1.25 var(--ff-display); color: var(--grey); }
.etgj .cn-next__list li > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.etgj .cn-next__title { font: 400 var(--fs-heading)/1.25 var(--ff-display); letter-spacing: -0.01em; color: var(--ink); }
.etgj .cn-next__text { font: 400 var(--fs-body)/1.5 var(--ff); color: var(--ink-2); text-wrap: pretty; }
.etgj .cn-next__call { margin: 24px 0 0; font: 400 var(--fs-body)/1.5 var(--ff); color: var(--ink-2); }
.etgj .cn-tel { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: .2em; white-space: nowrap; }
.etgj .cn-tel:hover { text-decoration-color: currentColor; }

/* ---------- The form card: glass, a touch brighter, so the form reads as the page's object ---------- */
.etgj .cn-form {
  padding: 36px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, .55);
}
.etgj .cn-form__title { margin: 0; font: 400 var(--fs-subtitle)/1.15 var(--ff-display); letter-spacing: -0.02em; color: var(--ink); }
.etgj .cn-form .hs-form-field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.etgj .cn-form .hs-form-field > label,
.etgj .cn-form .hs-form-field > legend {
  display: block; margin: 0 0 8px; padding: 0; font: 500 var(--fs-small)/1.35 var(--ff); color: var(--ink);
}

/* Inputs: dark wells on the glass, the buttons' 6px corners, a 1px line that brightens on hover and turns white on focus */
.etgj .cn-form .hs-input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 12px 14px; box-sizing: border-box;
  font: 400 16px/1.4 var(--ff); color: var(--ink);               /* 16px: iOS doesn't zoom into the field */
  background: rgba(0, 0, 0, .28); border: 0; border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: box-shadow .16s var(--ease), background-color .16s var(--ease);
  -webkit-appearance: none; appearance: none;
}
/* HubSpot injects .hs-custom-style input rules (min-height 27px, padding 0 15px) that outrank the class rule above:
   the id wins for text inputs only (checkboxes, radios, textarea and select keep their own rules). John, Nov 23. */
#etgj .cn-form input.hs-input:not([type="checkbox"]):not([type="radio"]) { min-height: 48px; padding: 12px 14px; }
.etgj .cn-form .hs-input:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.etgj .cn-form .hs-input:focus { outline: none; background: rgba(0, 0, 0, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), 0 0 0 3px rgba(255, 255, 255, .12); }
.etgj .cn-form .hs-input::placeholder { color: var(--grey); opacity: 1; }
.etgj .cn-form textarea.hs-input { min-height: 120px; resize: vertical; }
/* select: Phosphor's caret-down, as on the sub-nav's Solutions button */
.etgj .cn-form select.hs-input {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 fill=%22%23C8CACE%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");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
.etgj .cn-form select.hs-input:invalid { color: var(--grey); }
.etgj .cn-form select.hs-input option { color: #14171C; background: #fff; }
.etgj .cn-form .hs-error-msg { display: block; margin-top: 6px; font: 400 14px/1.35 var(--ff); color: #FF9A8E; }

/* ---------- Consent and submit ---------- */
/* the ET theme sets .hs-form .legal-consent-container p { margin: 0 !important } and fieldsets' bottom margin !important */
.etgj .cn-form .legal-consent-container p { margin: 8px 0 0 !important; font: 400 14px/1.55 var(--ff); color: var(--grey); text-wrap: pretty; }
.etgj .cn-form .legal-consent-container a { color: var(--ink-2); text-decoration: underline; text-underline-offset: .2em; }
.etgj .cn-form fieldset.hs-form-field { margin: 0 0 20px !important; }
.etgj .cn-form .hs-button { border: 0; cursor: pointer; min-height: 48px; padding-inline: 28px; }
.etgj .cn-form .hs-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Hero geometry ---------- */
@media (min-width: 961px) {
  .etgj .cn-hero { row-gap: 0; grid-template-rows: auto auto 1fr; }   /* the form spans rows 2 and 3: its extra height goes to row 3, so what happens next sits under the lede */
  .etgj .cn-hero > .cn-hero-brand { grid-column: 1 / -1; grid-row: 1; margin: 0 0 16px; }
  .etgj .cn-hero > .etgj-hero__text { grid-column: 1 / 7; grid-row: 2; }
  .etgj .cn-hero > .cn-next { grid-column: 1 / 7; grid-row: 3; align-self: start; }
  /* the card's top meets the top of the headline's lowercase letters */
  .etgj .cn-hero > .cn-form { grid-column: 7 / -1; grid-row: 2 / span 2; align-self: start; margin: calc(var(--fs-display) * 0.35) 0 0 var(--cell-pad); }
}
@media (min-width: 961px) and (max-width: 1200px) {
  .etgj .cn-form { padding: 28px; }
}
@media (max-width: 960px) {
  .etgj .cn-hero > * { grid-column: 1 / -1; }
  .etgj .cn-form { margin-top: 40px; padding: 28px 24px; border-radius: 20px; }
  .etgj .cn-next { margin-top: 48px; }
}
@media (max-width: 520px) {
  .etgj .cn-form { padding: 24px 20px; }
}

/* ================= OTHER WAYS TO REACH US ================= */
.etgj .cn-cell__label { margin: 0 0 10px; font: 400 var(--fs-small)/1.4 var(--ff); color: var(--grey); }
.etgj .cn-cell__title { margin: 0 0 12px; font: 400 var(--fs-heading)/1.25 var(--ff-display); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.etgj .cn-cell p:not(.cn-cell__label), .etgj .cn-cell address { margin: 0 0 20px; font: 400 var(--fs-body)/1.55 var(--ff); font-style: normal; color: var(--ink-2); text-wrap: pretty; }
.etgj .cn-big { color: inherit; text-decoration: none; white-space: nowrap; }
.etgj .cn-big:hover { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: .18em; }
.etgj .cn-links { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

/* Narrow desktops: two by two (a 4-up row is too narrow for the address). 960 and under, the system stacks the cells. */
@media (min-width: 961px) and (max-width: 1100px) {
  .etgj .cn-ways > * { grid-column: span 6; }
  .etgj .cn-ways > :nth-child(3) { padding-left: 0; }
  .etgj .cn-ways > :nth-child(3)::before { display: none; }
  .etgj .cn-ways > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ---------- ET's HubSpot form (Nov 19 design): the title sits above the embed; HubSpot's own CSS is off (css: ''),
   so these and the .cn-form hs- rules above style what it renders ---------- */
.etgj .cn-form > .cn-form__title { margin-bottom: 24px; }
.etgj .cn-form__loading { margin: 0; font: 400 var(--fs-small)/1.45 var(--ff); color: var(--grey); }
.etgj .cn-form .hs-form fieldset { max-width: none; }
.etgj .cn-form .hs-form fieldset.form-columns-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.etgj .cn-form .hs-form fieldset.form-columns-2 .hs-form-field { width: auto; float: none; }
.etgj .cn-form .hs-form fieldset .input { margin-right: 0 !important; }
.etgj .cn-form .hs-form .inputs-list { margin: 0; padding: 0; list-style: none; }
.etgj .cn-form .hs-form .hs-error-msgs { margin: 0; padding: 0; list-style: none; }
.etgj .cn-form .hs-form .hs-form-required { color: var(--grey); margin-left: 2px; }
.etgj .cn-form .hs-form .hs_submit { margin-top: 28px; }
.etgj .cn-form .hs-form input.hs-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 0; border-radius: 6px; background: var(--red); color: #fff; font: 500 var(--fs-small)/1 var(--ff); cursor: pointer; }
.etgj .cn-form .hs-form input.hs-button:hover { background: var(--red-hover); }
@media (max-width: 960px) {
  .etgj .cn-form .hs-form fieldset.form-columns-2 { grid-template-columns: minmax(0, 1fr); }
  /* except the names: first and last share a row on phones too (Nov 26); email and phone still stack */
  .etgj .cn-form .hs-form fieldset.form-columns-2:has(.hs_firstname) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .etgj .cn-form .hs-form input.hs-button { width: 100%; }
}
@media (min-width: 961px) { .etgj .cn-form .hs-form input.hs-button { width: auto; } }

/* ---------- Reveals (the design's reveal.css): pages/contact.js owns every entrance on this page ----------
   justice.css's reveal states are switched off here, so nothing animates twice or on two clocks. The script marks
   units with data-cn-reveal and adds .cn-in (not .is-in, which justice.js also sets on its own schedule). */
.etgj { --reveal-ease: cubic-bezier(.25, .6, .3, 1); --reveal-dur: 850ms; }
.etgj.etgj-page-contact.etgj-js :is(.etgj-sheet .etgj-h2, .etgj-head .etgj-link, .etgj-statement, .etgj-post,
  .etgj-hero__title, .etgj-hero__lede, .etgj-hero .etgj-btn) {
  opacity: 1; translate: none; animation: none; transition: transform .14s var(--ease-out);
}
/* Nov 25: scroll reveals switched off on every Justice page: hairlines, dividers and step connectors sit drawn from the start. */
/* cell dividers belong to their cell: they come in with it */
.etgj.etgj-page-contact.etgj-js .etgj-cells > * + *::before { transform: none; transition: none; }
/* the hidden start: a unit is invisible until the script starts it (its animation then runs from this state) */
.etgj.etgj-page-contact.etgj-js:not(.etgj-calm) [data-cn-reveal]:not(.cn-in) { opacity: 0; }
/* until the script has tagged the first screen, hold it (no flash of content that then fades in) */
.etgj.etgj-page-contact.etgj-boot .etgj-sheet--hero > .etgj-wrap { opacity: 0; }
