/* Home "What Clients Say" review cards: one card highlighted, the highlight follows the pointer.
   Katherine, 2026-10-30: "Can we have one highlighted and then the others highlight upon roll over?"
   Lane FXR 2026-10-31. Loaded from the reviews section of pages/home.html only.

   State lives in the .is-active class. The server renders it on the default card (Diane Reising's),
   home-reviews-20261031a.js moves it (mouse/pen enter, tap, keyboard focus inside a card) and marks the grid
   [data-rv-ready]. Without JS the CSS fallback below moves the highlight on hover / focus-within instead.

   Emphasis only, no information is revealed: Apex brand ring (#1985C8: 4.02:1 on white, 3.28:1 on the
   #E8E8E8 band, both above the 3:1 needed for a UI part), a 4px brand bar on top, a deeper shadow, a 6px lift.
   No text colour changes, so every text contrast stays what it was.

   Specificity note: site-wide whimsy.js tags these cards .apex-card / .apex-reveal (whimsy.css). That file's
   card hover uses `transform`; the lift here uses the separate `translate` property and the reveal keeps its
   own `transform`, so the two never fight. The whimsy hover lift is switched off on these cards so the
   hovered card and the highlighted card are always the same card. */

.rv-grid .rv-card {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  translate: 0 0;
  transition-property: opacity, transform, translate, box-shadow, border-color;
  transition-duration: 0.7s, 0.7s, 0.24s, 0.24s, 0.24s;
  transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* keep the whimsy scroll-reveal stagger on opacity/transform, none on the highlight */
  transition-delay: var(--rv-d, 0s), var(--rv-d, 0s), 0s, 0s, 0s;
}
.rv-grid .rv-card.apex-reveal-delay-1 { --rv-d: 60ms; }
.rv-grid .rv-card.apex-reveal-delay-2 { --rv-d: 120ms; }
.rv-grid .rv-card.apex-reveal-delay-3 { --rv-d: 180ms; }
.rv-grid .rv-card.apex-reveal-delay-4 { --rv-d: 240ms; }
.rv-grid .rv-card.apex-reveal-delay-5 { --rv-d: 300ms; }

/* whimsy.css .apex-card:hover lift + shadow: off here, the highlight below replaces it */
.rv-grid .rv-card.apex-card:hover { transform: none; }
.rv-grid .rv-card.apex-card:hover:not(.is-active) { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

/* ── highlighted ── */
.rv-grid .rv-card.is-active,
.rv-grid:not([data-rv-ready]) .rv-card:hover,
.rv-grid:not([data-rv-ready]) .rv-card:focus-within {
  z-index: 1;
  border-color: #1985C8;
  translate: 0 -6px;
  /* inset = the brand bar along the top edge (follows the corner radius). A box-shadow, not a ::before, so
     contrast checkers (axe, Vigil) can still read the white behind the text. On Diane's card the photo covers it. */
  box-shadow: inset 0 4px 0 0 #1985C8, 0 0 0 1px #1985C8, 0 26px 48px -22px rgba(14, 95, 145, 0.55);
}

/* No-JS fallback: while another card is hovered or holds focus, the default card steps back. */
.rv-grid:not([data-rv-ready]):has(.rv-card:hover, .rv-card:focus-within) .rv-card.is-active:not(:hover):not(:focus-within) {
  z-index: auto;
  border-color: #D4D4D4;
  translate: 0 0;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Reduced motion: the highlight still moves, but nothing slides or fades. */
@media (prefers-reduced-motion: reduce) {
  .rv-grid .rv-card { transition: none; }
  .rv-grid .rv-card.is-active,
  .rv-grid:not([data-rv-ready]) .rv-card:hover,
  .rv-grid:not([data-rv-ready]) .rv-card:focus-within { translate: none; }
}

/* Windows High Contrast / forced colours: box-shadow is dropped there, so draw a real outline. */
@media (forced-colors: active) {
  .rv-grid .rv-card.is-active { outline: 3px solid Highlight; outline-offset: 2px; }
}
