/* Independence Pathways - Design System & Global Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --color-primary: #1a5c38;
  /* Forest Green */
  --color-primary-light: #276b44;
  --color-primary-dark: #134529;

  --color-accent: #34a85a;
  /* Emerald Green */
  --color-accent-hover: #2d9450;

  --color-bg: #f0faf4;
  /* Soft Mint White */
  --color-surface: #ffffff;
  --color-surface-translucent: rgba(255, 255, 255, 0.88);

  --color-text: #1c3a2a;
  --color-text-light: #5a7a68;
  --color-text-inverse: #ffffff;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-main: 'Inter', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  background: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

.text-accent {
  color: var(--color-accent);
}

.text-light {
  color: var(--color-text-light);
}

.text-center {
  text-align: center;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.flex {
  display: flex;
  gap: var(--spacing-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.glass {
  background: var(--color-surface-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
  padding: var(--spacing-sm) 0;
}

header.scrolled {
  background: var(--color-surface-translucent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-xs) 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

nav a {
  font-weight: 500;
  color: var(--color-primary);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent);
  transition: width var(--transition-fast);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(26, 92, 56, 0.06) 0%, rgba(52, 168, 90, 0.06) 100%);
  padding-top: 80px;
}

.hero-content {
  max-width: 600px;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: var(--color-primary-light);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: blob 10s infinite alternate;
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: var(--color-accent);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob 12s infinite alternate;
}

@keyframes blob {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-40px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse-soft {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 168, 90, 0.4);
  }

  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(52, 168, 90, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 168, 90, 0);
  }
}

.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Specific reveal types (initial state handled by js adding .active) */
.reveal-up {
  transform: translate3d(0, 50px, 0);
}

.reveal-left {
  transform: translate3d(-50px, 0, 0);
}

.reveal-right {
  transform: translate3d(50px, 0, 0);
}

.reveal-scale {
  transform: scale(0.9);
}

/* Stagger delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* Enhanced Card Hover */
.card {
  /* existing styles... */
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-xl);
}

/* Subtle gradient overlay on hover */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

/* Hero image floating animation */
.hero-image img {
  animation: float 6s ease-in-out infinite;
}

/* Stats Counter Styles */
.stat-number {
  font-variant-numeric: tabular-nums;
  opacity: 0;
  /* Hidden until animated */
}

.stat-number.counted {
  opacity: 1;
}

/* Donation Page Specifics */
.donation-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.amount-btn {
  padding: var(--spacing-sm);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 600;
  color: var(--color-primary);
}

.amount-btn.selected,
.amount-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.custom-amount {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(52, 168, 90, 0.15);
}

/* Section Background Images */
.section-with-bg {
  position: relative;
}

.section-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  z-index: 1;
}

.section-bg-overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 92, 56, 0.88), rgba(19, 69, 41, 0.92));
  z-index: 1;
}

.section-bg-overlay-green {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 92, 56, 0.75), rgba(52, 168, 90, 0.6));
  z-index: 1;
}

/* Card Images */
.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

/* Program Cards */
.program-card {
  padding: 0;
  overflow: hidden;
}

.program-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.program-card-content {
  padding: var(--spacing-lg);
}

/* Image Banner */
.image-banner img {
  transition: transform 8s ease;
}

.image-banner:hover img {
  transform: scale(1.05);
}

/* Stats Section */
.stats-section {
  padding: var(--spacing-xl) 0;
}

/* Footer */
footer {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

footer a {
  color: #a7d9b8;
}

footer a:hover {
  color: var(--color-text-inverse);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--spacing-lg);
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
    font-size: 1.5rem;
    color: var(--color-primary);
  }
}

@media (min-width: 769px) {
  .mobile-toggle {
    display: none;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}