/* Homepage opening: the tour, a prompt inside the fluid field, then the headline on scroll. */
/* Scroll lengths in vh, read by stage.js: one viewport, the tour, then the prompt and headline. */
.stage.hero {
  --tour-vh: 0;
  --after-vh: 100;
  min-height: calc((100 + var(--tour-vh) + var(--after-vh)) * 1vh);
  display: block;
  padding-top: 0;
  overflow: visible;
  background: #000;
}
.stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(37, 99, 235, .2), transparent 70%),
    radial-gradient(ellipse 45% 40% at 72% 70%, rgba(124, 58, 237, .14), transparent 70%),
    #000;
}
.stage__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage .hero__orb { display: none; }
.stage.has-tour {
  --tour-vh: 360;
  --after-vh: 120;
}

.stage .stage__ask {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  margin-top: -2vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stage .stage__title {
  margin: 0 0 34px !important;
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5vw, 4.5rem) !important;
  font-weight: 600;
  line-height: 1.02 !important;
  letter-spacing: -.045em;
  color: #fff;
  text-align: center;
  text-wrap: balance;
}
.stage .stage__title span {
  background: linear-gradient(92deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stage .stage__prompt {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 18px 14px 14px 22px;
  border-radius: 24px;
  background: rgba(8, 11, 24, .58);
  border: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 90px -32px rgba(37, 99, 235, .6), inset 0 1px 0 rgba(255, 255, 255, .07);
  text-align: left;
  transition: border-color .25s, box-shadow .25s;
}
.stage .stage__prompt:focus-within {
  border-color: rgba(147, 197, 253, .5);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .12), 0 30px 90px -28px rgba(37, 99, 235, .72), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.stage .stage__input,
.stage .stage__ghost {
  font-family: var(--f-body);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
}
.stage .stage__input {
  display: block;
  width: 100%;
  min-height: 3.1em;
  max-height: 9.3em;
  margin: 0;
  padding: 0 8px 0 0;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  resize: none;
  overflow-y: auto;
  color: #fff;
  caret-color: #93c5fd;
  text-align: left;
}
.stage .stage__ghost {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  color: rgba(255, 255, 255, .42);
  text-align: left;
  pointer-events: none;
}
.stage .stage__ghost::after {
  content: '';
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.16em;
  background: rgba(147, 197, 253, .9);
  animation: stageBlink 1.05s steps(1) infinite;
}
.stage .stage__prompt:focus-within .stage__ghost::after { display: none; }
.stage .stage__prompt.has-text .stage__ghost { visibility: hidden; }

.stage .stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.stage .stage__note {
  font-family: var(--f-body);
  font-size: .8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .42);
  text-align: left;
}
.stage .stage__send {
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 10px 26px -10px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
  opacity: .5;
  transition: opacity .2s, transform .2s;
}
.stage .stage__prompt.has-text .stage__send { opacity: 1; }
.stage .stage__send:hover { transform: translateY(-1px); }
.stage .stage__send svg { width: 18px; height: 18px; display: block; }
.stage .stage__prompt.is-nudge { animation: stageNudge .42s ease; }

.stage .stage__scroll {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 30px;
  width: max-content;
  margin: 0 auto;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .7);
  font-family: var(--f-display);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
.stage .stage__scroll-label { padding-left: .24em; }
.stage .stage__mouse {
  position: relative;
  width: 26px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  transition: border-color .2s;
}
.stage .stage__wheel {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  animation: stageWheel 1.8s cubic-bezier(.6, 0, .4, 1) infinite;
}
.stage .stage__scroll:hover { color: #fff; }
.stage .stage__scroll:hover .stage__mouse { border-color: #fff; }

.stage__copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  height: 100%;
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
}
.stage .stage__copy {
  padding-top: 112px;
  padding-bottom: 36px;
}
.stage__copy.is-live { pointer-events: auto; }

/* Entrance without the tour: wait for the brand intro to start dissolving before the prompt rises.
   With the tour, its opening title takes this role (tour.css). */
.stage:not(.has-tour) .stage__ask > *,
.stage:not(.has-tour) .stage__scroll > * {
  animation: stageRise 1.1s cubic-bezier(.16, 1, .3, 1) backwards;
}
.stage:not(.has-tour) .stage__ask > .stage__prompt { animation-delay: .14s; }
.stage:not(.has-tour) .stage__scroll > * { animation-name: stageFade; animation-delay: .5s; }
html.git-ent .stage:not(.has-tour) .stage__ask > *,
html.git-ent .stage:not(.has-tour) .stage__scroll > * { animation-play-state: paused; }
html.git-ent:has(> #gitEntrance.git-ent--out) .stage:not(.has-tour) .stage__ask > *,
html.git-ent:has(> #gitEntrance.git-ent--out) .stage:not(.has-tour) .stage__scroll > * { animation-play-state: running; }

#message.stage-carried { animation: stageCarried 2.4s ease; }

@keyframes stageRise { from { opacity: 0; transform: translateY(22px); } }
@keyframes stageFade { from { opacity: 0; } }
@keyframes stageBlink { 50% { opacity: 0; } }
@keyframes stageWheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes stageNudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
@keyframes stageCarried {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); }
  25%, 65% { box-shadow: 0 0 0 4px rgba(96, 165, 250, .35); }
}

@media (max-width: 768px) {
  .stage .stage__copy { padding-top: 92px; padding-bottom: 24px; }
}
@media (max-width: 640px) {
  .stage .stage__ask { margin-top: -4vh; }
  .stage .stage__title {
    margin-bottom: 26px !important;
    font-size: clamp(1.9rem, 9.4vw, 2.6rem) !important;
  }
  .stage .stage__prompt { padding: 16px 12px 12px 18px; border-radius: 22px; }
  .stage .stage__input,
  .stage .stage__ghost { font-size: 1rem; }
  .stage .stage__ghost { top: 16px; left: 18px; right: 18px; }
  .stage .stage__note-more { display: none; }
  .stage .stage__send { width: 40px; height: 40px; border-radius: 12px; }
  .stage .stage__scroll { bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage .stage__ask > *,
  .stage .stage__scroll > *,
  .stage .stage__wheel,
  .stage .stage__ghost::after,
  .stage .stage__prompt.is-nudge,
  #message.stage-carried { animation: none; }
}
