/* ===============================================
   Kid Finance - Consolidated CSS
   =============================================== */

/* Fonts */
@font-face {
  font-family: "Bricolage Grotesk";
  src: url(../fonts/bricolage/BricolageGrotesque.ttf) format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Onest";
  src: url(../fonts/onest/Onest-VariableFont.ttf) format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables */
:root {
  /* Brand Colors */
  --brand-green-dark: #1c4040;
  --brand-green-light: #c8f8a9;
  --brand-purple: #8052f5;
  --brand-purple-light: #ccb0fa;
  --gradient-bg-purple: linear-gradient(135deg, #ccb0fa 0%, #8052f5 100%);

  /* RGB Values for alpha usage */
  --brand-purple-light-rgb: 175, 147, 247;
  --brand-green-light-rgb: 200, 248, 169;

  /* Bootstrap Overrides */
  --bs-primary: var(--brand-green-dark);
  --bs-secondary: var(--brand-green-light);
  --bs-success: var(--brand-green-light);
  --bs-info: #a0e9ff;
  --bs-warning: #ffc078;
  --bs-danger: #ff6b6b;
  --bs-light: #f8f9fa;
  --bs-dark: #121212;

  /* Typography */
  --bs-body-font-family: "Onest", system-ui, sans-serif;
  --bs-font-sans-serif: "Onest", system-ui, sans-serif;
  --bs-heading-font-family: "Bricolage Grotesk", system-ui, sans-serif;

  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Typography */
body {
  font-family: var(--bs-body-font-family);
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--bs-heading-font-family);
}

/* Layout */
section {
  position: relative;
  scroll-margin-top: 68px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

@media (min-width: 992px) {
  section {
    min-height: 90vh;
  }
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(128, 82, 245, 0.2), transparent);
  z-index: 1;
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.85) !important;
  transition: var(--transition-base);
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--brand-purple) !important;
}

.offcanvas {
  background: white;
}

.offcanvas-header {
  border-bottom: 1px solid var(--brand-green-light);
}

/* Dropdown Navigation */
.navbar .dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-base);
  display: block;
  pointer-events: none;
}

.navbar .dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--brand-purple);
  background-color: transparent;
}

/* Hero Section */
.hero-section {
  background: var(--gradient-bg-purple);
  position: relative;
  overflow: hidden;
  min-height: 100vh !important;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 25% 25%, rgba(28, 64, 64, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(128, 82, 245, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(128, 82, 245, 0.2);
}

/* Buttons */
.btn-primary {
  background: var(--brand-purple);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  transition: var(--transition-base);
}

.btn-primary:hover {
  background: var(--brand-green-light);
  color: #121212;
  transform: translateY(-2px);
}

/* Forms */
.form-control {
  border-radius: 50px;
  border: 2px solid var(--brand-green-light);
  padding: 12px 20px;
  transition: var(--transition-base);
}

.form-control:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 0.2rem rgba(128, 82, 245, 0.25);
}

/* Cards and Features */
.feature-card {
  border: 2px solid var(--brand-green-light);
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  background: white;
  height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--brand-purple-light);
}

/* Icons and Badges */
.feature-icon,
.feature-icon-purple {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}

.feature-icon {
  background: var(--brand-green-light);
}

.feature-icon-purple {
  background: var(--brand-purple-light);
}

.step-badge,
.step-badge-accent,
.step-icon-purple {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.step-badge {
  background: var(--brand-purple);
  color: white;
}

.step-badge-accent {
  background: var(--brand-green-light);
  border: 1px solid rgba(var(--brand-purple-light-rgb), 0.7);
  box-shadow: 0 0 0 10px rgba(var(--brand-purple-light-rgb), 0.5);
}

.step-icon-purple {
  background: var(--brand-purple-light);
  border: 1px solid rgba(var(--brand-purple-light-rgb), 0.6);
  box-shadow: 0 0 0 6px rgba(var(--brand-purple-light-rgb), 0.2);
  color: var(--brand-purple);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* Background Patterns */
.bg-notebook,
.bg-squares {
  background-color: #f8f9fa;
  background-image: linear-gradient(rgba(71, 71, 71, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 81, 81, 0.1) 1px, transparent 1px);
  background-size: 10px 10px;
}

.bg-dots {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.09) 1px, transparent 1px) center bottom / 10px 10px repeat;
}

.bg-green-light {
  background-color: rgba(var(--brand-green-light-rgb), 0.35);
}

.bg-brand-purple {
  background-color: var(--brand-purple) !important;
}

/* Social Proof */
.social-proof {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 15px 25px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  backdrop-filter: blur(10px);
}

/* Utility Classes */
.text-brand {
  color: var(--brand-purple);
}

.text-brand-light-green {
  color: var(--brand-green-light) !important;
}

.icon-white {
  color: #fff;
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation Classes */
.animate-slide-up {
  opacity: 0;
  animation: slideInUp var(--transition-smooth) forwards;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft var(--transition-smooth) forwards;
}

.animate-slide-right {
  opacity: 0;
  animation: slideInRight var(--transition-smooth) forwards;
}

.animate-scale-in {
  opacity: 0;
  animation: scaleIn var(--transition-smooth) forwards;
}

.animate-stagger {
  opacity: 0;
  animation: staggerFadeIn var(--transition-smooth) forwards;
}

/* Stagger Delays */
.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}
.stagger-5 {
  animation-delay: 0.5s;
}
.stagger-6 {
  animation-delay: 0.6s;
}
.stagger-7 {
  animation-delay: 0.7s;
}
.stagger-8 {
  animation-delay: 0.8s;
}

/* Elements hidden until animation starts */
.hero-content,
.hero-image,
.section-header,
.feature-card,
.step-item,
.about-text,
.parent-content,
.parent-image,
.cta-content,
.nav-item,
.social-proof {
  opacity: 0;
}

footer {
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(128, 82, 245, 0.2), transparent);
  z-index: 1;
}
