/* ==========================================================================
   DEV AGRO FOODS — Design System
   Static site: HTML5 + CSS3 + Bootstrap 5 + jQuery
   ========================================================================== */

:root {
  --green: #5fae31;
  --green-dark: #4d9227;
  --deep-green: #174a2a;
  --forest: #0d2919;
  --soft-green: #eaf5e2;
  --off-white: #fafbf7;
  --white: #ffffff;
  --text: #172019;
  --muted: #66736a;
  --line: #e4e9e0;

  --font-head: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Manrope", "Inter", system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 18px 40px -28px rgba(13, 41, 25, 0.35);
  --shadow-card: 0 24px 48px -32px rgba(13, 41, 25, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.75;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display-brand {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--deep-green);
}

h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); }

p { color: var(--muted); margin-bottom: 1rem; }

a { text-decoration: none; transition: color 0.25s var(--ease); }

img { max-width: 100%; height: auto; }

::selection { background: var(--soft-green); color: var(--deep-green); }

.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section-tight { padding: clamp(3.5rem, 6vw, 6rem) 0; }
.bg-soft { background: var(--off-white); }
.bg-mint { background: var(--soft-green); }
.bg-forest { background: var(--forest); color: rgba(255, 255, 255, 0.78); }
.bg-forest h1, .bg-forest h2, .bg-forest h3 { color: var(--white); }
.bg-forest p { color: rgba(255, 255, 255, 0.72); }

.container-x { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 992px) { .container-x { padding: 0 2.5rem; } }

/* ---------- Typographic helpers ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--green);
  display: inline-block;
}
.bg-forest .eyebrow { color: #a7d98a; }
.bg-forest .eyebrow::before { background: #a7d98a; }

.lead-text { font-size: 1.05rem; max-width: 60ch; }
.text-muted-soft { color: var(--muted); }
.rule {
  width: 56px; height: 2px; background: var(--green);
  border-radius: 2px; margin: 1.5rem 0;
}

/* ---------- Buttons ---------- */
.btn-brand,
.btn-outline-brand,
.btn-ghost-light {
  --bs-btn-focus-box-shadow: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  border-radius: 2px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s var(--ease);
}
.btn-brand { background: var(--green); color: var(--white); }
.btn-brand:hover { background: var(--deep-green); color: var(--white); transform: translateY(-2px); }

.btn-outline-brand { border-color: var(--deep-green); color: var(--deep-green); background: transparent; }
.btn-outline-brand:hover { background: var(--deep-green); color: var(--white); }

.btn-ghost-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn-ghost-light:hover { background: var(--white); color: var(--deep-green); }

.link-arrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--deep-green);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.link-arrow i { transition: transform 0.3s var(--ease); color: var(--green); }
.link-arrow:hover { color: var(--green); }
.link-arrow:hover i { transform: translateX(5px); }

