@layer base {
  html,
  body {
    margin: 0;
    padding: 0;
  }

  body {
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  main > :first-child {
    margin-top: 0 !important;
  }

  main > :last-child {
    margin-bottom: 0 !important;
  }
}

/* Subtle custom scrollbar (accessible, not hidden) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #bdc8d1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00658d;
}

/* Registration mark subtle grid pattern for hero accent */
.bg-print-grid {
  background-image: radial-gradient(rgba(0, 101, 141, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Highlight pulse when jumping from calculator to order form */
@keyframes pulseHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.45);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 0 12px rgba(0, 174, 239, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 174, 239, 0);
  }
}

.highlight-animate {
  animation: pulseHighlight 0.85s ease-in-out;
}

/* Smooth modal entrance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-panel-animate {
  animation: modalFadeIn 0.22s ease-out forwards;
}

/* Active nav underline indicator */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #00aeef;
  border-radius: 9999px;
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link.is-active {
  color: #00658d;
}

/* Print-only commercial quote styling */
@media print {
  body > *:not(#print-quote-sheet) {
    display: none !important;
  }

  #print-quote-sheet {
    display: block !important;
    position: static !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #131c29 !important;
    box-shadow: none !important;
  }
}
