:root {
  --z-background: -1;
  --z-decoration: 0;
  --z-media: 5;
  --z-content: 10;
  --z-header: 100;
  --z-mobile-menu: 300;
  --z-modal: 600;
  --z-loader: 900;
  --z-cursor: 1000;
  --z-skip-link: 1100;
}

body {
  isolation: isolate;
}

main,
.site-footer {
  position: relative;
  z-index: var(--z-content);
}

.site-header {
  z-index: var(--z-header);
}

.skip-link {
  z-index: var(--z-skip-link);
}

.editor-mark {
  z-index: var(--z-decoration);
}

.editor-note h2,
.editor-note > p,
.editor-signoff,
.about-portrait,
.about-mark {
  z-index: var(--z-media);
}

main > section:not(.hero),
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

.page-loader {
  display: none;
}

.js .page-loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--forest);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 460ms cubic-bezier(0.22, 1, 0.36, 1), visibility 460ms ease;
  animation: loader-failsafe 10ms 3s forwards;
}

.js.page-ready .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader[hidden] {
  display: none;
}

.page-loader-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--red);
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  animation: loader-mark 900ms cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.js .hero-copy > *,
.js .hero-grid > aside {
  transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js:not(.page-ready) .hero-copy > * {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}

.js:not(.page-ready) .hero-grid > aside {
  opacity: 0;
  transform: translate3d(0, 22px, 0) scale(0.985);
}

.js.page-ready .hero-copy > *,
.js.page-ready .hero-grid > aside {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-copy > :nth-child(1) { transition-delay: 80ms; }
.hero-copy > :nth-child(2) { transition-delay: 150ms; }
.hero-copy > :nth-child(3) { transition-delay: 220ms; }
.hero-copy > :nth-child(4) { transition-delay: 290ms; }
.hero-copy > :nth-child(5) { transition-delay: 360ms; }
.hero-grid > aside { transition-delay: 250ms; }

.motion-reveal,
.motion-card {
  --reveal-y: 0px;
  --card-lift: 0px;
  --parallax-y: 0px;
  --motion-scale: 1;
  transform: translate3d(0, calc(var(--reveal-y) + var(--card-lift) + var(--parallax-y)), 0) scale(var(--motion-scale));
  backface-visibility: hidden;
}

.motion-enabled .motion-reveal {
  --reveal-y: 28px;
  opacity: 0;
  transition: opacity 680ms cubic-bezier(0.22, 1, 0.36, 1), transform 680ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 360ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-enabled .motion-reveal.is-visible {
  --reveal-y: 0px;
  opacity: 1;
}

.motion-portrait {
  transform-origin: center center;
}

.motion-enabled .motion-portrait {
  --motion-scale: 0.985;
}

.motion-enabled .motion-portrait.is-visible {
  --motion-scale: 1.018;
}

.motion-counter {
  font-variant-numeric: tabular-nums;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0) translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, opacity 180ms ease;
  will-change: transform;
}

.custom-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor.is-active {
  width: 48px;
  height: 48px;
  border-color: var(--red);
}

@media (hover: hover) and (pointer: fine) {
  .motion-cursor-enabled,
  .motion-cursor-enabled a,
  .motion-cursor-enabled button {
    cursor: none;
  }

  .motion-enabled .motion-card:hover,
  .motion-enabled a.motion-card:focus-visible {
    --card-lift: -6px;
    box-shadow: 0 18px 38px rgba(22, 33, 31, 0.1);
  }

  .motion-enabled .motion-portrait.is-visible:hover {
    --motion-scale: 1.028;
  }
}

@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }

  .motion-enabled .motion-reveal {
    --reveal-y: 16px;
    transition-duration: 480ms;
  }

  .motion-enabled .motion-reveal.is-visible {
    --reveal-y: 0px;
  }

  .motion-parallax {
    --parallax-y: 0px !important;
  }

  .main-nav {
    z-index: var(--z-mobile-menu);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .page-loader,
  .custom-cursor {
    display: none !important;
  }

  .hero-copy > *,
  .hero-grid > aside,
  .motion-reveal,
  .motion-card,
  .motion-portrait,
  .motion-parallax {
    opacity: 1 !important;
    transform: none !important;
  }
}

@keyframes loader-mark {
  from { transform: scale(0.94); }
  to { transform: scale(1.04); }
}

@keyframes loader-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
