/* Main Stylesheet - Digital Focus and Cognitive Clarity */

/* 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 #4263eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #4263eb;
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 200;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.2s;
}

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

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

/* Form input styles */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #e03131;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #2f9e44;
}

/* Error message visibility */
.field-error {
  display: block !important;
}

/* Success state animation */
.form-success {
  animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* Gradient text helper */
.gradient-text {
  background: linear-gradient(135deg, #4263eb 0%, #5c7cfa 50%, #748ffc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero background pattern */
.hero-pattern {
  background-image: radial-gradient(circle at 25% 50%, rgba(66, 99, 235, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 75% 25%, rgba(92, 124, 250, 0.05) 0%, transparent 50%);
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Empty image placeholder styling */
img[src=""] {
  background: linear-gradient(135deg, #dbe4ff 0%, #bac8ff 100%);
  display: block;
  min-height: 200px;
}

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

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

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

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

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

  main {
    padding: 0;
  }

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

  a {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Selection styling */
::selection {
  background: #bac8ff;
  color: #212529;
}

/* FAQ accordion styles */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

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

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

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

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

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

/* Mobile menu slide animation */
.menu-slide-in {
  animation: slideInMenu 0.3s ease-out;
}

@keyframes slideInMenu {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}
