/* Life AgriScience — brand CI from LAS-BG-01 (2024) */

:root {
  /* Primary */
  --halite: #07343a;
  --lantern: #a0cc3a;
  --ice: #ebebe1;
  /* Secondary */
  --domain: #9b9b69;
  --jade: #0f9e9c;
  --pomegranate: #c83b00;

  /* Semantic aliases used across the site */
  --forest: var(--halite);
  --forest-mid: #0a454c;
  --leaf: var(--jade);
  --leaf-bright: var(--lantern);
  --sage: var(--domain);
  --mist: #f3f3ec;
  --paper: var(--ice);
  --ink: var(--halite);
  --ink-soft: #3d5a5e;
  --line: rgba(7, 52, 58, 0.14);
  --white: #ffffff;

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--jade);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--halite);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--halite);
}

.section--forest h1,
.section--forest h2,
.section--forest h3,
.section--forest h4,
.hero h1,
.post-hero h1 {
  color: var(--ice);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  position: relative;
}

.section--mist {
  background: var(--mist);
}

.section--forest {
  background: var(--halite);
  color: var(--ice);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 0.85rem;
}

.section--forest .eyebrow {
  color: var(--lantern);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  max-width: 16ch;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-top: 0.75rem;
}

.section--forest .section-lead {
  color: rgba(235, 235, 225, 0.82);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--lantern);
  color: var(--halite);
}

.btn-primary:hover {
  background: #8fb82f;
  color: var(--halite);
}

.btn-ghost {
  background: transparent;
  color: var(--ice);
  border-color: rgba(235, 235, 225, 0.55);
}

.btn-ghost:hover {
  background: rgba(235, 235, 225, 0.12);
  color: var(--ice);
  border-color: var(--ice);
}

.btn-dark {
  background: var(--halite);
  color: var(--ice);
}

.btn-dark:hover {
  background: var(--forest-mid);
  color: var(--ice);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* Nav */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s;
}

.site-nav.is-scrolled {
  background: rgba(235, 235, 225, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.site-nav__inner {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav__logo img {
  /* Keep descriptor “applied research services” legible (LAS-BG-01) */
  height: 2.75rem;
  width: auto;
}

.site-nav:not(.is-scrolled) .logo--colour {
  display: none;
}

.site-nav.is-scrolled .logo--white {
  display: none;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav__links a {
  color: rgba(235, 235, 225, 0.92);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

.site-nav.is-scrolled .site-nav__links a {
  color: var(--halite);
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
  color: var(--ice);
  background: rgba(160, 204, 58, 0.22);
}

.site-nav.is-scrolled .site-nav__links a:hover,
.site-nav.is-scrolled .site-nav__links a.is-active {
  color: var(--halite);
  background: rgba(160, 204, 58, 0.28);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.site-nav.is-scrolled .nav-toggle span {
  background: var(--halite);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--ice);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 52, 58, 0.5) 0%, rgba(7, 52, 58, 0.28) 40%, rgba(7, 52, 58, 0.88) 100%),
    radial-gradient(ellipse at 70% 20%, rgba(160, 204, 58, 0.18), transparent 55%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 0 4.5rem;
}

.hero__brand {
  /* Full logo lockup including business descriptor */
  width: min(340px, 78vw);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.15s forwards;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  max-width: 16ch;
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.35s forwards;
}

.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 42ch;
  color: rgba(235, 235, 225, 0.9);
  opacity: 0;
  animation: rise 1s var(--ease) 0.5s forwards;
}

.hero .cta-row {
  opacity: 0;
  animation: rise 1s var(--ease) 0.65s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: bob 2.4s ease-in-out infinite;
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 2rem;
  background: rgba(255, 255, 255, 0.5);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 6px);
  }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-visual {
  position: relative;
  min-height: 420px;
}

.about-visual img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  clip-path: polygon(8% 0, 100% 0, 100% 92%, 0 100%);
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: auto -1rem -1rem auto;
  width: 45%;
  height: 35%;
  background: linear-gradient(135deg, var(--lantern), var(--jade));
  z-index: -1;
  opacity: 0.45;
}

.split-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.split-lists h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.check-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lantern);
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat {
  padding: 1.25rem 0;
  border-top: 2px solid var(--lantern);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--halite);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-item {
  padding: 1.75rem 1.5rem;
  border-top: 2px solid var(--lantern);
  background: transparent;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.service-item:hover {
  background: rgba(160, 204, 58, 0.1);
  transform: translateY(-3px);
}

.service-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-item p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-bottom: 1rem;
}

.service-item ul li {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.service-item ul li:last-child {
  border-bottom: 0;
}

.service-item ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--jade);
}

/* Courses */
.courses-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.duration-pill {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--halite);
  background: var(--lantern);
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.25rem;
}

.highlight-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2rem;
}

