/*
  Loaded after scrollcraft.css, on the home page only.

  The engine's stylesheet ships page-wide resets (body type, img/svg display, form
  fonts). Those are right for a standalone scroll-craft page and wrong here: the shared
  navigation, footer and site components must look exactly as they do on every other
  page. These rules put the site's own baseline back. The engine itself is untouched.
*/
body {
  background: var(--color-background);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  letter-spacing: normal;
  text-rendering: auto;
}

img,
video,
canvas,
svg {
  display: revert;
  max-width: revert;
}

button,
input,
select,
textarea {
  font: revert;
  font-size: 100%;
  color: revert;
}

button,
input {
  line-height: normal;
}

/* Tokens the engine reads at the root (the selection colour, the scrollbar) */
:root {
  --sc-canvas: rgb(254, 254, 254);
  --sc-ink: rgb(41, 27, 20);
  --sc-accent: rgb(138, 90, 68);
  --sc-accent-ink: rgb(254, 254, 254);
}

/* Sections come into focus as you scroll: they start blurred and see-through,
   then sharpen and fill in. The engine adds .sc-in once a block enters view */
[data-sc-in],
[data-sc-stagger] > * {
  filter: blur(8px);
  transition:
    opacity 900ms var(--sc-ease-out),
    transform 900ms var(--sc-ease-out),
    filter 900ms var(--sc-ease-out);
}

[data-sc-in].sc-in,
[data-sc-stagger] > .sc-in {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-sc-in],
  [data-sc-stagger] > * {
    filter: none;
  }
}

/* Computers show the home page straight away; the reveal is for phones only */
@media only screen and (min-width: 992px) {
  [data-sc-in],
  [data-sc-stagger] > * {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
