/* ------------------------- */
/* Reset                     */
/* ------------------------- */

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

body,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

/* Typography */

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  line-height: 1.5;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1rem;
  text-wrap: balance;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-inline-size: 70ch;
}

p,
li,
h1,
h2,
h3,
h4 {
  word-break: break-word;
}

/* Links */

a:not([class]) {
  text-decoration-skip-ink: auto;
  text-decoration-thickness: max(0.08em, 1px);
  text-underline-offset: 0.15em;
  color: currentColor;
}

/* Media elements */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-inline-size: 100%;
}

/* Forms and buttons */

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

textarea:not([rows]) {
  min-height: 10em;
}

/* Lists */

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Scroll adjustments */

:target {
  scroll-margin-block: 5ex;
}

/* Reduced motion for accessibility */

@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;
  }
}
