/* QLOGIX "Quarter" - How it works. Loaded after ../styles.css and ../sub.css; classes here are prefixed hiw-.
   The page's own idea: the four steps are the four quarters of the dial. The hero dial lights them one after
   another (the first, in logo blue, is the 15 minutes until our reply); on the route below, each step's node is
   the same dial, filled up to its own quarter, so step four is the whole circle. */

.hiw-hero, .hiw-steps { --q1: #29b6e8; --q2: #0e85b7; --q3: #0c6c95; --q4: #1e3a5f; } /* step 1 to 4, as on the dial */

/* ---------- hero: the dial and its key ---------- */
.hiw-hero__side { justify-self: center; display: grid; gap: clamp(18px, 2.4vh, 30px); width: min(100%, 540px, 62vh); }
.hiw-dial { aspect-ratio: 1; }
.hiw-dial svg { width: 100%; height: auto; }
.hiw-dial text { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hiw-dial .hiw-dial__big { font-weight: 800; letter-spacing: -.03em; }
.hiw-q { transform-box: view-box; transform-origin: 300px 300px; transition: transform .6s var(--ease), opacity .4s; }
.hiw-dial__hand { opacity: 0; transform-box: view-box; transform-origin: 300px 300px; }

/* the key: one row per quarter, its swatch drawn in the quarter's own shape */
.hiw-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }
.hiw-key a {
  display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; column-gap: 12px;
  min-height: 52px; padding-block: 10px; border-top: 1.5px solid var(--navy-100);
  font-weight: 600; font-size: .9875rem; line-height: 1.3; text-decoration: none; color: var(--navy-950);
  transition: color .25s;
}
.hiw-key i { font-style: normal; }
.hiw-key__q { width: 18px; height: 18px; background: var(--c); transition: transform .45s var(--ease); }
.hiw-key li:nth-child(1) .hiw-key__q { --c: var(--q1); border-radius: 0 100% 0 0; transform-origin: 0 100%; }
.hiw-key li:nth-child(2) .hiw-key__q { --c: var(--q2); border-radius: 0 0 100% 0; transform-origin: 0 0; }
.hiw-key li:nth-child(3) .hiw-key__q { --c: var(--q3); border-radius: 0 0 0 100%; transform-origin: 100% 0; }
.hiw-key li:nth-child(4) .hiw-key__q { --c: var(--q4); border-radius: 100% 0 0 0; transform-origin: 100% 100%; }
.hiw-key__n { font-family: var(--display); font-weight: 600; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.hiw-key a:focus-visible { color: var(--brand-700); }
.hiw-key a:focus-visible .hiw-key__q { transform: scale(1.3); }
@media (hover: hover) {
  .hiw-key a:hover { color: var(--brand-700); }
  .hiw-key a:hover .hiw-key__q { transform: scale(1.3); }
}
/* pointing at a step in the key lifts its quarter on the dial and dims the others */
@supports selector(:has(*)) {
  .hiw-hero__side:has(.hiw-key a:focus-visible) .hiw-q { opacity: .35; }
  .hiw-hero__side:has(.hiw-key li:nth-child(1) a:focus-visible) .hiw-q--1,
  .hiw-hero__side:has(.hiw-key li:nth-child(2) a:focus-visible) .hiw-q--2,
  .hiw-hero__side:has(.hiw-key li:nth-child(3) a:focus-visible) .hiw-q--3,
  .hiw-hero__side:has(.hiw-key li:nth-child(4) a:focus-visible) .hiw-q--4 { opacity: 1; transform: scale(1.05); }
  @media (hover: hover) {
    .hiw-hero__side:has(.hiw-key a:hover) .hiw-q { opacity: .35; }
    .hiw-hero__side:has(.hiw-key li:nth-child(1) a:hover) .hiw-q--1,
    .hiw-hero__side:has(.hiw-key li:nth-child(2) a:hover) .hiw-q--2,
    .hiw-hero__side:has(.hiw-key li:nth-child(3) a:hover) .hiw-q--3,
    .hiw-hero__side:has(.hiw-key li:nth-child(4) a:hover) .hiw-q--4 { opacity: 1; transform: scale(1.05); }
  }
}

/* ---------- three figures (the fourth, 60 min, heads the portal band): one row on wide screens ---------- */
@media (min-width: 1181px) {
  .hiw-facts ul { flex-wrap: nowrap; }
  .hiw-facts li { min-width: 0; }
  .hiw-facts li span { max-width: none; min-width: 6.5em; text-wrap: balance; }
}

/* ---------- the route: four steps, four nodes ---------- */
.hiw-route { --gap: clamp(24px, 3vw, 56px); --node: 72px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); }
.hiw-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hiw-pie { flex: none; width: var(--node); height: var(--node); margin-bottom: 26px; }
.hiw-pie path { fill: var(--navy-100); }
.hiw-pie .hiw-pie__x { fill: none; stroke: #fff; stroke-width: 26px; }
.hiw-step .q1 { fill: var(--q1); }
.hiw-step:nth-child(n+2) .q2 { fill: var(--q2); }
.hiw-step:nth-child(n+3) .q3 { fill: var(--q3); }
.hiw-step:nth-child(n+4) .q4 { fill: var(--q4); }
/* the line to the next node: a dashed track, and the drawn line over it */
.hiw-step::before, .hiw-step::after {
  content: ""; position: absolute; top: calc(var(--node) / 2 - 1.5px); left: calc(var(--node) + 14px); right: calc(14px - var(--gap)); height: 3px;
}
.hiw-step::before { background: repeating-linear-gradient(90deg, var(--navy-200) 0 8px, transparent 8px 14px); }
.hiw-step::after { background: var(--brand-400); transform-origin: 0 50%; }
.hiw-step:last-child::before, .hiw-step:last-child::after { display: none; }

.hiw-step__n { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.hiw-step h3 {
  margin-top: 8px; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.2vw, 2.25rem); line-height: 1.02; letter-spacing: -.03em;
  overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
}
.hiw-step h3 i { display: block; font-style: normal; font-weight: 400; color: var(--muted); }
.hiw-step__p { margin-top: 18px; max-width: 36ch; font-size: 1.0625rem; line-height: 1.55; color: var(--muted); }
.hiw-step .sp-list { margin-top: 22px; gap: 10px; }
.hiw-step .sp-list li { font-size: 1rem; }

/* wide: the four columns share their rows, so titles, texts and lists start level */
@media (min-width: 1081px) {
  .hiw-route { grid-template-rows: repeat(5, auto); }
  .hiw-step { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; justify-items: start; }
}

/* ---------- client portal band: it runs on under the closing band's quarter corner ---------- */
.hiw-live { padding-bottom: calc(var(--sec) + var(--q)); margin-bottom: calc(-1 * var(--q)); }
.hiw-live__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 112px); align-items: center; }
.hiw-live__copy { display: grid; gap: 22px; justify-items: start; }
.hiw-live .tlink { color: var(--brand-300); }
/* the figure, and the homepage's tracking line under it: a position every hour */
.hiw-live__viz { display: grid; gap: clamp(36px, 4vw, 56px); }
.hiw-live__fig { display: grid; gap: 10px; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.3; color: var(--on-dark); }
.hiw-live__fig b { font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 7vw, 7rem); line-height: .9; letter-spacing: -.04em; color: #fff; white-space: nowrap; }
.hiw-live .viz-track { padding-top: 52px; }
.hiw-live .viz-track__line { height: 26px; }
.hiw-live .viz-track__line::before { height: 3px; margin-top: -1.5px; }
.hiw-live .viz-track__line i { height: 16px; }
.hiw-live .viz-track__line i:first-child { width: 16px; height: 16px; margin-inline: -7px; } /* lays out as wide as a tick: the ticks sit on the labels and the dot */
.hiw-live .viz-track__line b { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.hiw-live .viz-track__lab { margin-top: 14px; font-size: .9375rem; }
.hiw-live .viz-track__lab span:first-child { bottom: calc(100% + 52px); } /* "Pickup": above the first dot, clear of the taller line */

/* ---------- closing band ---------- */
.hiw-cta__by { display: block; margin-top: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  /* the route runs down the page */
  .hiw-route { --node: 60px; grid-template-columns: minmax(0, 1fr); }
  .hiw-step { display: grid; grid-template-columns: var(--node) minmax(0, 1fr); column-gap: clamp(18px, 4vw, 40px); align-content: start; padding-bottom: clamp(44px, 7vw, 72px); }
  .hiw-step:last-child { padding-bottom: 0; }
  .hiw-step > * { grid-column: 2; }
  .hiw-step > .hiw-pie { grid-column: 1; grid-row: 1 / span 4; margin-bottom: 0; }
  .hiw-step__n { padding-top: 4px; }
  .hiw-step::before, .hiw-step::after { top: calc(var(--node) + 12px); bottom: 12px; left: calc(var(--node) / 2 - 1.5px); right: auto; width: 3px; height: auto; }
  .hiw-step::before { background: repeating-linear-gradient(180deg, var(--navy-200) 0 8px, transparent 8px 14px); }
  .hiw-step::after { transform-origin: 50% 0; }
  .hiw-step__p { max-width: 52ch; }
}
@media (min-width: 720px) and (max-width: 1080px) {
  .hiw-step { grid-template-columns: var(--node) minmax(0, 1.15fr) minmax(0, 1fr); }
  .hiw-step .sp-list { grid-column: 3; grid-row: 2 / span 2; margin-top: 0; padding-top: 8px; }
}
@media (max-width: 960px) {
  .hiw-hero__side { justify-self: start; width: min(100%, 520px); margin-top: 20px; }
  .hiw-live__grid { grid-template-columns: minmax(0, 1fr); }
  .hiw-live__viz { width: min(100%, 560px); }
}
@media (max-width: 640px) {
  .hiw-key { grid-template-columns: minmax(0, 1fr); }
  .hiw-route { --node: 52px; }
}

/* ---------- motion (JS and motion allowed only) ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  /* the dial comes up, a hand sweeps the hour once, and each quarter lights as the hand passes it */
  .js .hiw-dial[data-reveal] { transform: scale(.86); transition: opacity .7s, transform 1.1s var(--ease); }
  .js .hiw-dial[data-reveal].is-seen { transform: none; }
  .hiw-q--1 { --t: .5s; } .hiw-q--2 { --t: .85s; } .hiw-q--3 { --t: 1.2s; } .hiw-q--4 { --t: 1.55s; }
  .js .hiw-dial.is-seen .hiw-q path { animation: hiw-lit .4s var(--t) both; }
  .js .hiw-dial.is-seen .hiw-q text { animation: hiw-fade .5s calc(var(--t) + .15s) both; }
  .js .hiw-dial.is-seen .hiw-dial__hand { animation: hiw-sweep 1.9s .5s linear both; }
  .js .hiw-key[data-reveal] { transition-delay: .9s; }

  /* the route: each node fills quarter by quarter, then the line draws on to the next one */
  .js .hiw-step[data-reveal] { transition-delay: var(--d, 0s); }
  .js .hiw-step::after { transform: scaleX(0); transition: transform .7s var(--ease-in-out) calc(var(--d, 0s) + .65s); }
  .js .hiw-step.is-seen::after { transform: none; }
  .js .hiw-step .hiw-pie path:not(.hiw-pie__x) { transition: fill .35s; }
  .js .hiw-step:not(.is-seen) .hiw-pie path:not(.hiw-pie__x) { fill: var(--navy-100); }
  .js .hiw-step.is-seen .q1 { transition-delay: calc(var(--d, 0s) + .2s); }
  .js .hiw-step.is-seen .q2 { transition-delay: calc(var(--d, 0s) + .32s); }
  .js .hiw-step.is-seen .q3 { transition-delay: calc(var(--d, 0s) + .44s); }
  .js .hiw-step.is-seen .q4 { transition-delay: calc(var(--d, 0s) + .56s); }
}
@media screen and (prefers-reduced-motion: no-preference) and (min-width: 1081px) {
  .hiw-step:nth-child(2) { --d: .4s; } .hiw-step:nth-child(3) { --d: .8s; } .hiw-step:nth-child(4) { --d: 1.2s; } /* one row: in turn */
}
@media screen and (prefers-reduced-motion: no-preference) and (max-width: 1080px) {
  .js .hiw-step::after { transform: scaleY(0); }
}
@keyframes hiw-lit { from { fill: #0c1e38; } }
@keyframes hiw-fade { from { opacity: 0; } }
@keyframes hiw-sweep {
  0% { transform: rotate(0deg); opacity: 1; }
  74% { transform: rotate(360deg); opacity: 1; }
  100% { transform: rotate(360deg); opacity: 0; }
}

@media print {
  .hiw-live { margin-bottom: 0; padding-bottom: var(--sec); }
  .hiw-live__viz { display: none; }
}
