/* HBA of Dothan — motion, measured.
 *
 * Two easings and the second one is RESERVED: `expressive` has exactly two
 * consumers on the live site (the card lift and the scroll reveal). Using it
 * anywhere else dilutes the one gesture the site treats as special.
 *
 * Measured with reducedMotion:'no-preference' deliberately — a motion register
 * measured under 'reduce' is empty and reads as "this site has no motion".
 */

:root {
  --hba-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --hba-ease-expressive: cubic-bezier(0.23, 1, 0.32, 1);
  --hba-dur-fast: 150ms;
  --hba-dur-base: 200ms;
  --hba-dur-slow: 300ms;
  --hba-dur-reveal: 500ms;
  --hba-dur-hero-zoom: 20000ms;
}

/* --- entrance: the staggered fadeInUp ladder (I-14) ---------------------- */
@keyframes hba-fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hba-enter { opacity: 0; animation: hba-fade-in-up 500ms linear forwards; }
/* Measured delay ladder: 0 / 100 / 200 / 300 / 380 / 400 / 460 / 540ms.
 * The capture recorded 459.99999999999994ms — a float artifact of a computed
 * stagger, authored here as the 460 it means. */
.hba-enter--d0   { animation-delay: 0ms;   animation-duration: 400ms; }
.hba-enter--d100 { animation-delay: 100ms; }
.hba-enter--d200 { animation-delay: 200ms; }
.hba-enter--d300 { animation-delay: 300ms; }
.hba-enter--d380 { animation-delay: 380ms; }
.hba-enter--d400 { animation-delay: 400ms; }
.hba-enter--d460 { animation-delay: 460ms; }
.hba-enter--d540 { animation-delay: 540ms; animation-duration: 600ms; }

/* --- heroZoom: 20 SECONDS (I-15) ----------------------------------------
 * ⚠ THE SINGLE MOST LIKELY PARITY MISS ON THIS SITE. It is invisible in a
 * screenshot pair and invisible in a settled-state audit — the only thing that
 * catches its absence is getAnimations() per frame (battery row B-9).
 */
@keyframes hba-hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
.hba-hero__bg {
  animation: hba-hero-zoom var(--hba-dur-hero-zoom) linear forwards;
  will-change: transform;
}

/* --- scroll reveal (I-13) ------------------------------------------------
 * Armed by site.js with a snap-arm + double-rAF. SMD lost a rework round to
 * arm-and-observe in the same paint: the observer fired before the initial
 * state had painted, so the transition had nothing to travel from.
 */
/* ⛔ THE FROM-STATE IS JS-ARMED, NOT CSS-DEFAULT (PR #18 review F1). With
 * `opacity: 0` on bare .hba-reveal, a failed/blocked site.js blanks every
 * reveal target — after this round that is most of the home page. site.js adds
 * `.hba-armed` (paint 1), waits the double rAF, then observes; no JS means no
 * arming and the content simply shows. */
/* ⛔ `translate`, NOT `transform` (shipped-URL B-11 failure, 2026-08-22). The
 * round-2 reveal used `transform: translateY(28px)` / `transform: none`, and
 * the `is-visible` END STATE (0,2,0 here, 0,3,0 with .hba-armed) outranks
 * `.hba-card:hover { transform: translateY(-4px) }` (0,2,0) — so every card
 * that carries .hba-reveal lost its I-07 hover lift the moment the reveal
 * finished. Locally the probe hovered before the observer fired and the row
 * stayed green; against the shipped URL it went red. The `translate` property
 * composes with `transform` instead of competing with it, so the reveal motion
 * and the hover lift are independent axes. */
.hba-reveal.hba-armed {
  opacity: 0;
  translate: 0 28px;
  transition: opacity var(--hba-dur-reveal) var(--hba-ease-expressive),
              translate var(--hba-dur-reveal) var(--hba-ease-expressive);
}
.hba-reveal.hba-armed.is-visible { opacity: 1; translate: none; }

/* --- card lift: the OTHER expressive consumer (I-05/I-07) ----------------
 * The live site is inconsistent — /benefits cards lift, home cards only shift
 * their border. NORMALIZED to the lift everywhere (the more considered of the
 * two, and the one using the reserved easing). SMD paid a rework round for
 * exactly this inconsistency.
 */
.hba-card {
  transition: transform var(--hba-dur-base) var(--hba-ease-expressive),
              box-shadow var(--hba-dur-base) var(--hba-ease-expressive),
              border-color var(--hba-dur-base) var(--hba-ease-standard);
}
.hba-card:hover {
  transform: translateY(-4px);
  box-shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.1) 0 4px 6px -4px;
}

/* --- reduced motion: ADDED, not reproduced ------------------------------
 * The live site has NO prefers-reduced-motion handling at all. Adding it is
 * required normalization, not redesign (LEGACY Stage C step 4 / HBA-D-8).
 * Entrances and the hero zoom resolve immediately to their END state — they do
 * not simply stop, which would leave content invisible.
 */
@media (prefers-reduced-motion: reduce) {
  .hba-enter,
  .hba-hero__bg,
  .hba-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
  }
  .hba-card:hover { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
