/* Kebbi Electrical Services - small additions to Tailwind */

html {
  scroll-behavior: smooth;
}

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

/* Focus ring that stays visible on light and dark backgrounds */
:focus-visible {
  outline: 3px solid #F5B700;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #0B1620;
  border-radius: 4px;
}

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

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

.circuit-bg {
  background-image:
    radial-gradient(circle at 85% 15%, rgba(245, 183, 0, 0.16), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(245, 183, 0, 0.08), transparent 40%),
    linear-gradient(135deg, #0B1620 0%, #0F2A44 60%, #133556 100%);
}

/* Legal dialogs */
dialog.legal {
  width: min(46rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: #1E293B;
  box-shadow: 0 25px 60px rgba(11, 22, 32, 0.45);
}

dialog.legal::backdrop {
  background: rgba(11, 22, 32, 0.7);
}

dialog.legal h3 {
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: #0F2A44;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

dialog.legal p,
dialog.legal li {
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

dialog.legal ul {
  list-style: disc;
  padding-left: 1.25rem;
}

dialog.legal a {
  color: #0F2A44;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Form error state */
.field-error {
  border-color: #B91C1C !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Programmatic focus targets (skip link, in-page navigation) need no ring */
[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}
