:root {
  --forest: #1b5e20;
  --emerald: #2e7d32;
  --olive: #6b8e23;
  --cream: #f7f1e3;
  --beige: #e8dcc4;
  --gray: #5f6f65;
  --gold: #f4c542;
  --orange: #e7a44e;
  --white: #ffffff;
  --text: #16311b;
  --bg: #f7f8f4;
  --card: rgba(255,255,255,0.78);
  --shadow: 0 18px 48px rgba(12, 41, 20, 0.16);
}

body.dark {
  --forest: #3f8f47;
  --emerald: #6ccf74;
  --olive: #8ebd37;
  --cream: #1f2f1f;
  --beige: #2d3f2d;
  --gray: #cfd8cc;
  --gold: #ffd669;
  --orange: #ffb36b;
  --white: #0f1710;
  --text: #eff7ee;
  --bg: #07110a;
  --card: rgba(7, 17, 10, 0.82);
  --shadow: 0 18px 48px rgba(0,0,0,0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--forest), var(--olive));
  color: var(--white);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(27,94,32,0.08);
}

body.dark .site-header {
  background: rgba(7, 17, 10, 0.85);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  isolation: isolate;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
}

.brand-mark svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
  background-color: transparent;
}

@media (max-width: 700px) {
  .brand-logo {
    height: 48px;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text small {
  font-size: 0.76rem;
  color: var(--gray);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links > a,
.dropdown-toggle {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links > a:hover,
.dropdown-toggle:hover,
.nav-links > a.active {
  background: rgba(27,94,32,0.1);
  color: var(--forest);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  min-width: 220px;
  padding: 0.8rem;
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(27,94,32,0.1);
  box-shadow: var(--shadow);
  border-radius: 16px;
  display: grid;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.dropdown-menu a:hover {
  background: rgba(27,94,32,0.1);
}

.theme-toggle,
.menu-toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  font-size: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(27,94,32,0.1);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

.hero-section {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 4rem 1.4rem;
  background: linear-gradient(120deg, rgba(8,34,12,0.76), rgba(28,89,35,0.45)), url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?auto=format&fit=crop&w=1800&q=80') center/cover;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(244,197,66,0.25), transparent 30%);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  color: var(--white);
}

.hero-note {
  margin: 1rem 0 1.8rem;
  padding: 0.95rem 1.25rem;
  display: inline-block;
  border-radius: 999px;
  background: rgba(244,197,66,0.17);
  color: var(--white);
  border: 1px solid rgba(244,197,66,0.35);
  font-weight: 600;
}

.highlight-text {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(36, 100, 42, 0.12);
  border-left: 5px solid var(--gold);
  color: var(--text);
  border-radius: 16px;
}
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.hero h1 {
  max-width: 760px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 700px;
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.9);
}

.typed-text {
  color: var(--gold);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}

.btn-primary {
  background: var(--gold);
  color: #2f2b16;
}

.btn-secondary,
.btn-tertiary,
.btn-dark {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  backdrop-filter: blur(12px);
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 1.4rem;
}

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-heading h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

.about-grid,
.contact-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.3fr 0.9fr;
}

.about-card,
.stats-card,
.resource-card,
.product-card,
.research-card,
.tech-card,
.testimonial-card,
.career-card,
.contact-form,
.contact-details,
.faq-item {
  background: var(--card);
  border: 1px solid rgba(27,94,32,0.1);
  box-shadow: var(--shadow);
  border-radius: 24px;
  backdrop-filter: blur(20px);
}

.large-card {
  padding: 2rem;
}

.large-card h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: var(--forest);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.pill-list span {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(27,94,32,0.1);
  color: var(--forest);
}

.stats-card {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.stat-item {
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(27,94,32,0.08), rgba(244,197,66,0.14));
}

.counter {
  font-size: 2rem;
  color: var(--forest);
}

.search-box,
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(27,94,32,0.08);
  max-width: 420px;
  margin: 1.5rem auto 0;
}

.search-box input,
.newsletter-form input,
.contact-form input,
.contact-form textarea {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font: inherit;
}

.resource-grid,
.product-grid,
.research-grid,
.career-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-card,
.product-card,
.research-card,
.career-card {
  padding: 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card:hover,
.product-card:hover,
.research-card:hover,
.tech-card:hover,
.career-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(12,41,20,0.18);
}

.resource-card i {
  font-size: 1.8rem;
  color: var(--forest);
  margin-bottom: 1rem;
}

.resource-card a,
.product-content a,
.research-card a,
.career-card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--forest);
  font-weight: 600;
}

.filter-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.filter-btn {
  border: 0;
  background: rgba(27,94,32,0.1);
  color: var(--forest);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--forest);
  color: var(--white);
}

.product-card img,
.research-card img,
.gallery-item img {
  height: 220px;
  border-radius: 18px;
  margin-bottom: 1rem;
}

.product-meta,
.rating {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray);
  font-size: 0.95rem;
}

.product-content h3,
.research-card h3,
.career-card h3 {
  margin: 0.6rem 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.tech-card {
  padding: 1.4rem;
  text-align: center;
  font-weight: 700;
  color: var(--forest);
  background: linear-gradient(135deg, rgba(27,94,32,0.08), rgba(244,197,66,0.15));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 24px;
  cursor: pointer;
}

.gallery-item img {
  height: 100%;
  min-height: 240px;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.testimonial-slider {
  padding-bottom: 3rem;
}

.testimonial-card {
  padding: 2rem;
  text-align: center;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.testimonial-card p {
  font-size: 1.08rem;
  margin-bottom: 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-question {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 1rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 1.2rem;
}

.faq-item.active .faq-answer {
  max-height: 140px;
  padding-bottom: 1rem;
}

.contact-form {
  padding: 1.4rem;
  display: grid;
  gap: 0.9rem;
}

.contact-form button,
.newsletter-form button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(135deg, var(--forest), var(--olive));
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.contact-details {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.map-placeholder {
  min-height: 180px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(27,94,32,0.12), rgba(244,197,66,0.2));
  color: var(--forest);
}

.contact-details ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(27,94,32,0.1);
}

.site-footer {
  background: linear-gradient(135deg, rgba(27,94,32,0.96), rgba(13,34,18,0.96));
  color: var(--white);
  padding: 4rem 1.4rem 2rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 1.4rem;
}

.footer-grid h3 {
  margin-bottom: 0.7rem;
}

.footer-grid a {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(255,255,255,0.86);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.16);
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
}

body.is-scrolled .back-to-top {
  display: grid;
  place-items: center;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 980px) {
  .resource-grid,
  .product-grid,
  .research-grid,
  .career-grid,
  .tech-grid,
  .gallery-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: var(--card);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    margin-top: 0.6rem;
  }
  .nav-dropdown.open .dropdown-menu {
    display: grid;
  }
  .resource-grid,
  .product-grid,
  .research-grid,
  .career-grid,
  .tech-grid,
  .gallery-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .stats-card {
    grid-template-columns: 1fr 1fr;
  }
}
