/* ═══════════════════════════════════════════════
   HOME PAGE — VISUAL ENHANCEMENTS
   Extracted from index.html inline <style>
═══════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   HERO — "The Living Grid"
   Ambient gradient mesh + data grid + choreographed entrance
══════════════════════════════════════════════════ */
.hp-hero {
  position: relative;
  overflow: hidden;
}

/* ── Animated gradient mesh ──
   Three soft blobs drift slowly, creating a living,
   breathing atmosphere at ~5-7% opacity. The effect
   is barely conscious — you feel it more than see it. */
.hp-hero-mesh {
  position: absolute;
  inset: -120px;
  pointer-events: none;
}

.hp-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.hp-hero-blob--1 {
  width: 700px; height: 700px;
  top: -280px; left: -150px;
  background: radial-gradient(circle, rgba(0, 162, 255, 0.07) 0%, transparent 70%);
  animation: hpBlobDrift1 25s ease-in-out infinite;
}

.hp-hero-blob--2 {
  width: 550px; height: 550px;
  top: -180px; right: -100px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
  animation: hpBlobDrift2 30s ease-in-out infinite;
}

.hp-hero-blob--3 {
  width: 500px; height: 500px;
  bottom: -220px; left: 28%;
  background: radial-gradient(circle, rgba(0, 122, 204, 0.04) 0%, transparent 70%);
  animation: hpBlobDrift3 22s ease-in-out infinite;
}

@keyframes hpBlobDrift1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(60px, 30px); }
  50% { transform: translate(20px, 55px); }
  75% { transform: translate(-30px, 20px); }
}

@keyframes hpBlobDrift2 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 25px); }
  50% { transform: translate(-65px, -10px); }
  75% { transform: translate(20px, -30px); }
}

@keyframes hpBlobDrift3 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -40px); }
  50% { transform: translate(-25px, -20px); }
  75% { transform: translate(-45px, 15px); }
}

/* ── Data grid overlay ──
   A faint repeating line grid, masked to an ellipse
   so it fades at the edges. Suggests infrastructure
   and precision without being literal. */
.hp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(0, 162, 255, 0.025) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(0, 162, 255, 0.018) 0 1px, transparent 1px 80px);
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 50% 42%, rgba(0,0,0,0.6) 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 65% at 50% 42%, rgba(0,0,0,0.6) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Network constellation ──
   Abstract nodes + connections representing live
   financial infrastructure. Flows animate to suggest
   data in motion. The whole thing fades in after the
   text begins appearing — background reveals last. */
.hp-hero-network {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1200px;
  height: auto;
  pointer-events: none;
  opacity: 0;
  animation: hpNetFadeIn 2.5s var(--ease-out) 0.4s forwards;
  -webkit-mask-image: radial-gradient(ellipse 38% 50% at 50% 45%, transparent 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,1) 100%);
  mask-image: radial-gradient(ellipse 38% 50% at 50% 45%, transparent 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,1) 100%);
}

@keyframes hpNetFadeIn {
  to { opacity: 1; }
}

/* Static connection lines */
.hp-net-lines line {
  stroke: rgba(0, 162, 255, 0.10);
  stroke-width: 1;
}

/* Animated flow lines — data in motion */
.hp-net-flows line {
  stroke: rgba(0, 162, 255, 0.18);
  stroke-width: 1.5;
  stroke-dasharray: 8 14;
  animation: hpNetFlow 4s linear infinite;
}

/* Stagger flow timing for organic feel */
.hp-net-flows line:nth-child(2) { animation-delay: -1.5s; animation-duration: 4.5s; }
.hp-net-flows line:nth-child(3) { animation-delay: -3s; }
.hp-net-flows line:nth-child(4) { animation-delay: -0.8s; animation-duration: 3.5s; }
.hp-net-flows line:nth-child(5) { animation-delay: -2.2s; animation-duration: 5s; }
.hp-net-flows line:nth-child(6) { animation-delay: -1s; animation-duration: 3.8s; }
.hp-net-flows line:nth-child(7) { animation-delay: -2.8s; animation-duration: 4.2s; }
.hp-net-flows line:nth-child(8) { animation-delay: -0.5s; animation-duration: 4.8s; }

@keyframes hpNetFlow {
  to { stroke-dashoffset: -44; }
}

