/* Aila Biotech - small additions to Tailwind */

section[id] {
  scroll-margin-top: 5rem;
}

:focus-visible {
  outline: 3px solid #2BA59A;
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #0F1B2D;
  color: #ffffff;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Legal dialogs */
dialog.legal-dialog {
  width: min(100% - 2rem, 46rem);
  max-height: 86vh;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: #0F1B2D;
  box-shadow: 0 25px 60px rgba(15, 27, 45, 0.35);
}

dialog.legal-dialog::backdrop {
  background: rgba(15, 27, 45, 0.65);
}

.legal-content h3 {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: #1F3A5F;
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #334155;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.4rem;
}

.legal-content a {
  color: #1F3A5F;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Form error state */
[aria-invalid="true"] {
  border-color: #B42318 !important;
  box-shadow: 0 0 0 1px #B42318;
}

/* Gentle motion for the hero illustration */
.float {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .float {
    animation: aila-float 8s ease-in-out infinite;
  }

  .float-slow {
    animation-duration: 11s;
    animation-delay: -4s;
  }

  .pulse-soft {
    animation: aila-pulse 6s ease-in-out infinite;
  }
}

@keyframes aila-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes aila-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
