/* Hero depth system. Rules are added in small, reviewable passes. */

.hero-scene {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--canvas);
  pointer-events: none;
}

.hero-scene::after {
  position: absolute;
  z-index: 8;
  inset: auto 0 0;
  height: 24%;
  background: linear-gradient(to bottom, transparent, var(--canvas) 88%); /* parallax-fade-allow */
  content: "";
}

.hero-plane,
.hero-plane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-plane img {
  object-fit: cover;
  object-position: 50% 50%;
}

.hero-plane {
  inset: -6%;
  width: auto;
  height: auto;
  will-change: transform;
}

.hero-plane-base {
  z-index: 0;
}

.hero-plane-mid {
  z-index: 1;
}

.hero-plane-front {
  z-index: 3;
}

.hero-routes {
  position: absolute;
  z-index: 2;
  top: 10%;
  right: -2%;
  width: min(68vw, 68rem);
  height: 78%;
  overflow: visible;
}

.hero-routes path {
  stroke: var(--hero-accent);
  stroke-width: 1.35;
  stroke-dasharray: 1;
  vector-effect: non-scaling-stroke;
}

.hero-routes circle {
  fill: var(--hero-accent);
}

.hero-route-note {
  position: absolute;
  z-index: 4;
  color: color-mix(in srgb, var(--hero-accent) 82%, var(--text));
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: clamp(0.55rem, 0.7vw, 0.68rem);
  line-height: 1.35;
  white-space: nowrap;
}

.hero-route-note-repair {
  top: 43%;
  right: 24%;
}

.hero-route-note-renewal {
  top: 58%;
  right: 10%;
}

.hero-route-note-movein {
  top: 25%;
  right: 5%;
}

@keyframes hero-base-drift {
  from { transform: translate3d(0, 0, 0) scale(1.01); }
  to { transform: translate3d(0, -3%, 0) scale(1.01); }
}

@keyframes hero-mid-drift {
  from { transform: translate3d(0, 0, 0) scale(1.025); }
  to { transform: translate3d(0, -8%, 0) scale(1.025); }
}

@keyframes hero-front-drift {
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to { transform: translate3d(0, -14%, 0) scale(1.04); }
}

@keyframes hero-route-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -10%, 0); }
}

@keyframes hero-note-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -4rem, 0); }
}

@keyframes hero-route-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes hero-cue-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

@supports (animation-timeline: scroll()) {
  .hero-plane,
  .hero-routes,
  .hero-route-note {
    animation-duration: 1s;
    animation-fill-mode: both;
    animation-timing-function: linear;
    animation-timeline: scroll(root block);
    animation-range: 0 100svh;
  }

  .hero-plane-base {
    animation-name: hero-base-drift;
  }

  .hero-plane-mid {
    animation-name: hero-mid-drift;
  }

  .hero-plane-front {
    animation-name: hero-front-drift;
  }

  .hero-routes {
    animation-name: hero-route-drift;
  }

  .hero-route-note {
    animation-name: hero-note-drift;
  }

  .hero-routes path {
    animation: hero-route-draw 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 72svh;
  }

  .hero-scroll-cue {
    animation: hero-cue-fade 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 32svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-plane,
  .hero-routes,
  .hero-routes path,
  .hero-route-note,
  .hero-scroll-cue {
    animation: none !important;
    transform: none !important;
  }
}

@media (prefers-reduced-data: reduce) {
  .hero-plane-mid,
  .hero-plane-front,
  .hero-routes,
  .hero-route-note {
    display: none;
  }

  .hero .portrait {
    right: var(--gutter);
    bottom: 2.75rem;
    width: min(10.25rem, 44vw);
  }

  .hero .portrait figcaption {
    color: rgba(255, 255, 255, 0.76);
    text-align: right;
  }

  .hero-scroll-cue {
    display: none;
  }

  .hero .hero-copy > :not(.hero-actions) {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.82);
  }
}

@media (prefers-contrast: more) {
  .hero .hero-copy > p,
  .hero .portrait figcaption,
  .hero-scroll-cue {
    color: #fff;
  }

  .hero .button.primary,
  .hero .button.secondary {
    border-color: #fff;
    background: #000;
  }
}

