/* Polish layer — fixes and enhancements across all sites */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Better font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent images from overflowing */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove broken image indicator */
img[src=""], img:not([src]) {
  visibility: hidden;
}

/* Smooth link transitions */
a {
  transition: opacity 0.18s ease, color 0.18s ease;
}

/* Button polish */
.button, button, [class*="-cta"], [class*="-btn"] {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.2s ease;
}

.button:hover, button:hover {
  transform: translateY(-1px);
}

.button:active, button:active {
  transform: translateY(0);
}

/* Card hover polish */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Consistent focus outline */
:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Prevent horizontal scroll */
body, .page-content {
  overflow-x: hidden;
}

/* Image placeholder — while loading */
img:not([src]), img[src=""] {
  background: var(--card, #f3f4f6);
  min-height: 40px;
}

/* Fix occasional collapsed sections with only floated children */
.section::after, .container::after {
  content: "";
  display: table;
  clear: both;
}

/* Slightly soften harsh section transitions */
.section + .section {
  border-top: 1px solid var(--border, transparent);
}
