// Reboot partially based on :
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
// ––––––––––––––––––––

*,
*:after,
*:before,
*::after,
*::before {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

::before,
::after {
  text-decoration: inherit;
  vertical-align: inherit;
}

html {
  -webkit-text-size-adjust: none; /*─ Debug font size on iphone when landscape orientation ─*/
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -ms-text-size-adjust: 100%;
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  cursor: default;
  scroll-behavior: smooth;
  tab-size: 4;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeSpeed;
  position: relative;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

nav,
header,
footer,
div,
span,
h1,
h2,
h3,
h4,
h5,
p,
a,
img,
ul,
li,
table,
form,
label,
input,
textarea,
select,
button {
  font-size: 1em;
  font-family: inherit;
}

/* Preventing Text Overflow */
h1,
h2,
h3,
h4,
h5,
p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  //hyphens: auto;
}

a {
  color: inherit;
  text-decoration: none;

  &:hover,
  &:active,
  &:focus {
    text-decoration: none;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-inline-start: 0;
  margin-inline-end: 0;
  margin-block-start: 0;
  margin-block-end: 0;
  padding: 0;
}

img,
video,
picture {
  display: block;
  max-width: 100%;
}

[role='img'],
img,
video {
  width: 100%;
  height: auto;
}

svg {
  display: inline-block;
  max-width: 100%;
  width: 100%;
  height: auto;
}
dl dl,
dl ol,
dl ul,
ol dl,
ul dl,
ol ol,
ol ul,
ul ol,
ul ul {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;

  li ul:not([role='list']),
  li ol:not([role='list']) {
    list-style: initial;
  }

  li ul,
  li ol {
    margin-left: var(--spacing);
  }
}

em {
  font-weight: 300;
}

b,
strong {
  font-weight: 700;
}

small {
  font-size: 0.6em !important;
}

// Prevent `sub` and `sup` elements from affecting the line height in all browsers
sub,
sup {
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}

// Accessibility
// Change the cursor on control elements in all browsers (opinionated)
[aria-controls] {
  cursor: pointer;
}

// Change the cursor on disabled, not-editable, or otherwise inoperable elements in all browsers (opinionated)
[aria-disabled='true'],
[disabled] {
  cursor: not-allowed;
}

// Change the display on visually hidden accessible elements in all browsers (opinionated)
[aria-hidden='false'][hidden] {
  display: initial;
}

[aria-hidden='false'][hidden]:not(:focus) {
  clip: rect(0, 0, 0, 0);
  position: absolute;
}

a,
area,
button,
input,
label,
select,
summary,
textarea,
[tabindex] {
  -ms-touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *:before,
  *:after,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