.hero.wide {
  --hero-accent: #83d9d0;
  position: relative;
  width: 100vw;
  max-width: none;
  min-height: calc(100svh - 4rem);
  margin-inline: calc(50% - 50vw);
  padding: 0;
  display: block;
  overflow: clip;
  isolation: isolate;
}

@supports not (overflow: clip) {
  .hero.wide {
    overflow: hidden;
  }
}

.hero .eyebrow {
  color: var(--hero-accent);
}

.hero .hero-copy {
  position: relative;
  z-index: 10;
  width: var(--page);
  max-width: none;
  min-height: calc(100svh - 4rem);
  margin-inline: auto;
  padding-block: clamp(6rem, 14vh, 9rem) 8rem;
}

.hero .hero-copy > * {
  max-width: min(39rem, 52vw);
}

.hero .hero-copy h1 {
  max-width: 9ch;
  color: var(--heading);
  font-size: clamp(4.5rem, 7.2vw, 6.75rem);
  line-height: 0.92;
}

.hero .hero-copy .hero-lede {
  color: var(--text);
  max-width: 35rem;
  font-size: clamp(1.1rem, 1.7vw, 1.28rem);
  line-height: 1.55;
}

.hero .hero-copy > p:last-of-type {
  color: var(--muted);
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero .button.primary,
.hero .button.secondary {
  color: var(--heading);
  background: rgba(0, 0, 0, 0.48);
  border-color: color-mix(in srgb, var(--hero-accent) 45%, transparent);
}

.hero .portrait {
  position: absolute;
  z-index: 12;
  right: max(1.5rem, calc((100vw - 75rem) / 2));
  bottom: 4.25rem;
  width: 10.5rem;
  margin: 0;
}

.hero .portrait-frame {
  aspect-ratio: 4 / 3;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.72);
  border-color: color-mix(in srgb, var(--hero-accent) 30%, var(--hairline));
}

.hero .portrait figcaption {
  margin-top: 0.5rem;
  color: var(--text);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
}

.hero-scroll-cue {
  position: absolute;
  z-index: 12;
  bottom: 2.2rem;
  left: 50%;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  text-decoration: none;
  transform: translateX(-50%);
}

.hero-scroll-cue > span {
  width: 1px;
  height: 1.35rem;
  background: var(--hero-accent);
  transform-origin: top;
}

@media (hover: hover) and (pointer: fine) {
  .hero .button.primary:hover,
  .hero .button.secondary:hover {
    color: var(--canvas);
    background: var(--hero-accent);
    border-color: var(--hero-accent);
  }
}

@media (max-width: 1100px) {
  .hero-routes {
    right: -12%;
    opacity: 0.58;
  }

  .hero-route-note {
    display: none;
  }
}

@media (max-width: 760px) {
  .hero.wide {
    min-height: 67rem;
  }

  .hero .hero-copy {
    min-height: 67rem;
    padding-block: 7rem 17rem;
  }

  .hero .hero-copy h1 {
    max-width: 8ch;
    font-size: clamp(3.35rem, 15.5vw, 4.2rem);
    line-height: 0.94;
  }

  .hero .hero-copy .hero-lede {
    max-width: 29rem;
    font-size: 1.06rem;
    line-height: 1.52;
  }

  .hero .hero-copy > p:last-of-type {
    color: rgba(255, 255, 255, 0.78);
    max-width: 30rem;
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .hero .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .hero .hero-actions .button {
    min-height: 2.75rem;
    padding-inline: 0.7rem;
    justify-content: center;
    font-size: 0.72rem;
  }

  .hero-plane-base {
    inset: -3%;
    object-position: 63% center;
  }

  .hero-plane-mid {
    inset: -4%;
    object-position: 67% center;
    opacity: 0.82;
  }

  .hero-plane-front {
    inset: -5%;
    object-position: 70% center;
    opacity: 0.58;
  }

  .hero-routes,
  .hero-route-note {
    display: none;
  }
}
