/* Apply box-sizing rule to all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles and margin for normal lists and lists with role attribute */
ul,
ol,
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Basic body settings */
body {
  min-height: 100vh;
  line-height: 1.5;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Make images easier to handle */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Ensure font inheritance for form elements */
input,
button,
textarea,
select {
  font: inherit;
  background-color: transparent;
  border: none;
  padding: 0;
}

/* Set cursor for clickable elements only */
button,
select,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

/* Improve text wrapping for headings and paragraphs */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  overflow-wrap: break-word;
}

/* Enable smooth scrolling by default */
html {
  scroll-behavior: smooth;
}

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

/* Remove animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
