/* =========================================================
   Free But Not Free — motion & imagery layer (light theme)
   Loaded after styles.css. Everything here degrades safely
   and is fully disabled under prefers-reduced-motion.
   ========================================================= */

/* ---------------------------------------------------------
   KEYFRAMES
   --------------------------------------------------------- */
@keyframes fbnf-aurora {
  0%   { transform: translate3d(-6%, -4%, 0) scale(1);    opacity: .55; }
  50%  { transform: translate3d(6%, 5%, 0)  scale(1.14);  opacity: .85; }
  100% { transform: translate3d(-6%, -4%, 0) scale(1);    opacity: .55; }
}

@keyframes fbnf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes fbnf-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(.6deg); }
}

@keyframes fbnf-pulse-ring {
  0%   { transform: scale(.65); opacity: .75; }
  80%  { opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

@keyframes fbnf-sheen {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(320%)  skewX(-18deg); }
}

@keyframes fbnf-gradient-pan {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

@keyframes fbnf-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

@keyframes fbnf-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes fbnf-spin-slow {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------
   SCROLL PROGRESS BAR
   --------------------------------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  z-index: 200; pointer-events: none;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(37, 99, 235, .55);
  transition: width .12s linear;
}

/* ---------------------------------------------------------
   HEADER — condense on scroll
   --------------------------------------------------------- */
.site-header { transition: box-shadow .3s ease, background .3s ease; }
.site-header.scrolled {
  box-shadow: 0 6px 26px rgba(15, 28, 47, .09);
  background: rgba(255, 255, 255, .97);
}
.site-header.scrolled .nav-wrap { padding-top: 9px; padding-bottom: 9px; }
.nav-wrap { transition: padding .3s ease; }

/* Animated nav underline */
.nav a { position: relative; }
.nav a::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 4px;
  height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* ---------------------------------------------------------
   AURORA BACKDROP (hero + CTA)
   --------------------------------------------------------- */
.aurora { position: absolute; inset: -20%; pointer-events: none; z-index: 0; overflow: hidden; }
.aurora span {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); will-change: transform, opacity;
}
.aurora span:nth-child(1) {
  width: 46vw; height: 46vw; top: -8%; left: 52%;
  background: radial-gradient(circle, rgba(37, 99, 235, .22), transparent 68%);
  animation: fbnf-aurora 18s ease-in-out infinite;
}
.aurora span:nth-child(2) {
  width: 38vw; height: 38vw; top: 34%; left: -6%;
  background: radial-gradient(circle, rgba(8, 145, 178, .16), transparent 68%);
  animation: fbnf-aurora 24s ease-in-out infinite reverse;
}
.aurora span:nth-child(3) {
  width: 30vw; height: 30vw; bottom: -14%; left: 34%;
  background: radial-gradient(circle, rgba(96, 165, 250, .22), transparent 68%);
  animation: fbnf-aurora 21s ease-in-out infinite 2s;
}

/* On the deep-navy CTA band the aurora needs to be lighter, not darker */
.cta-strip .aurora span:nth-child(1) { background: radial-gradient(circle, rgba(147, 197, 253, .30), transparent 68%); }
.cta-strip .aurora span:nth-child(2) { background: radial-gradient(circle, rgba(103, 232, 249, .20), transparent 68%); }
.cta-strip .aurora span:nth-child(3) { background: radial-gradient(circle, rgba(191, 219, 254, .22), transparent 68%); }

.hero .container, .cta-strip .container { position: relative; z-index: 3; }

/* ---------------------------------------------------------
   REVEAL VARIANTS + STAGGER
   --------------------------------------------------------- */
.reveal            { transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-left       { opacity: 0; transform: translateX(-34px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-right      { opacity: 0; transform: translateX(34px);  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-scale      { opacity: 0; transform: scale(.94);        transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-left.visible, .reveal-right.visible, .reveal-scale.visible { opacity: 1; transform: none; }

/* children animate in sequence */
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(1)  { transition-delay: .00s; }
.stagger.visible > *:nth-child(2)  { transition-delay: .06s; }
.stagger.visible > *:nth-child(3)  { transition-delay: .12s; }
.stagger.visible > *:nth-child(4)  { transition-delay: .18s; }
.stagger.visible > *:nth-child(5)  { transition-delay: .24s; }
.stagger.visible > *:nth-child(6)  { transition-delay: .30s; }
.stagger.visible > *:nth-child(7)  { transition-delay: .36s; }
.stagger.visible > *:nth-child(8)  { transition-delay: .42s; }
.stagger.visible > *:nth-child(n+9){ transition-delay: .48s; }

/* ---------------------------------------------------------
   CARDS — gradient border + sheen sweep
   --------------------------------------------------------- */
.card { position: relative; overflow: hidden; isolation: isolate; }
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(37,99,235,.65), rgba(8,145,178,.40), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease; pointer-events: none; z-index: 1;
}
.card:hover::before { opacity: 1; }

.card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .07), transparent);
  transform: translateX(-120%) skewX(-18deg); pointer-events: none; z-index: 0;
}
.card:hover::after { animation: fbnf-sheen .9s ease forwards; }

.card-icon { transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .3s ease, border-color .3s ease; }
.card:hover .card-icon { transform: translateY(-3px) rotate(-6deg) scale(1.06); background: rgba(37,99,235,.15); border-color: rgba(37,99,235,.35); }

/* ---------------------------------------------------------
   BUTTONS — shine sweep
   --------------------------------------------------------- */
.btn { position: relative; overflow: hidden; }
.btn > * { position: relative; z-index: 1; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
  transform: translateX(-120%) skewX(-18deg);
}
.btn-primary:hover::after { animation: fbnf-sheen .75s ease forwards; }

.btn-primary {
  background: linear-gradient(115deg, var(--blue-deep), var(--blue), var(--cyan), var(--blue));
  background-size: 300% 100%;
  animation: fbnf-gradient-pan 9s ease infinite;
}
/* the CTA band uses an inverted white button — keep it flat */
.cta-strip .btn-primary { animation: none; background: #fff; }
.cta-strip .btn-primary::after { background: linear-gradient(90deg, transparent, rgba(37,99,235,.16), transparent); }

/* Floating refer button — gentle attention pulse */
.float-refer { animation: fbnf-bob 4.5s ease-in-out infinite; }
.float-refer::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--blue); animation: fbnf-pulse-ring 2.8s ease-out infinite;
  pointer-events: none;
}

/* ---------------------------------------------------------
   HERO STATS — counter styling
   --------------------------------------------------------- */
.hero-stat .n { font-variant-numeric: tabular-nums; }
.hero-stat { position: relative; padding-left: 16px; }
.hero-stat::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue), transparent);
}

