/* Resollect — Backdrop & motion layer
   "Insane SaaS-level" but enterprise-appropriate.
   Targeted at banks/NBFCs/ARCs: precise, geometric, never carnival. */

/* === backdrop ============================================ */
/* Make body transparent so bg_fx shows through where sections don't paint over */
body { background: transparent !important; }
.bg_fx {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
  background: #fff;
}
/* animated grid */
.bg_grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(11,18,32,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,18,32,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  animation: gridShift 32s linear infinite;
  opacity: 0.85;
}
@keyframes gridShift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 56px 56px, 56px 56px; }
}

/* drifting orbs (very subtle blue/orange wash) */
.bg_orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.bg_orb.o1 {
  width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(37,99,235,0.30) 0%, transparent 65%);
  top: -160px; left: -120px;
  animation: orb1 24s ease-in-out infinite alternate;
}
.bg_orb.o2 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(242,92,55,0.16) 0%, transparent 65%);
  top: 40vh; right: -140px;
  animation: orb2 28s ease-in-out infinite alternate;
}
.bg_orb.o3 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(2,167,131,0.14) 0%, transparent 65%);
  top: 80vh; left: 30%;
  animation: orb3 22s ease-in-out infinite alternate;
}
@keyframes orb1 { from { transform: translate3d(0,0,0); } to { transform: translate3d(60px, 80px, 0); } }
@keyframes orb2 { from { transform: translate3d(0,0,0); } to { transform: translate3d(-80px, 40px, 0); } }
@keyframes orb3 { from { transform: translate3d(0,0,0); } to { transform: translate3d(40px, -60px, 0); } }

/* sweep line — runs across hero every 6s */
.bg_sweep {
  position: absolute; left: 0; right: 0; top: 28vh; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.55), transparent);
  animation: sweep 6s linear infinite;
}
@keyframes sweep {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40vh); opacity: 0; }
}

