@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,700;1,9..144,900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --primary: hsl(150, 78%, 40%);
  --primary-hover: hsl(150, 78%, 35%);
  --primary-glow: hsla(150, 78%, 40%, 0.3);
  --primary-soft: hsla(150, 78%, 40%, 0.08);
  --secondary: hsl(35, 92%, 55%);
  --secondary-hover: hsl(35, 92%, 50%);
  --background: hsl(210, 20%, 98%);
  --surface: hsl(0, 0%, 100%);
  --surface-hover: hsl(210, 20%, 96%);
  --text-main: hsl(222, 47%, 11%);
  --text-muted: hsl(215, 16%, 47%);
  --border: hsl(214, 32%, 91%);
  --danger: hsl(348, 83%, 47%);
  --success: hsl(150, 78%, 40%);
  --warning: hsl(35, 92%, 55%);
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-ui: 'Space Grotesk', sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --background: hsl(222, 47%, 8%);
  --surface: hsl(217, 33%, 14%);
  --surface-hover: hsl(217, 33%, 20%);
  --text-main: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --border: hsl(217, 33%, 22%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-full);
  font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
  opacity: 0; transition: opacity var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.btn-secondary-solid { background: var(--secondary); color: #fff; box-shadow: var(--shadow-md); }
.btn-secondary-solid:hover { background: var(--secondary-hover); transform: translateY(-2px); }
.btn-ghost { border: 2px solid var(--border); color: var(--text-main); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-outline-dark { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 72px;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent; transition: all var(--transition);
}
[data-theme='dark'] .navbar { background: rgba(15,23,42,0.8); }
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-container {
  max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--text-main); text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo i { color: var(--primary); font-size: 1.75rem; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--text-muted); font-weight: 500; font-size: 0.95rem;
  text-decoration: none; transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--primary); border-radius: 2px; transition: width var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-theme {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-theme:hover { color: var(--primary); border-color: var(--primary); }
.nav-toggle { display: none; font-size: 1.5rem; color: var(--text-main); background: none; border: none; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; position: relative; padding: 6rem 1.5rem 3rem; overflow: hidden;
}
.hero-bg-shapes { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4;
  animation: floatShape 20s ease-in-out infinite;
}
.shape-1 { width: 600px; height: 600px; background: var(--primary-glow); top: -200px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: hsla(35,92%,55%,0.2); bottom: -100px; left: -100px; animation-delay: -7s; }
.shape-3 { width: 300px; height: 300px; background: hsla(210,90%,55%,0.15); top: 50%; left: 50%; animation-delay: -14s; }
@keyframes floatShape { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-20px) scale(1.1); } }

.hero-container {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-content { display: flex; flex-direction: column; gap: 1.5rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content;
  padding: 0.5rem 1rem; border-radius: var(--radius-full);
  background: var(--primary-soft); border: 1px solid var(--primary-glow);
  color: var(--primary); font-size: 0.875rem; font-weight: 600;
  font-family: var(--font-ui);
}
.hero-title {
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.03em; line-height: 1.05;
  text-shadow: 0 2px 8px rgba(34,100,50,0.08);
}
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 520px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; align-items: center; gap: 1.5rem; margin-top: 1rem;
  padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: fit-content;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.5rem; font-family: var(--font-heading); }
