/* Custom styles extending Tailwind */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

body.menu-open {
  overflow: hidden;
}

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

/* Form input states */
input.error,
textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

input.success,
textarea.success {
  border-color: #5e6b4f;
  box-shadow: 0 0 0 2px rgba(94, 107, 79, 0.15);
}

/* Smooth transitions for mobile menu */
#mobile-menu {
  transition: opacity 0.3s ease;
}

#mobile-menu.hidden {
  opacity: 0;
  pointer-events: none;
}

#mobile-menu:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

/* Hero SVG animation */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-float {
  animation: floatSlow 6s ease-in-out infinite;
}

/* Card hover lift */
.group:hover {
  transform: translateY(-2px);
}

/* Selection colors */
::selection {
  background-color: rgba(94, 107, 79, 0.2);
  color: #343b2f;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

/* Cookie consent entrance */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#cookie-consent:not(.hidden) {
  animation: slideInRight 0.4s ease-out;
}

/* FAQ accordion styles */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
    color: #000;
  }
}

/* Ensure minimum contrast ratios */
.text-gray-400 {
  color: #8b95a3;
}

/* Responsive typography refinements */
@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* Loading state for forms */
button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Prose content styling */
.prose p + p {
  margin-top: 1.25rem;
}

.prose em {
  font-style: italic;
  color: #4a5540;
}

/* Subtle border animation on cards */
.group {
  transition: all 0.3s ease;
}

/* Blockquote / disclaimer styling */
blockquote,
.disclaimer-block {
  border-left: 4px solid #b3bda3;
  padding-left: 1rem;
  font-style: italic;
  color: #4b5563;
}
