/* Scroll film hero. Every rule stays under #hero so the rest of the page is untouched. */

#hero {
  scroll-margin-top: 0;
  color: #f5eee7;
  font-family: "Inter Tight", "Segoe UI", sans-serif;
  font-weight: 400;
}

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

#hero .track {
  height: 900vh;
}

#hero .stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #0b0c0e;
}

#hero .stage,
#hero .stage *,
#hero .stage *::before,
#hero .stage *::after {
  box-sizing: border-box;
}

#hero .plank,
#hero .film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

#hero .plank {
  z-index: 1;
}

#hero .film {
  z-index: 2;
  opacity: 0;
  background: #0b0c0e;
  transform-origin: center center;
}

#hero .scrim {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: 0;
  height: 16vh;
  background: linear-gradient(to bottom, rgba(11, 12, 14, 0.72), rgba(11, 12, 14, 0));
  opacity: 0;
  pointer-events: none;
}

#hero .rail {
  position: absolute;
  z-index: 6;
  left: 2.21%;
  top: 14%;
  bottom: 16%;
  width: 1px;
  pointer-events: none;
}

#hero .rail span {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  background: #bc8f59;
  transform: scaleY(0);
  transform-origin: top center;
}

#hero .copy {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

#hero .copy a,
#hero .copy h1,
#hero .copy p {
  pointer-events: auto;
}

#hero h1 {
  position: absolute;
  left: 6.77%;
  top: 23.78%;
  margin: 0;
  font-family: "Inter Tight", "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 4.55vw;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

#hero h1 span {
  display: block;
}

#hero .eyebrow {
  position: absolute;
  left: 7.03%;
  top: 41.7%;
  margin: 0;
  font-size: 1.28vw;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

#hero .body {
  position: absolute;
  left: 7.03%;
  top: 45.35%;
  margin: 0;
  font-size: 1.05vw;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

#hero .actions {
  position: absolute;
  left: 6.95%;
  top: 52.22%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.22vw;
}

#hero .gold,
#hero .ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.2vw;
  font-size: 0.95vw;
  font-weight: 500;
  letter-spacing: -0.01em;
}

#hero .gold {
  width: 10.47vw;
  height: 4.77vh;
  background: #bc8f59;
  color: #181a1b;
}

#hero .ghost {
  width: 9.27vw;
  height: 4.36vh;
  background: transparent;
  color: #f5eee7;
  border: 1px solid rgba(245, 238, 231, 0.85);
}

#hero .chapters {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

#hero .chapter {
  position: absolute;
  left: 6.77%;
  max-width: 26%;
  margin: 0;
  opacity: 0;
  color: #f5eee7;
  font-size: 1.85vw;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

#hero .chapter.make {
  top: 18%;
}

#hero .chapter.match {
  top: 50%;
  max-width: 22%;
  transform: translateY(-50%);
}

#hero .chapter.install {
  top: 68%;
  max-width: 28%;
}

#hero .chapter .gold {
  margin-top: 1.35vw;
  pointer-events: none;
}

#hero .chapter span {
  display: block;
  margin-bottom: 0.85vw;
  font-size: 0.68vw;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #bc8f59;
}

#hero .chapter span::after {
  content: "";
  display: block;
  width: 1.6vw;
  height: 1px;
  margin-top: 0.7vw;
  background: #bc8f59;
}

#hero .chapter small {
  display: block;
  max-width: 28em;
  margin-top: 0.75vw;
  font-size: 0.92vw;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  color: rgba(245, 238, 231, 0.78);
}

#hero .scroll {
  position: absolute;
  z-index: 4;
  left: 2.21%;
  top: 90.46%;
  margin: 0;
  font-size: 0.52vw;
  font-weight: 500;
  letter-spacing: 0.36em;
  line-height: 1;
}

#hero .scroll span {
  position: absolute;
  left: 0.42vw;
  top: 1.55vw;
  width: 1px;
  height: 2.3vh;
  background: #f5eee7;
  transform-origin: top center;
}

@media (max-width: 800px) {
  #hero .stage {
    height: 100svh;
  }

  #hero .plank,
  #hero .film {
    object-fit: cover;
    object-position: center center;
  }

  #hero .stage::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, rgba(11, 12, 14, 0.84) 0%, rgba(11, 12, 14, 0.62) 46%, rgba(11, 12, 14, 0.16) 72%, transparent 88%);
  }

  #hero h1,
  #hero .eyebrow,
  #hero .body,
  #hero .chapter,
  #hero .chapter small {
    color: #f7f1ea;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  }

  #hero h1 {
    left: 24px;
    right: 24px;
    top: 112px;
    font-size: clamp(26px, 7.8vw, 32px);
    line-height: 1.02;
    max-width: none;
  }

  #hero .eyebrow {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: calc(228px + env(safe-area-inset-bottom));
    max-width: 22em;
    font-size: 13px;
    letter-spacing: 0.04em;
    white-space: normal;
  }

  #hero .body {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: calc(152px + env(safe-area-inset-bottom));
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.4;
  }

  #hero .actions {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: auto;
    gap: 10px;
    flex-wrap: wrap;
  }

  #hero .gold,
  #hero .ghost {
    flex: 1 1 148px;
    width: auto;
    height: 48px;
    padding: 0 16px;
    border-radius: 2px;
    font-size: 15px;
  }

  #hero .chapter,
  #hero .chapter.make,
  #hero .chapter.match,
  #hero .chapter.install {
    left: 24px;
    right: 24px;
    max-width: none;
    width: auto;
    font-size: clamp(28px, 7.4vw, 36px);
    line-height: 1.08;
  }

  #hero .chapter.make { top: 112px; }
  #hero .chapter.match { top: 42%; }
  #hero .chapter.install {
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }

  #hero .chapter span {
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: #f0d7b0;
  }

  #hero .chapter span::after {
    width: 28px;
    margin-top: 8px;
  }

  #hero .chapter small {
    max-width: 34ch;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
  }

  #hero .chapter .gold {
    width: auto;
    margin-top: 16px;
  }

  #hero .scroll { display: none; }
  #hero .rail { left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #hero .track {
    height: auto;
  }

  #hero .stage {
    position: relative;
    height: 100svh;
  }

  #hero .film,
  #hero .chapters,
  #hero .scrim,
  #hero .rail,
  #hero .scroll {
    display: none;
  }
}
