.hero {
  position: relative;
  height: 240vh;
}

.hero-stage {
  position: sticky;
  top: var(--header-height);
  height: calc(100svh - var(--header-height));
  overflow: hidden;
}

.hero-frame {
  position: absolute;
  inset: var(--frame-inset, 10px 16px 16px);
  border-radius: var(--frame-radius, 28px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--white);
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgb(0 0 0 / 12%) 0%,
    rgb(0 0 0 / 0%) 35%,
    rgb(0 0 0 / 10%) 50%,
    rgb(0 0 0 / 68%) 100%
  );
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(0 0 0 / calc(var(--frame-dim, 0) * 0.45));
}

.hero-image {
  transform: scale(var(--image-zoom, 1.06));
  animation: settle 2.4s var(--ease-out) both;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 max(56px, env(safe-area-inset-left)) 64px;
  opacity: var(--copy-in, 1);
  transform: translateY(calc((1 - var(--copy-in, 1)) * -28px));
}

.hero-title {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  animation: rise 0.9s 0.2s var(--ease-out) both;
}

.hero-subtitle {
  margin-top: 22px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
  color: rgb(255 255 255 / 86%);
  animation: rise 0.9s 0.4s var(--ease-out) both;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  animation: rise 0.9s 0.6s var(--ease-out) both;
}

.hero-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  font-size: clamp(26px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.hero-caption-line {
  opacity: var(--caption-in, 0);
  transform: translateY(calc((1 - var(--caption-in, 0)) * 24px));
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    scale: 1.1;
  }

  to {
    scale: 1;
  }
}

@media (width <= 960px) {
  .hero-copy {
    padding: 0 22px 40px;
  }

  .hero-actions > * {
    flex: 1;
    min-width: max-content;
  }
}

@media (height <= 520px) {
  .hero-copy {
    padding-bottom: 32px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    margin-top: 12px;
    font-size: 15px;
  }

  .hero-actions {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image,
  .hero-copy,
  .hero-caption-line {
    transform: none;
  }
}

@media (width <= 360px) {
  .hero-title {
    font-size: 34px;
  }
}
