/* Core Layout & Overflow Prevention */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 5rem;
  scroll-padding-bottom: 7rem;
}

body {
  overflow-x: hidden;
  width: 100%;
}

/* Accessible hidden skip link */
.skip-link {
  position: absolute;
  top: -999px;
  right: 1rem;
  left: auto;
  padding: 0.75rem 1.5rem;
  background: #34523e;
  color: #ffffff;
  z-index: 9999;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #b09462;
  outline-offset: 2px;
}

/* High contrast focus outline */
:focus-visible {
  outline: 2px solid #34523e;
  outline-offset: 2px;
}

/* Modal Backdrop & Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: #ffffff;
  max-width: 48rem;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile-only spacer for cookie banner with matching footer background */
@media (max-width: 767px) {
  body:has(#cookie-banner:not(.hidden)) {
    padding-bottom: 125px;
    background-color: #1b2c21;
  }
}
