/* Shared type scale and spacing for the three narrative scenes. */
.hero-sticky-stage {
  --hero-gutter: clamp(24px, 5vw, 80px);
  --hero-space: clamp(24px, 3vh, 32px);
}

.hero-content-container {
  top: calc(var(--header-height) + 80px);
  bottom: 128px;
  left: max(var(--hero-gutter), calc((100% - 1360px) / 2));
  width: min(calc(100% - var(--hero-gutter) * 2), 1360px);
}

.hero-phase,
.hero-phase.phase-2,
.hero-phase.phase-3 {
  left: 0;
  right: auto;
  width: min(100%, 680px);
  max-width: none;
  margin: 0;
  text-align: left;
  transform-origin: center left;
}

.hero-phase.phase-2 {
  left: auto;
  right: 0;
}

.hero-phase.phase-3 {
  width: min(100%, 880px);
}

.hero-phase .hero-title,
.hero-phase .hero-phase-title {
  max-width: 22ch;
  margin: 0 0 var(--hero-space);
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 3.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-transform: none;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-phase .highlight-red {
  text-shadow: none;
}

.hero-phase .hero-description,
.hero-phase .hero-phase-desc {
  max-width: 58ch;
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  color: #ded9dd;
  text-wrap: pretty;
}

.hero-scroll-cue {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-top: 40px;
  padding: 4px 0;
  background: transparent;
}

.scroll-cue-text {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #c0b8be;
}

.mouse-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 34px;
  box-shadow: none;
}

.phase-2 .phase-tech-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
  justify-content: start;
}

.phase-tech-pills .tech-pill {
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  border-color: rgba(255, 77, 86, 0.3);
  box-shadow: none;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.phase-3 .hero-cta-group {
  justify-content: flex-start;
  gap: 16px;
  margin: 32px 0;
}

.phase-3 :is(.btn-primary-hero, .btn-secondary-hero) {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
}


.hero-scene-nav {
  right: max(120px, var(--hero-gutter));
  bottom: 32px;
  gap: 8px;
}

@media (max-width: 1024px) {
  .hero-content-container {
    top: calc(var(--header-height) + 72px);
    bottom: 112px;
  }
  .hero-phase.phase-2 { width: min(100%, 620px); }
}

@media (max-width: 768px) {
  .hero-content-container {
    top: calc(var(--header-height) + 64px);
    bottom: 112px;
  }
  .hero-phase,
  .hero-phase.phase-2,
  .hero-phase.phase-3 {
    left: 0;
    right: auto;
    width: 100%;
  }
  .hero-phase .hero-title,
  .hero-phase .hero-phase-title {
    font-size: clamp(1.875rem, 6.7vw, 2.75rem);
    line-height: 1.13;
    letter-spacing: -0.025em;
  }
  .hero-phase .hero-description,
  .hero-phase .hero-phase-desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
  }
  .hero-scroll-cue { margin-top: 24px; gap: 10px; }
  .scroll-cue-text { font-size: 0.6875rem; letter-spacing: 0.06em; }
  .phase-2 .phase-tech-pills { gap: 8px; margin-top: 24px; }
  .phase-tech-pills .tech-pill { padding: 10px; font-size: 0.75rem; }
  .phase-3 .hero-cta-group { gap: 12px; margin: 24px 0; }
  .hero-scene-nav {
    right: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(50%);
  }
}

@media (max-height: 740px) and (min-width: 769px) {
  .hero-sticky-stage { --hero-space: 20px; }
  .hero-content-container { top: calc(var(--header-height) + 64px); bottom: 104px; }
  .hero-phase .hero-title,
  .hero-phase .hero-phase-title { font-size: clamp(2rem, 5.5vh, 2.75rem); }
  .hero-scroll-cue { margin-top: 24px; }
  .phase-2 .phase-tech-pills { margin-top: 24px; }
  .phase-3 .hero-cta-group { margin: 24px 0; }
}

/* Preserve access to every scene's content on short or zoomed viewports. */
@media (max-width: 768px), (max-height: 740px) {
  .hero-phase { max-height: 100%; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-width: thin; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-track.motion-reduced .hero-content-container {
    top: auto;
    bottom: auto;
    height: auto;
  }
  .hero-scroll-track.motion-reduced .hero-phase,
  .hero-scroll-track.motion-reduced .hero-phase.phase-1 {
    left: auto;
    right: auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 32px 0;
    text-align: left;
  }
}
