/* IMI Building Contractors - small additions to Tailwind */

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

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

/* Blueprint grid used behind the hero */
.bg-blueprint {
  background-image:
    linear-gradient(rgba(245, 243, 239, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 243, 239, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Native dialogs used for the legal notices */
dialog.legal {
  width: min(42rem, calc(100% - 2rem));
  max-height: calc(100% - 3rem);
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: #1A1D21;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(26, 29, 33, 0.35);
}
dialog.legal::backdrop {
  background: rgba(26, 29, 33, 0.7);
}
dialog.legal h3 {
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: #1F3A5F;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}
dialog.legal p,
dialog.legal li { line-height: 1.65; }
dialog.legal ul { list-style: disc; padding-left: 1.25rem; }
dialog.legal a { color: #1F3A5F; text-decoration: underline; text-underline-offset: 2px; }

body.dialog-open { overflow: hidden; }

@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;
  }
}