/* === hero ticker bar (above hero) ======================== */
.ticker {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--hair);
  background: linear-gradient(90deg, #fff, #fafbff, #fff);
  height: 38px;
}
.ticker_track {
  display: flex; gap: 56px;
  white-space: nowrap;
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--n500);
  animation: tickerRun 60s linear infinite;
  padding-right: 56px;
}
.ticker_track span { display: inline-flex; align-items: center; gap: 8px; }
.ticker_track .dot {
  width: 6px; height: 6px; background: var(--brand);
  border-radius: 999px; animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
.ticker_track .dot.amber { background: var(--orange); }
.ticker_track .dot.green { background: #02A783; }
.ticker_track strong { color: var(--ink); font-weight: 600; }
@keyframes tickerRun {
  from { transform: translate(0, -50%); }
  to   { transform: translate(-50%, -50%); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* === scroll reveal ======================================= */
.r-fade {
  opacity: 0; transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.2, 0, 0, 1),
              transform 700ms cubic-bezier(0.2, 0, 0, 1);
}
.r-fade.in { opacity: 1; transform: none; }
.r-fade.delay-1 { transition-delay: 80ms; }
.r-fade.delay-2 { transition-delay: 160ms; }
.r-fade.delay-3 { transition-delay: 240ms; }

/* === number count-up — applied via JS .counted state ===== */
.counted .num,
.counted .n {
  background: linear-gradient(180deg, var(--ink) 0%, #2a3754 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counted .num .pct,
.counted .num .x {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === outcome cell — scanline accent on hover ============= */
.outcome_cell { position: relative; overflow: hidden; }
.outcome_cell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(37,99,235,0.06) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 800ms cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}
.outcome_cell:hover::after { transform: translateX(100%); }

/* module — animated index */
.module .num { position: relative; }
.module:hover .num::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 24px; height: 2px;
  background: var(--brand);
  animation: moduleBar 500ms cubic-bezier(0.2, 0, 0, 1) forwards;
}
@keyframes moduleBar { from { width: 0; } to { width: 24px; } }

/* === button shine ======================================== */
.btn_primary { position: relative; overflow: hidden; }
.btn_primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -120%;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 700ms cubic-bezier(0.2, 0, 0, 1);
}
.btn_primary:hover::after { left: 130%; }

/* === hero "live status" pill ============================= */
.live_pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.live_pill .live_dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: #02A783;
  position: relative;
}
.live_pill .live_dot::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: 999px;
  background: #02A783;
  opacity: 0.4;
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* === platform: animated state machine ==================== */
.flow_canvas {
  position: relative;
  height: 220px;
  margin: 32px 0;
  border: 1px solid var(--hair);
  background: #fff;
  overflow: hidden;
  border-radius: 4px;
}
.flow_node {
  position: absolute;
  background: #fff;
  border: 1px solid var(--hair-2);
  padding: 10px 14px;
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 rgba(11,18,32,0.04);
  transition: all 400ms cubic-bezier(0.2, 0, 0, 1);
}
.flow_node .nd_dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--n400);
}
.flow_node.done {
  background: var(--brand-soft); border-color: var(--brand);
  color: var(--brand-deep);
}
.flow_node.done .nd_dot { background: var(--brand); }
.flow_node.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: 0 8px 24px -8px rgba(11,18,32,0.5);
  transform: scale(1.04);
}
.flow_node.active .nd_dot {
  background: #02A783;
  animation: pulseDot 1s ease-in-out infinite;
}
.flow_svg {
  position: absolute; inset: 0;
  pointer-events: none;
}
.flow_path {
  fill: none; stroke: var(--hair); stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.flow_path.lit {
  stroke: var(--brand); stroke-dasharray: 0;
  stroke-width: 2;
  animation: pathDraw 800ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes pathDraw {
  from { stroke-dashoffset: 200; stroke-dasharray: 200; }
  to   { stroke-dashoffset: 0; stroke-dasharray: 0; }
}

/* === cursor-follow glow on dark sections ================= */
.glow_section {
  position: relative; overflow: hidden;
}
.glow_section::before {
  content: ''; position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 60%);
  border-radius: 999px;
  pointer-events: none;
  transform: translate(var(--mx, 50%), var(--my, 50%)) translate(-50%, -50%);
  transition: transform 200ms ease-out;
  opacity: 0.7;
}

/* === respect reduced motion ============================== */
@media (prefers-reduced-motion: reduce) {
  .bg_grid, .bg_orb, .bg_sweep, .ticker_track,
  .live_pill .live_dot::before, .ticker_track .dot,
  .btn_primary::after { animation: none !important; }
  .r-fade { transition: none; opacity: 1; transform: none; }
}

/* === in-page demo section restyling for low-friction ===== */
.demo_quick {
  display: flex; flex-direction: column; gap: 10px;
}
.demo_quick .single_row {
  display: flex; gap: 10px;
  background: rgba(255,255,255,0.06);
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
}
.demo_quick input {
  flex: 1; min-width: 0;
  background: transparent;
  border: 0; outline: none;
  padding: 12px 18px;
  font-size: 15px; font-family: inherit;
  color: #fff;
}
.demo_quick input::placeholder { color: rgba(255,255,255,0.45); }
.demo_quick button {
  padding: 12px 22px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background 200ms ease, transform 100ms ease;
}
.demo_quick button:hover { background: var(--brand-deep); }
.demo_quick button:active { transform: translateY(1px); }
.demo_quick .meta {
  font-size: 12px; color: rgba(255,255,255,0.55);
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.demo_quick .meta::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 999px; background: #02A783;
  animation: pulseDot 2s ease-in-out infinite;
}

/* === BD modal: minimal single-field default ============== */
.bd_minimal .row { grid-template-columns: 1fr !important; }
.bd_minimal { display: none !important; }
.bd_simple {
  padding: 22px 28px 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.bd_simple .single_row {
  display: flex; gap: 8px;
  background: var(--paper);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--hair);
}
.bd_simple input {
  flex: 1; min-width: 0;
  background: transparent;
  border: 0; outline: none;
  padding: 12px 18px;
  font-size: 15px; font-family: inherit;
  color: var(--ink);
}
.bd_simple button {
  padding: 12px 22px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  white-space: nowrap;
  transition: background 200ms ease, transform 100ms ease;
}
.bd_simple button:hover { background: var(--brand-deep); }
.bd_simple .or {
  text-align: center; font-size: 12px;
  color: var(--n500);
  letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0;
}
.bd_simple .or::before, .bd_simple .or::after {
  content: ''; flex: 1; height: 1px; background: var(--hair);
}
.bd_simple .calendly {
  padding: 12px 20px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--hair-2); border-radius: 999px;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: all 180ms ease;
}
.bd_simple .calendly:hover { border-color: var(--ink); background: var(--paper); }
.bd_simple .meta_row {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: var(--n500);
  flex-wrap: wrap;
  margin-top: 2px;
}
.bd_simple .meta_row .pip {
  display: inline-flex; align-items: center; gap: 6px;
}
.bd_simple .meta_row .pip::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 999px; background: #02A783;
}