/* ---------- Navbar ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  padding: 1.15rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
  background: transparent;
}
.site-nav .navbar-brand img { height: 42px; width: auto; transition: height 0.4s var(--ease); }
.site-nav.is-overlay .navbar-brand img { filter: brightness(0) invert(1); }

.site-nav .nav-link {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--deep-green);
  padding: 0.5rem 0 !important; margin: 0 1.05rem; position: relative;
}
.site-nav .nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1.5px; width: 0; background: var(--green);
  transition: width 0.3s var(--ease);
}
.site-nav .nav-link:hover::after,
.site-nav .nav-link.active::after { width: 100%; }
.site-nav .nav-link.active { color: var(--green); }

.site-nav.is-overlay { padding: 1.6rem 0; }
.site-nav.is-overlay .nav-link { color: rgba(255, 255, 255, 0.9); }
.site-nav.is-overlay .nav-link.active { color: #b9e39c; }
.site-nav.is-overlay .nav-link.active::after,
.site-nav.is-overlay .nav-link:hover::after { background: #b9e39c; }
.site-nav.is-overlay .btn-brand { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }
.site-nav.is-overlay .btn-brand:hover { background: var(--green); border-color: var(--green); }

.site-nav.is-scrolled {
  background: rgba(250, 251, 247, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(23, 74, 42, 0.08), 0 14px 34px -30px rgba(13, 41, 25, 0.5);
  padding: 0.7rem 0;
}
.site-nav.is-scrolled .navbar-brand img { height: 36px; }

.navbar-toggler { border: 0; padding: 0.35rem; box-shadow: none !important; }
.nav-burger { display: block; width: 26px; height: 2px; background: var(--deep-green); position: relative; }
.nav-burger::before, .nav-burger::after {
  content: ""; position: absolute; left: 0; width: 26px; height: 2px; background: var(--deep-green);
}
.nav-burger::before { top: -8px; }
.nav-burger::after { top: 8px; }
.is-overlay .nav-burger, .is-overlay .nav-burger::before, .is-overlay .nav-burger::after { background: var(--white); }

@media (max-width: 991.98px) {
  .site-nav { background: rgba(250, 251, 247, 0.96); backdrop-filter: blur(12px); padding: 0.75rem 0; }
  .site-nav.is-overlay { background: transparent; }
  .site-nav .navbar-collapse {
    background: var(--white);
    margin-top: 0.9rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: var(--shadow-soft);
  }
  .site-nav.is-overlay .navbar-collapse .nav-link { color: var(--deep-green); }
  .site-nav.is-overlay .navbar-collapse .nav-link.active { color: var(--green); }
  .site-nav .nav-link { margin: 0; padding: 0.7rem 0 !important; border-bottom: 1px solid var(--line); }
  .site-nav .navbar-collapse .btn-brand {
    width: 100%; justify-content: center; margin-top: 1.1rem;
    background: var(--green) !important; border-color: var(--green) !important; color: #fff !important;
  }
}

/* ---------- Hero carousel ---------- */
.hero { position: relative; }
.hero .carousel-item { height: clamp(560px, 92vh, 940px); }
.hero .hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero .hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.hero .carousel-item.active .hero-media img { animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
.hero .hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(13, 41, 25, 0.88) 0%, rgba(13, 41, 25, 0.62) 45%, rgba(13, 41, 25, 0.25) 100%);
}
.hero .hero-inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.hero .hero-copy { max-width: 46rem; color: #fff; padding-top: 4rem; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, 0.82); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 34rem; }
.hero .hero-eyebrow { color: #b9e39c; }
.hero .hero-eyebrow::before { background: #b9e39c; }

.hero .carousel-indicators { margin-bottom: 2.4rem; gap: 0.7rem; }
.hero .carousel-indicators [data-bs-target] {
  width: 34px; height: 3px; border: 0; border-radius: 3px;
  background: rgba(255, 255, 255, 0.35); opacity: 1;
}
.hero .carousel-indicators .active { background: var(--green); width: 56px; }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 7%; opacity: 0.6; }
.hero .carousel-control-prev:hover, .hero .carousel-control-next:hover { opacity: 1; }

/* Page hero (inner pages) */
.page-hero {
  position: relative; padding: clamp(9rem, 16vw, 13rem) 0 clamp(4rem, 8vw, 6.5rem);
  background: var(--forest); overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 15%, rgba(95, 174, 49, 0.28), transparent 55%);
}
.page-hero .page-hero-media { position: absolute; inset: 0; opacity: 0.28; }
.page-hero .page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .container-x { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, 0.76); max-width: 46rem; }
.page-hero .eyebrow { color: #b9e39c; }
.page-hero .eyebrow::before { background: #b9e39c; }

/* ---------- Media frames ---------- */
.frame { position: relative; overflow: hidden; border-radius: 2px; }
.frame img { width: 100%; display: block; transition: transform 0.9s var(--ease); }
.frame:hover img { transform: scale(1.05); }
.frame-accent::after {
  content: ""; position: absolute; left: -14px; bottom: -14px;
  width: 120px; height: 120px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
}

.stat-plate {
  background: var(--white); border: 1px solid var(--line);
  padding: 1.6rem 1.8rem; box-shadow: var(--shadow-soft);
}
.stat-plate .stat-label {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green); font-weight: 700;
}

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.6rem; }
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }

.product-card {
  background: var(--white); border: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100%;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: #cfe0c4; }
.product-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--off-white); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.07); }

.badge-new {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2;
  background: var(--green); color: #fff;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 0.4rem 0.7rem; border-radius: 2px;
}
.product-body { padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.product-cat {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--green); margin-bottom: 0.6rem;
}
.product-card h3 { font-size: 1.28rem; margin-bottom: 0.6rem; }
.product-card p { font-size: 0.93rem; margin-bottom: 1.2rem; }
.product-body .link-arrow { margin-top: auto; background: none; border: 0; padding: 0; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; margin-bottom: 3rem;
}
.filter-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.7rem 1.35rem; border-radius: 2px; transition: all 0.3s var(--ease);
}
.filter-btn:hover { border-color: var(--green); color: var(--deep-green); }
.filter-btn.active { background: var(--deep-green); border-color: var(--deep-green); color: #fff; }

.product-item.is-hidden { display: none; }

/* ---------- Feature / value cards ---------- */
.value-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.5rem; }
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.value-card {
  background: var(--white); border: 1px solid var(--line);
  padding: 2.1rem 1.8rem; height: 100%;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }
.value-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--soft-green); color: var(--deep-green);
  font-size: 1.25rem; margin-bottom: 1.35rem; border-radius: 2px;
}
.value-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.value-card p { font-size: 0.93rem; margin-bottom: 0; }

