:root {
  --bg: #f5fbf4;
  --bg-alt: #ecf7e9;
  --text: #17311a;
  --muted: #4a6651;
  --primary: #2f9f53;
  --primary-dark: #1f7d3f;
  --accent: #9edc56;
  --card: #ffffff;
  --shadow: 0 16px 36px rgba(24, 63, 32, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7fcf6 0%, #eef9eb 100%);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(244, 253, 242, 0.88);
  border-bottom: 1px solid rgba(38, 107, 55, 0.15);
  backdrop-filter: blur(12px);
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.logo i {
  font-size: 1.1rem;
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--primary-dark);
  font-size: 1.3rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hero {
  position: relative;
  padding: 110px 0 95px;
  background:
    radial-gradient(circle at top left, rgba(112, 190, 84, 0.4), transparent 45%),
    radial-gradient(circle at right center, rgba(39, 152, 78, 0.28), transparent 38%),
    linear-gradient(135deg, #e8f9e3 0%, #f4fff1 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(18, 72, 38, 0.04) 20%, transparent 80%);
  pointer-events: none;
}

.hero-content {
  position: relative;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(47, 159, 83, 0.14);
  color: #1f6b33;
  font-size: 0.82rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  line-height: 1.2;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  max-width: 900px;
}

.tagline {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(47, 159, 83, 0.35);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 600;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), #61be61);
  color: #fff;
  box-shadow: 0 12px 24px rgba(34, 126, 61, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: #e6f8e4;
  color: #205e32;
}

.section {
  padding: 74px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  margin: 0 0 22px;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
}

.grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(33, 102, 45, 0.09);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgba(24, 63, 32, 0.16);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.card h4 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
}

.styled-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.styled-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--muted);
}

.styled-list li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--primary);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.9rem;
}

.progress-text {
  margin: 0 0 10px;
  font-weight: 600;
  color: #195d2d;
}

.progress-track {
  width: 100%;
  height: 20px;
  border-radius: 999px;
  background: #d9efd6;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  background: repeating-linear-gradient(
    -45deg,
    #249244 0px,
    #249244 10px,
    #2fb85a 10px,
    #2fb85a 20px
  );
  animation: slide 1.2s linear infinite;
}

@keyframes slide {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}

.small-note {
  margin-top: 10px;
  font-size: 0.88rem;
}

.stack-block {
  margin-bottom: 16px;
}

.stack-block p {
  margin: 6px 0;
}

.workflow-diagram {
  display: grid;
  grid-template-columns: repeat(9, auto);
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 6px;
}

.flow-step {
  min-width: 170px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ebfae4 0%, #f9fff7 100%);
  border: 1px solid rgba(56, 139, 75, 0.2);
  text-align: center;
  color: #235133;
  font-weight: 600;
}

.flow-arrow {
  color: #2a9f4a;
  font-size: 1.1rem;
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px dashed #2f9f53;
  border-radius: 10px;
  color: #226334;
  font-weight: 600;
  cursor: pointer;
}

#leafImageInput {
  display: none;
}

.image-preview-wrap {
  margin-top: 14px;
  min-height: 230px;
  border: 1px dashed rgba(39, 114, 54, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: #f9fff8;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

#imagePreview {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  display: none;
}

#previewPlaceholder {
  color: #4c7957;
  margin: 0;
}

.result-box {
  border-radius: 12px;
  background: linear-gradient(135deg, #eefbe9 0%, #d8f2d8 100%);
  padding: 20px;
  border: 1px solid rgba(39, 123, 56, 0.23);
  margin-top: 10px;
}

.result-box.state-healthy {
  background: linear-gradient(135deg, #edffe9 0%, #d6f6cd 100%);
  border-color: rgba(35, 126, 47, 0.35);
}

.result-box.state-rust {
  background: linear-gradient(135deg, #fff3e4 0%, #ffd9b2 100%);
  border-color: rgba(183, 94, 29, 0.35);
}

.result-box.state-smut {
  background: linear-gradient(135deg, #f2f1f6 0%, #ddd8e7 100%);
  border-color: rgba(75, 70, 95, 0.35);
}

.result-box.state-blight {
  background: linear-gradient(135deg, #ffecec 0%, #ffd0d0 100%);
  border-color: rgba(166, 54, 54, 0.35);
}

.result-label {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #28613a;
}

.result-value {
  margin: 6px 0 0;
  font-size: 1.25rem;
  color: #113d20;
  font-weight: 700;
}

.team-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.team-card {
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f4fff4 100%);
}

.team-card h3 {
  margin-bottom: 8px;
}

.team-card p {
  margin: 0;
  color: #205534;
  font-weight: 600;
}

.site-footer {
  padding: 26px 0;
  text-align: center;
  background: #123b1f;
}

.site-footer p {
  margin: 0;
  color: #c7eecf;
  font-weight: 500;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-diagram {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 4%;
    right: 4%;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    border-radius: 12px;
    background: rgba(244, 253, 242, 0.98);
    border: 1px solid rgba(38, 107, 55, 0.14);
    box-shadow: 0 10px 22px rgba(18, 64, 31, 0.13);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding-top: 94px;
  }
}

@media (max-width: 520px) {
  .four-col {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }
}
