/* Public navbar polish */
.nav-link-fade {
  transition: color 160ms ease, transform 160ms ease;
}

/* Premium blob animation for hero backgrounds */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
  animation: blob 8s ease-in-out infinite;
}
.animation-delay-2000 {
  animation-delay: 2s;
}
.animation-delay-4000 {
  animation-delay: 4s;
}

/* Smooth entrance keyframes for scroll reveal */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up-delayed {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Mobile-first: prevent iOS zoom on inputs */
@media screen and (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Touch-friendly: minimum 48px tap targets for buttons and links on mobile */
@media screen and (max-width: 640px) {
  button:not(.no-touch), [role="button"], a.btn, a[href]:not(.no-touch) {
    min-height: 44px;
  }
}

/* Safe area for bottom navigation */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe { padding-bottom: env(safe-area-inset-bottom); }
}

/* Dropdown menu animation */
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-menu {
  animation: dropdown-in 120ms ease-out;
  transform-origin: top right;
}

/* Toast animations */
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%) translateY(-50%); }
  to   { opacity: 1; transform: translateX(0) translateY(-50%); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) translateY(-50%); }
  to   { opacity: 0; transform: translateX(100%) translateY(-50%); }
}
.toast-in {
  animation: toast-in 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast-out {
  animation: toast-out 200ms ease-in forwards;
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 600ms linear infinite;
}

/* Mobile: hide table columns on small screens */
@media (max-width: 639px) {
  .acc-table th:nth-child(4),
  .acc-table td:nth-child(4),
  .acc-table th:nth-child(5),
  .acc-table td:nth-child(5) {
    display: none;
  }
}

/* Homepage: disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate-hero],
  [data-animate-scroll] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Shared form field styling */
.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(55 65 81);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgb(209 213 219);
  background: rgb(255 255 255);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: rgb(17 24 39);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.form-textarea {
  min-height: 5.5rem;
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
  color: rgb(156 163 175);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 2px rgb(99 102 241 / 0.12);
}

.form-input[aria-invalid="true"],
.form-select[aria-invalid="true"],
.form-textarea[aria-invalid="true"],
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: rgb(252 165 165);
  background: rgb(254 242 242);
}

.form-input[aria-invalid="true"]:focus,
.form-select[aria-invalid="true"]:focus,
.form-textarea[aria-invalid="true"]:focus,
.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
  border-color: rgb(239 68 68);
  box-shadow: 0 0 0 2px rgb(239 68 68 / 0.12);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  cursor: not-allowed;
  background: rgb(249 250 251);
  color: rgb(107 114 128);
}

.form-help-text,
.form-error-text {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
}

.form-help-text {
  color: rgb(156 163 175);
}

.form-error-text {
  color: rgb(220 38 38);
}