/* ---------------------------------------------------------
   FIGURES / IMAGERY
   --------------------------------------------------------- */
.figure {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow);
}
.figure img { width: 100%; height: auto; display: block; }
.figure-float { animation: fbnf-float 7s ease-in-out infinite; }

.figure-glow { position: relative; }
.figure-glow::before {
  content: ''; position: absolute; inset: -18%;
  background: radial-gradient(closest-side, rgba(37,99,235,.18), transparent 72%);
  filter: blur(28px); z-index: -1; pointer-events: none;
}

.figure-plain { border: 0; background: none; box-shadow: none; border-radius: 0; }
.figure-plain img { width: 100%; height: auto; }

figcaption {
  font-size: .84rem; color: var(--text-dim); text-align: center;
  margin-top: 12px;
}

/* Hero right-hand column: illustration stacked over the referral card */
.hero-grid { grid-template-columns: 1.02fr .98fr; }
.hero-visual { display: block; }
.hero-visual .figure { padding: 14px; background: linear-gradient(165deg, #ffffff, var(--bg-alt)); }
.hero-visual .hero-card { margin-top: 4px; }

@media (max-width: 900px) {
  .hero-visual .figure { margin-bottom: 24px !important; }
}

/* Map frame on the coverage section */
.map-frame {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #ffffff, var(--bg-alt));
  padding: 18px; box-shadow: var(--shadow);
}
.map-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 240px at 70% 0%, rgba(37,99,235,.07), transparent 70%);
}
.map-frame img { width: 100%; height: auto; position: relative; z-index: 1; }

/* ---------------------------------------------------------
   LIVE STATUS CHIP
   --------------------------------------------------------- */
.live-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(5, 150, 105, .08); border: 1px solid rgba(5, 150, 105, .28);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--ok);
  text-transform: uppercase;
}
.live-chip i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  animation: fbnf-blink 1.8s ease-in-out infinite; flex-shrink: 0;
}

/* ---------------------------------------------------------
   TRUST BANNER
   --------------------------------------------------------- */
.trust-banner { overflow: hidden; }
.trust-list li { transition: color .25s ease, transform .25s ease; }
.trust-list li:hover { color: var(--text); transform: translateY(-2px); }

/* ---------------------------------------------------------
   STEPS — animated connector + hover lift
   --------------------------------------------------------- */
