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

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --radius: 0.5rem;
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(240, 10%, 3.9%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(240, 10%, 3.9%);
  --primary: hsl(158, 64%, 52%);
  --primary-foreground: hsl(0, 0%, 98%);
  --secondary: hsl(82, 84%, 60%);
  --secondary-foreground: hsl(240, 5.9%, 10%);
  --muted: hsl(240, 4.8%, 95.9%);
  --muted-foreground: hsl(240, 3.8%, 46.1%);
  --accent: hsl(24, 95%, 53%);
  --accent-foreground: hsl(0, 0%, 98%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(0, 0%, 98%);
  --border: hsl(240, 5.9%, 90%);
  --input: hsl(240, 5.9%, 90%);
  --ring: hsl(158, 64%, 52%);
}

.dark {
  --background: hsl(240, 10%, 3.9%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(240, 10%, 3.9%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(158, 64%, 52%);
  --primary-foreground: hsl(240, 5.9%, 10%);
  --secondary: hsl(240, 3.7%, 15.9%);
  --secondary-foreground: hsl(0, 0%, 98%);
  --muted: hsl(240, 3.7%, 15.9%);
  --muted-foreground: hsl(240, 5%, 64.9%);
  --accent: hsl(240, 3.7%, 15.9%);
  --accent-foreground: hsl(0, 0%, 98%);
  --destructive: hsl(0, 62.8%, 30.6%);
  --destructive-foreground: hsl(0, 0%, 98%);
  --border: hsl(240, 3.7%, 15.9%);
  --input: hsl(240, 3.7%, 15.9%);
  --ring: hsl(158, 64%, 52%);
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility classes */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.bg-primary\/10 { background-color: hsla(158, 64%, 52%, 0.1); }
.bg-primary\/90 { background-color: hsla(158, 64%, 52%, 0.9); }
.bg-muted { background-color: var(--muted); }
.bg-muted\/50 { background-color: hsla(240, 4.8%, 95.9%, 0.5); }

.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-muted-foreground { color: var(--muted-foreground); }

.border-border { border-color: var(--border); }
.border-primary { border-color: var(--primary); }

.hover\:bg-primary:hover { background-color: var(--primary); }
.hover\:bg-primary\/90:hover { background-color: hsla(158, 64%, 52%, 0.9); }
.hover\:bg-muted:hover { background-color: var(--muted); }
.hover\:bg-card:hover { background-color: var(--card); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-primary-foreground:hover { color: var(--primary-foreground); }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:text-primary\/80:hover { color: hsla(158, 64%, 52%, 0.8); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.hover\:scale-105:hover { transform: scale(1.05); }

.focus\:ring-2:focus { 
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ring);
}
.focus\:border-transparent:focus { border-color: transparent; }

/* Layout utilities */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mr-2 { margin-right: 0.5rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-16 { padding-top: 4rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Display and positioning */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none; }
.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-16 { top: 4rem; }
.z-50 { z-index: 50; }
.-top-4 { top: -1rem; }
.-bottom-6 { bottom: -1.5rem; }
.-right-6 { right: -1.5rem; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid layouts */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Flex utilities */
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }

/* Typography */
.font-sans { font-family: 'Inter', system-ui, sans-serif; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.italic { font-style: italic; }

/* Sizing */
.w-full { width: 100%; }
.w-3 { width: 0.75rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }

.h-3 { height: 0.75rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-auto { height: auto; }

.min-h-screen { min-height: 100vh; }

/* Border and rounding */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }

.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Backdrop effects */
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* Transform */
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-x-full { transform: translateX(-100%); }

/* Transitions */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Object fit */
.object-cover { object-fit: cover; }

/* Animations */
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Component-specific styles */
.hero-gradient {
  background: linear-gradient(135deg, hsla(158, 64%, 52%, 0.1) 0%, hsla(82, 84%, 60%, 0.1) 100%);
}

.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

.filter-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.step-item {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.blog-article.hidden {
  display: none;
}

.product-item.hidden {
  display: none;
}

/* Responsive design */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:flex-row { flex-direction: row; }
}

@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:flex-row { flex-direction: row; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:text-left { text-align: left; }
  .lg\:justify-start { justify-content: flex-start; }
}

/* Form styles */
input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: all 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ring);
  border-color: transparent;
}

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.15s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for accessibility */
a:focus, button:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}


/* Hero gradient: subtly greener */
.hero-gradient {
background: linear-gradient(
135deg,
hsla(158, 64%, 52%, 0.16) 0%,
hsla(82, 84%, 60%, 0.14) 100%
);
}

/* Slightly darker “Why Choose FarmUrban?” section and cards */
.features-darken { background-color: hsla(240, 13%, 82%, 0.6) !important; }
.card-darker { background-color: hsl(0, 0%, 98%) !important; }
.features-darken .border-border { border-color: hsl(240, 5.9%, 88%) !important; }

/* Footer theme variables */
:root {
--footer-bg: hsl(158, 42%, 18%);
--footer-fg: hsl(0, 0%, 98%);
--footer-muted: hsla(0, 0%, 100%, 0.78);
--footer-link: hsl(82, 84%, 70%);
--footer-accent: hsl(158, 64%, 60%);
--footer-divider: hsla(0, 0%, 100%, 0.12);
}

/* Footer utilities */
.bg-footer { background-color: var(--footer-bg); }
.text-footer-foreground { color: var(--footer-fg); }
.text-footer-muted { color: var(--footer-muted); }
.text-footer-link { color: var(--footer-link); }
.text-footer-accent { color: var(--footer-accent); }
.border-footer-divider { border-color: var(--footer-divider); }

/* Keep existing focus ring; ensure good contrast on dark footer */
a:focus, button:focus {
outline: 2px solid var(--ring);
outline-offset: 2px;
}