/* CSS Variables */
:root {
  --background: 0 0% 98%;
  --foreground: 150 100% 12%;
  --card: 0 0% 100%;
  --card-foreground: 150 100% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 150 100% 12%;
  --primary: 145 63% 49%;
  --primary-foreground: 0 0% 100%;
  --secondary: 150 100% 20%;
  --secondary-foreground: 0 0% 100%;
  --muted: 150 10% 95%;
  --muted-foreground: 150 10% 45%;
  --accent: 145 63% 42%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;
  --border: 150 20% 88%;
  --input: 150 20% 88%;
  --ring: 145 63% 49%;
  --radius: 0.75rem;
  --success: 145 63% 49%;
  --warning: 38 92% 50%;
  --danger: 0 84% 60%;
}

.dark {
  --background: 150 100% 8%;
  --foreground: 150 10% 95%;
  --card: 150 100% 12%;
  --card-foreground: 150 10% 95%;
  --popover: 150 100% 12%;
  --popover-foreground: 150 10% 95%;
  --primary: 145 63% 49%;
  --primary-foreground: 0 0% 100%;
  --secondary: 150 100% 20%;
  --secondary-foreground: 0 0% 100%;
  --muted: 150 30% 20%;
  --muted-foreground: 150 10% 65%;
  --accent: 145 63% 42%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 62.8% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 150 30% 20%;
  --input: 150 30% 20%;
  --ring: 145 63% 49%;
  --success: 145 63% 49%;
  --warning: 38 92% 50%;
  --danger: 0 84% 60%;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: hsl(var(--card) / 0.8);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: hsl(var(--card));
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  background-color: hsl(var(--primary));
  border-radius: 50%;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon-svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--primary-foreground));
}

.brand-text {
  font-size: 1.25rem;
  font-weight: bold;
  color: hsl(var(--foreground));
}

.desktop-menu {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  color: hsl(var(--foreground));
  cursor: pointer;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-link:hover {
  color: hsl(var(--primary));
  background-color: hsl(var(--muted));
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-menu {
  display: none;
  padding-bottom: 1rem;
}

.mobile-menu.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.mobile-menu .nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.mobile-menu .nav-link:hover {
  background-color: hsl(var(--muted));
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 4rem;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../assets/agro-hero.jpg');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsl(var(--secondary) / 0.8), hsl(var(--secondary) / 0.6), hsl(var(--background) / 0.9));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 4xl;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: bounce 2s infinite;
}

.scroll-wheel {
  width: 2rem;
  height: 3rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem;
}

.scroll-dot {
  width: 0.25rem;
  height: 0.75rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 0.125rem;
  animation: pulse 2s infinite;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInUp 0.6s ease;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  max-width: 48rem;
  margin: 0 auto;
}

.section-highlight {
  font-size: 1.125rem;
  color: hsl(var(--primary));
  font-weight: 600;
  margin-top: 1rem;
}

.benefits-section {
  background-color: hsl(var(--muted) / 0.3);
}

.use-cases-section {
  background-color: hsl(var(--muted) / 0.3);
}

/* Tech Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.tech-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.tech-card:hover {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  transform: translateY(-0.25rem);
}

.tech-icon {
  background-color: hsl(var(--primary) / 0.1);
  border-radius: 50%;
  padding: 1rem;
  margin: 0 auto 1rem;
  width: fit-content;
}

.tech-icon svg {
  width: 2rem;
  height: 2rem;
  color: hsl(var(--primary));
}

.tech-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.tech-description {
  color: hsl(var(--muted-foreground));
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.benefit-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.benefit-card:hover {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  transform: translateY(-0.25rem);
}

.benefit-icon {
  background-color: hsl(var(--primary) / 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem;
  width: fit-content;
  margin-bottom: 1rem;
}

.benefit-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--primary));
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.benefit-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* Sensors Grid */
.sensors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.sensor-card {
  background-color: hsl(var(--card));
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.5s ease;
  animation: fadeIn 0.6s ease;
}

.sensor-card.normal {
  border-color: hsl(var(--success));
  background-color: hsl(var(--success) / 0.05);
}

.sensor-card.alert {
  border-color: hsl(var(--danger));
  background-color: hsl(var(--danger) / 0.05);
}

.sensor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sensor-icon {
  background-color: hsl(var(--success) / 0.2);
  border-radius: 50%;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sensor-card.alert .sensor-icon {
  background-color: hsl(var(--danger) / 0.2);
}

.sensor-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--success));
}

.sensor-card.alert .sensor-icon svg {
  color: hsl(var(--danger));
}

.sensor-status {
  animation: pulse 2s infinite;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: hsl(var(--success));
}

.sensor-card.alert .status-dot {
  background-color: hsl(var(--danger));
}

.sensor-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.sensor-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.value-number {
  font-size: 2.25rem;
  font-weight: bold;
  color: hsl(var(--foreground));
}

.value-unit {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.sensor-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.ideal-range {
  color: hsl(var(--muted-foreground));
}

.status-text {
  font-weight: 600;
  color: hsl(var(--success));
}

.sensor-card.alert .status-text {
  color: hsl(var(--danger));
}

.sensors-note {
  text-align: center;
  margin-top: 3rem;
}

.sensors-note p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Use Cases Grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 72rem;
  margin: 0 auto;
}

.use-case-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.use-case-card:hover {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  transform: translateY(-0.5rem);
}

.use-case-icon {
  background-color: hsl(var(--primary));
  border-radius: 50%;
  padding: 1.5rem;
  margin: 0 auto 1rem;
  width: fit-content;
}

.use-case-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: hsl(var(--primary-foreground));
}

.use-case-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.use-case-description {
  color: hsl(var(--muted-foreground));
}

/* Contact Form */
.contact-wrapper {
  max-width: 32rem;
  margin: 0 auto;
}

.contact-form-container {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  animation: fadeIn 0.6s ease;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  background-color: hsl(var(--primary));
  border-radius: 50%;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--primary-foreground));
}

.footer-brand-text {
  font-size: 1.25rem;
  font-weight: bold;
}

.footer-description {
  color: hsl(var(--secondary-foreground) / 0.8);
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: hsl(var(--secondary-foreground) / 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: hsl(var(--secondary-foreground));
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  background-color: hsl(var(--primary) / 0.1);
  border-radius: 50%;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-link:hover {
  background-color: hsl(var(--primary) / 0.2);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid hsl(var(--secondary-foreground) / 0.2);
  padding-top: 2rem;
  text-align: center;
}

.footer-copyright {
  color: hsl(var(--secondary-foreground) / 0.8);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast.success {
  border-color: hsl(var(--success));
  background-color: hsl(var(--success) / 0.05);
}

.toast.error {
  border-color: hsl(var(--danger));
  background-color: hsl(var(--danger) / 0.05);
}

.toast-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.toast-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .desktop-menu {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .hero-title {
    font-size: 3.75rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .hero-buttons {
    flex-direction: row;
  }

  .section-title {
    font-size: 3rem;
  }

  .section-subtitle {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 4rem;
  }

  .section-title {
    font-size: 3.75rem;
  }
}

/* Utility Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-pulse-slow {
  animation: pulse 3s infinite;
}
