:root {
  --color-cream: #fffef5;
  --color-ink: #0d0d0d;
  --grain-background-opacity: 0.034;
  --grain-overlay-opacity: 0.012;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

html {
  background: var(--color-cream);
}

body {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 228, 152, 0.25) 0%, rgba(255, 228, 152, 0) 42%),
    radial-gradient(circle at 85% 10%, rgba(246, 214, 133, 0.2) 0%, rgba(246, 214, 133, 0) 40%),
    radial-gradient(circle at 50% 80%, rgba(233, 194, 98, 0.16) 0%, rgba(233, 194, 98, 0) 48%),
    linear-gradient(180deg, #fffdf4 0%, #fbf4dd 100%);
  color: var(--color-ink);
  font-family: var(--font-body), sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
}

body::before,
.global-grain-overlay {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -1;
  background-image: url("../images/grain.svg");
  background-position: 0 0;
  background-repeat: repeat;
  background-size: 48px 48px;
  opacity: var(--grain-background-opacity);
  mix-blend-mode: multiply;
  filter: contrast(1.15) brightness(0.98);
}

.global-grain-overlay {
  z-index: 9998;
  background-image: url("../images/grain.svg");
  background-position: 17px 11px;
  background-repeat: repeat;
  background-size: 48px 48px;
  opacity: var(--grain-overlay-opacity);
  mix-blend-mode: soft-light;
  filter: contrast(1.08);
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  list-style-position: inside;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(0, 0, 0, 0.12);
}

@media (max-width: 680px) {
  :root {
    --grain-background-opacity: 0.026;
    --grain-overlay-opacity: 0.009;
  }

  body::before,
  .global-grain-overlay {
    background-size: 38px 38px;
  }
}
