/* Reset & base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #222222;
  background: #ffffff;
  line-height: 1.6;
}

/* Centered content column */
header,
main,
footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav — sticky with a soft frosted-glass effect */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Added by JS once the page scrolls, so the header only gains depth when there's
   actually content behind it to separate from. */
header.scrolled {
  border-color: #eeeeee;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eaf4ea;
}

nav a {
  position: relative;
  margin-left: 24px;
  text-decoration: none;
  color: #222222;
  font-size: 15px;
}

/* Contact is the primary call-to-action in the nav, so it gets a filled pill instead of a plain link */
.nav-cta {
  padding: 8px 18px;
  color: #ffffff !important;
  background: #2e7d32;
  border-radius: 100px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-cta:hover {
  background: #245f28;
  transform: translateY(-2px);
}

.nav-cta::after {
  display: none;
}

/* Hamburger button — hidden on desktop, shown only on narrow screens (see bottom of file) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #222222;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Turn the three bars into an X when the menu is open */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Animated underline that grows in on hover */
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #2e7d32;
  transition: width 0.2s ease;
}

nav a:hover {
  color: #2e7d32;
}

nav a:hover::after {
  width: 100%;
}

/* Sections */
section {
  padding: 72px 0;
  /* Leaves room above the section when jumping to it via a nav link, so it
     doesn't land hidden underneath the sticky header. */
  scroll-margin-top: 90px;
}

/* Scroll reveal — fades and slides each section into place as it enters the
   viewport (JS adds "visible" once IntersectionObserver detects it). */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

#services,
#tools,
#contact {
  border-top: 1px solid #f0f0f0;
}

h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px 0;
}

h2 {
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  margin: 0 0 24px 0;
}

.section-eyebrow {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #2e7d32;
  margin-bottom: 10px;
}

/* Hero — photo panel with a white fade so the text stays readable */
#home {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 64px 48px;
  margin-top: 32px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.85) 40%, rgba(255, 255, 255, 0.25) 75%), url("hero-bg.jpg");
  background-size: cover;
  background-position: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2e7d32;
  background: #eaf4ea;
  border-radius: 100px;
}

#home p {
  font-size: 18px;
  color: #555555;
  max-width: 500px;
}

/* Links */
a {
  color: #2e7d32;
}

a:hover {
  text-decoration: none;
}

#home a {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  border: 1px solid #2e7d32;
  border-radius: 4px;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#home a:hover {
  background: #2e7d32;
  color: #ffffff;
  transform: translateY(-2px);
}

/* About — boxed panel for visual rhythm */
#about {
  background: #f7f9f7;
  border-radius: 16px;
  padding: 48px;
  margin: 0 0 8px 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 32px;
  border-left: 1px solid #e2e6e2;
}

.stat strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1.2;
}

.stat span {
  font-size: 13px;
  color: #777777;
}

.about-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e2e6e2;
}

.about-badge img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.about-badge strong {
  display: block;
  font-size: 14px;
  color: #222222;
}

.about-badge span {
  font-size: 13px;
  color: #777777;
}

/* Services — card grid */
#services ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#services li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#services li:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #dfece0;
}

#services li::before {
  content: "✓";
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  font-size: 12px;
  color: #ffffff;
  background: #2e7d32;
  border-radius: 50%;
}

.service-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.service-text p {
  margin: 0;
  font-size: 13.5px;
  color: #777777;
  line-height: 1.5;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

/* Reveal the description on hover (desktop) or when tapped (.open, added by JS for touch) */
#services li:hover .service-text p,
#services li.open .service-text p {
  max-height: 100px;
  opacity: 1;
  margin-top: 6px;
}

/* Tools & Platforms */
.tools-intro {
  color: #777777;
  font-size: 14px;
  margin: -8px 0 20px 0;
}

/* Fade the edges so the scrolling logos appear/disappear smoothly instead of cutting off */
.tools-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tools-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  animation: scroll-tools 40s linear infinite;
}

/* Pause the animation so visitors can read a name while hovering */
.tools-marquee:hover .tools-track {
  animation-play-state: paused;
}

@keyframes scroll-tools {
  from {
    transform: translateX(0);
  }
  to {
    /* -50% because the list is duplicated once, so this is exactly one full loop */
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tools-track {
    animation: none;
  }
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: #444444;
  background: #f5f5f5;
  border: 1px solid #eeeeee;
  border-radius: 100px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: #dddddd;
}

.tool-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 4px;
}

/* Shown instead of a logo when none is available, so every tag has a consistent icon slot */
.tool-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  background: #a8b5a9;
  border-radius: 50%;
}

/* Contact — two columns, each its own panel to match the boxed style used elsewhere on the site */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.contact-info {
  background: #f7f9f7;
  border-radius: 16px;
  padding: 40px;
}

.contact-form {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 16px;
  padding: 40px;
}

.contact-blurb {
  color: #555555;
  font-size: 15px;
  margin: 0 0 24px 0;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  text-decoration: none;
  color: #222222;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #dfece0;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: #ffffff;
  background: #2e7d32;
  border-radius: 50%;
}

.contact-icon svg {
  width: 17px;
  height: 17px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.contact-text strong {
  font-size: 13px;
  color: #999999;
  font-weight: 500;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  display: block;
  font-size: 13px;
  color: #555555;
  font-weight: 500;
  margin-bottom: 16px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: #222222;
  border: 1px solid #dddddd;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2e7d32;
}

.contact-form button {
  align-self: flex-start;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 15px;
  color: #ffffff;
  background: #2e7d32;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  background: #245f28;
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.form-status {
  min-height: 20px;
  margin: 12px 0 0 0;
  font-size: 13.5px;
}

.form-status.success {
  color: #2e7d32;
}

.form-status.error {
  color: #c0392b;
}

/* Footer */
footer {
  padding: 32px 24px;
  color: #999999;
  font-size: 13px;
  text-align: center;
}

/* Responsive overrides — kept at the end of the file so they reliably win over
   the earlier rules they're adjusting (same-specificity CSS rules are decided
   by source order, not by whether they're inside a @media block). */
@media (min-width: 900px) {
  #services ul {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Stack the contact info/form side by side only once there's enough room to breathe */
@media (max-width: 700px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-stats {
    padding-left: 0;
    padding-top: 24px;
    border-left: none;
    border-top: 1px solid #e2e6e2;
  }
}

@media (max-width: 600px) {
  #home {
    padding: 40px 24px;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.9) 55%, rgba(255, 255, 255, 0.4) 100%), url("hero-bg.jpg");
  }

  #home p {
    max-width: 100%;
  }

  #services ul {
    grid-template-columns: 1fr;
  }

  .brand p {
    white-space: nowrap;
    font-size: 15px;
  }

  .nav-toggle {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 8px 24px 20px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
  }

  nav.open {
    display: flex;
  }

  nav a {
    margin-left: 0;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
  }

  /* In the stacked mobile menu, the CTA becomes a full-width button instead of an inline pill */
  .nav-cta {
    display: block;
    margin-top: 12px;
    padding: 12px 0;
    text-align: center;
    border-bottom: none;
  }
}
