/* ============================================================
   SparkNest Design System — Blues, Bubbles, Sparkles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-300: #93C5FD;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --blue-900: #1E3A8A;
  --sky-50: #F0F9FF;
  --sky-100: #E0F2FE;
  --sky-200: #BAE6FD;
  --sky-300: #7DD3FC;
  --sky-400: #38BDF8;
  --cyan-100: #CFFAFE;
  --cyan-300: #67E8F9;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --green-50: #ECFDF5;
  --green-500: #10B981;
  --green-600: #059669;
  --red-50: #FEF2F2;
  --red-500: #EF4444;
  --amber-50: #FFFBEB;
  --amber-500: #F59E0B;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ===== ANIMATED BUBBLES BACKGROUND ===== */
.bubbles-bg {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: floatBubble linear infinite;
}
.bubble:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-duration: 18s; background: var(--blue-300); bottom: -100px; animation-delay: 0s; }
.bubble:nth-child(2) { width: 120px; height: 120px; left: 25%; animation-duration: 22s; background: var(--sky-300); bottom: -150px; animation-delay: 2s; }
.bubble:nth-child(3) { width: 60px; height: 60px; left: 45%; animation-duration: 15s; background: var(--cyan-300); bottom: -80px; animation-delay: 4s; }
.bubble:nth-child(4) { width: 100px; height: 100px; left: 65%; animation-duration: 20s; background: var(--blue-400); bottom: -120px; animation-delay: 1s; }
.bubble:nth-child(5) { width: 50px; height: 50px; left: 80%; animation-duration: 16s; background: var(--sky-200); bottom: -70px; animation-delay: 3s; }
.bubble:nth-child(6) { width: 90px; height: 90px; left: 90%; animation-duration: 24s; background: var(--blue-200); bottom: -110px; animation-delay: 5s; }
.bubble:nth-child(7) { width: 70px; height: 70px; left: 5%; animation-duration: 19s; background: var(--cyan-300); bottom: -90px; animation-delay: 6s; }
.bubble:nth-child(8) { width: 40px; height: 40px; left: 55%; animation-duration: 14s; background: var(--blue-300); bottom: -60px; animation-delay: 7s; }

@keyframes floatBubble {
  0% { transform: translateY(0) scale(1); opacity: 0.08; }
  50% { opacity: 0.12; }
  100% { transform: translateY(-110vh) scale(1.1); opacity: 0; }
}

/* ===== SPARKLE EFFECT ===== */
.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: sparkleAnim 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--blue-400), 0 0 12px var(--blue-300);
}
@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  transition: all 0.3s;
}
nav.scrolled {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--blue-600);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  position: relative;
}
.logo-icon::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--sky-300);
  border-radius: 50%;
  animation: sparkleAnim 3s ease-in-out infinite;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue-600); }
.nav-links .nav-cta {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.nav-links .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
  color: white;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-700);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}
.btn-secondary {
  background: var(--blue-50);
  color: var(--blue-600);
  border: 1px solid var(--blue-200);
}
.btn-secondary:hover {
  background: var(--blue-100);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 2px solid var(--blue-200);
}
.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-400);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}
.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: 14px;
}
.btn-success {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== SECTIONS ===== */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-500);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(59, 130, 246, 0.08);
  transition: all 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.1);
}
.card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.12);
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: all 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}
.badge-blue { background: var(--blue-50); color: var(--blue-600); border: 1px solid var(--blue-200); }
.badge-green { background: var(--green-50); color: var(--green-500); }
.badge-amber { background: var(--amber-50); color: var(--amber-500); }
.badge-red { background: var(--red-50); color: var(--red-500); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gray-900);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 10000;
  transform: translateY(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateY(0); }
.toast.success { background: var(--green-600); }
.toast.error { background: var(--red-500); }

/* ===== FOOTER ===== */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--blue-100);
  background: var(--gray-50);
  position: relative;
  z-index: 1;
}
footer .footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--blue-600);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
footer p {
  font-size: 0.8rem;
  color: var(--gray-400);
}
footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}
footer .footer-links a {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}
footer .footer-links a:hover { color: var(--blue-600); }

/* ===== PAGE WRAPPER ===== */
.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 0.75rem 1.25rem; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  .mobile-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .section-inner { padding: 0 0.5rem; }
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}
.empty-state h3 {
  color: var(--gray-600);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.9rem;
}