/* Static nodes */
.hp-net-nodes circle {
  fill: rgba(0, 162, 255, 0.15);
}

/* Key pulsing nodes — visible breathe */
.hp-net-pulses circle {
  fill: rgba(0, 162, 255, 0.25);
  filter: drop-shadow(0 0 4px rgba(0, 162, 255, 0.15));
  animation: hpNetPulse 5s ease-in-out infinite;
}

/* Center node — the core with prominent glow */
.hp-net-pulses circle:nth-child(2) {
  fill: rgba(0, 162, 255, 0.35);
  filter: drop-shadow(0 0 14px rgba(0, 162, 255, 0.25));
  animation-duration: 4s;
  animation-delay: -1s;
}

.hp-net-pulses circle:nth-child(1) { animation-delay: -2s; animation-duration: 4.5s; }
.hp-net-pulses circle:nth-child(3) { animation-delay: -0.5s; animation-duration: 5.5s; }
.hp-net-pulses circle:nth-child(4) { animation-delay: -3s; animation-duration: 4.2s; }

@keyframes hpNetPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Text content above decorative layers */
.hp-hero .container {
  position: relative;
  z-index: 1;
}

/* ── Gradient text accent ──
   "Asset-Backed Finance" in a blue→teal gradient.
   Subtle enough to read as text-with-color, not as
   a flashy effect. */
.hp-hero-gradient {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #06b6d4 60%, var(--brand-blue-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Choreographed entrance ──
   Each element fades up in sequence. The timing is
   deliberate: 0→200→450→650→900ms creates a rhythm
   that accelerates slightly, then breathes. */
.hp-hero-fade {
  opacity: 0;
  transform: translateY(20px);
  animation: hpHeroFade 0.7s var(--ease-out) forwards;
}

.hp-hero-fade--1 { animation-delay: 0ms; }
.hp-hero-fade--2 { animation-delay: 200ms; }
.hp-hero-fade--3 { animation-delay: 450ms; }
.hp-hero-fade--4 { animation-delay: 650ms; }
.hp-hero-fade--5 { animation-delay: 900ms; }

@keyframes hpHeroFade {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Enhanced primary CTA ──
   Wider ambient glow creates a subtle halo,
   drawing the eye without being aggressive. */
.hp-hero .btn-primary {
  box-shadow:
    0 2px 8px rgba(0, 162, 255, 0.25),
    0 0 40px rgba(0, 162, 255, 0.08);
}

.hp-hero .btn-primary:hover {
  box-shadow:
    0 4px 16px rgba(0, 162, 255, 0.35),
    0 0 50px rgba(0, 162, 255, 0.12);
}

/* ── Trust logos: subtle scale on hover ── */
.hp-hero .hero-logos img {
  transition: all 0.3s ease;
}

.hp-hero .hero-logos img:hover {
  transform: scale(1.08);
}

/* ── Stats bar shimmer ──
   A gradient line slowly sweeps across the top edge,
   suggesting live data flow. The effect is so subtle
   it reads as a premium material finish. */
.hp-stats-bar {
  position: relative;
  overflow: hidden;
}

.hp-stats-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brand-blue) 20%,
    #06b6d4 50%,
    var(--brand-blue) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: hpStatsShimmer 6s linear infinite;
}

@keyframes hpStatsShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Hero responsive ── */
@media (max-width: 680px) {
  .hp-hero-blob--1 { width: 400px; height: 400px; }
  .hp-hero-blob--2 { width: 350px; height: 350px; }
  .hp-hero-blob--3 { width: 300px; height: 300px; }
  .hp-hero-network { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-hero-fade {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hp-hero-blob {
    animation: none !important;
  }

  .hp-hero-network {
    opacity: 1;
    animation: none;
  }

  .hp-net-flows line,
  .hp-net-pulses circle {
    animation: none !important;
  }

  .hp-stats-bar::after {
    animation: none;
    background: linear-gradient(90deg, var(--brand-blue) 0%, #06b6d4 50%, var(--brand-blue) 100%);
    background-size: 100% 100%;
  }
}

/* ── Key Difference — dark section ── */
.hp-dark {
  background: linear-gradient(180deg, #0B0F14 0%, #131922 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-10) 0;
}
.hp-dark .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-9); align-items: center;
}
.hp-dark .eyebrow { color: var(--brand-blue); }
.hp-dark h2 { color: rgba(255,255,255,0.92); }
.hp-dark > .container > div:first-child p { color: rgba(255,255,255,0.6); font-size: var(--text-md); max-width: 520px; }

.hp-sources { display: grid; gap: var(--space-3); }
.hp-source {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; transition: all var(--duration-normal) var(--ease-out);
  opacity: 0; transform: translateX(16px);
}
.hp-source.visible { opacity: 1; transform: translateX(0); }
.hp-source:hover { border-color: rgba(0,162,255,0.3); background: rgba(0,162,255,0.06); }
.hp-source-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,162,255,0.1); color: var(--brand-blue);
}
.hp-source-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hp-source-text h4 { font-size: var(--text-sm); font-weight: 600; color: rgba(255,255,255,0.9); margin: 0 0 2px; }
.hp-source-text p { font-size: var(--text-xs); color: rgba(255,255,255,0.45); margin: 0; }

