/* 
*   Kevin Powell
*   https://youtu.be/cCAtD_BAHNw 
*/

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

* {
  margin: 0;
  padding: 0;
  font: inherit; /* Get rid of all font sizes and heights */
  touch-action: manipulation;
}

html {
  color-scheme: dark light; /* Default dark */
  hanging-punctuation: first last; /* Not supported in Chrome */
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  touch-action: manipulation;
  overflow-x: hidden;
}

ol,
ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

button {
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
  &:active {
    transform: scale(0.95);
  }
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
  border: none;
  background: none;
  outline: none;
}

/* Media responsive */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

p {
  max-width: 75ch;
  text-wrap: pretty; /* Prevents orphans on lines */
}

@media (prefers-reduced-motion: no-preference) {
  :has(:target) {
    scroll-behavior: smooth;
    scroll-padding-top: 3rem;
  }
}
