/*
 * FoundContext v4 CSS Reset
 * Modern reset focused on consistency across devices
 */

/* Box sizing reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margins and paddings */
* {
  margin: 0;
  padding: 0;
}

/* HTML and body setup */
html {
  height: 100%;
  font-size: 16px; /* Base font size for rem calculations */
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove list styles */
ul,
ol {
  list-style: none;
}

/* Reset form elements */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

/* Remove button styling */
button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Reset links */
a {
  text-decoration: none;
  color: inherit;
}

/* Reset headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: inherit;
  font-size: inherit;
}

/* Remove default styling from commonly styled elements */
blockquote,
dl,
dd,
figure,
pre {
  margin: 0;
}

/* Reset table styles */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
  text-align: left;
}

/* Media elements */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Accessibility improvements */
/* Screen reader only content */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link styling */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  border-radius: 3px;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Focus management */
:focus {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Reduce motion for users who prefer it */
@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;
  }
}