/* Main CSS - Maple Knowledge */

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

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

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background-color: #fbbf24;
  color: #292524;
}

/* Base typography */
body {
  font-size: 16px;
  line-height: 1.7;
}

/* Headings serif enhancement */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea {
  transition: all 0.2s ease;
}

/* Form input focus transitions */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Input validation states */
input.is-error,
textarea.is-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input.is-success,
textarea.is-success {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Mobile menu transitions */
#mobile-menu {
  transition: visibility 0.3s;
}

#mobile-menu.is-active {
  display: flex;
}

#mobile-menu .absolute.inset-y-0 {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.is-active .absolute.inset-y-0 {
  transform: translateX(0);
}

#menu-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-menu.is-active #menu-backdrop {
  opacity: 1;
}

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

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

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #92400e, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive image container */
.img-container img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* FAQ accordion styles */
.faq-item {
  border-bottom: 1px solid #e7e5e4;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  cursor: pointer;
  user-select: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.faq-answer.is-open {
  max-height: 500px;
}

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

.faq-question.is-active .faq-icon {
  transform: rotate(180deg);
}

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

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Registration success animation */
#reg-success {
  animation: fadeScale 0.5s ease-out;
}

@keyframes fadeScale {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

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

  a {
    text-decoration: underline;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    font-weight: 500;
  }

  a {
    text-decoration: underline;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #78716c;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.5rem 1rem;
  background: #292524;
  color: #fff;
  z-index: 9999;
  font-size: 0.875rem;
}

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