/* Main CSS - Financial Psychology 2026 */

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

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

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

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

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.5rem 1rem;
  background: #b45309;
  color: white;
  z-index: 200;
  transition: top 0.2s ease;
}

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

/* Custom selection color */
::selection {
  background: #fde68a;
  color: #292524;
}

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

img[src=""] {
  background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 50%, #d6d3d1 100%);
  min-height: 200px;
}

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

input::placeholder,
textarea::placeholder {
  color: #a8a29e;
}

/* Button press effect */
button:active {
  transform: scale(0.98);
}

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

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

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

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

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

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

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

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

/* Subtle link underline animation */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #b45309;
  transition: width 0.3s ease;
}

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

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

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu animation */
#mobile-menu.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Registration form success/error states */
#form-success,
#form-error {
  animation: fadeIn 0.3s ease;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  h1 {
    word-break: break-word;
    hyphens: auto;
  }
}

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

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

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

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}

/* 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;
  }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  .border-stone-200 {
    border-color: #78716c;
  }

  .text-stone-500 {
    color: #57534e;
  }
}
