/* --- DESIGN TOKENS & VARIABLES --- */
:root {
  /* Premium Dark Mode Colors */
  --bg-main: #0a0f0d;
  --bg-surface: #111a15;
  --bg-surface-light: rgba(26, 41, 33, 0.7);

  /* Agritech Accents */
  --color-primary: #10b981;
  /* Emerald */
  --color-primary-dark: #059669;
  --color-primary-light: #34d399;

  --color-secondary: #f59e0b;
  /* Sunset orange */

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-main: linear-gradient(135deg, var(--color-primary), #0ea5e9);
  --gradient-text: linear-gradient(to right, #34d399, #facc15);

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* --- RESET & FOUNDATION --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo span {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 5%;
}

/* --- UTILITIES --- */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(10, 15, 13, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-panel {
  background: var(--bg-surface-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-primary-light);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

.section-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--color-primary);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-badge.centered {
  margin: 0 auto 16px auto;
  display: table;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-title.centered {
  text-align: center;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 40px;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes float-reverse {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(15px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: padding 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(10, 15, 13, 0.85);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
}

.logo-icon {
  color: var(--color-primary);
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: float 10s ease-in-out infinite;
}

.gradient-sphere.one {
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
}

.gradient-sphere.two {
  bottom: -20%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
  animation: float-reverse 12s ease-in-out infinite;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.stats {
  display: flex;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.stat-item h4 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  position: relative;
  width: 320px;
  height: 650px;
  border-radius: 40px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1), 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  /* WhatsApp Dark Mode vibe */
}

.chat-header {
  background: #1e293b;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-icon {
  background: var(--color-primary);
  padding: 8px;
  border-radius: 50%;
  color: white;
  width: 36px;
  height: 36px;
}

.chat-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.chat-info .status {
  font-size: 0.75rem;
  color: var(--color-primary-light);
}

.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10h80v80H10z" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></svg>');
}

.bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  max-width: 85%;
  line-height: 1.4;
}

.bubble.user {
  background: #005c4b;
  color: #e9edef;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bubble.bot {
  background: #202c33;
  color: #e9edef;
  align-self: flex-start;
  border-top-left-radius: 4px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #8696a0;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-input {
  background: #202c33;
  margin: 12px;
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 0.85rem;
  color: #8696a0;
}

.floating-card {
  position: absolute;
  padding: 10px 16px;
  background: rgba(17, 26, 21, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.floating-card i {
  width: 18px;
  height: 18px;
}

.top-right {
  top: 100px;
  right: -50px;
  color: #38bdf8;
  animation: float-reverse 5s ease-in-out infinite;
}

.bottom-left {
  bottom: 120px;
  left: -40px;
  color: #facc15;
  animation: float 7s ease-in-out infinite;
}

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
  }

  .hero-subtitle {
    margin: 0 auto 40px auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .stats {
    justify-content: center;
    margin-bottom: 60px;
  }

  .floating-card {
    display: none;
  }
}

/* --- FEATURES SECTION --- */
.features {
  padding: 100px 0;
  position: relative;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  padding: 32px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

.icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover .icon-wrapper {
  transform: scale(1.1);
}

.green-glow {
  color: #10b981;
}

.orange-glow {
  color: #f59e0b;
}

.blue-glow {
  color: #3b82f6;
}

.purple-glow {
  color: #8b5cf6;
}

.feature-card:hover .green-glow {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.feature-card:hover .orange-glow {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.feature-card:hover .blue-glow {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.feature-card:hover .purple-glow {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
}


.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- HOW IT WORKS --- */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-surface);
  position: relative;
}

.how-it-works-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step-item {
  display: flex;
  gap: 20px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.step-details h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.step-details p {
  color: var(--text-secondary);
}

.visual-content {
  position: relative;
}

.video-container {
  padding: 2px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.0));
}

.interactive-demo {
  background: #0f172a;
  border-radius: calc(var(--radius-xl) - 2px);
  height: 450px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.demo-message {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  max-width: 80%;
  opacity: 0;
  transform: translateY(20px);
  animation: bubble-up 0.5s forwards ease-out;
}

.user-msg {
  background: #005c4b;
  color: #e9edef;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot-msg {
  background: #202c33;
  color: #e9edef;
  align-self: flex-start;
  border-top-left-radius: 4px;
}

.interactive-demo .demo-message:nth-child(1) {
  animation-delay: 0.5s;
}

.interactive-demo .demo-message:nth-child(2) {
  animation-delay: 1.5s;
}

.interactive-demo .demo-message:nth-child(3) {
  animation-delay: 3.5s;
}

.interactive-demo .demo-message:nth-child(4) {
  animation-delay: 4.5s;
}

@keyframes bubble-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .how-it-works-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

/* --- CTA SECTION --- */
.cta-section {
  padding: 100px 0;
}

.cta-box {
  text-align: center;
  padding: 60px 40px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, rgba(17, 26, 21, 0.8) 100%);
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-text);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cta-box h2 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.cta-box p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* --- FOOTER --- */
footer {
  background: var(--bg-surface);
  padding: 60px 0 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.text-green {
  color: var(--color-primary);
}

.footer-desc {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- MARKET PRICE WIDGET --- */
.market-widget {
  padding: 40px;
  margin-top: 20px;
}

.market-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-group select,
.input-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.input-group select:focus,
.input-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.1);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  min-height: 200px;
}

.price-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
}

.price-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-5px);
}

.price-card .market-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.price-card .market-name {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
}

.badge-mini {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-card .district-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.price-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.price-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-light);
}

.arrival-date {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.empty-state,
.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
  text-align: center;
}

.loading-state i {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .market-form {
    grid-template-columns: 1fr;
  }
}