/* Morvexilon - Custom Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
}

/* Base typography */
body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3f8450;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #3f8450;
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Mobile menu animation */
#mobile-menu .absolute.right-0 {
  transition: transform 0.3s ease-out;
}

#mobile-menu.menu-entering .absolute.right-0 {
  transform: translateX(100%);
}

#mobile-menu.menu-visible .absolute.right-0 {
  transform: translateX(0);
}

/* Hero section gradient overlay */
.hero-gradient {
  background: linear-gradient(135deg, #1b3824 0%, #265533 40%, #20442b 100%);
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
}

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

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

::-webkit-scrollbar-thumb {
  background: #cdb58e;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b08550;
}

/* Form input transitions */
input,
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Button active states */
button:active,
a.btn:active {
  transform: scale(0.98);
}

/* Calculator result bar animation */
#result-bar-fill {
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Image placeholder styling when src is empty */
img[src=""] {
  background: linear-gradient(135deg, #bbd9c0 0%, #e0d1b8 50%, #8fbf98 100%);
  min-height: 180px;
  display: block;
}

/* Newsletter form success state */
#newsletter-form.submitted input {
  opacity: 0.5;
  pointer-events: none;
}

#newsletter-form.submitted button {
  opacity: 0.5;
  pointer-events: none;
}

/* Cookie consent slide-in */
#cookie-consent {
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Sticky header shadow on scroll */
header.scrolled {
  box-shadow: 0 4px 20px rgba(89, 59, 44, 0.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .font-serif.text-4xl {
    font-size: 2rem;
  }
  
  .font-serif.text-5xl {
    font-size: 2.25rem;
  }
  
  .font-serif.text-6xl {
    font-size: 2.5rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu,
  .newsletter-section {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* Animations for sections on scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Selection color */
::selection {
  background-color: #bbd9c0;
  color: #1b3824;
}

/* Ensure proper image aspect ratios */
img {
  max-width: 100%;
  height: auto;
}

/* Loading state for calculator */
.calc-loading {
  position: relative;
  pointer-events: none;
}

.calc-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
}

/* Infographic timeline connector lines */
@media (min-width: 1024px) {
  .timeline-connector {
    position: relative;
  }
  
  .timeline-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: #bbd9c0;
  }
  
  .timeline-connector:last-child::after {
    display: none;
  }
}

/* Testimonial card quote styling */
.testimonial-quote::before {
  content: '"';
  font-family: Georgia, serif;
  font-size: 4rem;
  color: #bbd9c0;
  position: absolute;
  top: -0.5rem;
  left: 0;
  line-height: 1;
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #3f8450, #60a06d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Footer link underline animation */
footer nav a {
  position: relative;
}

footer nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #60a06d;
  transition: width 0.3s ease;
}

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