.highlight-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.highlight-panel li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  padding-left: 1.5rem;
  position: relative;
}

.highlight-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 0.6rem;
  height: 0.6rem;
  border: 1.5px solid var(--lantern);
  border-radius: 50%;
}

.highlight-panel li:last-child {
  border-bottom: 0;
}

/* Lab */
.lab-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.analysis-group {
  border: 1px solid var(--line);
  padding: 1.35rem;
  background: var(--white);
}

.analysis-group h3 {
  font-size: 1.15rem;
  color: var(--halite);
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.analysis-group li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.analysis-group li:last-child {
  border-bottom: 0;
}

.analysis-group li strong {
  font-weight: 600;
  color: var(--ink);
}

.analysis-group li span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease);
}

.news-card:hover {
  transform: translateY(-4px);
  color: inherit;
}

.news-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--mist);
}

.news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.news-card:hover .news-card__img img {
  transform: scale(1.04);
}

.news-card__body {
  padding: 1.15rem 0 0;
}

.news-card__date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 0.45rem;
}

.news-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.news-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.news-card--wide {
  grid-column: span 2;
}

/* Contact */
.contact-block {
  max-width: 40rem;
}

.contact-links {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.contact-link {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 0;
  border-top: 1px solid rgba(235, 235, 225, 0.2);
  text-decoration: none;
  color: var(--ice);
  transition: color 0.2s;
}

.contact-link:last-child {
  border-bottom: 1px solid rgba(235, 235, 225, 0.2);
}

.contact-link:hover {
  color: var(--lantern);
}

.contact-link__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lantern);
}

.contact-link__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.2;
}

.contact-loc {
  color: rgba(235, 235, 225, 0.7);
  font-size: 0.95rem;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 120;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(7, 52, 58, 0.28);
  transition: transform 0.3s var(--ease), background 0.2s;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
  background: #1ebe57;
  color: #fff;
}

.whatsapp-float svg {
  width: 1.7rem;
  height: 1.7rem;
}

/* Footer */
.site-footer {
  background: var(--halite);
  color: rgba(235, 235, 225, 0.75);
  padding: 2.5rem 0;
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer img {
  height: 2rem;
  opacity: 0.9;
}

.site-footer a {
  color: rgba(235, 235, 225, 0.85);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--lantern);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 960px) {
  .about-grid,
  .courses-layout,
  .lab-intro {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-card--wide {
    grid-column: span 1;
  }

  .stat-band {
    grid-template-columns: 1fr;
  }

  .split-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: block;
  }

  .site-nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--halite);
    padding: 1rem;
    gap: 0.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .site-nav.is-open .site-nav__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__links a,
  .site-nav.is-scrolled .site-nav__links a {
    color: var(--ice);
    padding: 0.85rem 1rem;
  }

  .site-nav.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-nav.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .service-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .about-visual,
  .about-visual img {
    min-height: 280px;
  }
}

/* Article / blog posts */
.page-article .site-nav .logo--white {
  display: none;
}

.page-article .site-nav .logo--colour {
  display: block;
}

.post-main {
  padding-bottom: 4rem;
}

.post-hero {
  position: relative;
  min-height: clamp(380px, 52vh, 560px);
  display: grid;
  align-items: end;
  color: var(--ice);
  overflow: hidden;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.post-hero__media,
.post-hero__shade {
  position: absolute;
  inset: 0;
}

.post-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero__shade {
  background: linear-gradient(180deg, rgba(7, 52, 58, 0.4) 0%, rgba(7, 52, 58, 0.85) 100%);
}

.post-hero__content {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 2.5rem) 0 3rem;
}

.post-meta {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
}

.post-hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  max-width: 18ch;
  margin-bottom: 0.85rem;
}

.post-deck {
  max-width: 52ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.post-body {
  max-width: 68ch;
}

.post-body h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.post-body h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.post-body p {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.post-body ul {
  list-style: disc;
}

.post-body ol {
  list-style: decimal;
}

.post-body li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.35rem;
  border-left: 3px solid var(--lantern);
  background: var(--mist);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--halite);
}

.post-body blockquote p {
  margin: 0;
  color: inherit;
}

.post-cta {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background: var(--mist);
  border-top: 2px solid var(--lantern);
}

.post-cta p {
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.post-aside__card {
  position: sticky;
  top: calc(var(--nav-h) + 1.25rem);
  padding: 1.5rem;
  background: var(--mist);
  border-top: 2px solid var(--lantern);
}

.post-aside__card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.post-related {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.post-related li {
  border-bottom: 1px solid var(--line);
}

.post-related a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.post-related a:hover {
  color: var(--jade);
}

.post-related__date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 0.25rem;
}

.post-related__title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 500;
}

.post-missing {
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
}

@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-aside__card {
    position: static;
  }
}
