/* Custom styles for Varentoxia */

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

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

/* Base font size */
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 #1e40af;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

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

#mobile-menu.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}

#mobile-menu .absolute:last-child {
  transition: transform 0.3s ease;
}

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

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

/* Hero pattern overlay */
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

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

/* Sequence planner result animation */
#planner-result {
  animation: slideUp 0.4s ease-out;
}

#planner-result .email-step {
  border-left: 3px solid #1e40af;
  padding-left: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

#planner-result .email-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#planner-result .email-step .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #1e40af;
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  margin-right: 8px;
}

#planner-result .email-step .step-day {
  font-size: 12px;
  color: #ea580c;
  font-weight: 600;
  text-transform: uppercase;
}

#planner-result .email-step h4 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 4px 0;
}

#planner-result .email-step p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

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

/* Stats counter animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Responsive image fallbacks */
img[src=""] {
  background: linear-gradient(135deg, #dbeafe, #fed7aa);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Selection color */
::selection {
  background: #1e40af;
  color: white;
}

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

  body {
    font-size: 12pt;
    color: black;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  .border-gray-100 {
    border-color: #374151;
  }

  .text-gray-600 {
    color: #1f2937;
  }
}