/* ============================================
   KD Rochester Landscapers — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #4A8B3F;
  color: #FEFDF9;
}

/* --- Geometric Background Shapes --- */
.geo-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.geo-circle--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 139, 63, 0.08) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  animation: float-slow 20s ease-in-out infinite;
}

.geo-circle--2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(232, 168, 56, 0.1) 0%, transparent 70%);
  bottom: 10%;
  left: -80px;
  animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-circle--3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(45, 90, 39, 0.12) 0%, transparent 70%);
  top: 40%;
  right: 5%;
  animation: float-slow 12s ease-in-out infinite;
}

.geo-rect {
  position: absolute;
  pointer-events: none;
}

.geo-rect--1 {
  width: 120px;
  height: 120px;
  background: rgba(74, 139, 63, 0.06);
  border-radius: 24px;
  top: 20%;
  left: 5%;
  transform: rotate(45deg);
  animation: spin-slow 25s linear infinite;
}

.geo-rect--2 {
  width: 80px;
  height: 80px;
  background: rgba(232, 168, 56, 0.08);
  border-radius: 16px;
  bottom: 25%;
  right: 10%;
  transform: rotate(20deg);
  animation: spin-slow 20s linear infinite reverse;
}

.geo-triangle {
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  border-style: solid;
}

.geo-triangle--1 {
  border-width: 0 50px 86px 50px;
  border-color: transparent transparent rgba(74, 139, 63, 0.07) transparent;
  top: 60%;
  left: 15%;
  animation: float-slow 18s ease-in-out infinite;
}

.geo-dots {
  position: absolute;
  top: 15%;
  right: 25%;
  width: 100px;
  height: 100px;
  background-image: radial-gradient(circle, rgba(74, 139, 63, 0.15) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

/* --- Animations --- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(2deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 5s ease-in-out infinite 1s;
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out forwards;
  opacity: 0;
}

.animate-slide-up-delay {
  animation: slide-up 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: slide-up 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Navigation --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(254, 253, 249, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(45, 90, 39, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4A8B3F;
  transition: width 0.3s ease;
}

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

/* --- Mobile Menu --- */
.menu-line {
  display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

#mobileMenu.open {
  transform: translateX(0);
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Service Cards --- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

/* --- Gallery --- */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 90, 39, 0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 80px;
  font-weight: 900;
  color: rgba(74, 139, 63, 0.07);
  line-height: 1;
  pointer-events: none;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
  border-color: #4A8B3F !important;
  box-shadow: 0 0 0 3px rgba(74, 139, 63, 0.1);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FDF9F0;
}

::-webkit-scrollbar-thumb {
  background: #b9d0ab;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4A8B3F;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .geo-circle--1 {
    width: 300px;
    height: 300px;
    right: -100px;
  }

  .geo-circle--2 {
    width: 150px;
    height: 150px;
  }

  .geo-rect--1 {
    width: 60px;
    height: 60px;
  }

  .geo-rect--2 {
    width: 40px;
    height: 40px;
  }

  .geo-triangle--1 {
    border-width: 0 30px 52px 30px;
  }

  .geo-dots {
    display: none;
  }

  .floating-card {
    display: none;
  }
}

@media (max-width: 480px) {
  #hero h1 {
    font-size: 2.5rem;
  }

  .section-pad {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
