/* =========================================================
   Empower Funding · "What makes us unique?" with its live display
   (Zman 27 Sep: the empty left half had to become interactive and wow).
   Loads after site.css on every page that has the block. js/uq.js plays it.
   The eye's order: the heading > the display (one point at a time, big) > the list, the active point lit.
   ========================================================= */

.unique.uq { padding: clamp(96px, 10vw, 160px) 0; }
.uq .unique__media { display: none; }
.uq .unique__in { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 72px); align-items: center; }
.uq__stage { grid-column: 1 / 7; grid-row: 1; min-width: 0; }
.uq .unique__panel { grid-column: 7 / -1; grid-row: 1; min-width: 0; }

/* ---------- the frame ---------- */
.uq__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 660px;
  margin-inline: auto;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(70% 60% at 28% 30%, rgba(202, 17, 29, .26), transparent 70%),
    linear-gradient(160deg, #1c1c19 0%, #111110 70%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 60px 120px -60px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.uq__frame::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 48px);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
          mask-image: radial-gradient(80% 80% at 50% 50%, #000 30%, transparent 100%);
}
.uq__hud { position: absolute; left: 28px; right: 28px; top: 24px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.uq__num { font-stretch: 125%; font-weight: 600; font-size: 14px; letter-spacing: .18em; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.uq__num b { color: #FF3B47; font-weight: 700; }
.uq__prog { position: relative; width: 132px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.uq__prog i { position: absolute; inset: 0; background: var(--red-hi); transform: scaleX(0); transform-origin: 0 50%; }
.uq.is-playing .uq__prog i { animation: uqProg var(--dur, 5s) linear forwards; }
.uq.is-paused .uq__prog i, .uq.is-paused .ulist li.is-active::after { animation-play-state: paused; }
@keyframes uqProg { to { transform: scaleX(1); } }

/* ---------- a scene ---------- */
.uq__scene {
  position: absolute; inset: 70px 30px 38px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  text-align: center;
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(.985);
  transition: opacity .5s ease, transform .7s var(--ease), visibility 0s linear .5s;
}
.uq__scene.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease .12s, transform .9s var(--ease) .12s, visibility 0s; }
.uq__cap { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; color: rgba(255, 255, 255, .88); max-width: 24em; text-wrap: balance; }
.uq__cap a { color: #fff; font-weight: 700; white-space: nowrap; border-bottom: 2px solid var(--red-hi); margin-left: 4px; }
.uq__big { font-stretch: 62%; font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* 01 · the rate, rolling in like a meter */
.uq__rates { display: flex; align-items: flex-end; justify-content: center; gap: clamp(22px, 4vw, 60px); }
.uq__rate { display: grid; justify-items: center; gap: 12px; }
.uq__who { font-stretch: 125%; font-weight: 600; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.uq__rate .uq__big { font-size: clamp(84px, 9vw, 150px); display: inline-flex; align-items: flex-start; }
.uq__cur { color: var(--red-hi); margin-right: .04em; }
.uq[data-rate="agent"] .uq__rate[data-who="seller"], .uq[data-rate="seller"] .uq__rate[data-who="agent"] { display: none; }
.uq[data-rate="agent"] .uq__rate .uq__big, .uq[data-rate="seller"] .uq__rate .uq__big { font-size: clamp(110px, 12.5vw, 210px); }
.uq__col { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; }
.uq__strip { display: block; transform: translateY(0); }
.uq__strip > span { display: block; height: 1em; }
.uq__dot { display: inline-block; }

/* 02 · 24 hours, a dial sweeping round */
.uq__dial { position: relative; width: min(62%, 320px); aspect-ratio: 1; }
.uq__dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.uq__track, .uq__sweep { fill: none; stroke-width: 9; }
.uq__track { stroke: rgba(255, 255, 255, .1); }
.uq__sweep { stroke: var(--red-hi); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 100px 100px; }
.uq__scene.is-on .uq__sweep { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease-io) .35s; }
.uq__ticks line { stroke: rgba(255, 255, 255, .28); stroke-width: 1.5; }
.uq__ticks line.big { stroke: rgba(255, 255, 255, .6); stroke-width: 2.5; }
.uq__dialnum { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; }
.uq__dialnum .uq__big { font-size: clamp(76px, 7.4vw, 124px); }
.uq__unit { font-stretch: 125%; font-weight: 600; font-size: 14px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }

/* 03 · the real team */
.uq__faces { display: flex; justify-content: center; padding: 0 12px; }
.uq__faces li { position: relative; width: clamp(92px, 8.6vw, 136px); margin: 0 -10px; display: grid; justify-items: center; gap: 12px; opacity: 0; transform: translateY(34px) rotate(calc((var(--k) - 1.5) * 7deg)); transition: opacity .5s ease, transform .8s var(--ease); }
.uq__scene.is-on .uq__faces li { opacity: 1; transform: translateY(0) rotate(calc((var(--k) - 1.5) * 3deg)); transition-delay: calc(.2s + var(--k) * .13s); }
.uq__faces img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid #171715; box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .9); background: var(--ink-3); }
.uq__faces span { font-size: 16px; font-weight: 600; color: #fff; }

/* 04 · match or beat, two quotes and a stamp */
.uq__slips { position: relative; width: min(80%, 380px); height: clamp(210px, 20vw, 270px); }
.uq__slip { position: absolute; width: 76%; display: grid; gap: 12px; padding: 22px 22px 26px; border-radius: 14px; text-align: left; }
.uq__slip i { display: block; height: 8px; border-radius: 8px; background: currentColor; opacity: .18; }
.uq__slip i.s { width: 58%; }
.uq__slabel { font-stretch: 125%; font-weight: 600; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }
.uq__slip--them { left: 0; top: 0; color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); transform: rotate(-4deg); }
.uq__slip--us { right: 0; bottom: 0; color: var(--ink); background: var(--paper); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(50px) rotate(3deg); transition: opacity .5s ease, transform .8s var(--ease); }
.uq__slip--us .uq__slabel { color: var(--red); }
.uq__scene.is-on .uq__slip--us { opacity: 1; transform: translateY(0) rotate(3deg); transition-delay: .35s; }
.uq__stamp { position: absolute; right: -16px; bottom: -18px; padding: 6px 12px 5px; border: 3px solid var(--red); border-radius: 6px; color: var(--red); background: rgba(244, 241, 236, .92); font-stretch: 62%; font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; opacity: 0; transform: rotate(-10deg) scale(1.9); }
.uq__scene.is-on .uq__stamp { opacity: 1; transform: rotate(-10deg) scale(1); transition: opacity .2s ease 1.15s, transform .45s cubic-bezier(.3, 1.6, .5, 1) 1.15s; }

/* 05 · save 30% */
.uq__bars { width: min(86%, 440px); display: grid; gap: 22px; text-align: left; }
.uq__blabel { font-size: 16px; color: rgba(255, 255, 255, .82); }
.uq__barrow--us .uq__blabel { color: #fff; font-weight: 700; }
.uq__barline { display: block; height: 18px; margin-top: 10px; border-radius: 9px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.uq__barline i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 9px; background: rgba(255, 255, 255, .34); transform: scaleX(0); transform-origin: 0 50%; }
.uq__barrow--us .uq__barline i { background: var(--red-hi); }
.uq__scene.is-on .uq__barline i { transform: scaleX(1); transition: transform 1.3s var(--ease) .3s; }
.uq__scene.is-on .uq__barrow--us .uq__barline i { transition-delay: .6s; }
.uq__save { display: flex; align-items: baseline; gap: 12px; font-stretch: 62%; font-weight: 800; font-size: clamp(34px, 3vw, 48px); line-height: 1; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.uq__save .uq__big { font-size: clamp(84px, 8vw, 132px); }
.uq__pct { color: var(--red-hi); font-size: clamp(56px, 5.4vw, 90px); }

/* 06 · no fees, a receipt with every line crossed off */
.uq__receipt { width: min(84%, 400px); padding: 14px 26px; border-radius: 12px; background: var(--paper); color: var(--ink); text-align: left; box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .95); transform: rotate(-2deg); }
.uq__receipt li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed rgba(14, 14, 12, .22); font-size: 18px; }
.uq__receipt li:last-child { border-bottom: 0; }
.uq__receipt span { position: relative; }
.uq__receipt span::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 3px; border-radius: 3px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.uq__receipt b { font-stretch: 62%; font-weight: 800; font-size: 26px; line-height: 1; color: var(--red); opacity: 0; transform: translateX(10px); }
.uq__scene.is-on .uq__receipt span::after { transform: scaleX(1); transition: transform .45s var(--ease-io) calc(.45s + var(--k) * .3s); }
.uq__scene.is-on .uq__receipt b { opacity: 1; transform: none; transition: opacity .3s ease calc(.7s + var(--k) * .3s), transform .5s var(--ease) calc(.7s + var(--k) * .3s); }
.uq__scene--fees .uq__cap { font-size: clamp(16px, 1.15vw, 18px); }

/* 07 · across South Africa (Three.js, with a flat outline underneath as the fallback) */
.uq__scene--map { inset: 60px 14px 30px; gap: 10px; }
.uq__map { position: relative; width: 100%; flex: 1 1 auto; min-height: 0; }
.uq__map svg, .uq__map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.uq__map.has-3d svg { opacity: 0; }
.uq__za { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .5); stroke-width: .008; fill-rule: evenodd; }
.uq__pin { fill: var(--red-hi); }
.uq__pin-ring { fill: none; stroke: var(--red-hi); stroke-width: .006; }
.uq__tag { position: absolute; z-index: 2; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none; font-size: 14px; font-weight: 600; color: #fff; padding: 5px 10px; border-radius: 20px; background: rgba(14, 14, 12, .78); border: 1px solid rgba(255, 255, 255, .18); opacity: 0; transition: opacity .6s ease; }
.uq__map.is-ready .uq__tag { opacity: 1; }

/* ---------- the list beside it ---------- */
.uq .ulist li { cursor: pointer; transition: opacity .45s ease; -webkit-tap-highlight-color: transparent; }
.uq .ulist li:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 4px; }
.uq.is-live .ulist li { opacity: .66; }
.uq.is-live .ulist li.is-active, .uq.is-live .ulist li:hover { opacity: 1; }
.uq .ulist li.is-active .ulist__ic { background: var(--red); border-color: var(--red); }
.uq .ulist li.is-active .ulist__t { transform: translateX(8px); }
.uq .ulist li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red-hi); transform: scaleX(0); transform-origin: 0 50%; }
.uq.is-playing .ulist li.is-active::after { animation: uqProg var(--dur, 5s) linear forwards; }
.uq .ulist__n { font-size: 13px; }

/* ---------- tablets and phones: heading, then the display, then the list ---------- */
@media (max-width: 1060px) {
  .uq .unique__in { grid-template-columns: minmax(0, 1fr); }
  .uq .unique__panel { display: contents; }
  .uq .unique__panel > h2 { grid-row: 1; }
  .uq .unique__panel > .rule { grid-row: 2; }
  .uq__stage { grid-column: 1; grid-row: 3; width: 100%; max-width: 620px; margin: 0 auto 30px; }
  .uq .unique__panel > .ulist { grid-row: 4; }
}
@media (max-width: 720px) {
  .unique.uq { padding: 76px 0 84px; }
  .uq .rule { margin: 22px 0 26px; }
  .uq__frame { aspect-ratio: 1 / 1.08; border-radius: 20px; }
  .uq__hud { left: 20px; right: 20px; top: 18px; }
  .uq__prog { width: 96px; }
  .uq__scene { inset: 56px 18px 26px; gap: 20px; }
  .uq__scene--map { inset: 50px 6px 20px; }
  .uq__faces li { margin: 0 -8px; }
  .uq__faces span { font-size: 14px; }
  .uq__receipt { padding: 8px 18px; }
  .uq__receipt li { font-size: 16px; padding: 10px 0; }
  .uq__slip { padding: 16px 16px 20px; gap: 10px; }
  .uq__stamp { font-size: 20px; right: -8px; bottom: -14px; }
  .uq__tag { font-size: 13px; }
}

/* shot mode and reduced motion: no autoplay, no transitions (uq.js shows the first point, taps still switch) */
.shotmode .uq__scene, .rm .uq__scene, .shotmode .uq__scene *, .rm .uq__scene * { transition: none !important; }
