/* Custom styles for ASR INFOPRO */

/* Base styles */
html {
  scroll-behavior: smooth;
}

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

/* Typography */
.prose h2 {
  color: #0f172a;
  font-weight: 700;
}

.prose h3 {
  color: #1e293b;
  font-weight: 600;
}

.prose p {
  line-height: 1.75;
}

.prose a {
  color: #0891b2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #0e7490;
  text-decoration: underline;
}

.prose ul li {
  margin-bottom: 0.5rem;
}

.prose hr {
  border-color: #e2e8f0;
  margin: 3rem 0;
}

/* Grid pattern for hero backgrounds */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Custom focus styles */
input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;
  ring: 2px;
  ring-color: #06b6d4;
}

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

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

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

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #0891b2);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: #0f172a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #06b6d4;
  transform: translateY(-3px);
}

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

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

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

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

/* Selection highlight */
::selection {
  background: #06b6d4;
  color: white;
}

::-moz-selection {
  background: #06b6d4;
  color: white;
}

/* Skip to main content (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  transition: top 0.3s ease;
}

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

/* Loading state for form submission */
button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button[type="submit"].loading {
  position: relative;
  color: transparent;
}

button[type="submit"].loading::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Print styles */
@media print {
  header,
  footer,
  .back-to-top,
  .scroll-indicator {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gray-50 {
    background-color: #ffffff;
    border: 2px solid #000000;
  }

  .text-gray-600 {
    color: #000000;
  }

  .border-gray-100 {
    border-color: #000000;
  }
}

/* Dark mode support (optional - can be enabled later) */
/*
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0f172a;
    color: #e2e8f0;
  }
}
*/
