
* {
  box-sizing: border-box;
  font-style: normal;
  font-weight: normal;
  text-wrap: balance;
  line-height: var(--lineheight);
  scroll-behavior: smooth;
  scroll-margin: var(--distanceLarge);
}

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

body {
  display: grid;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--fontFamily, system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
  font-size: var(--fontSize, 1rem);
  background: var(--bg);
  color: var(--fg);
  color-scheme: light;
}

body:has(dialog[open]) {
  overflow: hidden;
}

body:has(#darkmode:checked),
body:has(#darkmode:checked) dialog {
  background: var(--blackColor);
  color: var(--whiteColor);
  --bg: var(--blackColor);
  --fg: var(--whiteColor);
}

/*переключатель темной темы*/
/*текстовое*/
h1 {
  font-family: var(--fontFamily);
  font-size: var(--h1Size);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--fontFamily);
  font-size: var(--h2Size);
  font-weight: 800;
  line-height: 1.02;
   letter-spacing: -0.03em;
}

h3 {
  font-family: var(--fontFamily);
  font-size: var(--h3Size);
}

p,
span,
label,
figcaption {
  font-family: var(--fontFamily);
  font-size: inherit;
  
}

a {
  font-family: var(--fontFamily);
  font-size: var(--fontSize);
  text-decoration: none;
  color: inherit;
}

small {
  font-family: var(--fontFamily);
  font-size: 0.5em;
  text-wrap: balance;
  animation: var(--fadeInAnimaion);
}
   
/*изображение*/
img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}