/* ----------------------------------------
   CSS Custom Properties (matched to maatautomation.nl)
---------------------------------------- */
:root {
  --primary: #035833;
  --secondary: #112d12;
  --accent: #e69f4e;
  --bg: #fefbf6;
  --bg-alt: #f8f6f1;
  --primary-bg: #152c15;
  --text: #112d12;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ----------------------------------------
   CSS Reset
---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* ----------------------------------------
   Base Styles
---------------------------------------- */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

img {
  max-width: 100%;
}

/* ----------------------------------------
   Navigation
---------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1000;
  background: rgba(254, 251, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

#navbar.scrolled {
  border-bottom-color: rgba(17, 45, 18, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.6rem;
}

.nav-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.nav-logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-links a:hover {
  color: var(--primary);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 88, 51, 0.25);
  color: var(--white) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#navbar.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#navbar.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

#navbar.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: rgba(254, 251, 246, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17, 45, 18, 0.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#navbar.nav-open .nav-mobile {
  max-height: 320px;
}

.nav-mobile-links {
  list-style: none;
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-mobile-links a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(17, 45, 18, 0.06);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.nav-mobile-links a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.nav-mobile-links .nav-cta-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 0.5rem;
  border: none;
  text-align: center;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-mobile {
    display: block;
  }
}

/* ----------------------------------------
   Hero Section
---------------------------------------- */
#hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-headline-accent {
  color: var(--accent);
}

.hero-subtext {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: rgba(17, 45, 18, 0.7);
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 2rem;
  background: var(--primary);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(3, 88, 51, 0.3);
}

/* ----------------------------------------
   Animation Classes
---------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------
   Services Section
---------------------------------------- */
#services {
  background: var(--primary-bg);
  padding: 5rem 0;
}

.section-label-lined {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.section-label-lined::before,
.section-label-lined::after {
  content: '';
  height: 1px;
  width: 48px;
  background: rgba(230, 159, 78, 0.4);
}

.section-label-lined span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-heading-light {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: rgba(17, 45, 18, 0.08);
  color: var(--primary);
}

.service-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #112d12;
  margin-bottom: 0.6rem;
}

.service-card-desc {
  font-size: 0.95rem;
  color: rgba(17, 45, 18, 0.72);
  line-height: 1.55;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.service-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(17, 45, 18, 0.2);
  color: #112d12;
  background: transparent;
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------
   Contact Section
---------------------------------------- */
#contact {
  background: var(--bg);
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-headline {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-subtext {
  color: rgba(17, 45, 18, 0.65);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email svg {
  flex-shrink: 0;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0ddd6;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.form-submit:hover {
  background: #024528;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-headline {
    font-size: 1.6rem;
  }
}

/* ----------------------------------------
   Footer
---------------------------------------- */
#footer {
  background: var(--primary-bg);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.6rem;
}

.footer-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.footer-logo-text span {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
}

.footer-copyright {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* ----------------------------------------
   Prefers Reduced Motion
---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

/* ----------------------------------------
   Global Polish
---------------------------------------- */
button,
.hero-cta,
.nav-cta,
.nav-cta-mobile {
  cursor: pointer;
}