.steps::before {
  background: linear-gradient(90deg, transparent, var(--blue), var(--cyan), var(--blue), transparent);
  background-size: 200% 100%;
  animation: fbnf-gradient-pan 8s linear infinite;
  opacity: .45;
}
.step { transition: transform .3s ease; }
.step:hover { transform: translateY(-6px); }
.step-num { transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease; position: relative; }
.step:hover .step-num { transform: scale(1.1); }
.step-num::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--blue); opacity: 0;
}
.step:hover .step-num::after { animation: fbnf-pulse-ring 1.4s ease-out; }

/* ---------------------------------------------------------
   AUDIENCE TILES
   --------------------------------------------------------- */
.audience { position: relative; overflow: hidden; }
.audience svg { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.audience:hover svg { transform: translateY(-4px) scale(1.12); }
.audience::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(200px 100px at 50% 0%, rgba(37,99,235,.10), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.audience:hover::before { opacity: 1; }

/* ---------------------------------------------------------
   COUNTY CHIPS
   --------------------------------------------------------- */
.county { transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease; }
.county:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------
   FAQ — smoother open
   --------------------------------------------------------- */
.faq-item { transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.faq-item:hover { transform: translateX(3px); }
.faq-item.open { background: linear-gradient(160deg, #f7faff, #ffffff); }
.faq-a { transition: max-height .38s cubic-bezier(.4, 0, .2, 1); }

/* ---------------------------------------------------------
   FORMS — focus lift
   --------------------------------------------------------- */
.field input, .field select, .field textarea { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { transform: translateY(-1px); }
.form-card { position: relative; overflow: hidden; }
.form-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), var(--cyan), var(--blue-deep));
  background-size: 200% 100%; animation: fbnf-gradient-pan 7s linear infinite;
}

/* ---------------------------------------------------------
   PAGE HEADER — decorative animated arc
   --------------------------------------------------------- */
.page-header { position: relative; overflow: hidden; }
.page-header .header-orb {
  position: absolute; right: -80px; top: -120px;
  width: 380px; height: 380px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(37,99,235,.16), transparent 66%);
  filter: blur(40px); animation: fbnf-aurora 20s ease-in-out infinite;
}
.page-header .header-rings {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: 260px; height: 260px; pointer-events: none; opacity: .6;
}
.page-header .header-rings circle { fill: none; stroke: var(--border-lit); stroke-width: 1; }
.page-header .header-rings circle:nth-child(odd) { stroke: rgba(37,99,235,.28); }
.page-header .header-rings { animation: fbnf-spin-slow 60s linear infinite; }
.page-header .container { position: relative; z-index: 2; }

/* ---------------------------------------------------------
   SECTION DIVIDER
   --------------------------------------------------------- */
.divider-glow {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--blue), var(--cyan), var(--blue), transparent);
  background-size: 200% 100%; opacity: .35;
  animation: fbnf-gradient-pan 10s linear infinite;
}

/* ---------------------------------------------------------
   CONTACT / METHOD CARDS
   --------------------------------------------------------- */
.contact-method { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.contact-method:hover { transform: translateY(-3px); border-color: var(--border-lit); box-shadow: var(--shadow); }
.contact-method .ci { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.contact-method:hover .ci { transform: scale(1.08) rotate(-5deg); }

/* Map embed */
.map-embed {
  width: 100%; height: 420px; border: 0; display: block;
  border-radius: var(--radius); filter: grayscale(.12) contrast(1.02);
}
.map-embed-wrap {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}

/* ---------------------------------------------------------
   FOOTER polish
   --------------------------------------------------------- */
.footer-col a { position: relative; }
.footer-col a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--blue-bright); transition: width .25s ease;
}
.footer-col a:hover::after { width: 100%; }

/* ---------------------------------------------------------
   RESPONSIVE TWEAKS
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .page-header .header-rings { display: none; }
  .aurora span:nth-child(1) { width: 90vw; height: 90vw; }
  .aurora span:nth-child(2), .aurora span:nth-child(3) { width: 70vw; height: 70vw; }
  .map-embed { height: 320px; }
}

@media (max-width: 640px) {
  .float-refer { animation: none; }
  .float-refer::before { display: none; }
}

/* ---------------------------------------------------------
   REDUCED MOTION — turn everything off
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale,
  .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .aurora span, .float-refer, .btn-primary, .steps::before,
  .form-card::before, .divider-glow, .page-header .header-orb,
  .page-header .header-rings, .live-chip i, .figure-float {
    animation: none !important;
  }
  .card::after, .btn-primary::after { display: none; }
  .scroll-progress { display: none; }
}