.bg-forest .value-card {
  background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.14);
}
.bg-forest .value-icon { background: rgba(95, 174, 49, 0.22); color: #c6e8ac; }

/* ---------- Process ---------- */
.process-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(1, minmax(0, 1fr)); position: relative; }
@media (min-width: 768px) { .process-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; } }

.process-step { position: relative; padding: 1.8rem 1.4rem; background: var(--white); border: 1px solid var(--line); }
.process-step .step-num {
  font-family: var(--font-head); font-size: 2.3rem; color: var(--green);
  line-height: 1; display: block; margin-bottom: 0.8rem;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.process-step p { font-size: 0.86rem; margin-bottom: 0; }
@media (min-width: 768px) {
  .process-step::after {
    content: ""; position: absolute; top: 50%; right: -1rem; width: 1rem; height: 1px;
    background: #cfe0c4;
  }
  .process-step:last-child::after { display: none; }
}

/* ---------- Applications ---------- */
.app-tile {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  background: var(--white); padding: 1.9rem 1.6rem; height: 100%;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.app-tile i { font-size: 1.6rem; color: var(--green); display: block; margin-bottom: 1rem; transition: color 0.35s var(--ease); }
.app-tile h3 { font-size: 1.1rem; margin-bottom: 0.4rem; transition: color 0.35s var(--ease); }
.app-tile p { font-size: 0.88rem; margin-bottom: 0; transition: color 0.35s var(--ease); }
.app-tile:hover { background: var(--deep-green); transform: translateY(-4px); }
.app-tile:hover h3 { color: #fff; }
.app-tile:hover p { color: rgba(255, 255, 255, 0.72); }
.app-tile:hover i { color: #b9e39c; }

/* ---------- Trust band ---------- */
.trust-band { position: relative; overflow: hidden; }
.trust-band .trust-media { position: absolute; inset: 0; }
.trust-band .trust-media img { width: 100%; height: 100%; object-fit: cover; }
.trust-band .trust-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13, 41, 25, 0.93) 0%, rgba(13, 41, 25, 0.72) 55%, rgba(13, 41, 25, 0.35) 100%);
}
.trust-band .container-x { position: relative; z-index: 2; }

/* ---------- Contact ---------- */
.contact-card {
  border: 1px solid var(--line); background: var(--white);
  padding: 2rem 1.9rem; height: 100%;
}
.contact-card .value-icon { margin-bottom: 1.1rem; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.contact-card a { color: var(--deep-green); font-weight: 600; }
.contact-card a:hover { color: var(--green); }
.demo-note {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--green); background: var(--soft-green);
  padding: 0.35rem 0.7rem; border-radius: 2px;
}

/* ---------- CTA ---------- */
.cta-band { position: relative; background: var(--deep-green); overflow: hidden; }
.cta-band::before,
.cta-band::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 174, 49, 0.35), transparent 70%);
}
.cta-band::before { width: 420px; height: 420px; top: -180px; right: -120px; }
.cta-band::after { width: 320px; height: 320px; bottom: -160px; left: -90px; }
.cta-band .container-x { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.76); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: rgba(255, 255, 255, 0.62); padding: clamp(3.5rem, 6vw, 5.5rem) 0 0; position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--deep-green));
}
.site-footer img.footer-logo { height: 46px; filter: brightness(0) invert(1); margin-bottom: 1.4rem; }
.site-footer h4 {
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase; color: #fff; margin-bottom: 1.2rem;
}
.site-footer p { color: rgba(255, 255, 255, 0.6); font-size: 0.93rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.65rem; }
.site-footer a { color: rgba(255, 255, 255, 0.62); font-size: 0.93rem; }
.site-footer a:hover { color: #b9e39c; }
.footer-bottom {
  margin-top: 3rem; padding: 1.4rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem; color: rgba(255, 255, 255, 0.45);
}
.footer-leaf { color: rgba(95, 174, 49, 0.45); font-size: 1.4rem; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 2px; overflow: hidden; }
.modal-product-media { background: var(--off-white); min-height: 260px; }
.modal-product-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-product-body { padding: 2.2rem; }
@media (min-width: 992px) { .modal-product-body { padding: 2.8rem; } }
.modal .btn-close { position: absolute; top: 1rem; right: 1rem; z-index: 5; background-color: #fff; opacity: 0.9; padding: 0.7rem; border-radius: 50%; }
.modal-app-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.modal-app-list li {
  font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  color: var(--deep-green); background: var(--soft-green); padding: 0.45rem 0.8rem; border-radius: 2px;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero .carousel-item.active .hero-media img { animation: none; transform: scale(1); }
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
  body { font-size: 0.97rem; }
  .btn-brand, .btn-outline-brand, .btn-ghost-light { width: 100%; justify-content: center; }
  .hero .hero-copy { padding-top: 2.5rem; }
  .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }
  .product-body { padding: 1.25rem; }
  .value-card, .app-tile { padding: 1.6rem 1.35rem; }
}
