.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100dvw;
  min-height: 100dvh;
  overflow: hidden;
  background: #000000;
}

.hero__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100dvw;
  height: 100dvh;
  object-fit: cover;
  object-position: 28% center;
  pointer-events: none;
  user-select: none;
  filter: brightness(0.58);
}

.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.hero__stage {
  position: relative;
  z-index: 1;
  width: min(100%, 24.5rem);
  margin-right: clamp(1.25rem, 7vw, 6.5rem);
  padding: clamp(1.5rem, 4vw, 2rem);
}

.hero__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.65rem 1.5rem 1.5rem;
  border-radius: 1.15rem;
  background: #111014;
}

.hero__logo {
  margin-bottom: 1rem;
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--ink);
}

.hero__title {
  font-family: var(--font-logo);
  font-size: clamp(1.75rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--ink);
}

.hero__text {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

.hero__action {
  display: grid;
  margin-top: 0.65rem;
  min-height: 7.5rem;
}

.hero__form,
.hero__done {
  grid-area: 1 / 1;
}

.hero__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.95rem;
  border: none;
  border-radius: 0.75rem;
  background: #1c1a21;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.hero__input::placeholder {
  color: rgba(243, 241, 246, 0.32);
}

.hero__note {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  line-height: 1.4;
  text-align: left;
  color: rgba(243, 241, 246, 0.34);
}

.hero__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 0.75rem;
  background: #f3f1f6;
  color: #111014;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.hero__submit-label {
  transition: opacity 0.2s ease;
}

.hero__submit-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid rgba(17, 16, 20, 0.2);
  border-top-color: #111014;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.hero__submit.is-loading {
  cursor: wait;
  pointer-events: none;
}

.hero__submit.is-loading .hero__submit-label {
  opacity: 0;
}

.hero__submit.is-loading .hero__submit-spin {
  opacity: 1;
  animation: hero-spin 0.7s linear infinite;
}

@keyframes hero-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.hero__done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.45rem) scale(0.98);
  filter: blur(6px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    filter 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.hero__check {
  width: 2rem;
  height: 2rem;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.18s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
}

.hero__done-text {
  font-family: var(--font-logo);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--ink);
}

.hero__card.is-done .hero__form {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.4rem);
  filter: blur(8px);
}

.hero__card.is-done .hero__done {
  opacity: 1;
  transform: none;
  filter: none;
}

.hero__card.is-done .hero__check {
  opacity: 1;
  transform: none;
}

@media (max-width: 720px) {
  .hero {
    align-items: flex-end;
    justify-content: center;
  }

  .hero__stage {
    width: 100%;
    margin: 0;
    padding: 1.1rem 1.1rem 1.5rem;
  }

  .hero__media {
    object-position: 22% center;
    filter: brightness(0.5);
  }

  .hero__veil {
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 55%,
      rgba(0, 0, 0, 0.55) 100%
    );
  }

  .hero__card {
    border-radius: 1rem;
  }
}
