.home-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  color: #fff;
  font-family: Inter, sans-serif;
}

.home-nav::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: #000;
  border-bottom: 1px solid rgb(255 255 255 / .1);
  transform: translateY(-100%);
  transition: transform .3s ease-out;
}

.home-nav.is-scrolled::before { transform: none; }
.home-nav__brand, .home-nav__toggle { z-index: 1; }
.home-nav__brand img, .app-link img, .app-link picture { display: block; }
.home-nav__brand img { width: 70px; height: 32px; }
.home-nav__toggle, .home-nav__home { display: none; }

.home-nav__items {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 500;
}

.home-nav a, .home-hero a { text-decoration: none; }
.home-nav__items > a { color: inherit; transition: opacity .3s ease-out; }
.home-nav__items > a:hover, .app-link:hover { opacity: .8; }
.home-nav a:focus-visible, .home-nav button:focus-visible, .home-hero a:focus-visible {
  outline: 2px solid #01bf96;
  outline-offset: 5px;
}

.app-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 16px;
  padding: 4px 4px 4px 24px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #01bf96;
  background: #fff;
  color: #333;
  font: 700 16px/1 Inter, sans-serif;
  transition: opacity .3s ease-out;
}

.home-nav__items .app-link--nav {
  margin-left: 20px;
  gap: 8px;
  padding-left: 12px;
  box-shadow: none;
  color: #222;
  font-size: 14px;
  font-weight: 500;
}
.app-link--nav img { width: 32px; height: 32px; }

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: max(652px, 100vh);
  overflow: hidden;
  background: #000;
  color: #fff;
}

.home-hero__video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: calc(100% - 2px);
  object-fit: cover;
}

.home-hero__content {
  position: absolute;
  right: 48px;
  bottom: 116px;
  left: 48px;
  display: grid;
  justify-items: start;
  gap: 32px;
  max-width: 766px;
  animation: home-content-in .6s .3s both;
}

.home-hero__text {
  display: grid;
  gap: 16px;
  filter: drop-shadow(0 0 12px rgb(0 0 0 / .75));
}

.home-hero h1 {
  margin: 0;
  color: inherit;
  font: 700 64px/normal Mermaid, Georgia, serif;
  letter-spacing: 0;
}

.home-hero p { margin: 0; color: inherit; font: 400 16px/1.5 Inter, sans-serif; }

.home-story {
  position: relative;
  isolation: isolate;
  min-height: 1788px;
  background: #000;
  color: #000;
}

