/* ============================================================
   LoanFlow Pro — Landing Page Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #05060f;
  --bg-secondary:  #0d0e1f;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-glow:   rgba(99,102,241,0.4);

  --indigo:   #6366f1;
  --violet:   #8b5cf6;
  --teal:     #06d6a0;
  --amber:    #f59e0b;
  --red:      #ef4444;

  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --grad-hero:    linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
  --grad-card:    linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.05));

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 60px rgba(99,102,241,.3);
  --shadow-card: 0 8px 32px rgba(0,0,0,.4);
  --transition:  all .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background Mesh ──────────────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.bg-mesh::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(99,102,241,.15) 0%, transparent 70%);
  animation: floatA 12s ease-in-out infinite alternate;
}
.bg-mesh::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(139,92,246,.12) 0%, transparent 70%);
  animation: floatB 15s ease-in-out infinite alternate;
}
@keyframes floatA {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(3%,5%) scale(1.1); }
}
@keyframes floatB {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-3%,-5%) scale(1.15); }
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5,6,15,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  padding: .75rem 2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,.5);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(99,102,241,.5);
}
.nav-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}
.nav-logo .logo-text span { color: var(--indigo); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }

.nav-actions { display: flex; align-items: center; gap: .75rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(99,102,241,.5);
  background: rgba(99,102,241,.1);
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 0 24px rgba(99,102,241,.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,.6);
}
.btn-outline {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid var(--indigo);
}
.btn-outline:hover {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,.4);
}
.btn-lg {
  padding: .9rem 2rem;
  font-size: 1rem;
}
.btn-xl {
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 14px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1rem 5rem;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: #a5b4fc;
  padding: .4rem 1rem;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  animation: fadeInUp .6s ease both;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.6; transform:scale(1.2); }
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
  margin-bottom: 1.25rem;
  animation: fadeInUp .7s ease .1s both;
}
.hero-title .grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp .7s ease .2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp .7s ease .3s both;
}

.hero-access {
  margin-top: 3.5rem;
  animation: fadeInUp .7s ease .4s both;
}
.hero-access-card {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  text-align: left;
  max-width: 420px;
  width: 100%;
}
.hero-access-card p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  text-align: center;
}
.access-form {
  display: flex;
  gap: .5rem;
}
.access-input {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}
.access-input::placeholder { color: var(--text-muted); }
.access-input:focus {
  border-color: var(--indigo);
  background: rgba(99,102,241,.08);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.stats-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 2rem;
  text-align: center;
}
.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.03em;
}
.stat-item .stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ── Section ──────────────────────────────────────────────── */
.section {
  padding: 6rem 1.5rem;
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}
.section-tag {
  display: inline-block;
  color: var(--indigo);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.container { max-width: 1200px; margin: 0 auto; }

/* ── Feature Cards ────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  background: var(--grad-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
  position: relative;
}
.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
  position: relative;
}
.feature-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
  position: relative;
}

/* ── Dashboard Preview ────────────────────────────────────── */
.preview-section { background: var(--bg-secondary); }
.preview-window {
  background: #111827;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.6), var(--shadow-glow);
  max-width: 960px;
  margin: 0 auto;
}
.preview-topbar {
  background: #1f2937;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.preview-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.preview-dot.red   { background: #ff5f57; }
.preview-dot.yellow{ background: #ffbd2e; }
.preview-dot.green { background: #28c840; }
.preview-url {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  padding: .3rem 1rem;
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: .5rem;
}
.preview-body {
  display: flex;
  min-height: 400px;
}
.preview-sidebar {
  width: 200px;
  background: #0f172a;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.preview-sidebar-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.preview-sidebar-logo .icon {
  width: 28px; height: 28px;
  background: var(--grad-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.preview-sidebar-logo span { font-size: .85rem; font-weight: 700; }

.preview-nav-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .8rem;
  color: #94a3b8;
  margin-bottom: .25rem;
}
.preview-nav-item.active {
  background: rgba(99,102,241,.2);
  color: #a5b4fc;
}

.preview-main { flex: 1; padding: 1.5rem; background: #f8fafc; }
.preview-main-dark { background: #1a2035; }

.preview-kpi-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.preview-kpi {
  background: #fff;
  border-radius: 10px;
  padding: .85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.preview-kpi .kpi-value {
  font-size: 1.2rem; font-weight: 800; color: #111827;
}
.preview-kpi .kpi-label { font-size: .65rem; color: #9ca3af; margin-top: 2px; }

.preview-table { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.preview-table-header {
  padding: .75rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}
.preview-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid #f9fafb;
  font-size: .75rem;
}
.preview-row .status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.preview-row.green-row { background: rgba(16,185,129,.05); }
.preview-row.yellow-row { background: rgba(245,158,11,.05); }
.preview-row.red-row { background: rgba(239,68,68,.05); }
.status-dot.s-green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.status-dot.s-yellow { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.status-dot.s-red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.row-name { flex:1; font-weight: 600; color: #111827; }
.row-amount { color: #6b7280; width: 80px; }
.row-date { color: #9ca3af; width: 100px; }
.row-badge {
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
}
.badge-green { background: rgba(16,185,129,.15); color: #059669; }
.badge-yellow { background: rgba(245,158,11,.15); color: #d97706; }
.badge-red { background: rgba(239,68,68,.15); color: #dc2626; }

/* ── How it Works ─────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 2rem;
  counter-reset: step;
}
.step-card {
  text-align: center;
  position: relative;
}
.step-card::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: var(--grad-primary);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  box-shadow: 0 0 24px rgba(99,102,241,.4);
}
.step-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.step-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
}

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  padding: 6rem 1.5rem;
  text-align: center;
}
.cta-box {
  background: var(--grad-hero);
  border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 40px 100px rgba(99,102,241,.3);
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 60%);
  pointer-events: none;
}
.cta-box h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.03em;
  position: relative;
}
.cta-box p {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  position: relative;
}
.cta-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }
.btn-white {
  background: #fff;
  color: var(--indigo);
  font-weight: 700;
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
  text-decoration: none;
}
.footer-logo .icon {
  width: 32px; height: 32px;
  background: var(--grad-primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.footer-logo span { font-size: 1rem; font-weight: 700; }
.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .preview-body { flex-direction: column; }
  .preview-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .preview-kpi-row { grid-template-columns: repeat(2,1fr); }
  .access-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .section { padding: 4rem 1rem; }
  .hero { padding: 7rem 1rem 4rem; }
}
