/* Authentication Pages - Unified Design System */

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

/* Custom input autofill styling - matches stone palette */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #F5F5F4 inset;
  -webkit-text-fill-color: #1C1917;
  transition: background-color 5000s ease-in-out 0s;
}

/* Input field animations - blue focus ring */
input:focus {
  animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }
}

/* Button hover lift animation */
button[type="submit"],
a.button {
  transform-origin: center;
  will-change: transform;
}

/* Decorative background blur refinement */
.blur-3xl {
  filter: blur(120px);
}

/* Form validation states */
input:invalid:not(:placeholder-shown) {
  border-color: #DC2626;
}

input:valid:not(:placeholder-shown) {
  border-color: #059669;
}

/* Selection color - brand blue */
::selection {
  background-color: #2563EB;
  color: white;
}

::-moz-selection {
  background-color: #2563EB;
  color: white;
}

/* Loading state for submit button */
button[type="submit"][disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* Focus visible for accessibility - blue ring */
*:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography refinements */
body {
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings optical sizing */
h1, h2, h3 {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* Improve readability on smaller screens */
@media (max-width: 640px) {
  body {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Custom scrollbar for webkit browsers - stone palette */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #78716C;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2563EB;
}

/* Reduced motion for accessibility */
@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;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .no-print,
  footer {
    display: none !important;
  }
}
