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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.75rem;
}

html, body {
  overflow-x: clip;
}

::selection {
  background: #2d6a4f;
  color: white;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tracking-hero { letter-spacing: 0.25em; }
.leading-none { line-height: 1; }
.aspect-portrait { aspect-ratio: 4/5; }
.aspect-landscape { aspect-ratio: 4/3; }
.text-xxs { font-size: 0.625rem; }

#topbar {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#topbar.topbar-hidden {
  transform: translateY(-100%);
}

#navbar {
  top: 0;
  background: transparent;
  transition: top 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#navbar.has-topbar {
  top: 2.25rem;
  background: rgba(10, 31, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
  top: 0;
  background: rgba(10, 31, 20, 0.95);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

#navbar.scrolled.has-topbar {
  top: 2.25rem;
}

#navbar .h-18 {
  height: 4.5rem;
}

#navbar.scrolled .nav-logo {
  height: 1.75rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 0.875rem;
  right: 0.875rem;
  height: 1px;
  background: #52b788;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 11rem;
  background: rgba(10, 31, 20, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 0.625rem;
  padding: 0.5rem 0.375rem 0.375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.2rem;
  margin-left: 0.5rem;
  background: #2d6a4f;
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.3s;
}

.nav-link-cta:hover {
  background: #40916c;
  transform: translateY(-1px);
}

.mobile-link {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.75rem;
  color: white;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-link.text-xl {
  font-size: 1.125rem;
  font-family: 'Figtree', system-ui, sans-serif;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-link-cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #2d6a4f;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu {
  z-index: 55;
  background: #112b1c;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6rem 1.5rem 3rem;
}

#mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu.active .mobile-link,
#mobile-menu.active .mobile-link-cta {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.08s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.12s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.16s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.24s; }
#mobile-menu.active .mobile-link:nth-child(6) { transition-delay: 0.28s; }
#mobile-menu.active .mobile-link:nth-child(7) { transition-delay: 0.32s; }
#mobile-menu.active .mobile-link:nth-child(8) { transition-delay: 0.36s; }
#mobile-menu.active .mobile-link-cta { transition-delay: 0.4s; }

.menu-open .menu-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-open .menu-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}

.menu-open .menu-bar:nth-child(3) {
  width: 1.5rem;
  align-self: center;
  margin-right: 0;
  transform: translateY(-4px) rotate(-45deg);
}

#navbar.scrolled .menu-bar {
  background: white;
}

@keyframes scroll-down {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(5px); opacity: 0.2; }
}

.animate-scroll-down {
  animation: scroll-down 2s ease-in-out infinite;
}

.scroll-indicator {
  animation: fade-pulse 3s ease-in-out infinite;
}

@keyframes fade-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.section-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #40916c;
  margin-bottom: 0.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.75rem;
  background: #2d6a4f;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover {
  background: #40916c;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: #1a3a2a;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-submit:hover {
  background: #2d6a4f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.25);
}

.btn-outline-green {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  color: #2d6a4f;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid #2d6a4f;
  border-radius: 9999px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-outline-green:hover {
  background: #2d6a4f;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.2);
}

.svc-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.875rem;
  overflow: hidden;
  background: white;
  border: 1px solid #e8ede9;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-card:hover {
  border-color: #d8f3dc;
  box-shadow: 0 12px 36px rgba(45, 106, 79, 0.08);
  transform: translateY(-4px);
}

.svc-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

.svc-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.svc-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
  color: #2d6a4f;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: color 0.25s;
}

.svc-card:hover .svc-link {
  color: #40916c;
}

@media (min-width: 1024px) {
  .svc-img { height: 200px; }
}

@media (max-width: 639px) {
  .svc-img { height: 200px; }
}

.usp-card {
  padding: 1.75rem 1.25rem;
  background: white;
  border-radius: 0.875rem;
  border: 1px solid #e8ede9;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.usp-card:hover {
  border-color: #d8f3dc;
  box-shadow: 0 8px 30px rgba(45, 106, 79, 0.06);
  transform: translateY(-3px);
}

.usp-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: #eef8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d6a4f;
  transition: all 0.35s;
}

.usp-card:hover .usp-icon {
  background: #2d6a4f;
  color: white;
}

.ref-item {
  border-radius: 0.625rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.ref-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ref-item:hover img {
  transform: scale(1.06);
}

.ref-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 31, 20, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.ref-item:hover .ref-overlay {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 31, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  opacity: 1;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.875rem;
  text-align: center;
  opacity: 0.8;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a3a2a;
  margin-bottom: 0.375rem;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: #f7faf8;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #1a3a2a;
  transition: all 0.3s;
  outline: none;
}

input.form-input,
textarea.form-input {
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus {
  border-color: #40916c;
  background: white;
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.08);
}

select.form-input {
  cursor: pointer;
  padding-right: 2.75rem;
}

.contact-form {
  padding: 2rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

.svc-card-wide {
  height: 240px;
}

.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

.img-lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-lazy.loaded {
  opacity: 1;
}

@media (max-width: 1024px) {
  .contact-form {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .svc-img { height: 200px; }

  .grid > div {
    min-width: 0;
    max-width: 100%;
  }
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: #eef8f0;
  color: #2d6a4f;
  transition: all 0.25s;
}

.social-icon:hover {
  background: #2d6a4f;
  color: white;
  transform: translateY(-2px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #40916c;
  outline-offset: 2px;
}

#contact-form {
  max-width: 100%;
  overflow: hidden;
}

#contact-form .g-recaptcha {
  transform-origin: left center;
  max-width: 100%;
}

@media (max-width: 400px) {
  #contact-form .g-recaptcha {
    transform: scale(0.85);
  }
}

@media (max-width: 340px) {
  #contact-form .g-recaptcha {
    transform: scale(0.75);
  }
}