.hp-source-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--space-4); padding: 6px 14px;
  background: rgba(0,162,255,0.08); border: 1px solid rgba(0,162,255,0.15);
  border-radius: 999px; font-size: var(--text-xs); font-weight: 600; color: var(--brand-blue-200);
}
.hp-source-badge svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Outcomes — elevated cards ── */
.hp-outcomes-section {
  background: linear-gradient(180deg, #fff 0%, var(--canvas) 100%);
  padding: var(--space-10) 0;
}
.hp-outcomes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5);
  margin-top: var(--space-7);
}
.hp-outcome {
  position: relative; padding: var(--space-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 0; transform: translateY(20px);
}
.hp-outcome.visible { opacity: 1; transform: translateY(0); }
.hp-outcome::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-200));
  opacity: 0; transition: opacity var(--duration-normal) var(--ease-out);
}
.hp-outcome:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--brand-blue-100); }
.hp-outcome:hover::before { opacity: 1; }
.hp-outcome-header {
  display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3);
}
.hp-outcome-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-blue-50); color: var(--brand-blue);
  transition: all var(--duration-normal) var(--ease-out);
}
.hp-outcome:hover .hp-outcome-icon { background: var(--brand-blue); color: #fff; }
.hp-outcome-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hp-outcome-title {
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
  color: var(--ink); margin: 0; letter-spacing: -0.01em; flex: 1;
}
.hp-outcome-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.hp-outcome-badge--speed { background: rgba(0,162,255,0.08); color: var(--brand-blue); }
.hp-outcome-badge--expand { background: rgba(139,92,246,0.08); color: #7C3AED; }
.hp-outcome-badge--verify { background: rgba(22,163,74,0.08); color: var(--success); }
.hp-outcome-badge--savings { background: rgba(245,158,11,0.08); color: #D97706; }
.hp-outcome-badge svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp-outcome p {
  font-size: var(--text-sm); color: var(--slate); margin: 0; line-height: 1.55; flex: 1;
}
.hp-outcome-highlight {
  margin-top: var(--space-3); padding: 8px var(--space-3);
  background: var(--canvas); border-radius: 6px;
  display: flex; align-items: center; gap: var(--space-2);
  font-family: 'IBM Plex Mono', monospace; font-size: var(--text-xs); font-weight: 500;
  color: var(--slate); line-height: 1.4;
}
.hp-outcome-highlight-icon {
  width: 24px; height: 24px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.hp-outcome-highlight-icon svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp-outcome-highlight--blue .hp-outcome-highlight-icon { background: rgba(0,162,255,0.1); color: var(--brand-blue); }
.hp-outcome-highlight--purple .hp-outcome-highlight-icon { background: rgba(139,92,246,0.1); color: #7C3AED; }
.hp-outcome-highlight--green .hp-outcome-highlight-icon { background: rgba(22,163,74,0.1); color: var(--success); }
.hp-outcome-highlight--amber .hp-outcome-highlight-icon { background: rgba(245,158,11,0.1); color: #D97706; }

@media (max-width: 680px) {
  .hp-outcomes { grid-template-columns: 1fr; }
}

/* ── How It Works — timeline flow ── */
.hp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: var(--space-7); position: relative; }
.hp-step {
  position: relative; padding: var(--space-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  transition: all var(--duration-normal) var(--ease-out);
  opacity: 0; transform: translateY(20px);
  margin: 0 var(--space-3);
}
.hp-step.visible { opacity: 1; transform: translateY(0); }
.hp-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--brand-blue-100); }
.hp-step-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.hp-step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700;
  background: var(--brand-blue-50); color: var(--brand-blue);
  transition: all var(--duration-normal) var(--ease-out);
}
.hp-step:hover .hp-step-num { background: var(--brand-blue); color: #fff; }
.hp-step-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--canvas); color: var(--brand-blue);
}
.hp-step-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hp-step h4 { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; margin: 0 0 var(--space-2); color: var(--ink); }
.hp-step p { font-size: var(--text-sm); color: var(--slate); margin: 0; line-height: 1.5; }

/* Arrow connectors between steps */
.hp-step-arrow {
  position: absolute; top: 50%; right: -22px; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--brand-blue); opacity: 0.4; z-index: 2;
}
.hp-step-arrow svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hp-step:last-child .hp-step-arrow { display: none; }

/* ── Case Study — dark section ── */
.hp-case {
  background: linear-gradient(180deg, #0B0F14 0%, #131922 100%);
  border-radius: var(--radius-lg); padding: var(--space-10) 0;
}
.hp-case .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-9); align-items: center;
}
.hp-case .eyebrow { color: var(--brand-blue); }
.hp-case h2 { color: rgba(255,255,255,0.92); }
.hp-case-text p { color: rgba(255,255,255,0.6); }
.hp-case-text ul { list-style: none; padding: 0; margin: var(--space-4) 0; }
.hp-case-text ul li {
  position: relative; padding-left: 20px; margin-bottom: var(--space-2);
  font-size: var(--text-sm); color: rgba(255,255,255,0.6); line-height: 1.5;
}
.hp-case-text ul li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue);
}
.hp-case .btn-secondary {
  border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85);
}
.hp-case .btn-secondary:hover { border-color: var(--brand-blue); color: #fff; background: rgba(0,162,255,0.1); }

.hp-case-metrics {
  display: grid; grid-template-columns: 1fr; gap: var(--space-3);
}
.hp-case-metric {
  padding: var(--space-5);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
}
.hp-case-metric:hover { border-color: rgba(0,162,255,0.25); background: rgba(0,162,255,0.06); }
.hp-case-metric-value {
  font-family: 'IBM Plex Mono', monospace; font-size: var(--text-3xl); font-weight: 600;
  color: var(--brand-blue); letter-spacing: -0.02em; margin-bottom: var(--space-1);
}
.hp-case-metric-label {
  font-size: var(--text-sm); color: rgba(255,255,255,0.5);
}

/* ── Testimonials — enhanced ── */
.hp-testimonials {
  background: linear-gradient(180deg, var(--canvas) 0%, #fff 100%);
  padding: var(--space-10) 0;
}
.hp-testimonial {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: var(--space-6); position: relative; overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}
.hp-testimonial::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue-200));
  opacity: 0; transition: opacity var(--duration-normal) var(--ease-out);
}
.hp-testimonial:hover { box-shadow: var(--shadow-hover); border-color: var(--brand-blue-100); }
.hp-testimonial:hover::before { opacity: 1; }
.hp-testimonial-quote {
  font-size: 48px; line-height: 1; color: var(--brand-blue); opacity: 0.15;
  font-family: Georgia, serif; margin-bottom: var(--space-2);
}
.hp-testimonial blockquote {
  font-size: var(--text-md); color: var(--slate); line-height: 1.6;
  margin: 0 0 var(--space-5); font-style: normal;
}

/* ── Scroll animations ── */
.hp-source, .hp-step, .hp-case-metric, .hp-outcome {
  opacity: 0; transform: translateY(16px);
}
.hp-source.visible { opacity: 1; transform: translateX(0); }
.hp-step.visible, .hp-case-metric.visible, .hp-outcome.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .hp-dark .container, .hp-case .container { grid-template-columns: 1fr; }
  .hp-steps { grid-template-columns: 1fr; }
  .hp-step { margin: 0 0 var(--space-3) 0; }
  .hp-step-arrow { display: none; }
}
@media (max-width: 680px) {
  .hp-dark, .hp-case { padding: var(--space-8) 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-source, .hp-step, .hp-case-metric, .hp-outcome { opacity: 1; transform: none; transition: none !important; }
}
