/* © 2026 Finfident PTY LTD — Finfident Hub abstract backgrounds (CarPlay-style)
   Files: /img/bg/ff-tide-dark.webp, ff-dusk-navy.webp, ff-mist-light.webp, ff-dawn-light.webp
   Usage: add ONE class to <body>:
     Staff  → ff-bg-mist   (dark header uses .ff-hero-tide)
     Client → ff-bg-dawn   (hero uses .ff-hero-tide)
     Partner→ ff-bg-mist   (hero uses .ff-hero-navy)
   The background is a single fixed layer painted once and promoted to its own GPU layer,
   so it never repaints while scrolling or tapping (no flicker, no jank on iOS WKWebView).
   Do NOT use background-attachment: fixed (iOS ignores it and repaints on scroll). */

body.ff-bg-mist,
body.ff-bg-dawn,
body.ff-bg-tide,
body.ff-bg-navy { background-color: #f3f7f6; }

body.ff-bg-mist::before,
body.ff-bg-dawn::before,
body.ff-bg-tide::before,
body.ff-bg-navy::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translateZ(0);          /* own compositing layer */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
body.ff-bg-mist::before { background-image: url("/img/bg/ff-mist-light.webp"); }
body.ff-bg-dawn::before { background-image: url("/img/bg/ff-dawn-light.webp"); }
body.ff-bg-tide::before { background-image: url("/img/bg/ff-tide-dark.webp"); background-color: #0e3a3f; }
body.ff-bg-navy::before { background-image: url("/img/bg/ff-dusk-navy.webp"); background-color: #1c3c6e; }
body.ff-bg-tide, body.ff-bg-navy { background-color: #0e3a3f; }

/* Hero / header bands (top of Home screens, splash, login) */
.ff-hero-tide,
.ff-hero-navy {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
.ff-hero-tide { background-color: #0e3a3f; background-image: url("/img/bg/ff-tide-dark.webp"); }
.ff-hero-navy { background-color: #1c3c6e; background-image: url("/img/bg/ff-dusk-navy.webp"); }

/* Cards on top of the light backgrounds: frosted glass that stays readable.
   Keep blur small — large backdrop-filter values are expensive on older iPhones. */
.ff-glass {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 2px rgba(14, 58, 63, .06), 0 8px 24px rgba(14, 58, 63, .06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ff-glass { background: rgba(255, 255, 255, 0.95); }
}