.home-story__photos {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-story__photos img {
  position: absolute;
  max-width: none;
  object-fit: cover;
  transition: translate .6s ease-out;
  translate: calc(var(--pointer-x, 0) * var(--drift, 10px)) calc(var(--pointer-y, 0) * var(--drift, 10px));
}

.home-story__photos img:nth-child(1) { right: -40px; top: 881px; --duration: 10s; --drift: 18px; }
.home-story__photos img:nth-child(2) { left: calc(50% - 386px); top: 692px; --duration: 7s; --drift: 16px; }
.home-story__photos img:nth-child(3) { left: 58px; top: 215px; --duration: 10s; --drift: -10px; }
.home-story__photos img:nth-child(4) { left: -75px; top: 482px; --duration: 6s; --drift: 6px; }
.home-story__photos img:nth-child(5) { right: 28px; bottom: 101px; --duration: 8s; --drift: -14px; }
.home-story__photos img:nth-child(6) { left: -9px; bottom: 239px; --duration: 10s; }
.home-story__photos img:nth-child(7) { right: -69px; top: 346px; --duration: 10s; }
.home-story__photos img:nth-child(8) { right: 92px; top: 0; --duration: 7s; }

.home-story__cards {
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 172px;
}

.home-story__card {
  display: grid;
  place-content: center;
  width: min(100%, 470px);
  min-height: 172px;
  padding: 96px 32px;
  margin: 0;
  box-shadow: 0 0 40px rgb(0 0 0 / .25);
  backdrop-filter: blur(16px);
  background: rgb(255 255 255 / .95);
  color: #000;
  text-align: center;
  font: 700 32px/1.5 Mermaid, Georgia, serif;
}

.home-story__card:nth-child(2) { align-self: end; margin-right: 56px; }
.home-story__card:nth-child(3) { align-self: start; margin-left: 136px; }
.home-story__conclusion { width: min(100%, 696px); gap: 16px; font-size: 40px; line-height: normal; }
.home-story__conclusion span:last-child { font-size: 32px; }

.home-story.has-motion .home-story__card { opacity: 0; transition: opacity .6s ease-out; }
.home-story.has-motion .home-story__card.is-visible { opacity: 1; }
.home-story.has-motion img { transform: translateY(150px); }
.home-story.has-motion img.is-visible { animation: home-photo-in var(--duration, 7s) cubic-bezier(.215,.61,.355,1) both; }

@keyframes home-photo-in {
  from { transform: translateY(150px); }
  to { transform: translateY(0); }
}
@keyframes home-content-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (width < 1280px) {
  .home-nav { min-height: 73px; }
  .home-nav__brand img { width: 88.568px; height: 41px; }
  .home-nav__toggle {
    position: absolute;
    top: 17px;
    right: 16px;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .home-nav__toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
    transition: transform .3s ease;
  }
  .home-nav__toggle[aria-expanded=true] span:first-child { transform: translateY(4px) rotate(45deg); }
  .home-nav__toggle[aria-expanded=true] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .home-nav__panel { display: none; }
  .home-nav.menu-open .home-nav__panel {
    position: fixed;
    inset: 0;
    display: flex;
    overflow-y: auto;
    padding: 214px 16px;
    align-items: flex-start;
    justify-content: center;
    background: rgb(0 0 0 / .8);
    backdrop-filter: blur(4px);
  }
  .home-nav.menu-open::before { transform: translateY(-100%); }
  .home-nav__home { display: inline; }
  .home-nav__items {
    align-items: flex-start;
    flex-direction: column;
    gap: 64px;
    font: 700 clamp(36px, 12.8vw, 48px)/1 Mermaid, Georgia, serif;
  }
  .home-nav__items > a { animation: menu-item-in .6s both; }
  .home-nav__items > a:nth-child(2) { animation-delay: .2s; }
  .home-nav__items > a:nth-child(n + 3):not(.app-link--nav) { animation-delay: .4s; }
  .home-nav__items .app-link--nav {
    margin: 0;
    padding-left: 24px;
    gap: 16px;
    box-shadow: 0 0 0 2px #01bf96;
    animation: none;
  }
  .app-link--nav img { width: 40px; height: 40px; }
  .home-hero { min-height: max(720px, 100vh); }
  .home-hero__video { height: 100%; }
  .home-hero__content { left: 32px; right: 32px; }
  .home-story__card:nth-child(3) { margin-left: 70px; }
  @keyframes menu-item-in {
    from { opacity: 0; transform: translateY(-150px); }
    to { opacity: 1; transform: none; }
  }
}

@media (width < 800px) {
  .home-nav { min-height: 64px; padding: 16px 24px; }
  .home-nav__brand img { width: 70px; height: 32px; }
  .home-nav__toggle { top: 12px; }
  .home-hero__content { left: 16px; right: 16px; }
  .home-hero h1 { font-size: 32px; }
  .home-hero p { font-size: 14px; }
  .home-story__photos img { width: 375px; height: 250px; }
  .home-story__photos img:nth-child(2) { left: calc(50% - 361px); }
  .home-story__photos img:nth-child(5) { left: -58px; right: auto; bottom: 59px; width: 100%; }
  .home-story__photos img:nth-child(6) { left: 58px; bottom: 336px; width: 100%; }
  .home-story__card { padding: 32px 24px; font-size: 24px; }
  .home-story__card:nth-child(2), .home-story__card:nth-child(3) { align-self: center; margin: 0; }
  .home-story__conclusion { font-size: 32px; line-height: 1.5; }
  .home-story__conclusion span:last-child { font-size: 24px; line-height: normal; }
}

/* Leave room for the sixth landing-page menu item on shorter phones. */
@media (width < 1280px) and (760px <= height < 844px) {
  .home-nav--landing.menu-open .home-nav__panel {
    padding-top: calc(214px - (844px - 100dvh));
  }
}

@media (width < 1280px) and (height < 760px) {
  .home-nav.menu-open .home-nav__panel { padding: 88px 16px 36px; }
  .home-nav__items { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-nav *, .home-nav::before, .home-hero *, .home-story * {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .home-story.has-motion .home-story__card { opacity: 1; }
  .home-story.has-motion img { transform: none; translate: none; }
}

html.home-menu-open { overflow: hidden; }
#highlights { scroll-margin-top: 80px; }
@media (width < 1280px) {
  #highlights { scroll-margin-top: 64px; }
}