.hero-stat span { font-size: 0.8rem; color: var(--text-muted); }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero Visual */
.hero-visual { position: relative; }
.hero-image-wrapper { position: relative; }
.hero-img {
  width: 100%; border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl); transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1);
}
.hero-image-wrapper:hover .hero-img { transform: scale(1.02) rotateY(-3deg); }
.hero-float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); z-index: 5;
}
.hero-float-card strong { display: block; font-size: 0.8rem; line-height: 1.2; }
.hero-float-card span { font-size: 0.7rem; }
.float-card-icon {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.float-card-1 { top: 8%; right: -15px; animation: floatUp 5s ease-in-out infinite; }
.float-card-2 { bottom: 15%; left: -25px; animation: floatDown 6s ease-in-out infinite; }
.float-card-3 { top: 55%; right: -30px; animation: floatUp 7s ease-in-out infinite 1s; }
@keyframes floatUp { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatDown { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

.hero-scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-size: 1.5rem; color: var(--text-muted); animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }

/* ===== TRUSTED ===== */
.trusted-section { padding: 3rem 0; border-bottom: 1px solid var(--border); }
.trusted-label { text-align: center; color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; }
.trusted-logos { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; align-items: center; }
.trusted-logo {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-family: var(--font-ui); font-weight: 600;
  font-size: 1rem; opacity: 0.6; transition: opacity var(--transition);
}
.trusted-logo:hover { opacity: 1; }
.trusted-logo i { font-size: 1.5rem; }

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-badge {
  display: inline-block; padding: 0.4rem 1rem; border-radius: var(--radius-full);
  background: var(--primary-soft); color: var(--primary);
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  font-family: var(--font-ui); margin-bottom: 1rem;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ===== FEATURES ===== */
.features-section { padding: 6rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 2.5rem 2rem; transition: all var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent, var(--primary)), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: transparent; }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent, var(--primary)) 12%, transparent);
  color: var(--accent, var(--primary));
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* ===== HOW IT WORKS ===== */
.how-section { padding: 6rem 0; background: var(--surface); }
.steps-grid { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.step-card {
  flex: 1; max-width: 340px; background: var(--background); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2.5rem 2rem; text-align: center;
  position: relative; transition: all var(--transition);
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.step-number {
  font-family: var(--font-heading); font-size: 4rem; font-weight: 900;
  background: linear-gradient(135deg, var(--primary-glow), transparent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1; margin-bottom: 1rem;
}
.step-icon {
  width: 64px; height: 64px; border-radius: var(--radius-full);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
  margin: 0 auto 1.5rem;
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.step-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.step-connector { color: var(--primary); font-size: 1.5rem; opacity: 0.5; }

/* ===== STATS ===== */
.stats-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, hsl(150,78%,35%) 0%, hsl(150,78%,28%) 50%, hsl(160,65%,25%) 100%);
  color: #fff;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-item { padding: 1.5rem; }
.stat-number { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 900; margin-bottom: 0.5rem; }
.stat-label { font-size: 1rem; opacity: 0.85; font-weight: 500; }

/* ===== PORTALS ===== */
.portals-section { padding: 6rem 0; }
.portals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.portal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 2.5rem 2rem; transition: all var(--transition); display: flex; flex-direction: column;
}
.portal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.portal-icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem;
}
.portal-farmer .portal-icon { background: hsla(150,78%,40%,0.12); color: hsl(150,78%,40%); }
.portal-admin .portal-icon { background: hsla(35,92%,55%,0.12); color: hsl(35,92%,55%); }
.portal-buyer .portal-icon { background: hsla(210,90%,55%,0.12); color: hsl(210,90%,55%); }
.portal-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.portal-card > p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.portal-features {
  list-style: none; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1;
}
.portal-features li {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted);
}
.portal-features li i { color: var(--primary); font-size: 1rem; }
.portal-card .btn { width: 100%; justify-content: center; }

/* ===== TESTIMONIALS ===== */
.testimonials-section { padding: 6rem 0; background: var(--surface); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.testimonial-card {
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 2rem; transition: all var(--transition);
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testimonial-stars { color: hsl(45, 100%, 50%); margin-bottom: 1rem; display: flex; gap: 0.25rem; font-size: 1.1rem; }
.testimonial-card > p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--primary-glow); color: var(--primary); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 0.95rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--text-muted); }

/* ===== CTA ===== */
.cta-section { padding: 6rem 0; }
.cta-card {
  background: linear-gradient(135deg, hsl(150,78%,38%), hsl(160,65%,30%));
  border-radius: var(--radius-2xl); padding: 5rem 3rem; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  animation: spinSlow 40s linear infinite;
}
@keyframes spinSlow { 100% { transform: rotate(360deg); } }
.cta-card h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; position: relative; }
.cta-card .gradient-text { -webkit-text-fill-color: hsl(45,100%,80%); }
.cta-card p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; position: relative; }
.cta-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }
.cta-actions .btn-primary { background: #fff; color: hsl(150,78%,35%); }
.cta-actions .btn-primary:hover { box-shadow: 0 0 30px rgba(255,255,255,0.3); }
.cta-actions .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.cta-actions .btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ===== FOOTER ===== */
.footer { padding: 4rem 0 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-logo {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
}
.footer-logo i { color: var(--primary); }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: 0.75rem; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--surface-hover); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: all var(--transition); text-decoration: none;
}
.footer-socials a:hover { background: var(--primary); color: #fff; }
.footer-links h4 { font-size: 1rem; margin-bottom: 1rem; font-family: var(--font-ui); }
.footer-links a {
  display: block; color: var(--text-muted); font-size: 0.9rem;
  text-decoration: none; margin-bottom: 0.75rem; transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center; padding-top: 2rem; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.875rem;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.16,1,0.3,1); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .hero-content { align-items: center; }
  .hero-subtitle { margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { margin: 0 auto; }
  .features-grid, .portals-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .features-grid, .portals-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; }
  .step-connector { transform: rotate(90deg); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-float-card { display: none; }
  .cta-card { padding: 3rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
